Attached is a patch for include/linux/if_arp.h, which adds two new
ARPHRD types, ARPHRD_IEEE80211_FULL and ARPHRD_IEEE80211_CAPTURE.
This patch is against 2.4.20-pre8, but it should also go into 2.5.x as
well, assuming I'm not flamed into oblivion..
A bit of explanation. First, _FULL:
IEEE 802.11 has a variable "hardware" header length, 24 bytes for most
frames but 30 bytes for others. This poses a problem if you want to
expose a native 802.11 netdev interface to the OS, as
netdev->hardhdr_len et.al. aren't variable.
But wait, isn't there already ARPHRD_IEEE80211? Yes, but unfortunately,
common usage of this type assumes 24-byte headers. So if we break this
assumption, we break backwards compatibility with existing apps.
Remember this is intended for a native 802.11 netdev, and plenty of
stuff uses PF_PACKET sockets on these interfaces expecting packets to
come and go a certian way. For Rx frames we can play games with the
skb->mac.raw pointer, but this won't do for Tx frames.
Onto the _CAPTURE type.
(See http://www.shaftnet.org/~pizza/software/capturefrm.txt for the
longwinded version including the header format)
"The original header format for 'monitor mode' or capturing frames was
a considerable hack. The document covers a redesign of that format."
That "considerable hack" is ARPHRD_IEEE80211_PRISM, which has since come
to be used by many other drivers in lieu of a better way to do things.
Unfortunately, there is no version field in the old format, so for the
sake of making a clean break we'd like to get a new ARP type defined for
it.
This new header is non-hardware specific and has many more useful
fields, as well as the removal of a lot of cruft. And there's now
version and length fields, so we can expand on this format cleanly in
the future and not bother you guys with new ARPHRD types. :)
...
Nothing in the wild is currently using either of these types, but that
will change RSN.. and I can't push patches to libpcapðereal until the
ARP types are in the kernel and therefore fixed. :)
- Pizza
-- Solomon Peachy solomon@linux-wlan.com AbsoluteValue Systems http://www.linux-wlan.com 715-D North Drive +1 (321) 259-0737 (office) Melbourne, FL 32934 +1 (321) 259-0286 (fax)
This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:56 EST