The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/net80211/ieee80211_ioctl.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

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

Cache object: 076b641cd3546fed53a35eff3a00ca22


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.