Re: Capturing Raw packets
- From: "bobrics" <bobrics@xxxxxxxxx>
- Date: 27 Feb 2006 19:20:43 -0800
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).
.
- References:
- Capturing Raw packets
- From: bobrics
- Re: Capturing Raw packets
- From: Robert Harris
- Capturing Raw packets
- Prev by Date: Re: how to access environmental variables from shell in makefile
- Next by Date: Re: run make in another dir?
- Previous by thread: Re: Capturing Raw packets
- Next by thread: system(), PIDs and children
- Index(es):
Relevant Pages
|
|