011ca65ab1005fd6bcf46083a9097b32df56174d
[dragonfly.git] / sys / netproto / 802_11 / ieee80211_ioctl.h
1 /*
2  * Copyright (c) 2001 Atsushi Onoe
3  * Copyright (c) 2002-2005 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  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  * 3. The name of the author may not be used to endorse or promote products
15  *    derived from this software without specific prior written permission.
16  *
17  * Alternatively, this software may be distributed under the terms of the
18  * GNU General Public License ("GPL") version 2 as published by the Free
19  * Software Foundation.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.10.2.7 2006/09/02 17:09:26 sam Exp $
33  * $DragonFly: src/sys/netproto/802_11/ieee80211_ioctl.h,v 1.8 2008/01/19 07:34:13 sephe Exp $
34  */
35 #ifndef _NET80211_IEEE80211_IOCTL_H_
36 #define _NET80211_IEEE80211_IOCTL_H_
37
38 /*
39  * IEEE 802.11 ioctls.
40  */
41 #include <netproto/802_11/_ieee80211.h>
42 #include <netproto/802_11/ieee80211.h>
43 #include <netproto/802_11/ieee80211_crypto.h>
44
45 /*
46  * Per/node (station) statistics.
47  */
48 struct ieee80211_nodestats {
49         uint32_t        ns_rx_data;             /* rx data frames */
50         uint32_t        ns_rx_mgmt;             /* rx management frames */
51         uint32_t        ns_rx_ctrl;             /* rx control frames */
52         uint32_t        ns_rx_ucast;            /* rx unicast frames */
53         uint32_t        ns_rx_mcast;            /* rx multi/broadcast frames */
54         uint64_t        ns_rx_bytes;            /* rx data count (bytes) */
55         uint64_t        ns_rx_beacons;          /* rx beacon frames */
56         uint32_t        ns_rx_proberesp;        /* rx probe response frames */
57
58         uint32_t        ns_rx_dup;              /* rx discard 'cuz dup */
59         uint32_t        ns_rx_noprivacy;        /* rx w/ wep but privacy off */
60         uint32_t        ns_rx_wepfail;          /* rx wep processing failed */
61         uint32_t        ns_rx_demicfail;        /* rx demic failed */
62         uint32_t        ns_rx_decap;            /* rx decapsulation failed */
63         uint32_t        ns_rx_defrag;           /* rx defragmentation failed */
64         uint32_t        ns_rx_disassoc;         /* rx disassociation */
65         uint32_t        ns_rx_deauth;           /* rx deauthentication */
66         uint32_t        ns_rx_decryptcrc;       /* rx decrypt failed on crc */
67         uint32_t        ns_rx_unauth;           /* rx on unauthorized port */
68         uint32_t        ns_rx_unencrypted;      /* rx unecrypted w/ privacy */
69
70         uint32_t        ns_tx_data;             /* tx data frames */
71         uint32_t        ns_tx_mgmt;             /* tx management frames */
72         uint32_t        ns_tx_ucast;            /* tx unicast frames */
73         uint32_t        ns_tx_mcast;            /* tx multi/broadcast frames */
74         uint64_t        ns_tx_bytes;            /* tx data count (bytes) */
75         uint32_t        ns_tx_probereq;         /* tx probe request frames */
76
77         uint32_t        ns_tx_novlantag;        /* tx discard 'cuz no tag */
78         uint32_t        ns_tx_vlanmismatch;     /* tx discard 'cuz bad tag */
79
80         uint32_t        ns_ps_discard;          /* ps discard 'cuz of age */
81
82         /* MIB-related state */
83         uint32_t        ns_tx_assoc;            /* [re]associations */
84         uint32_t        ns_tx_assoc_fail;       /* [re]association failures */
85         uint32_t        ns_tx_auth;             /* [re]authentications */
86         uint32_t        ns_tx_auth_fail;        /* [re]authentication failures*/
87         uint32_t        ns_tx_deauth;           /* deauthentications */
88         uint32_t        ns_tx_deauth_code;      /* last deauth reason */
89         uint32_t        ns_tx_disassoc;         /* disassociations */
90         uint32_t        ns_tx_disassoc_code;    /* last disassociation reason */
91 };
92
93 /*
94  * Summary statistics.
95  */
96 struct ieee80211_stats {
97         uint32_t        is_rx_badversion;       /* rx frame with bad version */
98         uint32_t        is_rx_tooshort;         /* rx frame too short */
99         uint32_t        is_rx_wrongbss;         /* rx from wrong bssid */
100         uint32_t        is_rx_dup;              /* rx discard 'cuz dup */
101         uint32_t        is_rx_wrongdir;         /* rx w/ wrong direction */
102         uint32_t        is_rx_mcastecho;        /* rx discard 'cuz mcast echo */
103         uint32_t        is_rx_notassoc;         /* rx discard 'cuz sta !assoc */
104         uint32_t        is_rx_noprivacy;        /* rx w/ wep but privacy off */
105         uint32_t        is_rx_unencrypted;      /* rx w/o wep and privacy on */
106         uint32_t        is_rx_wepfail;          /* rx wep processing failed */
107         uint32_t        is_rx_decap;            /* rx decapsulation failed */
108         uint32_t        is_rx_mgtdiscard;       /* rx discard mgt frames */
109         uint32_t        is_rx_ctl;              /* rx discard ctrl frames */
110         uint32_t        is_rx_beacon;           /* rx beacon frames */
111         uint32_t        is_rx_rstoobig;         /* rx rate set truncated */
112         uint32_t        is_rx_elem_missing;     /* rx required element missing*/
113         uint32_t        is_rx_elem_toobig;      /* rx element too big */
114         uint32_t        is_rx_elem_toosmall;    /* rx element too small */
115         uint32_t        is_rx_elem_unknown;     /* rx element unknown */
116         uint32_t        is_rx_badchan;          /* rx frame w/ invalid chan */
117         uint32_t        is_rx_chanmismatch;     /* rx frame chan mismatch */
118         uint32_t        is_rx_nodealloc;        /* rx frame dropped */
119         uint32_t        is_rx_ssidmismatch;     /* rx frame ssid mismatch  */
120         uint32_t        is_rx_auth_unsupported; /* rx w/ unsupported auth alg */
121         uint32_t        is_rx_auth_fail;        /* rx sta auth failure */
122         uint32_t        is_rx_auth_countermeasures;/* rx auth discard 'cuz CM */
123         uint32_t        is_rx_assoc_bss;        /* rx assoc from wrong bssid */
124         uint32_t        is_rx_assoc_notauth;    /* rx assoc w/o auth */
125         uint32_t        is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */
126         uint32_t        is_rx_assoc_norate;     /* rx assoc w/ no rate match */
127         uint32_t        is_rx_assoc_badwpaie;   /* rx assoc w/ bad WPA IE */
128         uint32_t        is_rx_deauth;           /* rx deauthentication */
129         uint32_t        is_rx_disassoc;         /* rx disassociation */
130         uint32_t        is_rx_badsubtype;       /* rx frame w/ unknown subtype*/
131         uint32_t        is_rx_nobuf;            /* rx failed for lack of buf */
132         uint32_t        is_rx_decryptcrc;       /* rx decrypt failed on crc */
133         uint32_t        is_rx_ahdemo_mgt;       /* rx discard ahdemo mgt frame*/
134         uint32_t        is_rx_bad_auth;         /* rx bad auth request */
135         uint32_t        is_rx_unauth;           /* rx on unauthorized port */
136         uint32_t        is_rx_badkeyid;         /* rx w/ incorrect keyid */
137         uint32_t        is_rx_ccmpreplay;       /* rx seq# violation (CCMP) */
138         uint32_t        is_rx_ccmpformat;       /* rx format bad (CCMP) */
139         uint32_t        is_rx_ccmpmic;          /* rx MIC check failed (CCMP) */
140         uint32_t        is_rx_tkipreplay;       /* rx seq# violation (TKIP) */
141         uint32_t        is_rx_tkipformat;       /* rx format bad (TKIP) */
142         uint32_t        is_rx_tkipmic;          /* rx MIC check failed (TKIP) */
143         uint32_t        is_rx_tkipicv;          /* rx ICV check failed (TKIP) */
144         uint32_t        is_rx_badcipher;        /* rx failed 'cuz key type */
145         uint32_t        is_rx_nocipherctx;      /* rx failed 'cuz key !setup */
146         uint32_t        is_rx_acl;              /* rx discard 'cuz acl policy */
147         uint32_t        is_tx_nobuf;            /* tx failed for lack of buf */
148         uint32_t        is_tx_nonode;           /* tx failed for no node */
149         uint32_t        is_tx_unknownmgt;       /* tx of unknown mgt frame */
150         uint32_t        is_tx_badcipher;        /* tx failed 'cuz key type */
151         uint32_t        is_tx_nodefkey;         /* tx failed 'cuz no defkey */
152         uint32_t        is_tx_noheadroom;       /* tx failed 'cuz no space */
153         uint32_t        is_tx_fragframes;       /* tx frames fragmented */
154         uint32_t        is_tx_frags;            /* tx fragments created */
155         uint32_t        is_scan_active;         /* active scans started */
156         uint32_t        is_scan_passive;        /* passive scans started */
157         uint32_t        is_node_timeout;        /* nodes timed out inactivity */
158         uint32_t        is_crypto_nomem;        /* no memory for crypto ctx */
159         uint32_t        is_crypto_tkip;         /* tkip crypto done in s/w */
160         uint32_t        is_crypto_tkipenmic;    /* tkip en-MIC done in s/w */
161         uint32_t        is_crypto_tkipdemic;    /* tkip de-MIC done in s/w */
162         uint32_t        is_crypto_tkipcm;       /* tkip counter measures */
163         uint32_t        is_crypto_ccmp;         /* ccmp crypto done in s/w */
164         uint32_t        is_crypto_wep;          /* wep crypto done in s/w */
165         uint32_t        is_crypto_setkey_cipher;/* cipher rejected key */
166         uint32_t        is_crypto_setkey_nokey; /* no key index for setkey */
167         uint32_t        is_crypto_delkey;       /* driver key delete failed */
168         uint32_t        is_crypto_badcipher;    /* unknown cipher */
169         uint32_t        is_crypto_nocipher;     /* cipher not available */
170         uint32_t        is_crypto_attachfail;   /* cipher attach failed */
171         uint32_t        is_crypto_swfallback;   /* cipher fallback to s/w */
172         uint32_t        is_crypto_keyfail;      /* driver key alloc failed */
173         uint32_t        is_crypto_enmicfail;    /* en-MIC failed */
174         uint32_t        is_ibss_capmismatch;    /* merge failed-cap mismatch */
175         uint32_t        is_ibss_norate;         /* merge failed-rate mismatch */
176         uint32_t        is_ps_unassoc;          /* ps-poll for unassoc. sta */
177         uint32_t        is_ps_badaid;           /* ps-poll w/ incorrect aid */
178         uint32_t        is_ps_qempty;           /* ps-poll w/ nothing to send */
179         uint32_t        is_ff_badhdr;           /* fast frame rx'd w/ bad hdr */
180         uint32_t        is_ff_tooshort;         /* fast frame rx decap error */
181         uint32_t        is_ff_split;            /* fast frame rx split error */
182         uint32_t        is_ff_decap;            /* fast frames decap'd */
183         uint32_t        is_ff_encap;            /* fast frames encap'd for tx */
184         uint32_t        is_rx_badbintval;       /* rx frame w/ bogus bintval */
185         uint32_t        is_rx_demicfail;        /* rx demic failed */
186         uint32_t        is_rx_defrag;           /* rx defragmentation failed */
187         uint32_t        is_rx_mgmt;             /* rx management frames */
188         uint32_t        is_spare[6];
189 };
190
191 /*
192  * Max size of optional information elements.  We artificially
193  * constrain this; it's limited only by the max frame size (and
194  * the max parameter size of the wireless extensions).
195  */
196 #define IEEE80211_MAX_OPT_IE    256
197
198 /*
199  * WPA/RSN get/set key request.  Specify the key/cipher
200  * type and whether the key is to be used for sending and/or
201  * receiving.  The key index should be set only when working
202  * with global keys (use IEEE80211_KEYIX_NONE for ``no index'').
203  * Otherwise a unicast/pairwise key is specified by the bssid
204  * (on a station) or mac address (on an ap).  They key length
205  * must include any MIC key data; otherwise it should be no
206  more than IEEE80211_KEYBUF_SIZE.
207  */
208 struct ieee80211req_key {
209         uint8_t         ik_type;        /* key/cipher type */
210         uint8_t         ik_pad;
211         uint16_t        ik_keyix;       /* key index */
212         uint8_t         ik_keylen;      /* key length in bytes */
213         uint8_t         ik_flags;
214 /* NB: IEEE80211_KEY_XMIT and IEEE80211_KEY_RECV defined elsewhere */
215 #define IEEE80211_KEY_DEFAULT   0x80    /* default xmit key */
216         uint8_t         ik_macaddr[IEEE80211_ADDR_LEN];
217         uint64_t        ik_keyrsc;      /* key receive sequence counter */
218         uint64_t        ik_keytsc;      /* key transmit sequence counter */
219         uint8_t         ik_keydata[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE];
220 };
221
222 /*
223  * Delete a key either by index or address.  Set the index
224  * to IEEE80211_KEYIX_NONE when deleting a unicast key.
225  */
226 struct ieee80211req_del_key {
227         uint8_t         idk_keyix;      /* key index */
228         uint8_t         idk_macaddr[IEEE80211_ADDR_LEN];
229 };
230
231 /*
232  * MLME state manipulation request.  IEEE80211_MLME_ASSOC
233  * only makes sense when operating as a station.  The other
234  * requests can be used when operating as a station or an
235  * ap (to effect a station).
236  */
237 struct ieee80211req_mlme {
238         uint8_t         im_op;          /* operation to perform */
239 #define IEEE80211_MLME_ASSOC            1       /* associate station */
240 #define IEEE80211_MLME_DISASSOC         2       /* disassociate station */
241 #define IEEE80211_MLME_DEAUTH           3       /* deauthenticate station */
242 #define IEEE80211_MLME_AUTHORIZE        4       /* authorize station */
243 #define IEEE80211_MLME_UNAUTHORIZE      5       /* unauthorize station */
244         uint8_t         im_ssid_len;    /* length of optional ssid */
245         uint16_t        im_reason;      /* 802.11 reason code */
246         uint8_t         im_macaddr[IEEE80211_ADDR_LEN];
247         uint8_t         im_ssid[IEEE80211_NWID_LEN];
248 };
249
250 /* 
251  * MAC ACL operations.
252  */
253 enum {
254         IEEE80211_MACCMD_POLICY_OPEN    = 0,    /* set policy: no ACL's */
255         IEEE80211_MACCMD_POLICY_ALLOW   = 1,    /* set policy: allow traffic */
256         IEEE80211_MACCMD_POLICY_DENY    = 2,    /* set policy: deny traffic */
257         IEEE80211_MACCMD_FLUSH          = 3,    /* flush ACL database */
258         IEEE80211_MACCMD_DETACH         = 4,    /* detach ACL policy */
259         IEEE80211_MACCMD_POLICY         = 5,    /* get ACL policy */
260         IEEE80211_MACCMD_LIST           = 6,    /* get ACL database */
261 };
262
263 struct ieee80211req_maclist {
264         uint8_t         ml_macaddr[IEEE80211_ADDR_LEN];
265 };
266
267 /*
268  * Set the active channel list.  Note this list is
269  * intersected with the available channel list in
270  * calculating the set of channels actually used in
271  * scanning.
272  */
273 struct ieee80211req_chanlist {
274         uint8_t         ic_channels[IEEE80211_CHAN_BYTES];
275 };
276
277 /*
278  * Get the active channel list info.
279  */
280 struct ieee80211req_chaninfo {
281         u_int   ic_nchans;
282         struct ieee80211_channel ic_chans[IEEE80211_CHAN_MAX];
283 };
284
285 /*
286  * Retrieve the WPA/RSN information element for an associated station.
287  */
288 struct ieee80211req_wpaie {
289         uint8_t         wpa_macaddr[IEEE80211_ADDR_LEN];
290         uint8_t         wpa_ie[IEEE80211_MAX_OPT_IE];
291 };
292
293 /*
294  * Retrieve per-node statistics.
295  */
296 struct ieee80211req_sta_stats {
297         union {
298                 /* NB: explicitly force 64-bit alignment */
299                 uint8_t         macaddr[IEEE80211_ADDR_LEN];
300                 uint64_t        pad;
301         } is_u;
302         struct ieee80211_nodestats is_stats;
303 };
304
305 /*
306  * Station information block; the mac address is used
307  * to retrieve other data like stats, unicast key, etc.
308  */
309 struct ieee80211req_sta_info {
310         uint16_t        isi_len;                /* length (mult of 4) */
311         uint16_t        isi_freq;               /* MHz */
312         uint16_t        isi_flags;              /* channel flags */
313         uint16_t        isi_state;              /* state flags */
314         uint8_t         isi_authmode;           /* authentication algorithm */
315         uint8_t         isi_rssi;               /* receive signal strength */
316         uint8_t         isi_capinfo;            /* deprecated */
317         uint8_t         isi_erp;                /* ERP element */
318         uint8_t         isi_macaddr[IEEE80211_ADDR_LEN];
319         uint8_t         isi_nrates;
320                                         /* negotiated rates */
321         uint8_t         isi_rates[IEEE80211_RATE_MAXSIZE];
322         uint8_t         isi_txrate;             /* index to isi_rates[] */
323         int8_t          isi_noise;              /* noise floor */
324         uint16_t        isi_ie_len;             /* IE length */
325         uint16_t        isi_associd;            /* assoc response */
326         uint16_t        isi_txpower;            /* current tx power */
327         uint16_t        isi_vlan;               /* vlan tag */
328         uint16_t        isi_txseqs[17];         /* seq to be transmitted */
329         uint16_t        isi_rxseqs[17];         /* seq previous for qos frames*/
330         uint16_t        isi_inact;              /* inactivity timer */
331         uint16_t        isi_capinfo2;           /* capabilities */
332         /* XXX frag state? */
333         /* variable length IE data */
334 };
335
336 /*
337  * Retrieve per-station information; to retrieve all
338  * specify a mac address of ff:ff:ff:ff:ff:ff.
339  */
340 struct ieee80211req_sta_req {
341         union {
342                 /* NB: explicitly force 64-bit alignment */
343                 uint8_t         macaddr[IEEE80211_ADDR_LEN];
344                 uint64_t        pad;
345         } is_u;
346         struct ieee80211req_sta_info info[1];   /* variable length */
347 };
348
349 /*
350  * Get/set per-station tx power cap.
351  */
352 struct ieee80211req_sta_txpow {
353         uint8_t         it_macaddr[IEEE80211_ADDR_LEN];
354         uint8_t         it_txpow;
355 };
356
357 /*
358  * WME parameters are set and return using i_val and i_len.
359  * i_val holds the value itself.  i_len specifies the AC
360  * and, as appropriate, then high bit specifies whether the
361  * operation is to be applied to the BSS or ourself.
362  */
363 #define IEEE80211_WMEPARAM_SELF 0x0000          /* parameter applies to self */
364 #define IEEE80211_WMEPARAM_BSS  0x8000          /* parameter applies to BSS */
365 #define IEEE80211_WMEPARAM_VAL  0x7fff          /* parameter value */
366
367 #if defined(__FreeBSD__) || defined(__DragonFly__)
368 /*
369  * FreeBSD-style ioctls.
370  */
371 /* the first member must be matched with struct ifreq */
372 struct ieee80211req {
373         char            i_name[IFNAMSIZ];       /* if_name, e.g. "wi0" */
374         uint16_t        i_type;                 /* req type */
375         int16_t         i_val;                  /* Index or simple value */
376         int16_t         i_len;                  /* Index or simple value */
377         void            *i_data;                /* Extra data */
378 };
379 #define SIOCS80211               _IOW('i', 234, struct ieee80211req)
380 #define SIOCG80211              _IOWR('i', 235, struct ieee80211req)
381
382 #define IEEE80211_IOC_SSID              1
383 #define IEEE80211_IOC_NUMSSIDS          2
384 #define IEEE80211_IOC_WEP               3
385 #define         IEEE80211_WEP_NOSUP     -1
386 #define         IEEE80211_WEP_OFF       0
387 #define         IEEE80211_WEP_ON        1
388 #define         IEEE80211_WEP_MIXED     2
389 #define IEEE80211_IOC_WEPKEY            4
390 #define IEEE80211_IOC_NUMWEPKEYS        5
391 #define IEEE80211_IOC_WEPTXKEY          6
392 #define IEEE80211_IOC_AUTHMODE          7
393 #define IEEE80211_IOC_STATIONNAME       8
394 #define IEEE80211_IOC_CHANNEL           9
395 #define IEEE80211_IOC_POWERSAVE         10
396 #define         IEEE80211_POWERSAVE_NOSUP       -1
397 #define         IEEE80211_POWERSAVE_OFF         0
398 #define         IEEE80211_POWERSAVE_CAM         1
399 #define         IEEE80211_POWERSAVE_PSP         2
400 #define         IEEE80211_POWERSAVE_PSP_CAM     3
401 #define         IEEE80211_POWERSAVE_ON          IEEE80211_POWERSAVE_CAM
402 #define IEEE80211_IOC_POWERSAVESLEEP    11
403 #define IEEE80211_IOC_RTSTHRESHOLD      12
404 #define IEEE80211_IOC_PROTMODE          13
405 #define         IEEE80211_PROTMODE_OFF          0
406 #define         IEEE80211_PROTMODE_CTS          1
407 #define         IEEE80211_PROTMODE_RTSCTS       2
408 #define IEEE80211_IOC_TXPOWER           14      /* global tx power limit */
409 #define IEEE80211_IOC_BSSID             15
410 #define IEEE80211_IOC_ROAMING           16      /* roaming mode */
411 #define IEEE80211_IOC_PRIVACY           17      /* privacy invoked */
412 #define IEEE80211_IOC_DROPUNENCRYPTED   18      /* discard unencrypted frames */
413 #define IEEE80211_IOC_WPAKEY            19
414 #define IEEE80211_IOC_DELKEY            20
415 #define IEEE80211_IOC_MLME              21
416 #define IEEE80211_IOC_OPTIE             22      /* optional info. element */
417 #define IEEE80211_IOC_SCAN_REQ          23
418 #define IEEE80211_IOC_SCAN_RESULTS      24
419 #define IEEE80211_IOC_COUNTERMEASURES   25      /* WPA/TKIP countermeasures */
420 #define IEEE80211_IOC_WPA               26      /* WPA mode (0,1,2) */
421 #define IEEE80211_IOC_CHANLIST          27      /* channel list */
422 #define IEEE80211_IOC_WME               28      /* WME mode (on, off) */
423 #define IEEE80211_IOC_HIDESSID          29      /* hide SSID mode (on, off) */
424 #define IEEE80211_IOC_APBRIDGE          30      /* AP inter-sta bridging */
425 #define IEEE80211_IOC_MCASTCIPHER       31      /* multicast/default cipher */
426 #define IEEE80211_IOC_MCASTKEYLEN       32      /* multicast key length */
427 #define IEEE80211_IOC_UCASTCIPHERS      33      /* unicast cipher suites */
428 #define IEEE80211_IOC_UCASTCIPHER       34      /* unicast cipher */
429 #define IEEE80211_IOC_UCASTKEYLEN       35      /* unicast key length */
430 #define IEEE80211_IOC_DRIVER_CAPS       36      /* driver capabilities */
431 #define IEEE80211_IOC_KEYMGTALGS        37      /* key management algorithms */
432 #define IEEE80211_IOC_RSNCAPS           38      /* RSN capabilities */
433 #define IEEE80211_IOC_WPAIE             39      /* WPA information element */
434 #define IEEE80211_IOC_STA_STATS         40      /* per-station statistics */
435 #define IEEE80211_IOC_MACCMD            41      /* MAC ACL operation */
436 #define IEEE80211_IOC_CHANINFO          42      /* channel info list */
437 #define IEEE80211_IOC_TXPOWMAX          43      /* max tx power for channel */
438 #define IEEE80211_IOC_STA_TXPOW         44      /* per-station tx power limit */
439 #define IEEE80211_IOC_WME_CWMIN         46      /* WME: ECWmin */
440 #define IEEE80211_IOC_WME_CWMAX         47      /* WME: ECWmax */
441 #define IEEE80211_IOC_WME_AIFS          48      /* WME: AIFSN */
442 #define IEEE80211_IOC_WME_TXOPLIMIT     49      /* WME: txops limit */
443 #define IEEE80211_IOC_WME_ACM           50      /* WME: ACM (bss only) */
444 #define IEEE80211_IOC_WME_ACKPOLICY     51      /* WME: ACK policy (!bss only)*/
445 #define IEEE80211_IOC_DTIM_PERIOD       52      /* DTIM period (beacons) */
446 #define IEEE80211_IOC_BEACON_INTERVAL   53      /* beacon interval (ms) */
447 #define IEEE80211_IOC_ADDMAC            54      /* add sta to MAC ACL table */
448 #define IEEE80211_IOC_DELMAC            55      /* del sta from MAC ACL table */
449 #define IEEE80211_IOC_PUREG             56      /* pure 11g (no 11b stations) */
450 #define IEEE80211_IOC_MCAST_RATE        72      /* tx rate for mcast frames */
451 #define IEEE80211_IOC_FRAGTHRESHOLD     73      /* tx fragmentation threshold */
452 #define IEEE80211_IOC_BURST             75      /* packet bursting */
453 #define IEEE80211_IOC_BMISSTHRESHOLD    77      /* beacon miss threshold */
454 #define IEEE80211_IOC_STA_INFO          78      /* station/neighbor info */
455 #define IEEE80211_IOC_RATECTL           255
456
457 /*
458  * Scan result data returned for IEEE80211_IOC_SCAN_RESULTS.
459  */
460 struct ieee80211req_scan_result {
461         uint16_t        isr_len;                /* length (mult of 4) */
462         uint16_t        isr_freq;               /* MHz */
463         uint16_t        isr_flags;              /* channel flags */
464         uint8_t         isr_noise;
465         uint8_t         isr_rssi;
466         uint8_t         isr_intval;             /* beacon interval */
467         uint8_t         isr_capinfo;            /* capabilities (deprecated) */
468         uint8_t         isr_erp;                /* ERP element */
469         uint8_t         isr_bssid[IEEE80211_ADDR_LEN];
470         uint8_t         isr_nrates;
471         uint8_t         isr_rates[IEEE80211_RATE_MAXSIZE];
472         uint8_t         isr_ssid_len;           /* SSID length */
473         uint8_t         isr_ie_len;             /* IE length */
474         uint16_t        isr_capinfo2;           /* capabilities */
475         uint8_t         isr_pad[3];
476         /* variable length SSID followed by IE data */
477 };
478
479 #define SIOCG80211STATS         _IOWR('i', 236, struct ifreq)
480 #endif /* __FreeBSD__ || __DragonFly__ */
481
482 #endif /* _NET80211_IEEE80211_IOCTL_H_ */