Deleted Added
full compact
ieee80211_ioctl.h (170360) ieee80211_ioctl.h (170530)
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/net80211/ieee80211_ioctl.h 170360 2007-06-06 04:56:04Z sam $
26 * $FreeBSD: head/sys/net80211/ieee80211_ioctl.h 170530 2007-06-11 03:36:55Z sam $
27 */
28#ifndef _NET80211_IEEE80211_IOCTL_H_
29#define _NET80211_IEEE80211_IOCTL_H_
30
31/*
32 * IEEE 802.11 ioctls.
33 */
34#include <net80211/_ieee80211.h>
35#include <net80211/ieee80211.h>
36#include <net80211/ieee80211_crypto.h>
37
38/*
39 * Per/node (station) statistics.
40 */
41struct ieee80211_nodestats {
27 */
28#ifndef _NET80211_IEEE80211_IOCTL_H_
29#define _NET80211_IEEE80211_IOCTL_H_
30
31/*
32 * IEEE 802.11 ioctls.
33 */
34#include <net80211/_ieee80211.h>
35#include <net80211/ieee80211.h>
36#include <net80211/ieee80211_crypto.h>
37
38/*
39 * Per/node (station) statistics.
40 */
41struct ieee80211_nodestats {
42 u_int32_t ns_rx_data; /* rx data frames */
43 u_int32_t ns_rx_mgmt; /* rx management frames */
44 u_int32_t ns_rx_ctrl; /* rx control frames */
45 u_int32_t ns_rx_ucast; /* rx unicast frames */
46 u_int32_t ns_rx_mcast; /* rx multi/broadcast frames */
47 u_int64_t ns_rx_bytes; /* rx data count (bytes) */
48 u_int64_t ns_rx_beacons; /* rx beacon frames */
49 u_int32_t ns_rx_proberesp; /* rx probe response frames */
42 uint32_t ns_rx_data; /* rx data frames */
43 uint32_t ns_rx_mgmt; /* rx management frames */
44 uint32_t ns_rx_ctrl; /* rx control frames */
45 uint32_t ns_rx_ucast; /* rx unicast frames */
46 uint32_t ns_rx_mcast; /* rx multi/broadcast frames */
47 uint64_t ns_rx_bytes; /* rx data count (bytes) */
48 uint64_t ns_rx_beacons; /* rx beacon frames */
49 uint32_t ns_rx_proberesp; /* rx probe response frames */
50
50
51 u_int32_t ns_rx_dup; /* rx discard 'cuz dup */
52 u_int32_t ns_rx_noprivacy; /* rx w/ wep but privacy off */
53 u_int32_t ns_rx_wepfail; /* rx wep processing failed */
54 u_int32_t ns_rx_demicfail; /* rx demic failed */
55 u_int32_t ns_rx_decap; /* rx decapsulation failed */
56 u_int32_t ns_rx_defrag; /* rx defragmentation failed */
57 u_int32_t ns_rx_disassoc; /* rx disassociation */
58 u_int32_t ns_rx_deauth; /* rx deauthentication */
59 u_int32_t ns_rx_decryptcrc; /* rx decrypt failed on crc */
60 u_int32_t ns_rx_unauth; /* rx on unauthorized port */
61 u_int32_t ns_rx_unencrypted; /* rx unecrypted w/ privacy */
51 uint32_t ns_rx_dup; /* rx discard 'cuz dup */
52 uint32_t ns_rx_noprivacy; /* rx w/ wep but privacy off */
53 uint32_t ns_rx_wepfail; /* rx wep processing failed */
54 uint32_t ns_rx_demicfail; /* rx demic failed */
55 uint32_t ns_rx_decap; /* rx decapsulation failed */
56 uint32_t ns_rx_defrag; /* rx defragmentation failed */
57 uint32_t ns_rx_disassoc; /* rx disassociation */
58 uint32_t ns_rx_deauth; /* rx deauthentication */
59 uint32_t ns_rx_action; /* rx action */
60 uint32_t ns_rx_decryptcrc; /* rx decrypt failed on crc */
61 uint32_t ns_rx_unauth; /* rx on unauthorized port */
62 uint32_t ns_rx_unencrypted; /* rx unecrypted w/ privacy */
62
63
63 u_int32_t ns_tx_data; /* tx data frames */
64 u_int32_t ns_tx_mgmt; /* tx management frames */
65 u_int32_t ns_tx_ucast; /* tx unicast frames */
66 u_int32_t ns_tx_mcast; /* tx multi/broadcast frames */
67 u_int64_t ns_tx_bytes; /* tx data count (bytes) */
68 u_int32_t ns_tx_probereq; /* tx probe request frames */
64 uint32_t ns_tx_data; /* tx data frames */
65 uint32_t ns_tx_mgmt; /* tx management frames */
66 uint32_t ns_tx_ucast; /* tx unicast frames */
67 uint32_t ns_tx_mcast; /* tx multi/broadcast frames */
68 uint64_t ns_tx_bytes; /* tx data count (bytes) */
69 uint32_t ns_tx_probereq; /* tx probe request frames */
69
70
70 u_int32_t ns_tx_novlantag; /* tx discard 'cuz no tag */
71 u_int32_t ns_tx_vlanmismatch; /* tx discard 'cuz bad tag */
71 uint32_t ns_tx_novlantag; /* tx discard 'cuz no tag */
72 uint32_t ns_tx_vlanmismatch; /* tx discard 'cuz bad tag */
72
73
73 u_int32_t ns_ps_discard; /* ps discard 'cuz of age */
74 uint32_t ns_ps_discard; /* ps discard 'cuz of age */
74
75 /* MIB-related state */
75
76 /* MIB-related state */
76 u_int32_t ns_tx_assoc; /* [re]associations */
77 u_int32_t ns_tx_assoc_fail; /* [re]association failures */
78 u_int32_t ns_tx_auth; /* [re]authentications */
79 u_int32_t ns_tx_auth_fail; /* [re]authentication failures*/
80 u_int32_t ns_tx_deauth; /* deauthentications */
81 u_int32_t ns_tx_deauth_code; /* last deauth reason */
82 u_int32_t ns_tx_disassoc; /* disassociations */
83 u_int32_t ns_tx_disassoc_code; /* last disassociation reason */
77 uint32_t ns_tx_assoc; /* [re]associations */
78 uint32_t ns_tx_assoc_fail; /* [re]association failures */
79 uint32_t ns_tx_auth; /* [re]authentications */
80 uint32_t ns_tx_auth_fail; /* [re]authentication failures*/
81 uint32_t ns_tx_deauth; /* deauthentications */
82 uint32_t ns_tx_deauth_code; /* last deauth reason */
83 uint32_t ns_tx_disassoc; /* disassociations */
84 uint32_t ns_tx_disassoc_code; /* last disassociation reason */
84};
85
86/*
87 * Summary statistics.
88 */
89struct ieee80211_stats {
85};
86
87/*
88 * Summary statistics.
89 */
90struct ieee80211_stats {
90 u_int32_t is_rx_badversion; /* rx frame with bad version */
91 u_int32_t is_rx_tooshort; /* rx frame too short */
92 u_int32_t is_rx_wrongbss; /* rx from wrong bssid */
93 u_int32_t is_rx_dup; /* rx discard 'cuz dup */
94 u_int32_t is_rx_wrongdir; /* rx w/ wrong direction */
95 u_int32_t is_rx_mcastecho; /* rx discard 'cuz mcast echo */
96 u_int32_t is_rx_notassoc; /* rx discard 'cuz sta !assoc */
97 u_int32_t is_rx_noprivacy; /* rx w/ wep but privacy off */
98 u_int32_t is_rx_unencrypted; /* rx w/o wep and privacy on */
99 u_int32_t is_rx_wepfail; /* rx wep processing failed */
100 u_int32_t is_rx_decap; /* rx decapsulation failed */
101 u_int32_t is_rx_mgtdiscard; /* rx discard mgt frames */
102 u_int32_t is_rx_ctl; /* rx discard ctrl frames */
103 u_int32_t is_rx_beacon; /* rx beacon frames */
104 u_int32_t is_rx_rstoobig; /* rx rate set truncated */
105 u_int32_t is_rx_elem_missing; /* rx required element missing*/
106 u_int32_t is_rx_elem_toobig; /* rx element too big */
107 u_int32_t is_rx_elem_toosmall; /* rx element too small */
108 u_int32_t is_rx_elem_unknown; /* rx element unknown */
109 u_int32_t is_rx_badchan; /* rx frame w/ invalid chan */
110 u_int32_t is_rx_chanmismatch; /* rx frame chan mismatch */
111 u_int32_t is_rx_nodealloc; /* rx frame dropped */
112 u_int32_t is_rx_ssidmismatch; /* rx frame ssid mismatch */
113 u_int32_t is_rx_auth_unsupported; /* rx w/ unsupported auth alg */
114 u_int32_t is_rx_auth_fail; /* rx sta auth failure */
115 u_int32_t is_rx_auth_countermeasures;/* rx auth discard 'cuz CM */
116 u_int32_t is_rx_assoc_bss; /* rx assoc from wrong bssid */
117 u_int32_t is_rx_assoc_notauth; /* rx assoc w/o auth */
118 u_int32_t is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */
119 u_int32_t is_rx_assoc_norate; /* rx assoc w/ no rate match */
120 u_int32_t is_rx_assoc_badwpaie; /* rx assoc w/ bad WPA IE */
121 u_int32_t is_rx_deauth; /* rx deauthentication */
122 u_int32_t is_rx_disassoc; /* rx disassociation */
123 u_int32_t is_rx_badsubtype; /* rx frame w/ unknown subtype*/
124 u_int32_t is_rx_nobuf; /* rx failed for lack of buf */
125 u_int32_t is_rx_decryptcrc; /* rx decrypt failed on crc */
126 u_int32_t is_rx_ahdemo_mgt; /* rx discard ahdemo mgt frame*/
127 u_int32_t is_rx_bad_auth; /* rx bad auth request */
128 u_int32_t is_rx_unauth; /* rx on unauthorized port */
129 u_int32_t is_rx_badkeyid; /* rx w/ incorrect keyid */
130 u_int32_t is_rx_ccmpreplay; /* rx seq# violation (CCMP) */
131 u_int32_t is_rx_ccmpformat; /* rx format bad (CCMP) */
132 u_int32_t is_rx_ccmpmic; /* rx MIC check failed (CCMP) */
133 u_int32_t is_rx_tkipreplay; /* rx seq# violation (TKIP) */
134 u_int32_t is_rx_tkipformat; /* rx format bad (TKIP) */
135 u_int32_t is_rx_tkipmic; /* rx MIC check failed (TKIP) */
136 u_int32_t is_rx_tkipicv; /* rx ICV check failed (TKIP) */
137 u_int32_t is_rx_badcipher; /* rx failed 'cuz key type */
138 u_int32_t is_rx_nocipherctx; /* rx failed 'cuz key !setup */
139 u_int32_t is_rx_acl; /* rx discard 'cuz acl policy */
140 u_int32_t is_tx_nobuf; /* tx failed for lack of buf */
141 u_int32_t is_tx_nonode; /* tx failed for no node */
142 u_int32_t is_tx_unknownmgt; /* tx of unknown mgt frame */
143 u_int32_t is_tx_badcipher; /* tx failed 'cuz key type */
144 u_int32_t is_tx_nodefkey; /* tx failed 'cuz no defkey */
145 u_int32_t is_tx_noheadroom; /* tx failed 'cuz no space */
146 u_int32_t is_tx_fragframes; /* tx frames fragmented */
147 u_int32_t is_tx_frags; /* tx fragments created */
148 u_int32_t is_scan_active; /* active scans started */
149 u_int32_t is_scan_passive; /* passive scans started */
150 u_int32_t is_node_timeout; /* nodes timed out inactivity */
151 u_int32_t is_crypto_nomem; /* no memory for crypto ctx */
152 u_int32_t is_crypto_tkip; /* tkip crypto done in s/w */
153 u_int32_t is_crypto_tkipenmic; /* tkip en-MIC done in s/w */
154 u_int32_t is_crypto_tkipdemic; /* tkip de-MIC done in s/w */
155 u_int32_t is_crypto_tkipcm; /* tkip counter measures */
156 u_int32_t is_crypto_ccmp; /* ccmp crypto done in s/w */
157 u_int32_t is_crypto_wep; /* wep crypto done in s/w */
158 u_int32_t is_crypto_setkey_cipher;/* cipher rejected key */
159 u_int32_t is_crypto_setkey_nokey; /* no key index for setkey */
160 u_int32_t is_crypto_delkey; /* driver key delete failed */
161 u_int32_t is_crypto_badcipher; /* unknown cipher */
162 u_int32_t is_crypto_nocipher; /* cipher not available */
163 u_int32_t is_crypto_attachfail; /* cipher attach failed */
164 u_int32_t is_crypto_swfallback; /* cipher fallback to s/w */
165 u_int32_t is_crypto_keyfail; /* driver key alloc failed */
166 u_int32_t is_crypto_enmicfail; /* en-MIC failed */
167 u_int32_t is_ibss_capmismatch; /* merge failed-cap mismatch */
168 u_int32_t is_ibss_norate; /* merge failed-rate mismatch */
169 u_int32_t is_ps_unassoc; /* ps-poll for unassoc. sta */
170 u_int32_t is_ps_badaid; /* ps-poll w/ incorrect aid */
171 u_int32_t is_ps_qempty; /* ps-poll w/ nothing to send */
172 u_int32_t is_ff_badhdr; /* fast frame rx'd w/ bad hdr */
173 u_int32_t is_ff_tooshort; /* fast frame rx decap error */
174 u_int32_t is_ff_split; /* fast frame rx split error */
175 u_int32_t is_ff_decap; /* fast frames decap'd */
176 u_int32_t is_ff_encap; /* fast frames encap'd for tx */
177 u_int32_t is_rx_badbintval; /* rx frame w/ bogus bintval */
178 u_int32_t is_rx_demicfail; /* rx demic failed */
179 u_int32_t is_rx_defrag; /* rx defragmentation failed */
180 u_int32_t is_rx_mgmt; /* rx management frames */
181 u_int32_t is_spare[6];
91 uint32_t is_rx_badversion; /* rx frame with bad version */
92 uint32_t is_rx_tooshort; /* rx frame too short */
93 uint32_t is_rx_wrongbss; /* rx from wrong bssid */
94 uint32_t is_rx_dup; /* rx discard 'cuz dup */
95 uint32_t is_rx_wrongdir; /* rx w/ wrong direction */
96 uint32_t is_rx_mcastecho; /* rx discard 'cuz mcast echo */
97 uint32_t is_rx_notassoc; /* rx discard 'cuz sta !assoc */
98 uint32_t is_rx_noprivacy; /* rx w/ wep but privacy off */
99 uint32_t is_rx_unencrypted; /* rx w/o wep and privacy on */
100 uint32_t is_rx_wepfail; /* rx wep processing failed */
101 uint32_t is_rx_decap; /* rx decapsulation failed */
102 uint32_t is_rx_mgtdiscard; /* rx discard mgt frames */
103 uint32_t is_rx_ctl; /* rx discard ctrl frames */
104 uint32_t is_rx_beacon; /* rx beacon frames */
105 uint32_t is_rx_rstoobig; /* rx rate set truncated */
106 uint32_t is_rx_elem_missing; /* rx required element missing*/
107 uint32_t is_rx_elem_toobig; /* rx element too big */
108 uint32_t is_rx_elem_toosmall; /* rx element too small */
109 uint32_t is_rx_elem_unknown; /* rx element unknown */
110 uint32_t is_rx_badchan; /* rx frame w/ invalid chan */
111 uint32_t is_rx_chanmismatch; /* rx frame chan mismatch */
112 uint32_t is_rx_nodealloc; /* rx frame dropped */
113 uint32_t is_rx_ssidmismatch; /* rx frame ssid mismatch */
114 uint32_t is_rx_auth_unsupported; /* rx w/ unsupported auth alg */
115 uint32_t is_rx_auth_fail; /* rx sta auth failure */
116 uint32_t is_rx_auth_countermeasures;/* rx auth discard 'cuz CM */
117 uint32_t is_rx_assoc_bss; /* rx assoc from wrong bssid */
118 uint32_t is_rx_assoc_notauth; /* rx assoc w/o auth */
119 uint32_t is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */
120 uint32_t is_rx_assoc_norate; /* rx assoc w/ no rate match */
121 uint32_t is_rx_assoc_badwpaie; /* rx assoc w/ bad WPA IE */
122 uint32_t is_rx_deauth; /* rx deauthentication */
123 uint32_t is_rx_disassoc; /* rx disassociation */
124 uint32_t is_rx_badsubtype; /* rx frame w/ unknown subtype*/
125 uint32_t is_rx_nobuf; /* rx failed for lack of buf */
126 uint32_t is_rx_decryptcrc; /* rx decrypt failed on crc */
127 uint32_t is_rx_ahdemo_mgt; /* rx discard ahdemo mgt frame*/
128 uint32_t is_rx_bad_auth; /* rx bad auth request */
129 uint32_t is_rx_unauth; /* rx on unauthorized port */
130 uint32_t is_rx_badkeyid; /* rx w/ incorrect keyid */
131 uint32_t is_rx_ccmpreplay; /* rx seq# violation (CCMP) */
132 uint32_t is_rx_ccmpformat; /* rx format bad (CCMP) */
133 uint32_t is_rx_ccmpmic; /* rx MIC check failed (CCMP) */
134 uint32_t is_rx_tkipreplay; /* rx seq# violation (TKIP) */
135 uint32_t is_rx_tkipformat; /* rx format bad (TKIP) */
136 uint32_t is_rx_tkipmic; /* rx MIC check failed (TKIP) */
137 uint32_t is_rx_tkipicv; /* rx ICV check failed (TKIP) */
138 uint32_t is_rx_badcipher; /* rx failed 'cuz key type */
139 uint32_t is_rx_nocipherctx; /* rx failed 'cuz key !setup */
140 uint32_t is_rx_acl; /* rx discard 'cuz acl policy */
141 uint32_t is_tx_nobuf; /* tx failed for lack of buf */
142 uint32_t is_tx_nonode; /* tx failed for no node */
143 uint32_t is_tx_unknownmgt; /* tx of unknown mgt frame */
144 uint32_t is_tx_badcipher; /* tx failed 'cuz key type */
145 uint32_t is_tx_nodefkey; /* tx failed 'cuz no defkey */
146 uint32_t is_tx_noheadroom; /* tx failed 'cuz no space */
147 uint32_t is_tx_fragframes; /* tx frames fragmented */
148 uint32_t is_tx_frags; /* tx fragments created */
149 uint32_t is_scan_active; /* active scans started */
150 uint32_t is_scan_passive; /* passive scans started */
151 uint32_t is_node_timeout; /* nodes timed out inactivity */
152 uint32_t is_crypto_nomem; /* no memory for crypto ctx */
153 uint32_t is_crypto_tkip; /* tkip crypto done in s/w */
154 uint32_t is_crypto_tkipenmic; /* tkip en-MIC done in s/w */
155 uint32_t is_crypto_tkipdemic; /* tkip de-MIC done in s/w */
156 uint32_t is_crypto_tkipcm; /* tkip counter measures */
157 uint32_t is_crypto_ccmp; /* ccmp crypto done in s/w */
158 uint32_t is_crypto_wep; /* wep crypto done in s/w */
159 uint32_t is_crypto_setkey_cipher;/* cipher rejected key */
160 uint32_t is_crypto_setkey_nokey; /* no key index for setkey */
161 uint32_t is_crypto_delkey; /* driver key delete failed */
162 uint32_t is_crypto_badcipher; /* unknown cipher */
163 uint32_t is_crypto_nocipher; /* cipher not available */
164 uint32_t is_crypto_attachfail; /* cipher attach failed */
165 uint32_t is_crypto_swfallback; /* cipher fallback to s/w */
166 uint32_t is_crypto_keyfail; /* driver key alloc failed */
167 uint32_t is_crypto_enmicfail; /* en-MIC failed */
168 uint32_t is_ibss_capmismatch; /* merge failed-cap mismatch */
169 uint32_t is_ibss_norate; /* merge failed-rate mismatch */
170 uint32_t is_ps_unassoc; /* ps-poll for unassoc. sta */
171 uint32_t is_ps_badaid; /* ps-poll w/ incorrect aid */
172 uint32_t is_ps_qempty; /* ps-poll w/ nothing to send */
173 uint32_t is_ff_badhdr; /* fast frame rx'd w/ bad hdr */
174 uint32_t is_ff_tooshort; /* fast frame rx decap error */
175 uint32_t is_ff_split; /* fast frame rx split error */
176 uint32_t is_ff_decap; /* fast frames decap'd */
177 uint32_t is_ff_encap; /* fast frames encap'd for tx */
178 uint32_t is_rx_badbintval; /* rx frame w/ bogus bintval */
179 uint32_t is_rx_demicfail; /* rx demic failed */
180 uint32_t is_rx_defrag; /* rx defragmentation failed */
181 uint32_t is_rx_mgmt; /* rx management frames */
182 uint32_t is_rx_action; /* rx action mgt frames */
183 uint32_t is_amsdu_tooshort; /* A-MSDU rx decap error */
184 uint32_t is_amsdu_split; /* A-MSDU rx split error */
185 uint32_t is_amsdu_decap; /* A-MSDU decap'd */
186 uint32_t is_amsdu_encap; /* A-MSDU encap'd for tx */
187 uint32_t is_ampdu_bar_bad; /* A-MPDU BAR out of window */
188 uint32_t is_ampdu_bar_oow; /* A-MPDU BAR before ADDBA */
189 uint32_t is_ampdu_bar_rx; /* A-MPDU BAR frames handled */
190 uint32_t is_ampdu_rx_flush; /* A-MPDU frames flushed */
191 uint32_t is_ampdu_rx_oor; /* A-MPDU frames out-of-order */
192 uint32_t is_ampdu_rx_copy; /* A-MPDU frames copied down */
193 uint32_t is_spare[32];
182};
183
184/*
185 * Max size of optional information elements. We artificially
186 * constrain this; it's limited only by the max frame size (and
187 * the max parameter size of the wireless extensions).
188 */
189#define IEEE80211_MAX_OPT_IE 256

--- 4 unchanged lines hidden (view full) ---

194 * receiving. The key index should be set only when working
195 * with global keys (use IEEE80211_KEYIX_NONE for ``no index'').
196 * Otherwise a unicast/pairwise key is specified by the bssid
197 * (on a station) or mac address (on an ap). They key length
198 * must include any MIC key data; otherwise it should be no
199 more than IEEE80211_KEYBUF_SIZE.
200 */
201struct ieee80211req_key {
194};
195
196/*
197 * Max size of optional information elements. We artificially
198 * constrain this; it's limited only by the max frame size (and
199 * the max parameter size of the wireless extensions).
200 */
201#define IEEE80211_MAX_OPT_IE 256

--- 4 unchanged lines hidden (view full) ---

206 * receiving. The key index should be set only when working
207 * with global keys (use IEEE80211_KEYIX_NONE for ``no index'').
208 * Otherwise a unicast/pairwise key is specified by the bssid
209 * (on a station) or mac address (on an ap). They key length
210 * must include any MIC key data; otherwise it should be no
211 more than IEEE80211_KEYBUF_SIZE.
212 */
213struct ieee80211req_key {
202 u_int8_t ik_type; /* key/cipher type */
203 u_int8_t ik_pad;
204 u_int16_t ik_keyix; /* key index */
205 u_int8_t ik_keylen; /* key length in bytes */
206 u_int8_t ik_flags;
214 uint8_t ik_type; /* key/cipher type */
215 uint8_t ik_pad;
216 uint16_t ik_keyix; /* key index */
217 uint8_t ik_keylen; /* key length in bytes */
218 uint8_t ik_flags;
207/* NB: IEEE80211_KEY_XMIT and IEEE80211_KEY_RECV defined elsewhere */
208#define IEEE80211_KEY_DEFAULT 0x80 /* default xmit key */
219/* NB: IEEE80211_KEY_XMIT and IEEE80211_KEY_RECV defined elsewhere */
220#define IEEE80211_KEY_DEFAULT 0x80 /* default xmit key */
209 u_int8_t ik_macaddr[IEEE80211_ADDR_LEN];
210 u_int64_t ik_keyrsc; /* key receive sequence counter */
211 u_int64_t ik_keytsc; /* key transmit sequence counter */
212 u_int8_t ik_keydata[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE];
221 uint8_t ik_macaddr[IEEE80211_ADDR_LEN];
222 uint64_t ik_keyrsc; /* key receive sequence counter */
223 uint64_t ik_keytsc; /* key transmit sequence counter */
224 uint8_t ik_keydata[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE];
213};
214
215/*
216 * Delete a key either by index or address. Set the index
217 * to IEEE80211_KEYIX_NONE when deleting a unicast key.
218 */
219struct ieee80211req_del_key {
225};
226
227/*
228 * Delete a key either by index or address. Set the index
229 * to IEEE80211_KEYIX_NONE when deleting a unicast key.
230 */
231struct ieee80211req_del_key {
220 u_int8_t idk_keyix; /* key index */
221 u_int8_t idk_macaddr[IEEE80211_ADDR_LEN];
232 uint8_t idk_keyix; /* key index */
233 uint8_t idk_macaddr[IEEE80211_ADDR_LEN];
222};
223
224/*
225 * MLME state manipulation request. IEEE80211_MLME_ASSOC
226 * only makes sense when operating as a station. The other
227 * requests can be used when operating as a station or an
228 * ap (to effect a station).
229 */
230struct ieee80211req_mlme {
234};
235
236/*
237 * MLME state manipulation request. IEEE80211_MLME_ASSOC
238 * only makes sense when operating as a station. The other
239 * requests can be used when operating as a station or an
240 * ap (to effect a station).
241 */
242struct ieee80211req_mlme {
231 u_int8_t im_op; /* operation to perform */
243 uint8_t im_op; /* operation to perform */
232#define IEEE80211_MLME_ASSOC 1 /* associate station */
233#define IEEE80211_MLME_DISASSOC 2 /* disassociate station */
234#define IEEE80211_MLME_DEAUTH 3 /* deauthenticate station */
235#define IEEE80211_MLME_AUTHORIZE 4 /* authorize station */
236#define IEEE80211_MLME_UNAUTHORIZE 5 /* unauthorize station */
244#define IEEE80211_MLME_ASSOC 1 /* associate station */
245#define IEEE80211_MLME_DISASSOC 2 /* disassociate station */
246#define IEEE80211_MLME_DEAUTH 3 /* deauthenticate station */
247#define IEEE80211_MLME_AUTHORIZE 4 /* authorize station */
248#define IEEE80211_MLME_UNAUTHORIZE 5 /* unauthorize station */
237 u_int8_t im_ssid_len; /* length of optional ssid */
238 u_int16_t im_reason; /* 802.11 reason code */
239 u_int8_t im_macaddr[IEEE80211_ADDR_LEN];
240 u_int8_t im_ssid[IEEE80211_NWID_LEN];
249 uint8_t im_ssid_len; /* length of optional ssid */
250 uint16_t im_reason; /* 802.11 reason code */
251 uint8_t im_macaddr[IEEE80211_ADDR_LEN];
252 uint8_t im_ssid[IEEE80211_NWID_LEN];
241};
242
243/*
244 * MAC ACL operations.
245 */
246enum {
247 IEEE80211_MACCMD_POLICY_OPEN = 0, /* set policy: no ACL's */
248 IEEE80211_MACCMD_POLICY_ALLOW = 1, /* set policy: allow traffic */
249 IEEE80211_MACCMD_POLICY_DENY = 2, /* set policy: deny traffic */
250 IEEE80211_MACCMD_FLUSH = 3, /* flush ACL database */
251 IEEE80211_MACCMD_DETACH = 4, /* detach ACL policy */
252 IEEE80211_MACCMD_POLICY = 5, /* get ACL policy */
253 IEEE80211_MACCMD_LIST = 6, /* get ACL database */
254};
255
256struct ieee80211req_maclist {
253};
254
255/*
256 * MAC ACL operations.
257 */
258enum {
259 IEEE80211_MACCMD_POLICY_OPEN = 0, /* set policy: no ACL's */
260 IEEE80211_MACCMD_POLICY_ALLOW = 1, /* set policy: allow traffic */
261 IEEE80211_MACCMD_POLICY_DENY = 2, /* set policy: deny traffic */
262 IEEE80211_MACCMD_FLUSH = 3, /* flush ACL database */
263 IEEE80211_MACCMD_DETACH = 4, /* detach ACL policy */
264 IEEE80211_MACCMD_POLICY = 5, /* get ACL policy */
265 IEEE80211_MACCMD_LIST = 6, /* get ACL database */
266};
267
268struct ieee80211req_maclist {
257 u_int8_t ml_macaddr[IEEE80211_ADDR_LEN];
269 uint8_t ml_macaddr[IEEE80211_ADDR_LEN];
258};
259
260/*
261 * Set the active channel list. Note this list is
262 * intersected with the available channel list in
263 * calculating the set of channels actually used in
264 * scanning.
265 */
266struct ieee80211req_chanlist {
270};
271
272/*
273 * Set the active channel list. Note this list is
274 * intersected with the available channel list in
275 * calculating the set of channels actually used in
276 * scanning.
277 */
278struct ieee80211req_chanlist {
267 u_int8_t ic_channels[IEEE80211_CHAN_BYTES];
279 uint8_t ic_channels[IEEE80211_CHAN_BYTES];
268};
269
270/*
271 * Get the active channel list info.
272 */
273struct ieee80211req_chaninfo {
274 u_int ic_nchans;
275 struct ieee80211_channel ic_chans[IEEE80211_CHAN_MAX];
276};
277
278/*
279 * Retrieve the WPA/RSN information element for an associated station.
280 */
280};
281
282/*
283 * Get the active channel list info.
284 */
285struct ieee80211req_chaninfo {
286 u_int ic_nchans;
287 struct ieee80211_channel ic_chans[IEEE80211_CHAN_MAX];
288};
289
290/*
291 * Retrieve the WPA/RSN information element for an associated station.
292 */
281struct ieee80211req_wpaie {
282 u_int8_t wpa_macaddr[IEEE80211_ADDR_LEN];
283 u_int8_t wpa_ie[IEEE80211_MAX_OPT_IE];
293struct ieee80211req_wpaie { /* old version w/ only one ie */
294 uint8_t wpa_macaddr[IEEE80211_ADDR_LEN];
295 uint8_t wpa_ie[IEEE80211_MAX_OPT_IE];
284};
296};
297struct ieee80211req_wpaie2 {
298 uint8_t wpa_macaddr[IEEE80211_ADDR_LEN];
299 uint8_t wpa_ie[IEEE80211_MAX_OPT_IE];
300 uint8_t rsn_ie[IEEE80211_MAX_OPT_IE];
301};
285
286/*
287 * Retrieve per-node statistics.
288 */
289struct ieee80211req_sta_stats {
290 union {
291 /* NB: explicitly force 64-bit alignment */
302
303/*
304 * Retrieve per-node statistics.
305 */
306struct ieee80211req_sta_stats {
307 union {
308 /* NB: explicitly force 64-bit alignment */
292 u_int8_t macaddr[IEEE80211_ADDR_LEN];
293 u_int64_t pad;
309 uint8_t macaddr[IEEE80211_ADDR_LEN];
310 uint64_t pad;
294 } is_u;
295 struct ieee80211_nodestats is_stats;
296};
297
298/*
299 * Station information block; the mac address is used
300 * to retrieve other data like stats, unicast key, etc.
301 */
302struct ieee80211req_sta_info {
311 } is_u;
312 struct ieee80211_nodestats is_stats;
313};
314
315/*
316 * Station information block; the mac address is used
317 * to retrieve other data like stats, unicast key, etc.
318 */
319struct ieee80211req_sta_info {
303 u_int16_t isi_len; /* length (mult of 4) */
304 u_int16_t isi_freq; /* MHz */
305 u_int16_t isi_flags; /* channel flags */
306 u_int16_t isi_state; /* state flags */
307 u_int8_t isi_authmode; /* authentication algorithm */
320 uint16_t isi_len; /* length (mult of 4) */
321 uint16_t isi_ie_off; /* offset to IE data */
322 uint16_t isi_ie_len; /* IE length */
323 uint16_t isi_freq; /* MHz */
324 uint16_t isi_flags; /* channel flags */
325 uint16_t isi_state; /* state flags */
326 uint8_t isi_authmode; /* authentication algorithm */
308 int8_t isi_rssi; /* receive signal strength */
327 int8_t isi_rssi; /* receive signal strength */
309 u_int8_t isi_capinfo; /* capabilities */
310 u_int8_t isi_erp; /* ERP element */
311 u_int8_t isi_macaddr[IEEE80211_ADDR_LEN];
312 u_int8_t isi_nrates;
313 /* negotiated rates */
314 u_int8_t isi_rates[IEEE80211_RATE_MAXSIZE];
315 u_int8_t isi_txrate; /* index to isi_rates[] */
316 int8_t isi_noise; /* noise floor */
328 int8_t isi_noise; /* noise floor */
317 u_int16_t isi_ie_len; /* IE length */
318 u_int16_t isi_associd; /* assoc response */
319 u_int16_t isi_txpower; /* current tx power */
320 u_int16_t isi_vlan; /* vlan tag */
321 u_int16_t isi_txseqs[17]; /* seq to be transmitted */
322 u_int16_t isi_rxseqs[17]; /* seq previous for qos frames*/
323 u_int16_t isi_inact; /* inactivity timer */
329 uint8_t isi_capinfo; /* capabilities */
330 uint8_t isi_erp; /* ERP element */
331 uint8_t isi_macaddr[IEEE80211_ADDR_LEN];
332 uint8_t isi_nrates;
333 /* negotiated rates */
334 uint8_t isi_rates[IEEE80211_RATE_MAXSIZE];
335 uint8_t isi_txrate; /* index to isi_rates[] */
336 uint16_t isi_associd; /* assoc response */
337 uint16_t isi_txpower; /* current tx power */
338 uint16_t isi_vlan; /* vlan tag */
339 uint16_t isi_txseqs[17]; /* seq to be transmitted */
340 uint16_t isi_rxseqs[17]; /* seq previous for qos frames*/
341 uint16_t isi_inact; /* inactivity timer */
324 /* XXX frag state? */
325 /* variable length IE data */
326};
327
328/*
329 * Retrieve per-station information; to retrieve all
330 * specify a mac address of ff:ff:ff:ff:ff:ff.
331 */
332struct ieee80211req_sta_req {
333 union {
334 /* NB: explicitly force 64-bit alignment */
342 /* XXX frag state? */
343 /* variable length IE data */
344};
345
346/*
347 * Retrieve per-station information; to retrieve all
348 * specify a mac address of ff:ff:ff:ff:ff:ff.
349 */
350struct ieee80211req_sta_req {
351 union {
352 /* NB: explicitly force 64-bit alignment */
335 u_int8_t macaddr[IEEE80211_ADDR_LEN];
336 u_int64_t pad;
353 uint8_t macaddr[IEEE80211_ADDR_LEN];
354 uint64_t pad;
337 } is_u;
338 struct ieee80211req_sta_info info[1]; /* variable length */
339};
340
341/*
342 * Get/set per-station tx power cap.
343 */
344struct ieee80211req_sta_txpow {
355 } is_u;
356 struct ieee80211req_sta_info info[1]; /* variable length */
357};
358
359/*
360 * Get/set per-station tx power cap.
361 */
362struct ieee80211req_sta_txpow {
345 u_int8_t it_macaddr[IEEE80211_ADDR_LEN];
346 u_int8_t it_txpow;
363 uint8_t it_macaddr[IEEE80211_ADDR_LEN];
364 uint8_t it_txpow;
347};
348
349/*
350 * WME parameters are set and return using i_val and i_len.
351 * i_val holds the value itself. i_len specifies the AC
352 * and, as appropriate, then high bit specifies whether the
353 * operation is to be applied to the BSS or ourself.
354 */
355#define IEEE80211_WMEPARAM_SELF 0x0000 /* parameter applies to self */
356#define IEEE80211_WMEPARAM_BSS 0x8000 /* parameter applies to BSS */
357#define IEEE80211_WMEPARAM_VAL 0x7fff /* parameter value */
358
359#ifdef __FreeBSD__
360/*
361 * FreeBSD-style ioctls.
362 */
363/* the first member must be matched with struct ifreq */
364struct ieee80211req {
365 char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
365};
366
367/*
368 * WME parameters are set and return using i_val and i_len.
369 * i_val holds the value itself. i_len specifies the AC
370 * and, as appropriate, then high bit specifies whether the
371 * operation is to be applied to the BSS or ourself.
372 */
373#define IEEE80211_WMEPARAM_SELF 0x0000 /* parameter applies to self */
374#define IEEE80211_WMEPARAM_BSS 0x8000 /* parameter applies to BSS */
375#define IEEE80211_WMEPARAM_VAL 0x7fff /* parameter value */
376
377#ifdef __FreeBSD__
378/*
379 * FreeBSD-style ioctls.
380 */
381/* the first member must be matched with struct ifreq */
382struct ieee80211req {
383 char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
366 u_int16_t i_type; /* req type */
384 uint16_t i_type; /* req type */
367 int16_t i_val; /* Index or simple value */
368 int16_t i_len; /* Index or simple value */
369 void *i_data; /* Extra data */
370};
371#define SIOCS80211 _IOW('i', 234, struct ieee80211req)
372#define SIOCG80211 _IOWR('i', 235, struct ieee80211req)
385 int16_t i_val; /* Index or simple value */
386 int16_t i_len; /* Index or simple value */
387 void *i_data; /* Extra data */
388};
389#define SIOCS80211 _IOW('i', 234, struct ieee80211req)
390#define SIOCG80211 _IOWR('i', 235, struct ieee80211req)
391#define SIOCG80211STATS _IOWR('i', 236, struct ifreq)
373
374#define IEEE80211_IOC_SSID 1
375#define IEEE80211_IOC_NUMSSIDS 2
376#define IEEE80211_IOC_WEP 3
377#define IEEE80211_WEP_NOSUP -1
378#define IEEE80211_WEP_OFF 0
379#define IEEE80211_WEP_ON 1
380#define IEEE80211_WEP_MIXED 2

--- 54 unchanged lines hidden (view full) ---

435#define IEEE80211_IOC_WME_TXOPLIMIT 49 /* WME: txops limit */
436#define IEEE80211_IOC_WME_ACM 50 /* WME: ACM (bss only) */
437#define IEEE80211_IOC_WME_ACKPOLICY 51 /* WME: ACK policy (!bss only)*/
438#define IEEE80211_IOC_DTIM_PERIOD 52 /* DTIM period (beacons) */
439#define IEEE80211_IOC_BEACON_INTERVAL 53 /* beacon interval (ms) */
440#define IEEE80211_IOC_ADDMAC 54 /* add sta to MAC ACL table */
441#define IEEE80211_IOC_DELMAC 55 /* del sta from MAC ACL table */
442#define IEEE80211_IOC_PUREG 56 /* pure 11g (no 11b stations) */
392
393#define IEEE80211_IOC_SSID 1
394#define IEEE80211_IOC_NUMSSIDS 2
395#define IEEE80211_IOC_WEP 3
396#define IEEE80211_WEP_NOSUP -1
397#define IEEE80211_WEP_OFF 0
398#define IEEE80211_WEP_ON 1
399#define IEEE80211_WEP_MIXED 2

--- 54 unchanged lines hidden (view full) ---

454#define IEEE80211_IOC_WME_TXOPLIMIT 49 /* WME: txops limit */
455#define IEEE80211_IOC_WME_ACM 50 /* WME: ACM (bss only) */
456#define IEEE80211_IOC_WME_ACKPOLICY 51 /* WME: ACK policy (!bss only)*/
457#define IEEE80211_IOC_DTIM_PERIOD 52 /* DTIM period (beacons) */
458#define IEEE80211_IOC_BEACON_INTERVAL 53 /* beacon interval (ms) */
459#define IEEE80211_IOC_ADDMAC 54 /* add sta to MAC ACL table */
460#define IEEE80211_IOC_DELMAC 55 /* del sta from MAC ACL table */
461#define IEEE80211_IOC_PUREG 56 /* pure 11g (no 11b stations) */
462#define IEEE80211_IOC_FF 57 /* ATH fast frames (on, off) */
463#define IEEE80211_IOC_TURBOP 58 /* ATH turbo' (on, off) */
464#define IEEE80211_IOC_BGSCAN 59 /* bg scanning (on, off) */
465#define IEEE80211_IOC_BGSCAN_IDLE 60 /* bg scan idle threshold */
466#define IEEE80211_IOC_BGSCAN_INTERVAL 61 /* bg scan interval */
467#define IEEE80211_IOC_SCANVALID 65 /* scan cache valid threshold */
468#define IEEE80211_IOC_ROAM_RSSI_11A 66 /* rssi threshold in 11a */
469#define IEEE80211_IOC_ROAM_RSSI_11B 67 /* rssi threshold in 11b */
470#define IEEE80211_IOC_ROAM_RSSI_11G 68 /* rssi threshold in 11g */
471#define IEEE80211_IOC_ROAM_RATE_11A 69 /* tx rate threshold in 11a */
472#define IEEE80211_IOC_ROAM_RATE_11B 70 /* tx rate threshold in 11b */
473#define IEEE80211_IOC_ROAM_RATE_11G 71 /* tx rate threshold in 11g */
443#define IEEE80211_IOC_MCAST_RATE 72 /* tx rate for mcast frames */
444#define IEEE80211_IOC_FRAGTHRESHOLD 73 /* tx fragmentation threshold */
445#define IEEE80211_IOC_BURST 75 /* packet bursting */
446#define IEEE80211_IOC_SCAN_RESULTS 76 /* get scan results */
447#define IEEE80211_IOC_BMISSTHRESHOLD 77 /* beacon miss threshold */
448#define IEEE80211_IOC_STA_INFO 78 /* station/neighbor info */
474#define IEEE80211_IOC_MCAST_RATE 72 /* tx rate for mcast frames */
475#define IEEE80211_IOC_FRAGTHRESHOLD 73 /* tx fragmentation threshold */
476#define IEEE80211_IOC_BURST 75 /* packet bursting */
477#define IEEE80211_IOC_SCAN_RESULTS 76 /* get scan results */
478#define IEEE80211_IOC_BMISSTHRESHOLD 77 /* beacon miss threshold */
479#define IEEE80211_IOC_STA_INFO 78 /* station/neighbor info */
480#define IEEE80211_IOC_WPAIE2 79 /* WPA+RSN info elements */
481#define IEEE80211_IOC_CURCHAN 80 /* current channel */
482#define IEEE80211_IOC_SHORTGI 81 /* 802.11n half GI */
483#define IEEE80211_IOC_AMPDU 82 /* 802.11n A-MPDU (on, off) */
484#define IEEE80211_IOC_AMPDU_LIMIT 83 /* A-MPDU length limit */
485#define IEEE80211_IOC_AMPDU_DENSITY 84 /* A-MPDU density */
486#define IEEE80211_IOC_AMSDU 85 /* 802.11n A-MSDU (on, off) */
487#define IEEE80211_IOC_AMSDU_LIMIT 86 /* A-MSDU length limit */
488#define IEEE80211_IOC_PUREN 87 /* pure 11n (no legacy sta's) */
489#define IEEE80211_IOC_DOTH 88 /* 802.11h (on, off) */
490#define IEEE80211_IOC_REGDOMAIN 89 /* regulatory domain */
491#define IEEE80211_IOC_COUNTRYCODE 90 /* ISO country code */
492#define IEEE80211_IOC_LOCATION 91 /* indoor/outdoor/anywhere */
493#define IEEE80211_IOC_HTCOMPAT 92 /* support pre-D1.10 HT ie's */
449
450/*
451 * Scan result data returned for IEEE80211_IOC_SCAN_RESULTS.
452 * Each result is a fixed size structure followed by a variable
453 * length SSID and one or more variable length information elements.
454 * The size of each variable length item is found in the fixed
455 * size structure and the entire length of the record is specified
456 * in isr_len. Result records are rounded to a multiple of 4 bytes.
457 */
458struct ieee80211req_scan_result {
494
495/*
496 * Scan result data returned for IEEE80211_IOC_SCAN_RESULTS.
497 * Each result is a fixed size structure followed by a variable
498 * length SSID and one or more variable length information elements.
499 * The size of each variable length item is found in the fixed
500 * size structure and the entire length of the record is specified
501 * in isr_len. Result records are rounded to a multiple of 4 bytes.
502 */
503struct ieee80211req_scan_result {
459 u_int16_t isr_len; /* length (mult of 4) */
460 u_int16_t isr_ie_len; /* IE length */
461 u_int16_t isr_freq; /* MHz */
462 u_int16_t isr_flags; /* channel flags */
504 uint16_t isr_len; /* length (mult of 4) */
505 uint16_t isr_ie_off; /* offset to IE data */
506 uint16_t isr_ie_len; /* IE length */
507 uint16_t isr_freq; /* MHz */
508 uint16_t isr_flags; /* channel flags */
463 int8_t isr_noise;
464 int8_t isr_rssi;
509 int8_t isr_noise;
510 int8_t isr_rssi;
465 u_int8_t isr_intval; /* beacon interval */
466 u_int8_t isr_capinfo; /* capabilities */
467 u_int8_t isr_erp; /* ERP element */
468 u_int8_t isr_bssid[IEEE80211_ADDR_LEN];
469 u_int8_t isr_nrates;
470 u_int8_t isr_rates[IEEE80211_RATE_MAXSIZE];
471 u_int8_t isr_ssid_len; /* SSID length */
472 u_int8_t isr_pad[8];
511 uint8_t isr_intval; /* beacon interval */
512 uint8_t isr_capinfo; /* capabilities */
513 uint8_t isr_erp; /* ERP element */
514 uint8_t isr_bssid[IEEE80211_ADDR_LEN];
515 uint8_t isr_nrates;
516 uint8_t isr_rates[IEEE80211_RATE_MAXSIZE];
517 uint8_t isr_ssid_len; /* SSID length */
473 /* variable length SSID followed by IE data */
474};
475
518 /* variable length SSID followed by IE data */
519};
520
476#define SIOCG80211STATS _IOWR('i', 236, struct ifreq)
521struct ieee80211_clone_params {
522 char icp_parent[IFNAMSIZ]; /* parent device */
523 int icp_opmode; /* operating mode */
524};
477#endif /* __FreeBSD__ */
478
479#endif /* _NET80211_IEEE80211_IOCTL_H_ */
525#endif /* __FreeBSD__ */
526
527#endif /* _NET80211_IEEE80211_IOCTL_H_ */