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