All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] New ARPHRD types
@ 2002-10-21 22:19 Solomon Peachy
  2002-10-22 23:55 ` David S. Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Solomon Peachy @ 2002-10-21 22:19 UTC (permalink / raw)
  To: linux-kernel


[-- 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&ethereal 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 --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-10-24 16:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-21 22:19 [PATCH] New ARPHRD types Solomon Peachy
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.