ieee80211_ioctl.h revision 1.18.62.1 1 1.18 dyoung /* $NetBSD: ieee80211_ioctl.h,v 1.18.62.1 2008/02/22 16:50:25 skrll Exp $ */
2 1.1 dyoung /*-
3 1.1 dyoung * Copyright (c) 2001 Atsushi Onoe
4 1.18.62.1 skrll * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
5 1.1 dyoung * All rights reserved.
6 1.1 dyoung *
7 1.1 dyoung * Redistribution and use in source and binary forms, with or without
8 1.1 dyoung * modification, are permitted provided that the following conditions
9 1.1 dyoung * are met:
10 1.1 dyoung * 1. Redistributions of source code must retain the above copyright
11 1.1 dyoung * notice, this list of conditions and the following disclaimer.
12 1.1 dyoung * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 dyoung * notice, this list of conditions and the following disclaimer in the
14 1.1 dyoung * documentation and/or other materials provided with the distribution.
15 1.1 dyoung *
16 1.1 dyoung * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 1.1 dyoung * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 1.1 dyoung * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 1.1 dyoung * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 1.1 dyoung * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 1.1 dyoung * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 1.1 dyoung * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 1.1 dyoung * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 1.1 dyoung * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 1.1 dyoung * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 1.1 dyoung *
27 1.18.62.1 skrll * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.26 2007/11/02 05:22:24 sam Exp $
28 1.1 dyoung */
29 1.1 dyoung #ifndef _NET80211_IEEE80211_IOCTL_H_
30 1.1 dyoung #define _NET80211_IEEE80211_IOCTL_H_
31 1.1 dyoung
32 1.1 dyoung /*
33 1.1 dyoung * IEEE 802.11 ioctls.
34 1.1 dyoung */
35 1.9 dyoung #include <net80211/_ieee80211.h>
36 1.9 dyoung #include <net80211/ieee80211.h>
37 1.9 dyoung #include <net80211/ieee80211_crypto.h>
38 1.1 dyoung
39 1.9 dyoung /*
40 1.18.62.1 skrll * Per/node (station) statistics.
41 1.9 dyoung */
42 1.9 dyoung struct ieee80211_nodestats {
43 1.18.62.1 skrll uint32_t ns_rx_data; /* rx data frames */
44 1.18.62.1 skrll uint32_t ns_rx_mgmt; /* rx management frames */
45 1.18.62.1 skrll uint32_t ns_rx_ctrl; /* rx control frames */
46 1.18.62.1 skrll uint32_t ns_rx_ucast; /* rx unicast frames */
47 1.18.62.1 skrll uint32_t ns_rx_mcast; /* rx multi/broadcast frames */
48 1.18.62.1 skrll uint64_t ns_rx_bytes; /* rx data count (bytes) */
49 1.18.62.1 skrll uint64_t ns_rx_beacons; /* rx beacon frames */
50 1.18.62.1 skrll uint32_t ns_rx_proberesp; /* rx probe response frames */
51 1.18.62.1 skrll
52 1.18.62.1 skrll uint32_t ns_rx_dup; /* rx discard 'cuz dup */
53 1.18.62.1 skrll uint32_t ns_rx_noprivacy; /* rx w/ wep but privacy off */
54 1.18.62.1 skrll uint32_t ns_rx_wepfail; /* rx wep processing failed */
55 1.18.62.1 skrll uint32_t ns_rx_demicfail; /* rx demic failed */
56 1.18.62.1 skrll uint32_t ns_rx_decap; /* rx decapsulation failed */
57 1.18.62.1 skrll uint32_t ns_rx_defrag; /* rx defragmentation failed */
58 1.18.62.1 skrll uint32_t ns_rx_disassoc; /* rx disassociation */
59 1.18.62.1 skrll uint32_t ns_rx_deauth; /* rx deauthentication */
60 1.18.62.1 skrll uint32_t ns_rx_action; /* rx action */
61 1.18.62.1 skrll uint32_t ns_rx_decryptcrc; /* rx decrypt failed on crc */
62 1.18.62.1 skrll uint32_t ns_rx_unauth; /* rx on unauthorized port */
63 1.18.62.1 skrll uint32_t ns_rx_unencrypted; /* rx unecrypted w/ privacy */
64 1.18.62.1 skrll uint32_t ns_rx_drop; /* rx discard other reason */
65 1.18.62.1 skrll
66 1.18.62.1 skrll uint32_t ns_tx_data; /* tx data frames */
67 1.18.62.1 skrll uint32_t ns_tx_mgmt; /* tx management frames */
68 1.18.62.1 skrll uint32_t ns_tx_ucast; /* tx unicast frames */
69 1.18.62.1 skrll uint32_t ns_tx_mcast; /* tx multi/broadcast frames */
70 1.18.62.1 skrll uint64_t ns_tx_bytes; /* tx data count (bytes) */
71 1.18.62.1 skrll uint32_t ns_tx_probereq; /* tx probe request frames */
72 1.9 dyoung
73 1.18.62.1 skrll uint32_t ns_tx_novlantag; /* tx discard 'cuz no tag */
74 1.18.62.1 skrll uint32_t ns_tx_vlanmismatch; /* tx discard 'cuz bad tag */
75 1.9 dyoung
76 1.18.62.1 skrll uint32_t ns_ps_discard; /* ps discard 'cuz of age */
77 1.9 dyoung
78 1.9 dyoung /* MIB-related state */
79 1.18.62.1 skrll uint32_t ns_tx_assoc; /* [re]associations */
80 1.18.62.1 skrll uint32_t ns_tx_assoc_fail; /* [re]association failures */
81 1.18.62.1 skrll uint32_t ns_tx_auth; /* [re]authentications */
82 1.18.62.1 skrll uint32_t ns_tx_auth_fail; /* [re]authentication failures*/
83 1.18.62.1 skrll uint32_t ns_tx_deauth; /* deauthentications */
84 1.18.62.1 skrll uint32_t ns_tx_deauth_code; /* last deauth reason */
85 1.18.62.1 skrll uint32_t ns_tx_disassoc; /* disassociations */
86 1.18.62.1 skrll uint32_t ns_tx_disassoc_code; /* last disassociation reason */
87 1.9 dyoung };
88 1.9 dyoung
89 1.11 dyoung #ifdef COMPAT_20
90 1.11 dyoung struct ieee80211_ostats {
91 1.11 dyoung u_int32_t is_rx_badversion; /* rx frame with bad version */
92 1.11 dyoung u_int32_t is_rx_tooshort; /* rx frame too short */
93 1.11 dyoung u_int32_t is_rx_wrongbss; /* rx from wrong bssid */
94 1.11 dyoung u_int32_t is_rx_dup; /* rx discard 'cuz dup */
95 1.11 dyoung u_int32_t is_rx_wrongdir; /* rx w/ wrong direction */
96 1.11 dyoung u_int32_t is_rx_mcastecho; /* rx discard 'cuz mcast echo */
97 1.11 dyoung u_int32_t is_rx_notassoc; /* rx discard 'cuz sta !assoc */
98 1.11 dyoung u_int32_t is_rx_nowep; /* rx w/ wep but wep !config */
99 1.11 dyoung u_int32_t is_rx_wepfail; /* rx wep processing failed */
100 1.11 dyoung u_int32_t is_rx_decap; /* rx decapsulation failed */
101 1.11 dyoung u_int32_t is_rx_mgtdiscard; /* rx discard mgt frames */
102 1.11 dyoung u_int32_t is_rx_ctl; /* rx discard ctrl frames */
103 1.11 dyoung u_int32_t is_rx_rstoobig; /* rx rate set truncated */
104 1.11 dyoung u_int32_t is_rx_elem_missing; /* rx required element missing*/
105 1.11 dyoung u_int32_t is_rx_elem_toobig; /* rx element too big */
106 1.11 dyoung u_int32_t is_rx_elem_toosmall; /* rx element too small */
107 1.11 dyoung u_int32_t is_rx_elem_unknown; /* rx element unknown */
108 1.11 dyoung u_int32_t is_rx_badchan; /* rx frame w/ invalid chan */
109 1.11 dyoung u_int32_t is_rx_chanmismatch; /* rx frame chan mismatch */
110 1.11 dyoung u_int32_t is_rx_nodealloc; /* rx frame dropped */
111 1.11 dyoung u_int32_t is_rx_ssidmismatch; /* rx frame ssid mismatch */
112 1.11 dyoung u_int32_t is_rx_auth_unsupported; /* rx w/ unsupported auth alg */
113 1.11 dyoung u_int32_t is_rx_auth_fail; /* rx sta auth failure */
114 1.11 dyoung u_int32_t is_rx_assoc_bss; /* rx assoc from wrong bssid */
115 1.11 dyoung u_int32_t is_rx_assoc_notauth; /* rx assoc w/o auth */
116 1.11 dyoung u_int32_t is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */
117 1.11 dyoung u_int32_t is_rx_assoc_norate; /* rx assoc w/ no rate match */
118 1.11 dyoung u_int32_t is_rx_deauth; /* rx deauthentication */
119 1.11 dyoung u_int32_t is_rx_disassoc; /* rx disassociation */
120 1.11 dyoung u_int32_t is_rx_badsubtype; /* rx frame w/ unknown subtype*/
121 1.11 dyoung u_int32_t is_rx_nombuf; /* rx failed for lack of mbuf */
122 1.11 dyoung u_int32_t is_rx_decryptcrc; /* rx decrypt failed on crc */
123 1.11 dyoung u_int32_t is_rx_ahdemo_mgt; /* rx discard ahdemo mgt frame*/
124 1.11 dyoung u_int32_t is_rx_bad_auth; /* rx bad auth request */
125 1.11 dyoung u_int32_t is_tx_nombuf; /* tx failed for lack of mbuf */
126 1.11 dyoung u_int32_t is_tx_nonode; /* tx failed for no node */
127 1.11 dyoung u_int32_t is_tx_unknownmgt; /* tx of unknown mgt frame */
128 1.11 dyoung u_int32_t is_scan_active; /* active scans started */
129 1.11 dyoung u_int32_t is_scan_passive; /* passive scans started */
130 1.11 dyoung u_int32_t is_node_timeout; /* nodes timed out inactivity */
131 1.11 dyoung u_int32_t is_crypto_nomem; /* no memory for crypto ctx */
132 1.11 dyoung };
133 1.11 dyoung #endif /* COMPAT_20 */
134 1.11 dyoung
135 1.9 dyoung /*
136 1.9 dyoung * Summary statistics.
137 1.9 dyoung */
138 1.6 dyoung struct ieee80211_stats {
139 1.18.62.1 skrll uint32_t is_rx_badversion; /* rx frame with bad version */
140 1.18.62.1 skrll uint32_t is_rx_tooshort; /* rx frame too short */
141 1.18.62.1 skrll uint32_t is_rx_wrongbss; /* rx from wrong bssid */
142 1.18.62.1 skrll uint32_t is_rx_dup; /* rx discard 'cuz dup */
143 1.18.62.1 skrll uint32_t is_rx_wrongdir; /* rx w/ wrong direction */
144 1.18.62.1 skrll uint32_t is_rx_mcastecho; /* rx discard 'cuz mcast echo */
145 1.18.62.1 skrll uint32_t is_rx_notassoc; /* rx discard 'cuz sta !assoc */
146 1.18.62.1 skrll uint32_t is_rx_noprivacy; /* rx w/ wep but privacy off */
147 1.18.62.1 skrll uint32_t is_rx_unencrypted; /* rx w/o wep and privacy on */
148 1.18.62.1 skrll uint32_t is_rx_wepfail; /* rx wep processing failed */
149 1.18.62.1 skrll uint32_t is_rx_decap; /* rx decapsulation failed */
150 1.18.62.1 skrll uint32_t is_rx_mgtdiscard; /* rx discard mgt frames */
151 1.18.62.1 skrll uint32_t is_rx_ctl; /* rx discard ctrl frames */
152 1.18.62.1 skrll uint32_t is_rx_beacon; /* rx beacon frames */
153 1.18.62.1 skrll uint32_t is_rx_rstoobig; /* rx rate set truncated */
154 1.18.62.1 skrll uint32_t is_rx_elem_missing; /* rx required element missing*/
155 1.18.62.1 skrll uint32_t is_rx_elem_toobig; /* rx element too big */
156 1.18.62.1 skrll uint32_t is_rx_elem_toosmall; /* rx element too small */
157 1.18.62.1 skrll uint32_t is_rx_elem_unknown; /* rx element unknown */
158 1.18.62.1 skrll uint32_t is_rx_badchan; /* rx frame w/ invalid chan */
159 1.18.62.1 skrll uint32_t is_rx_chanmismatch; /* rx frame chan mismatch */
160 1.18.62.1 skrll uint32_t is_rx_nodealloc; /* rx frame dropped */
161 1.18.62.1 skrll uint32_t is_rx_ssidmismatch; /* rx frame ssid mismatch */
162 1.18.62.1 skrll uint32_t is_rx_auth_unsupported; /* rx w/ unsupported auth alg */
163 1.18.62.1 skrll uint32_t is_rx_auth_fail; /* rx sta auth failure */
164 1.18.62.1 skrll uint32_t is_rx_auth_countermeasures;/* rx auth discard 'cuz CM */
165 1.18.62.1 skrll uint32_t is_rx_assoc_bss; /* rx assoc from wrong bssid */
166 1.18.62.1 skrll uint32_t is_rx_assoc_notauth; /* rx assoc w/o auth */
167 1.18.62.1 skrll uint32_t is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */
168 1.18.62.1 skrll uint32_t is_rx_assoc_norate; /* rx assoc w/ no rate match */
169 1.18.62.1 skrll uint32_t is_rx_assoc_badwpaie; /* rx assoc w/ bad WPA IE */
170 1.18.62.1 skrll uint32_t is_rx_deauth; /* rx deauthentication */
171 1.18.62.1 skrll uint32_t is_rx_disassoc; /* rx disassociation */
172 1.18.62.1 skrll uint32_t is_rx_badsubtype; /* rx frame w/ unknown subtype*/
173 1.18.62.1 skrll uint32_t is_rx_nobuf; /* rx failed for lack of buf */
174 1.18.62.1 skrll uint32_t is_rx_decryptcrc; /* rx decrypt failed on crc */
175 1.18.62.1 skrll uint32_t is_rx_ahdemo_mgt; /* rx discard ahdemo mgt frame*/
176 1.18.62.1 skrll uint32_t is_rx_bad_auth; /* rx bad auth request */
177 1.18.62.1 skrll uint32_t is_rx_unauth; /* rx on unauthorized port */
178 1.18.62.1 skrll uint32_t is_rx_badkeyid; /* rx w/ incorrect keyid */
179 1.18.62.1 skrll uint32_t is_rx_ccmpreplay; /* rx seq# violation (CCMP) */
180 1.18.62.1 skrll uint32_t is_rx_ccmpformat; /* rx format bad (CCMP) */
181 1.18.62.1 skrll uint32_t is_rx_ccmpmic; /* rx MIC check failed (CCMP) */
182 1.18.62.1 skrll uint32_t is_rx_tkipreplay; /* rx seq# violation (TKIP) */
183 1.18.62.1 skrll uint32_t is_rx_tkipformat; /* rx format bad (TKIP) */
184 1.18.62.1 skrll uint32_t is_rx_tkipmic; /* rx MIC check failed (TKIP) */
185 1.18.62.1 skrll uint32_t is_rx_tkipicv; /* rx ICV check failed (TKIP) */
186 1.18.62.1 skrll uint32_t is_rx_badcipher; /* rx failed 'cuz key type */
187 1.18.62.1 skrll uint32_t is_rx_nocipherctx; /* rx failed 'cuz key !setup */
188 1.18.62.1 skrll uint32_t is_rx_acl; /* rx discard 'cuz acl policy */
189 1.18.62.1 skrll uint32_t is_tx_nobuf; /* tx failed for lack of buf */
190 1.18.62.1 skrll uint32_t is_tx_nonode; /* tx failed for no node */
191 1.18.62.1 skrll uint32_t is_tx_unknownmgt; /* tx of unknown mgt frame */
192 1.18.62.1 skrll uint32_t is_tx_badcipher; /* tx failed 'cuz key type */
193 1.18.62.1 skrll uint32_t is_tx_nodefkey; /* tx failed 'cuz no defkey */
194 1.18.62.1 skrll uint32_t is_tx_noheadroom; /* tx failed 'cuz no space */
195 1.18.62.1 skrll uint32_t is_tx_fragframes; /* tx frames fragmented */
196 1.18.62.1 skrll uint32_t is_tx_frags; /* tx fragments created */
197 1.18.62.1 skrll uint32_t is_scan_active; /* active scans started */
198 1.18.62.1 skrll uint32_t is_scan_passive; /* passive scans started */
199 1.18.62.1 skrll uint32_t is_node_timeout; /* nodes timed out inactivity */
200 1.18.62.1 skrll uint32_t is_crypto_nomem; /* no memory for crypto ctx */
201 1.18.62.1 skrll uint32_t is_crypto_tkip; /* tkip crypto done in s/w */
202 1.18.62.1 skrll uint32_t is_crypto_tkipenmic; /* tkip en-MIC done in s/w */
203 1.18.62.1 skrll uint32_t is_crypto_tkipdemic; /* tkip de-MIC done in s/w */
204 1.18.62.1 skrll uint32_t is_crypto_tkipcm; /* tkip counter measures */
205 1.18.62.1 skrll uint32_t is_crypto_ccmp; /* ccmp crypto done in s/w */
206 1.18.62.1 skrll uint32_t is_crypto_wep; /* wep crypto done in s/w */
207 1.18.62.1 skrll uint32_t is_crypto_setkey_cipher;/* cipher rejected key */
208 1.18.62.1 skrll uint32_t is_crypto_setkey_nokey; /* no key index for setkey */
209 1.18.62.1 skrll uint32_t is_crypto_delkey; /* driver key delete failed */
210 1.18.62.1 skrll uint32_t is_crypto_badcipher; /* unknown cipher */
211 1.18.62.1 skrll uint32_t is_crypto_nocipher; /* cipher not available */
212 1.18.62.1 skrll uint32_t is_crypto_attachfail; /* cipher attach failed */
213 1.18.62.1 skrll uint32_t is_crypto_swfallback; /* cipher fallback to s/w */
214 1.18.62.1 skrll uint32_t is_crypto_keyfail; /* driver key alloc failed */
215 1.18.62.1 skrll uint32_t is_crypto_enmicfail; /* en-MIC failed */
216 1.18.62.1 skrll uint32_t is_ibss_capmismatch; /* merge failed-cap mismatch */
217 1.18.62.1 skrll uint32_t is_ibss_norate; /* merge failed-rate mismatch */
218 1.18.62.1 skrll uint32_t is_ps_unassoc; /* ps-poll for unassoc. sta */
219 1.18.62.1 skrll uint32_t is_ps_badaid; /* ps-poll w/ incorrect aid */
220 1.18.62.1 skrll uint32_t is_ps_qempty; /* ps-poll w/ nothing to send */
221 1.18.62.1 skrll uint32_t is_ff_badhdr; /* fast frame rx'd w/ bad hdr */
222 1.18.62.1 skrll uint32_t is_ff_tooshort; /* fast frame rx decap error */
223 1.18.62.1 skrll uint32_t is_ff_split; /* fast frame rx split error */
224 1.18.62.1 skrll uint32_t is_ff_decap; /* fast frames decap'd */
225 1.18.62.1 skrll uint32_t is_ff_encap; /* fast frames encap'd for tx */
226 1.18.62.1 skrll uint32_t is_rx_badbintval; /* rx frame w/ bogus bintval */
227 1.18.62.1 skrll uint32_t is_rx_demicfail; /* rx demic failed */
228 1.18.62.1 skrll uint32_t is_rx_defrag; /* rx defragmentation failed */
229 1.18.62.1 skrll uint32_t is_rx_mgmt; /* rx management frames */
230 1.18.62.1 skrll uint32_t is_rx_action; /* rx action mgt frames */
231 1.18.62.1 skrll uint32_t is_amsdu_tooshort; /* A-MSDU rx decap error */
232 1.18.62.1 skrll uint32_t is_amsdu_split; /* A-MSDU rx split error */
233 1.18.62.1 skrll uint32_t is_amsdu_decap; /* A-MSDU decap'd */
234 1.18.62.1 skrll uint32_t is_amsdu_encap; /* A-MSDU encap'd for tx */
235 1.18.62.1 skrll uint32_t is_ampdu_bar_bad; /* A-MPDU BAR out of window */
236 1.18.62.1 skrll uint32_t is_ampdu_bar_oow; /* A-MPDU BAR before ADDBA */
237 1.18.62.1 skrll uint32_t is_ampdu_bar_move; /* A-MPDU BAR moved window */
238 1.18.62.1 skrll uint32_t is_ampdu_bar_rx; /* A-MPDU BAR frames handled */
239 1.18.62.1 skrll uint32_t is_ampdu_rx_flush; /* A-MPDU frames flushed */
240 1.18.62.1 skrll uint32_t is_ampdu_rx_oor; /* A-MPDU frames out-of-order */
241 1.18.62.1 skrll uint32_t is_ampdu_rx_copy; /* A-MPDU frames copied down */
242 1.18.62.1 skrll uint32_t is_ampdu_rx_drop; /* A-MPDU frames dropped */
243 1.18.62.1 skrll uint32_t is_tx_badstate; /* tx discard state != RUN */
244 1.18.62.1 skrll uint32_t is_tx_notassoc; /* tx failed, sta not assoc */
245 1.18.62.1 skrll uint32_t is_tx_classify; /* tx classification failed */
246 1.18.62.1 skrll uint32_t is_ht_assoc_nohtcap; /* non-HT sta rejected */
247 1.18.62.1 skrll uint32_t is_ht_assoc_downgrade; /* HT sta forced to legacy */
248 1.18.62.1 skrll uint32_t is_ht_assoc_norate; /* HT assoc w/ rate mismatch */
249 1.18.62.1 skrll uint32_t is_ampdu_rx_age; /* A-MPDU sent up 'cuz of age */
250 1.18.62.1 skrll uint32_t is_ampdu_rx_move; /* A-MPDU MSDU moved window */
251 1.18.62.1 skrll uint32_t is_addba_reject; /* ADDBA reject 'cuz disabled */
252 1.18.62.1 skrll uint32_t is_addba_norequest; /* ADDBA response w/o ADDBA */
253 1.18.62.1 skrll uint32_t is_addba_badtoken; /* ADDBA response w/ wrong
254 1.18.62.1 skrll dialogtoken */
255 1.18.62.1 skrll uint32_t is_ampdu_stop; /* A-MPDU stream stopped */
256 1.18.62.1 skrll uint32_t is_ampdu_stop_failed; /* A-MPDU stream not running */
257 1.18.62.1 skrll uint32_t is_ampdu_rx_reorder; /* A-MPDU held for rx reorder */
258 1.18.62.1 skrll uint32_t is_spare[16];
259 1.9 dyoung };
260 1.9 dyoung
261 1.9 dyoung /*
262 1.9 dyoung * Max size of optional information elements. We artificially
263 1.9 dyoung * constrain this; it's limited only by the max frame size (and
264 1.9 dyoung * the max parameter size of the wireless extensions).
265 1.9 dyoung */
266 1.9 dyoung #define IEEE80211_MAX_OPT_IE 256
267 1.9 dyoung
268 1.9 dyoung /*
269 1.9 dyoung * WPA/RSN get/set key request. Specify the key/cipher
270 1.9 dyoung * type and whether the key is to be used for sending and/or
271 1.9 dyoung * receiving. The key index should be set only when working
272 1.9 dyoung * with global keys (use IEEE80211_KEYIX_NONE for ``no index'').
273 1.9 dyoung * Otherwise a unicast/pairwise key is specified by the bssid
274 1.9 dyoung * (on a station) or mac address (on an ap). They key length
275 1.9 dyoung * must include any MIC key data; otherwise it should be no
276 1.18.62.1 skrll * more than IEEE80211_KEYBUF_SIZE.
277 1.9 dyoung */
278 1.9 dyoung struct ieee80211req_key {
279 1.18.62.1 skrll uint8_t ik_type; /* key/cipher type */
280 1.18.62.1 skrll uint8_t ik_pad;
281 1.18.62.1 skrll uint16_t ik_keyix; /* key index */
282 1.18.62.1 skrll uint8_t ik_keylen; /* key length in bytes */
283 1.18.62.1 skrll uint8_t ik_flags;
284 1.9 dyoung /* NB: IEEE80211_KEY_XMIT and IEEE80211_KEY_RECV defined elsewhere */
285 1.9 dyoung #define IEEE80211_KEY_DEFAULT 0x80 /* default xmit key */
286 1.18.62.1 skrll uint8_t ik_macaddr[IEEE80211_ADDR_LEN];
287 1.18.62.1 skrll uint64_t ik_keyrsc; /* key receive sequence counter */
288 1.18.62.1 skrll uint64_t ik_keytsc; /* key transmit sequence counter */
289 1.18.62.1 skrll uint8_t ik_keydata[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE];
290 1.9 dyoung };
291 1.9 dyoung
292 1.9 dyoung /*
293 1.9 dyoung * Delete a key either by index or address. Set the index
294 1.9 dyoung * to IEEE80211_KEYIX_NONE when deleting a unicast key.
295 1.9 dyoung */
296 1.9 dyoung struct ieee80211req_del_key {
297 1.18.62.1 skrll uint8_t idk_keyix; /* key index */
298 1.18.62.1 skrll uint8_t idk_macaddr[IEEE80211_ADDR_LEN];
299 1.9 dyoung };
300 1.9 dyoung
301 1.9 dyoung /*
302 1.9 dyoung * MLME state manipulation request. IEEE80211_MLME_ASSOC
303 1.9 dyoung * only makes sense when operating as a station. The other
304 1.9 dyoung * requests can be used when operating as a station or an
305 1.9 dyoung * ap (to effect a station).
306 1.9 dyoung */
307 1.9 dyoung struct ieee80211req_mlme {
308 1.18.62.1 skrll uint8_t im_op; /* operation to perform */
309 1.9 dyoung #define IEEE80211_MLME_ASSOC 1 /* associate station */
310 1.9 dyoung #define IEEE80211_MLME_DISASSOC 2 /* disassociate station */
311 1.9 dyoung #define IEEE80211_MLME_DEAUTH 3 /* deauthenticate station */
312 1.9 dyoung #define IEEE80211_MLME_AUTHORIZE 4 /* authorize station */
313 1.9 dyoung #define IEEE80211_MLME_UNAUTHORIZE 5 /* unauthorize station */
314 1.18.62.1 skrll uint8_t im_ssid_len; /* length of optional ssid */
315 1.18.62.1 skrll uint16_t im_reason; /* 802.11 reason code */
316 1.18.62.1 skrll uint8_t im_macaddr[IEEE80211_ADDR_LEN];
317 1.18.62.1 skrll uint8_t im_ssid[IEEE80211_NWID_LEN];
318 1.9 dyoung };
319 1.9 dyoung
320 1.9 dyoung /*
321 1.9 dyoung * MAC ACL operations.
322 1.9 dyoung */
323 1.9 dyoung enum {
324 1.9 dyoung IEEE80211_MACCMD_POLICY_OPEN = 0, /* set policy: no ACL's */
325 1.9 dyoung IEEE80211_MACCMD_POLICY_ALLOW = 1, /* set policy: allow traffic */
326 1.9 dyoung IEEE80211_MACCMD_POLICY_DENY = 2, /* set policy: deny traffic */
327 1.9 dyoung IEEE80211_MACCMD_FLUSH = 3, /* flush ACL database */
328 1.9 dyoung IEEE80211_MACCMD_DETACH = 4, /* detach ACL policy */
329 1.15 skrll IEEE80211_MACCMD_POLICY = 5, /* get ACL policy */
330 1.15 skrll IEEE80211_MACCMD_LIST = 6, /* get ACL database */
331 1.15 skrll };
332 1.15 skrll
333 1.15 skrll struct ieee80211req_maclist {
334 1.18.62.1 skrll uint8_t ml_macaddr[IEEE80211_ADDR_LEN];
335 1.9 dyoung };
336 1.9 dyoung
337 1.9 dyoung /*
338 1.9 dyoung * Set the active channel list. Note this list is
339 1.9 dyoung * intersected with the available channel list in
340 1.9 dyoung * calculating the set of channels actually used in
341 1.9 dyoung * scanning.
342 1.9 dyoung */
343 1.9 dyoung struct ieee80211req_chanlist {
344 1.18.62.1 skrll uint8_t ic_channels[IEEE80211_CHAN_BYTES];
345 1.9 dyoung };
346 1.9 dyoung
347 1.9 dyoung /*
348 1.9 dyoung * Get the active channel list info.
349 1.9 dyoung */
350 1.9 dyoung struct ieee80211req_chaninfo {
351 1.9 dyoung u_int ic_nchans;
352 1.9 dyoung struct ieee80211_channel ic_chans[IEEE80211_CHAN_MAX];
353 1.9 dyoung };
354 1.9 dyoung
355 1.9 dyoung /*
356 1.9 dyoung * Retrieve the WPA/RSN information element for an associated station.
357 1.9 dyoung */
358 1.18.62.1 skrll struct ieee80211req_wpaie { /* old version w/ only one ie */
359 1.18.62.1 skrll uint8_t wpa_macaddr[IEEE80211_ADDR_LEN];
360 1.18.62.1 skrll uint8_t wpa_ie[IEEE80211_MAX_OPT_IE];
361 1.18.62.1 skrll };
362 1.18.62.1 skrll struct ieee80211req_wpaie2 {
363 1.18.62.1 skrll uint8_t wpa_macaddr[IEEE80211_ADDR_LEN];
364 1.18.62.1 skrll uint8_t wpa_ie[IEEE80211_MAX_OPT_IE];
365 1.18.62.1 skrll uint8_t rsn_ie[IEEE80211_MAX_OPT_IE];
366 1.9 dyoung };
367 1.9 dyoung
368 1.9 dyoung /*
369 1.9 dyoung * Retrieve per-node statistics.
370 1.9 dyoung */
371 1.9 dyoung struct ieee80211req_sta_stats {
372 1.9 dyoung union {
373 1.9 dyoung /* NB: explicitly force 64-bit alignment */
374 1.18.62.1 skrll uint8_t macaddr[IEEE80211_ADDR_LEN];
375 1.18.62.1 skrll uint64_t pad;
376 1.9 dyoung } is_u;
377 1.9 dyoung struct ieee80211_nodestats is_stats;
378 1.9 dyoung };
379 1.9 dyoung
380 1.9 dyoung /*
381 1.9 dyoung * Station information block; the mac address is used
382 1.9 dyoung * to retrieve other data like stats, unicast key, etc.
383 1.9 dyoung */
384 1.9 dyoung struct ieee80211req_sta_info {
385 1.18.62.1 skrll uint16_t isi_len; /* length (mult of 4) */
386 1.18.62.1 skrll uint16_t isi_ie_off; /* offset to IE data */
387 1.18.62.1 skrll uint16_t isi_ie_len; /* IE length */
388 1.18.62.1 skrll uint16_t isi_freq; /* MHz */
389 1.18.62.1 skrll uint32_t isi_flags; /* channel flags */
390 1.18.62.1 skrll uint16_t isi_state; /* state flags */
391 1.18.62.1 skrll uint8_t isi_authmode; /* authentication algorithm */
392 1.18.62.1 skrll int8_t isi_rssi; /* receive signal strength */
393 1.18.62.1 skrll int8_t isi_noise; /* noise floor */
394 1.18.62.1 skrll uint8_t isi_capinfo; /* capabilities */
395 1.18.62.1 skrll uint8_t isi_erp; /* ERP element */
396 1.18.62.1 skrll uint8_t isi_macaddr[IEEE80211_ADDR_LEN];
397 1.18.62.1 skrll uint8_t isi_nrates;
398 1.9 dyoung /* negotiated rates */
399 1.18.62.1 skrll uint8_t isi_rates[IEEE80211_RATE_MAXSIZE];
400 1.18.62.1 skrll uint8_t isi_txrate; /* index to isi_rates[] */
401 1.18.62.1 skrll uint16_t isi_associd; /* assoc response */
402 1.18.62.1 skrll uint16_t isi_txpower; /* current tx power */
403 1.18.62.1 skrll uint16_t isi_vlan; /* vlan tag */
404 1.18.62.1 skrll /* NB: [IEEE80211_NONQOS_TID] holds seq#'s for non-QoS stations */
405 1.18.62.1 skrll uint16_t isi_txseqs[IEEE80211_TID_SIZE];/* tx seq #/TID */
406 1.18.62.1 skrll uint16_t isi_rxseqs[IEEE80211_TID_SIZE];/* rx seq#/TID */
407 1.18.62.1 skrll uint16_t isi_inact; /* inactivity timer */
408 1.9 dyoung /* XXX frag state? */
409 1.9 dyoung /* variable length IE data */
410 1.9 dyoung };
411 1.9 dyoung
412 1.9 dyoung /*
413 1.9 dyoung * Retrieve per-station information; to retrieve all
414 1.9 dyoung * specify a mac address of ff:ff:ff:ff:ff:ff.
415 1.9 dyoung */
416 1.9 dyoung struct ieee80211req_sta_req {
417 1.9 dyoung union {
418 1.9 dyoung /* NB: explicitly force 64-bit alignment */
419 1.18.62.1 skrll uint8_t macaddr[IEEE80211_ADDR_LEN];
420 1.18.62.1 skrll uint64_t pad;
421 1.9 dyoung } is_u;
422 1.9 dyoung struct ieee80211req_sta_info info[1]; /* variable length */
423 1.9 dyoung };
424 1.9 dyoung
425 1.9 dyoung /*
426 1.9 dyoung * Get/set per-station tx power cap.
427 1.9 dyoung */
428 1.9 dyoung struct ieee80211req_sta_txpow {
429 1.18.62.1 skrll uint8_t it_macaddr[IEEE80211_ADDR_LEN];
430 1.18.62.1 skrll uint8_t it_txpow;
431 1.6 dyoung };
432 1.6 dyoung
433 1.9 dyoung /*
434 1.9 dyoung * WME parameters are set and return using i_val and i_len.
435 1.9 dyoung * i_val holds the value itself. i_len specifies the AC
436 1.9 dyoung * and, as appropriate, then high bit specifies whether the
437 1.9 dyoung * operation is to be applied to the BSS or ourself.
438 1.9 dyoung */
439 1.9 dyoung #define IEEE80211_WMEPARAM_SELF 0x0000 /* parameter applies to self */
440 1.9 dyoung #define IEEE80211_WMEPARAM_BSS 0x8000 /* parameter applies to BSS */
441 1.9 dyoung #define IEEE80211_WMEPARAM_VAL 0x7fff /* parameter value */
442 1.9 dyoung
443 1.1 dyoung /*
444 1.1 dyoung * FreeBSD-style ioctls.
445 1.1 dyoung */
446 1.1 dyoung /* the first member must be matched with struct ifreq */
447 1.1 dyoung struct ieee80211req {
448 1.1 dyoung char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
449 1.18.62.1 skrll uint16_t i_type; /* req type */
450 1.1 dyoung int16_t i_val; /* Index or simple value */
451 1.1 dyoung int16_t i_len; /* Index or simple value */
452 1.1 dyoung void *i_data; /* Extra data */
453 1.1 dyoung };
454 1.9 dyoung
455 1.9 dyoung #ifdef __FreeBSD__
456 1.1 dyoung #define SIOCS80211 _IOW('i', 234, struct ieee80211req)
457 1.1 dyoung #define SIOCG80211 _IOWR('i', 235, struct ieee80211req)
458 1.9 dyoung #define SIOCG80211STATS _IOWR('i', 236, struct ifreq)
459 1.9 dyoung #endif /* __FreeBSD__ */
460 1.1 dyoung
461 1.17 dyoung #ifdef __NetBSD__
462 1.17 dyoung #define SIOCS80211 _IOW('i', 244, struct ieee80211req)
463 1.17 dyoung #define SIOCG80211 _IOWR('i', 245, struct ieee80211req)
464 1.17 dyoung #define SIOCG80211STATS _IOWR('i', 246, struct ifreq)
465 1.17 dyoung #define SIOCG80211ZSTATS _IOWR('i', 247, struct ifreq)
466 1.17 dyoung #ifdef COMPAT_20
467 1.17 dyoung #define OSIOCG80211STATS _IOWR('i', 242, struct ifreq)
468 1.17 dyoung #define OSIOCG80211ZSTATS _IOWR('i', 243, struct ifreq)
469 1.17 dyoung #endif /* COMPAT_20 */
470 1.17 dyoung #endif /* __NetBSD__ */
471 1.17 dyoung
472 1.18 dyoung #if defined(__FreeBSD__) || defined(COMPAT_FREEBSD_NET80211)
473 1.1 dyoung #define IEEE80211_IOC_SSID 1
474 1.18 dyoung #endif /* __FreeBSD__ || COMPAT_FREEBSD_NET80211 */
475 1.1 dyoung #define IEEE80211_IOC_NUMSSIDS 2
476 1.1 dyoung #define IEEE80211_IOC_WEP 3
477 1.1 dyoung #define IEEE80211_WEP_NOSUP -1
478 1.1 dyoung #define IEEE80211_WEP_OFF 0
479 1.1 dyoung #define IEEE80211_WEP_ON 1
480 1.1 dyoung #define IEEE80211_WEP_MIXED 2
481 1.18 dyoung #if defined(__FreeBSD__) || defined(COMPAT_FREEBSD_NET80211)
482 1.1 dyoung #define IEEE80211_IOC_WEPKEY 4
483 1.18 dyoung #endif /* __FreeBSD__ || COMPAT_FREEBSD_NET80211 */
484 1.1 dyoung #define IEEE80211_IOC_NUMWEPKEYS 5
485 1.18 dyoung #if defined(__FreeBSD__) || defined(COMPAT_FREEBSD_NET80211)
486 1.1 dyoung #define IEEE80211_IOC_WEPTXKEY 6
487 1.18 dyoung #endif /* __FreeBSD__ || COMPAT_FREEBSD_NET80211 */
488 1.1 dyoung #define IEEE80211_IOC_AUTHMODE 7
489 1.1 dyoung #define IEEE80211_IOC_STATIONNAME 8
490 1.18 dyoung #if defined(__FreeBSD__) || defined(COMPAT_FREEBSD_NET80211)
491 1.1 dyoung #define IEEE80211_IOC_CHANNEL 9
492 1.18 dyoung #endif /* __FreeBSD__ || COMPAT_FREEBSD_NET80211 */
493 1.1 dyoung #define IEEE80211_IOC_POWERSAVE 10
494 1.1 dyoung #define IEEE80211_POWERSAVE_NOSUP -1
495 1.1 dyoung #define IEEE80211_POWERSAVE_OFF 0
496 1.1 dyoung #define IEEE80211_POWERSAVE_CAM 1
497 1.1 dyoung #define IEEE80211_POWERSAVE_PSP 2
498 1.1 dyoung #define IEEE80211_POWERSAVE_PSP_CAM 3
499 1.1 dyoung #define IEEE80211_POWERSAVE_ON IEEE80211_POWERSAVE_CAM
500 1.1 dyoung #define IEEE80211_IOC_POWERSAVESLEEP 11
501 1.6 dyoung #define IEEE80211_IOC_RTSTHRESHOLD 12
502 1.7 dyoung #define IEEE80211_IOC_PROTMODE 13
503 1.7 dyoung #define IEEE80211_PROTMODE_OFF 0
504 1.7 dyoung #define IEEE80211_PROTMODE_CTS 1
505 1.7 dyoung #define IEEE80211_PROTMODE_RTSCTS 2
506 1.9 dyoung #define IEEE80211_IOC_TXPOWER 14 /* global tx power limit */
507 1.18 dyoung #if defined(__FreeBSD__) || defined(COMPAT_FREEBSD_NET80211)
508 1.9 dyoung #define IEEE80211_IOC_BSSID 15
509 1.18 dyoung #endif /* __FreeBSD__ || COMPAT_FREEBSD_NET80211 */
510 1.9 dyoung #define IEEE80211_IOC_ROAMING 16 /* roaming mode */
511 1.9 dyoung #define IEEE80211_IOC_PRIVACY 17 /* privacy invoked */
512 1.9 dyoung #define IEEE80211_IOC_DROPUNENCRYPTED 18 /* discard unencrypted frames */
513 1.9 dyoung #define IEEE80211_IOC_WPAKEY 19
514 1.9 dyoung #define IEEE80211_IOC_DELKEY 20
515 1.9 dyoung #define IEEE80211_IOC_MLME 21
516 1.9 dyoung #define IEEE80211_IOC_OPTIE 22 /* optional info. element */
517 1.9 dyoung #define IEEE80211_IOC_SCAN_REQ 23
518 1.18.62.1 skrll /* 24 was IEEE80211_IOC_SCAN_RESULTS */
519 1.9 dyoung #define IEEE80211_IOC_COUNTERMEASURES 25 /* WPA/TKIP countermeasures */
520 1.9 dyoung #define IEEE80211_IOC_WPA 26 /* WPA mode (0,1,2) */
521 1.9 dyoung #define IEEE80211_IOC_CHANLIST 27 /* channel list */
522 1.9 dyoung #define IEEE80211_IOC_WME 28 /* WME mode (on, off) */
523 1.9 dyoung #define IEEE80211_IOC_HIDESSID 29 /* hide SSID mode (on, off) */
524 1.9 dyoung #define IEEE80211_IOC_APBRIDGE 30 /* AP inter-sta bridging */
525 1.9 dyoung #define IEEE80211_IOC_MCASTCIPHER 31 /* multicast/default cipher */
526 1.9 dyoung #define IEEE80211_IOC_MCASTKEYLEN 32 /* multicast key length */
527 1.9 dyoung #define IEEE80211_IOC_UCASTCIPHERS 33 /* unicast cipher suites */
528 1.9 dyoung #define IEEE80211_IOC_UCASTCIPHER 34 /* unicast cipher */
529 1.9 dyoung #define IEEE80211_IOC_UCASTKEYLEN 35 /* unicast key length */
530 1.9 dyoung #define IEEE80211_IOC_DRIVER_CAPS 36 /* driver capabilities */
531 1.9 dyoung #define IEEE80211_IOC_KEYMGTALGS 37 /* key management algorithms */
532 1.9 dyoung #define IEEE80211_IOC_RSNCAPS 38 /* RSN capabilities */
533 1.9 dyoung #define IEEE80211_IOC_WPAIE 39 /* WPA information element */
534 1.9 dyoung #define IEEE80211_IOC_STA_STATS 40 /* per-station statistics */
535 1.9 dyoung #define IEEE80211_IOC_MACCMD 41 /* MAC ACL operation */
536 1.9 dyoung #define IEEE80211_IOC_CHANINFO 42 /* channel info list */
537 1.9 dyoung #define IEEE80211_IOC_TXPOWMAX 43 /* max tx power for channel */
538 1.9 dyoung #define IEEE80211_IOC_STA_TXPOW 44 /* per-station tx power limit */
539 1.18.62.1 skrll /* 45 was IEEE80211_IOC_STA_INFO */
540 1.9 dyoung #define IEEE80211_IOC_WME_CWMIN 46 /* WME: ECWmin */
541 1.9 dyoung #define IEEE80211_IOC_WME_CWMAX 47 /* WME: ECWmax */
542 1.9 dyoung #define IEEE80211_IOC_WME_AIFS 48 /* WME: AIFSN */
543 1.9 dyoung #define IEEE80211_IOC_WME_TXOPLIMIT 49 /* WME: txops limit */
544 1.9 dyoung #define IEEE80211_IOC_WME_ACM 50 /* WME: ACM (bss only) */
545 1.9 dyoung #define IEEE80211_IOC_WME_ACKPOLICY 51 /* WME: ACK policy (!bss only)*/
546 1.9 dyoung #define IEEE80211_IOC_DTIM_PERIOD 52 /* DTIM period (beacons) */
547 1.9 dyoung #define IEEE80211_IOC_BEACON_INTERVAL 53 /* beacon interval (ms) */
548 1.9 dyoung #define IEEE80211_IOC_ADDMAC 54 /* add sta to MAC ACL table */
549 1.9 dyoung #define IEEE80211_IOC_DELMAC 55 /* del sta from MAC ACL table */
550 1.10 dyoung #define IEEE80211_IOC_PUREG 56 /* pure 11g (no 11b stations) */
551 1.18.62.1 skrll #define IEEE80211_IOC_FF 57 /* ATH fast frames (on, off) */
552 1.18.62.1 skrll #define IEEE80211_IOC_TURBOP 58 /* ATH turbo' (on, off) */
553 1.18.62.1 skrll #define IEEE80211_IOC_BGSCAN 59 /* bg scanning (on, off) */
554 1.18.62.1 skrll #define IEEE80211_IOC_BGSCAN_IDLE 60 /* bg scan idle threshold */
555 1.18.62.1 skrll #define IEEE80211_IOC_BGSCAN_INTERVAL 61 /* bg scan interval */
556 1.18.62.1 skrll #define IEEE80211_IOC_SCANVALID 65 /* scan cache valid threshold */
557 1.18.62.1 skrll #define IEEE80211_IOC_ROAM_RSSI_11A 66 /* rssi threshold in 11a */
558 1.18.62.1 skrll #define IEEE80211_IOC_ROAM_RSSI_11B 67 /* rssi threshold in 11b */
559 1.18.62.1 skrll #define IEEE80211_IOC_ROAM_RSSI_11G 68 /* rssi threshold in 11g */
560 1.18.62.1 skrll #define IEEE80211_IOC_ROAM_RATE_11A 69 /* tx rate threshold in 11a */
561 1.18.62.1 skrll #define IEEE80211_IOC_ROAM_RATE_11B 70 /* tx rate threshold in 11b */
562 1.18.62.1 skrll #define IEEE80211_IOC_ROAM_RATE_11G 71 /* tx rate threshold in 11g */
563 1.18.62.1 skrll #define IEEE80211_IOC_MCAST_RATE 72 /* tx rate for mcast frames */
564 1.18 dyoung #define IEEE80211_IOC_MCAST_RATE 72 /* tx rate for mcast frames */
565 1.15 skrll #define IEEE80211_IOC_FRAGTHRESHOLD 73 /* tx fragmentation threshold */
566 1.18.62.1 skrll #define IEEE80211_IOC_BURST 75 /* packet bursting */
567 1.18.62.1 skrll #define IEEE80211_IOC_SCAN_RESULTS 76 /* get scan results */
568 1.18.62.1 skrll #define IEEE80211_IOC_BMISSTHRESHOLD 77 /* beacon miss threshold */
569 1.18.62.1 skrll #define IEEE80211_IOC_STA_INFO 78 /* station/neighbor info */
570 1.18.62.1 skrll #define IEEE80211_IOC_WPAIE2 79 /* WPA+RSN info elements */
571 1.18.62.1 skrll #define IEEE80211_IOC_CURCHAN 80 /* current channel */
572 1.18.62.1 skrll #define IEEE80211_IOC_SHORTGI 81 /* 802.11n half GI */
573 1.18.62.1 skrll #define IEEE80211_IOC_AMPDU 82 /* 802.11n A-MPDU (on, off) */
574 1.18.62.1 skrll #define IEEE80211_IOC_AMPDU_LIMIT 83 /* A-MPDU length limit */
575 1.18.62.1 skrll #define IEEE80211_IOC_AMPDU_DENSITY 84 /* A-MPDU density */
576 1.18.62.1 skrll #define IEEE80211_IOC_AMSDU 85 /* 802.11n A-MSDU (on, off) */
577 1.18.62.1 skrll #define IEEE80211_IOC_AMSDU_LIMIT 86 /* A-MSDU length limit */
578 1.18.62.1 skrll #define IEEE80211_IOC_PUREN 87 /* pure 11n (no legacy sta's) */
579 1.18.62.1 skrll #define IEEE80211_IOC_DOTH 88 /* 802.11h (on, off) */
580 1.18.62.1 skrll #define IEEE80211_IOC_REGDOMAIN 89 /* regulatory domain */
581 1.18.62.1 skrll #define IEEE80211_IOC_COUNTRYCODE 90 /* ISO country code */
582 1.18.62.1 skrll #define IEEE80211_IOC_LOCATION 91 /* indoor/outdoor/anywhere */
583 1.18.62.1 skrll #define IEEE80211_IOC_HTCOMPAT 92 /* support pre-D1.10 HT ie's */
584 1.18.62.1 skrll #define IEEE80211_IOC_INACTIVITY 94 /* sta inactivity handling */
585 1.18.62.1 skrll #define IEEE80211_IOC_HTPROTMODE 102 /* HT protection (off, rts) */
586 1.18.62.1 skrll #define IEEE80211_IOC_HTCONF 105 /* HT config (off, HT20, HT40)*/
587 1.1 dyoung
588 1.9 dyoung /*
589 1.9 dyoung * Scan result data returned for IEEE80211_IOC_SCAN_RESULTS.
590 1.18.62.1 skrll * Each result is a fixed size structure followed by a variable
591 1.18.62.1 skrll * length SSID and one or more variable length information elements.
592 1.18.62.1 skrll * The size of each variable length item is found in the fixed
593 1.18.62.1 skrll * size structure and the entire length of the record is specified
594 1.18.62.1 skrll * in isr_len. Result records are rounded to a multiple of 4 bytes.
595 1.9 dyoung */
596 1.9 dyoung struct ieee80211req_scan_result {
597 1.18.62.1 skrll uint16_t isr_len; /* length (mult of 4) */
598 1.18.62.1 skrll uint16_t isr_ie_off; /* offset to IE data */
599 1.18.62.1 skrll uint16_t isr_ie_len; /* IE length */
600 1.18.62.1 skrll uint16_t isr_freq; /* MHz */
601 1.18.62.1 skrll uint16_t isr_flags; /* channel flags */
602 1.18.62.1 skrll int8_t isr_noise;
603 1.18.62.1 skrll int8_t isr_rssi;
604 1.18.62.1 skrll uint8_t isr_intval; /* beacon interval */
605 1.18.62.1 skrll uint8_t isr_capinfo; /* capabilities */
606 1.18.62.1 skrll uint8_t isr_erp; /* ERP element */
607 1.18.62.1 skrll uint8_t isr_bssid[IEEE80211_ADDR_LEN];
608 1.18.62.1 skrll uint8_t isr_nrates;
609 1.18.62.1 skrll uint8_t isr_rates[IEEE80211_RATE_MAXSIZE];
610 1.18.62.1 skrll uint8_t isr_ssid_len; /* SSID length */
611 1.9 dyoung /* variable length SSID followed by IE data */
612 1.9 dyoung };
613 1.2 dyoung
614 1.2 dyoung #ifdef __NetBSD__
615 1.2 dyoung /* nwid is pointed at by ifr.ifr_data */
616 1.2 dyoung struct ieee80211_nwid {
617 1.2 dyoung u_int8_t i_len;
618 1.2 dyoung u_int8_t i_nwid[IEEE80211_NWID_LEN];
619 1.2 dyoung };
620 1.2 dyoung
621 1.2 dyoung #define SIOCS80211NWID _IOWR('i', 230, struct ifreq)
622 1.2 dyoung #define SIOCG80211NWID _IOWR('i', 231, struct ifreq)
623 1.2 dyoung
624 1.2 dyoung /* the first member must be matched with struct ifreq */
625 1.2 dyoung struct ieee80211_nwkey {
626 1.2 dyoung char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
627 1.2 dyoung int i_wepon; /* wep enabled flag */
628 1.2 dyoung int i_defkid; /* default encrypt key id */
629 1.2 dyoung struct {
630 1.2 dyoung int i_keylen;
631 1.2 dyoung u_int8_t *i_keydat;
632 1.2 dyoung } i_key[IEEE80211_WEP_NKID];
633 1.2 dyoung };
634 1.2 dyoung #define SIOCS80211NWKEY _IOW('i', 232, struct ieee80211_nwkey)
635 1.2 dyoung #define SIOCG80211NWKEY _IOWR('i', 233, struct ieee80211_nwkey)
636 1.2 dyoung /* i_wepon */
637 1.2 dyoung #define IEEE80211_NWKEY_OPEN 0 /* No privacy */
638 1.2 dyoung #define IEEE80211_NWKEY_WEP 1 /* WEP enabled */
639 1.2 dyoung #define IEEE80211_NWKEY_EAP 2 /* EAP enabled */
640 1.2 dyoung #define IEEE80211_NWKEY_PERSIST 0x100 /* designate persist keyset */
641 1.2 dyoung
642 1.2 dyoung /* power management parameters */
643 1.2 dyoung struct ieee80211_power {
644 1.2 dyoung char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
645 1.2 dyoung int i_enabled; /* 1 == on, 0 == off */
646 1.2 dyoung int i_maxsleep; /* max sleep in ms */
647 1.2 dyoung };
648 1.2 dyoung #define SIOCS80211POWER _IOW('i', 234, struct ieee80211_power)
649 1.2 dyoung #define SIOCG80211POWER _IOWR('i', 235, struct ieee80211_power)
650 1.2 dyoung
651 1.2 dyoung struct ieee80211_auth {
652 1.2 dyoung char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
653 1.2 dyoung int i_authtype;
654 1.2 dyoung };
655 1.2 dyoung
656 1.2 dyoung #define IEEE80211_AUTH_NONE 0
657 1.2 dyoung #define IEEE80211_AUTH_OPEN 1
658 1.2 dyoung #define IEEE80211_AUTH_SHARED 2
659 1.2 dyoung
660 1.2 dyoung #define SIOCS80211AUTH _IOW('i', 236, struct ieee80211_auth)
661 1.2 dyoung #define SIOCG80211AUTH _IOWR('i', 237, struct ieee80211_auth)
662 1.2 dyoung
663 1.4 dyoung struct ieee80211chanreq {
664 1.2 dyoung char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
665 1.2 dyoung u_int16_t i_channel;
666 1.2 dyoung };
667 1.2 dyoung
668 1.5 dyoung #ifndef IEEE80211_CHAN_ANY
669 1.2 dyoung #define IEEE80211_CHAN_ANY 0xffff
670 1.4 dyoung #endif
671 1.2 dyoung
672 1.4 dyoung #define SIOCS80211CHANNEL _IOW('i', 238, struct ieee80211chanreq)
673 1.4 dyoung #define SIOCG80211CHANNEL _IOWR('i', 239, struct ieee80211chanreq)
674 1.2 dyoung
675 1.2 dyoung struct ieee80211_bssid {
676 1.2 dyoung char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
677 1.2 dyoung u_int8_t i_bssid[IEEE80211_ADDR_LEN];
678 1.2 dyoung };
679 1.2 dyoung
680 1.2 dyoung #define SIOCS80211BSSID _IOW('i', 240, struct ieee80211_bssid)
681 1.2 dyoung #define SIOCG80211BSSID _IOWR('i', 241, struct ieee80211_bssid)
682 1.6 dyoung
683 1.2 dyoung #endif
684 1.1 dyoung
685 1.18.62.1 skrll #if defined(__FreeBSD__) || defined(COMPAT_FREEBSD_NET80211)
686 1.18.62.1 skrll struct ieee80211_clone_params {
687 1.18.62.1 skrll char icp_parent[IFNAMSIZ]; /* parent device */
688 1.18.62.1 skrll int icp_opmode; /* operating mode */
689 1.18.62.1 skrll };
690 1.18.62.1 skrll #endif /* __FreeBSD__ || COMPAT_FREEBSD_NET80211 */
691 1.18.62.1 skrll
692 1.16 elad #endif /* !_NET80211_IEEE80211_IOCTL_H_ */
693