PERFORCE change 43949 for review
Sam Leffler
sam at FreeBSD.org
Mon Dec 15 11:15:02 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=43949
Change 43949 by sam at sam_ebb on 2003/12/15 11:14:56
add protocol definitions for:
o WPA
o QOS
o Atheros OUI
o misc stuff useful for inclusion in tcpdump et. al.
Affected files ...
.. //depot/projects/netperf/sys/net80211/ieee80211.h#5 edit
Differences ...
==== //depot/projects/netperf/sys/net80211/ieee80211.h#5 (text+ko) ====
@@ -118,6 +118,7 @@
#define IEEE80211_FC0_SUBTYPE_CFACK 0x50
#define IEEE80211_FC0_SUBTYPE_CFPOLL 0x60
#define IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK 0x70
+#define IEEE80211_FC0_SUBTYPE_QOS 0x80
#define IEEE80211_FC1_DIR_MASK 0x03
#define IEEE80211_FC1_DIR_NODS 0x00 /* STA->STA */
@@ -139,6 +140,12 @@
#define IEEE80211_NWID_LEN 32
+#define IEEE80211_QOS_TXOP 0x00ff
+/* bit 8 is reserved */
+#define IEEE80211_QOS_ACKPOLICY 0x0600
+#define IEEE80211_QOS_ESOP 0x0800
+#define IEEE80211_QOS_TID 0xf000
+
/*
* Control frames.
*/
@@ -217,7 +224,8 @@
#define IEEE80211_CAPINFO_CHNL_AGILITY 0x0080
/* bits 8-9 are reserved */
#define IEEE80211_CAPINFO_SHORT_SLOTTIME 0x0400
-/* bits 11-12 are reserved */
+#define IEEE80211_CAPINFO_RSN 0x0800
+/* bit 12 is reserved */
#define IEEE80211_CAPINFO_DSSSOFDM 0x2000
/* bits 14-15 are reserved */
@@ -260,6 +268,25 @@
struct erp {
u_int8_t flags;
} erp;
+ struct country {
+ u_int8_t cc[3]; /* ISO CC+(I)ndoor/(O)utdoor */
+ struct {
+ u_int8_t schan; /* starting channel */
+ u_int8_t nchan; /* number channels */
+ u_int8_t maxtxpwr;
+ } band[4]; /* up to 4 sub bands */
+ } country;
+ struct ath {
+ u_int8_t flags;
+ } ath;
+ struct rsn {
+ u_int16_t version; /* spec revision */
+ u_int32_t mcipher[1]; /* multicast/group key cipher */
+ u_int16_t uciphercnt; /* # pairwise key ciphers */
+ u_int32_t uciphers[8]; /* ciphers */
+ u_int16_t authselcnt; /* authentication selector cnt*/
+ u_int32_t authsels[8]; /* selectors */
+ } rsn __attribute__((__packed__));
};
enum {
@@ -272,8 +299,12 @@
IEEE80211_ELEMID_IBSSPARMS = 6,
IEEE80211_ELEMID_COUNTRY = 7,
IEEE80211_ELEMID_CHALLENGE = 16,
+ /* 17-31 reserved for challenge text extension */
IEEE80211_ELEMID_ERP = 42,
IEEE80211_ELEMID_XRATES = 50,
+ IEEE80211_ELEMID_TPC = 150,
+ IEEE80211_ELEMID_CCKM = 156,
+ IEEE80211_ELEMID_VENDOR = 221, /* vendor private */
};
#define IEEE80211_CHALLENGE_LEN 128
@@ -284,7 +315,31 @@
/* EPR information element flags */
#define IEEE80211_ERP_NON_ERP_PRESENT 0x01
#define IEEE80211_ERP_USE_PROTECTION 0x02
-#define IEEE80211_ERP_BARKER_MODE 0x04
+#define IEEE80211_ERP_LONG_PREAMBLE 0x04
+
+/* Atheros private advanced capabilities info */
+#define ATHEROS_CAP_TURBO_PRIME 0x01
+#define ATHEROS_CAP_COMPRESSION 0x02
+#define ATHEROS_CAP_FAST_FRAME 0x04
+/* bits 3-6 reserved */
+#define ATHEROS_CAP_BOOST 0x80
+
+#define ATH_OUI 0x7f0300 /* Atheros OUI */
+#define ATH_OUI_TYPE_CAP 0x01
+#define ATH_OUI_VER_CAP 0x01
+
+#define WPA_OUI 0xf25000
+#define WPA_OUI_TYPE 0x01
+
+#define WPA_OUI_CSE_NULL ((0x00<<24)|WPA_OUI)
+#define WPA_OUI_CSE_WEP40 ((0x01<<24)|WPA_OUI)
+#define WPA_OUI_CSE_TKIP ((0x02<<24)|WPA_OUI)
+#define WPA_OUI_CSE_AES_CCMP ((0x04<<24)|WPA_OUI)
+#define WPA_OUI_CSE_WEP104 ((0x05<<24)|WPA_OUI)
+
+#define WPA_OUI_ASE_NONE ((0x00<<24)|WPA_OUI)
+#define WPA_OUI_ASE_8021X_UNSPEC ((0x01<<24)|WPA_OUI)
+#define WPA_OUI_ASE_8021X_PSK ((0x02<<24)|WPA_OUI)
/*
* AUTH management packets
@@ -308,6 +363,7 @@
#define IEEE80211_AUTH_ALG_OPEN 0x0000
#define IEEE80211_AUTH_ALG_SHARED 0x0001
+#define IEEE80211_AUTH_ALG_LEAP 0x0080
enum {
IEEE80211_AUTH_OPEN_REQUEST = 1,
@@ -338,6 +394,11 @@
IEEE80211_REASON_ASSOC_LEAVE = 8,
IEEE80211_REASON_ASSOC_NOT_AUTHED = 9,
+ IEEE80211_REASON_RSN_REQUIRED = 11,
+ IEEE80211_REASON_RSN_INCONSISTENT = 12,
+ IEEE80211_REASON_IE_INVALID = 13,
+ IEEE80211_REASON_MIC_FAILURE = 14,
+
IEEE80211_STATUS_SUCCESS = 0,
IEEE80211_STATUS_UNSPECIFIED = 1,
IEEE80211_STATUS_CAPINFO = 10,
More information about the p4-projects
mailing list