From: Solomon Peachy <solomon@linux-wlan.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] New ARPHRD types
Date: Mon, 21 Oct 2002 18:19:36 -0400 [thread overview]
Message-ID: <20021021221936.GA32390@linux-wlan.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2372 bytes --]
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)
[-- Attachment #1.2: newarp.patch --]
[-- Type: text/plain, Size: 537 bytes --]
--- /usr/src/linux/include/linux/if_arp.h Mon Oct 14 14:16:29 2002
+++ if_arp.h Mon Oct 21 17:47:29 2002
@@ -83,6 +83,8 @@
#define ARPHRD_IEEE802_TR 800 /* Magic type ident for TR */
#define ARPHRD_IEEE80211 801 /* IEEE 802.11 */
#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */
+#define ARPHRD_IEEE80211_FULL 803 /* IEEE 802.11 w/ fixed headerlen */
+#define ARPHRD_IEEE80211_CAPTURE 804 /* IEEE 802.11 w/ new capture header */
#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next reply other threads:[~2002-10-21 22:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-21 22:19 Solomon Peachy [this message]
2002-10-22 23:55 ` David S. Miller
2002-10-23 14:16 ` Solomon Peachy
2002-10-24 4:18 ` David S. Miller
2002-10-24 14:58 ` Solomon Peachy
2002-10-24 15:38 ` Alan Cox
2002-10-24 15:53 ` Solomon Peachy
2002-10-24 17:01 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021021221936.GA32390@linux-wlan.com \
--to=solomon@linux-wlan.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome