PERFORCE change 47066 for review
Sam Leffler
sam at FreeBSD.org
Mon Feb 16 14:56:48 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=47066
Change 47066 by sam at sam_ebb on 2004/02/16 14:56:24
o add methods for key management
o add glue to the 802.1x authenticator
o redo flag bits to support additional ciphers
o add IEEE80211_F_PRIVACY to signify "privacy" separately from
any particular cipher
o move flag bits around so IEEE80211_F_PRIVACY lines up with the
IEEE 802.11 capability bit
o do similar machinations for capabilities
o add debug message flags for the 802.1x authenticator and the
radius client
Affected files ...
.. //depot/projects/netperf+sockets/sys/net80211/ieee80211_var.h#11 edit
Differences ...
==== //depot/projects/netperf+sockets/sys/net80211/ieee80211_var.h#11 (text+ko) ====
@@ -169,6 +169,8 @@
#define IEEE80211_PS_MAX_QUEUE 50 /* maximum saved packets */
+struct eapolcom;
+
struct ieee80211com {
SLIST_ENTRY(ieee80211com) ic_next;
struct ifnet *ic_ifp;
@@ -240,43 +242,69 @@
int ic_wep_txkey; /* default tx key index */
void *ic_wep_ctx; /* wep crypt context */
u_int32_t ic_iv; /* initial vector for wep */
+ int (*ic_key_add)(struct ieee80211com *,
+ struct ieee80211_wepkey *);
+ int (*ic_key_delete)(struct ieee80211com *,
+ u_int keyix);
+ int (*ic_key_set)(struct ieee80211com *,
+ u_int keyix, struct ieee80211_wepkey *);
+ /*
+ * 802.1x glue. When an authenticator attaches it
+ * fills in this section. We assume that when ic_ec
+ * is setup that the methods are safe to call.
+ */
+ struct eapolcom *ic_ec;
+ void (*ic_node_join)(struct ieee80211com *,
+ struct ieee80211_node *);
+ void (*ic_node_leave)(struct ieee80211com *,
+ struct ieee80211_node *);
};
#define IEEE80211_ADDR_EQ(a1,a2) (memcmp(a1,a2,IEEE80211_ADDR_LEN) == 0)
#define IEEE80211_ADDR_COPY(dst,src) memcpy(dst,src,IEEE80211_ADDR_LEN)
/* ic_flags */
-#define IEEE80211_F_ASCAN 0x00000001 /* STATUS: active scan */
-#define IEEE80211_F_SIBSS 0x00000002 /* STATUS: start IBSS */
-#define IEEE80211_F_WEPON 0x00000100 /* CONF: WEP enabled */
-#define IEEE80211_F_IBSSON 0x00000200 /* CONF: IBSS creation enable */
-#define IEEE80211_F_PMGTON 0x00000400 /* CONF: Power mgmt enable */
-#define IEEE80211_F_DESBSSID 0x00000800 /* CONF: des_bssid is set */
-#define IEEE80211_F_SCANAP 0x00001000 /* CONF: Scanning AP */
-#define IEEE80211_F_ROAMING 0x00002000 /* CONF: roaming enabled */
-#define IEEE80211_F_SWRETRY 0x00004000 /* CONF: sw tx retry enabled */
-#define IEEE80211_F_TXPOW_FIXED 0x00008000 /* TX Power: fixed rate */
-#define IEEE80211_F_SHSLOT 0x00010000 /* CONF: short slot time */
-#define IEEE80211_F_SHPREAMBLE 0x00020000 /* CONF: short preamble */
-#define IEEE80211_F_DATAPAD 0x00040000 /* CONF: do alignment pad */
-#define IEEE80211_F_USEPROT 0x00080000 /* STATUS: protection enabled */
-#define IEEE80211_F_USEBARKER 0x00100000 /* STATUS: use barker preamble*/
-#define IEEE80211_F_TIMUPDATE 0x00200000 /* STATUS: update beacon tim */
+#define IEEE80211_F_WEPON 0x00000001 /* CONF: WEP enabled */
+#define IEEE80211_F_AESON 0x00000002 /* CONF: AES enabled */
+#define IEEE80211_F_CKIPON 0x00000004 /* CONF: CKIP enabled */
+/* NB: this is intentionally setup to be IEEE80211_CAPINFO_PRIVACY */
+#define IEEE80211_F_PRIVACY 0x00000010 /* CONF: privacy enabled */
+#define IEEE80211_F_ASCAN 0x00000100 /* STATUS: active scan */
+#define IEEE80211_F_SIBSS 0x00000200 /* STATUS: start IBSS */
+#define IEEE80211_F_IBSSON 0x00000400 /* CONF: IBSS creation enable */
+#define IEEE80211_F_PMGTON 0x00000800 /* CONF: Power mgmt enable */
+#define IEEE80211_F_DESBSSID 0x00001000 /* CONF: des_bssid is set */
+#define IEEE80211_F_SCANAP 0x00002000 /* CONF: Scanning AP */
+#define IEEE80211_F_ROAMING 0x00004000 /* CONF: roaming enabled */
+#define IEEE80211_F_SWRETRY 0x00008000 /* CONF: sw tx retry enabled */
+#define IEEE80211_F_TXPOW_FIXED 0x00010000 /* TX Power: fixed rate */
+#define IEEE80211_F_SHSLOT 0x00020000 /* CONF: short slot time */
+#define IEEE80211_F_SHPREAMBLE 0x00040000 /* CONF: short preamble */
+#define IEEE80211_F_DATAPAD 0x00080000 /* CONF: do alignment pad */
+#define IEEE80211_F_USEPROT 0x00100000 /* STATUS: protection enabled */
+#define IEEE80211_F_USEBARKER 0x00200000 /* STATUS: use barker preamble*/
+#define IEEE80211_F_TIMUPDATE 0x00400000 /* STATUS: update beacon tim */
+
+#define IEEE80211_F_CRYPTON 0x0000000f /* CONF: crypto alg's enabled */
/* ic_caps */
#define IEEE80211_C_WEP 0x00000001 /* CAPABILITY: WEP available */
-#define IEEE80211_C_IBSS 0x00000002 /* CAPABILITY: IBSS available */
-#define IEEE80211_C_PMGT 0x00000004 /* CAPABILITY: Power mgmt */
-#define IEEE80211_C_HOSTAP 0x00000008 /* CAPABILITY: HOSTAP avail */
-#define IEEE80211_C_AHDEMO 0x00000010 /* CAPABILITY: Old Adhoc Demo */
-#define IEEE80211_C_SWRETRY 0x00000020 /* CAPABILITY: sw tx retry */
-#define IEEE80211_C_TXPMGT 0x00000040 /* CAPABILITY: tx power mgmt */
-#define IEEE80211_C_SHSLOT 0x00000080 /* CAPABILITY: short slottime */
-#define IEEE80211_C_SHPREAMBLE 0x00000100 /* CAPABILITY: short preamble */
-#define IEEE80211_C_MONITOR 0x00000200 /* CAPABILITY: monitor mode */
-#define IEEE80211_C_RCVMGT 0x00000400 /* CAPABILITY: rcv mgt frames */
+#define IEEE80211_C_AES 0x00000002 /* CAPABILITY: AES available */
+#define IEEE80211_C_CKIP 0x00000004 /* CAPABILITY: CKIP available */
+#define IEEE80211_C_IBSS 0x00000100 /* CAPABILITY: IBSS available */
+#define IEEE80211_C_PMGT 0x00000200 /* CAPABILITY: Power mgmt */
+#define IEEE80211_C_HOSTAP 0x00000400 /* CAPABILITY: HOSTAP avail */
+#define IEEE80211_C_AHDEMO 0x00000800 /* CAPABILITY: Old Adhoc Demo */
+#define IEEE80211_C_SWRETRY 0x00001000 /* CAPABILITY: sw tx retry */
+#define IEEE80211_C_TXPMGT 0x00002000 /* CAPABILITY: tx power mgmt */
+#define IEEE80211_C_SHSLOT 0x00004000 /* CAPABILITY: short slottime */
+#define IEEE80211_C_SHPREAMBLE 0x00008000 /* CAPABILITY: short preamble */
+#define IEEE80211_C_MONITOR 0x00010000 /* CAPABILITY: monitor mode */
+#define IEEE80211_C_RCVMGT 0x00020000 /* CAPABILITY: rcv mgt frames */
/* XXX protection/barker? */
+#define IEEE80211_C_CRYPTO 0x0000000f /* CAPABILITY: crypto alg's */
+
/* flags for ieee80211_fix_rate() */
#define IEEE80211_F_DOSORT 0x00000001 /* sort rate list */
#define IEEE80211_F_DOFRATE 0x00000002 /* use fixed rate */
@@ -287,6 +315,7 @@
void ieee80211_ifdetach(struct ieee80211com *);
void ieee80211_media_init(struct ieee80211com *,
ifm_change_cb_t, ifm_stat_cb_t);
+struct ieee80211com *ieee80211_find_instance(struct ifnet *);
int ieee80211_media_change(struct ifnet *);
void ieee80211_media_status(struct ifnet *, struct ifmediareq *);
int ieee80211_ioctl(struct ieee80211com *, u_long, caddr_t);
@@ -317,6 +346,8 @@
#define IEEE80211_MSG_OUTPUT 0x00100000 /* output handling */
#define IEEE80211_MSG_STATE 0x00080000 /* state machine */
#define IEEE80211_MSG_POWER 0x00040000 /* power save handling */
+#define IEEE80211_MSG_DOT1X 0x00020000 /* 802.1x authenticator */
+#define IEEE80211_MSG_RADIUS 0x00010000 /* 802.1x radius client */
#define IEEE80211_MSG_ANY 0xffffffff /* anything */
More information about the p4-projects
mailing list