Re: Capturing Raw packets



My main idea was to control ethernet packets completely. The receiver
on the other side will listen to everything, including the garbage and
will try to make sense of it. So, it would probably understand my own
headers, even if they are ethernet. There's no hub in between, and I
can assume it'll be two directly connected transceivers. I want to find
out how can I take advantage of layer 2 and minimize the overhead to
measure the actual data transfer speeds.

1. To clarify, can I modify the ethernet headers when using a raw
socket? i.e. when I am defining it as socket (PF_PACKET, SOCK_RAW,
htons (ETH_P_ALL)); ?

2. Which option/function exactly gives the control of whether a user or
kernel will fill in the header? I would like to explore both of the
options: full user control, including the optional bytes 13 and 14; and
also the kernel option.

3. Also, when the packet is filled out by a kernel, can I still modify
these optional bytes 13 and 14?




If you want tcpdump to make sense of your packets, you need to prepend
them with protocol headers (i.e. ethernet headers and perhaps IP
headers, if they are IP packets).

.



Relevant Pages

  • Re: ndis minport driver question.
    ... Regular (802.3 Ethernet) miniports only send and receive 802.3 packets, ... Wireless miniports also use 802.3 headers while communicating with upper ...
    (microsoft.public.windowsce.platbuilder)
  • [patch] gsoc project: improving layer2 filtering
    ... This summer I was working on improving layer2 filtering (my mentor is ... +Table entry can contain optional ethernet address. ... further packets matching the rule that would ... +When enabled a special tag containing MAC header is appended to incoming ...
    (freebsd-net)
  • Re: Multiple NICs - custom protocol development
    ... I am building a custom MAC protocol for a wireless system that has different ... I want to use Ethernet as a physical layer. ... So,I want to use one card running server code and one card running client ... I want to be able to send packets from one NIC to the other and maintain ...
    (freebsd-questions)
  • Re: Sniffer Cant see cluster traffic
    ... None of the original Digital designed Ethernet protocols (SCS, LAT, ... protocol specific multicasts. ... IP over Ethernet on the other hand is full of Ethernet broadcasts. ... I got to see many SCS packets that were specifically adressed ...
    (comp.os.vms)
  • Re: Embedded Ethernet, looking for an efficient solution...
    ... > Ethernet into our future board level products. ... A tall task for a newbie... ... Crossover cable or switch ports? ... > ports on-board can actually process packets quick ...
    (comp.arch.embedded)