[PATCH] PF_PACKET uses cooked packets with the link level header removed for Linux

Zhu Yi yi.zhu at intel.com
Thu Aug 11 10:07:46 UTC 2005


[ I don't know if I send to the right list. If not, please help to
forward. Thanks! ]
Hi,

I'm working on generic 802.11 stack for Linux. One problem I met so far
with dhcp is dhclient stopped working after I use 802.11 header as the
link layer header (as opposed to 802.3 header before).

The root cause is dhclient uses PF_PACKET and SOCK_RAW to capture the
whole link level packet. Since it doesn't understand 802.11 protocol, it
fails to parse. One possible fix is to add the 802.11 header parsing
code into dhcp package. But one problem is the 802.11 header might be
too difficult/impossible to build considering about 802.11e (QoS),
802.11i (encryption), etc. Another way (which is better as I think) is
to use the cooked packets supported (PF_PACKET and SOCK_DGRAM) by Linux.
The kernel will add/remove the link level header after/before it
gets/sends a packet from the userspace. So the user application actually
doesn't need to worry about how to build the underlined hardware header.
It is also known how pump(8) does.

Attached patch add this cooked packet feature support for dhcp-3.0.
Patch is also available from:
http://www.kernel.org/pub/linux/kernel/people/chuyee/patches/dhcp-3.0/dhcp-3.0-linux_cooked_packet.patch

Please let me know what you think.

Thanks,
-yi

Signed-off-by: Zhu Yi <yi.zhu at intel.com>



-- Binary/unsupported file stripped by Ecartis --
-- Type: text/x-patch
-- File: dhcp-3.0-linux_cooked_packet.patch




More information about the dhcp-hackers mailing list