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

Cache object: 5df706e261c1848c08d442d4b0131c3e


[ 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.