/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * This file define a set of standard wireless extensions * * Version : 22 16.3.07 * * Authors : Jean Tourrilhes - HPL - <[email protected]> * Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved. */ #ifndef _UAPI_LINUX_WIRELESS_H #define _UAPI_LINUX_WIRELESS_H /************************** DOCUMENTATION **************************/ /* * Initial APIs (1996 -> onward) : * ----------------------------- * Basically, the wireless extensions are for now a set of standard ioctl * call + /proc/net/wireless * * The entry /proc/net/wireless give statistics and information on the * driver. * This is better than having each driver having its entry because * its centralised and we may remove the driver module safely. * * Ioctl are used to configure the driver and issue commands. This is * better than command line options of insmod because we may want to * change dynamically (while the driver is running) some parameters. * * The ioctl mechanimsm are copied from standard devices ioctl. * We have the list of command plus a structure descibing the * data exchanged... * Note that to add these ioctl, I was obliged to modify : * # net/core/dev.c (two place + add include) * # net/ipv4/af_inet.c (one place + add include) * * /proc/net/wireless is a copy of /proc/net/dev. * We have a structure for data passed from the driver to /proc/net/wireless * Too add this, I've modified : * # net/core/dev.c (two other places) * # include/linux/netdevice.h (one place) * # include/linux/proc_fs.h (one place) * * New driver API (2002 -> onward) : * ------------------------------- * This file is only concerned with the user space API and common definitions. * The new driver API is defined and documented in : * # include/net/iw_handler.h * * Note as well that /proc/net/wireless implementation has now moved in : * # net/core/wireless.c * * Wireless Events (2002 -> onward) : * -------------------------------- * Events are defined at the end of this file, and implemented in : * # net/core/wireless.c * * Other comments : * -------------- * Do not add here things that are redundant with other mechanisms * (drivers init, ifconfig, /proc/net/dev, ...) and with are not * wireless specific. * * These wireless extensions are not magic : each driver has to provide * support for them... * * IMPORTANT NOTE : As everything in the kernel, this is very much a * work in progress. Contact me if you have ideas of improvements... */ /***************************** INCLUDES *****************************/ #include <linux/types.h> /* for __u* and __s* typedefs */ #include <linux/socket.h> /* for "struct sockaddr" et al */ #include <linux/if.h> /* for IFNAMSIZ and co... */ #ifdef __KERNEL__ # include <linux/stddef.h> /* for offsetof */ #else # include <stddef.h> /* for offsetof */ #endif /***************************** VERSION *****************************/ /* * This constant is used to know the availability of the wireless * extensions and to know which version of wireless extensions it is * (there is some stuff that will be added in the future...) * I just plan to increment with each new version. */ #define WIRELESS_EXT … /* * Changes : * * V2 to V3 * -------- * Alan Cox start some incompatibles changes. I've integrated a bit more. * - Encryption renamed to Encode to avoid US regulation problems * - Frequency changed from float to struct to avoid problems on old 386 * * V3 to V4 * -------- * - Add sensitivity * * V4 to V5 * -------- * - Missing encoding definitions in range * - Access points stuff * * V5 to V6 * -------- * - 802.11 support (ESSID ioctls) * * V6 to V7 * -------- * - define IW_ESSID_MAX_SIZE and IW_MAX_AP * * V7 to V8 * -------- * - Changed my e-mail address * - More 802.11 support (nickname, rate, rts, frag) * - List index in frequencies * * V8 to V9 * -------- * - Support for 'mode of operation' (ad-hoc, managed...) * - Support for unicast and multicast power saving * - Change encoding to support larger tokens (>64 bits) * - Updated iw_params (disable, flags) and use it for NWID * - Extracted iw_point from iwreq for clarity * * V9 to V10 * --------- * - Add PM capability to range structure * - Add PM modifier : MAX/MIN/RELATIVE * - Add encoding option : IW_ENCODE_NOKEY * - Add TxPower ioctls (work like TxRate) * * V10 to V11 * ---------- * - Add WE version in range (help backward/forward compatibility) * - Add retry ioctls (work like PM) * * V11 to V12 * ---------- * - Add SIOCSIWSTATS to get /proc/net/wireless programatically * - Add DEV PRIVATE IOCTL to avoid collisions in SIOCDEVPRIVATE space * - Add new statistics (frag, retry, beacon) * - Add average quality (for user space calibration) * * V12 to V13 * ---------- * - Document creation of new driver API. * - Extract union iwreq_data from struct iwreq (for new driver API). * - Rename SIOCSIWNAME as SIOCSIWCOMMIT * * V13 to V14 * ---------- * - Wireless Events support : define struct iw_event * - Define additional specific event numbers * - Add "addr" and "param" fields in union iwreq_data * - AP scanning stuff (SIOCSIWSCAN and friends) * * V14 to V15 * ---------- * - Add IW_PRIV_TYPE_ADDR for struct sockaddr private arg * - Make struct iw_freq signed (both m & e), add explicit padding * - Add IWEVCUSTOM for driver specific event/scanning token * - Add IW_MAX_GET_SPY for driver returning a lot of addresses * - Add IW_TXPOW_RANGE for range of Tx Powers * - Add IWEVREGISTERED & IWEVEXPIRED events for Access Points * - Add IW_MODE_MONITOR for passive monitor * * V15 to V16 * ---------- * - Increase the number of bitrates in iw_range to 32 (for 802.11g) * - Increase the number of frequencies in iw_range to 32 (for 802.11b+a) * - Reshuffle struct iw_range for increases, add filler * - Increase IW_MAX_AP to 64 for driver returning a lot of addresses * - Remove IW_MAX_GET_SPY because conflict with enhanced spy support * - Add SIOCSIWTHRSPY/SIOCGIWTHRSPY and "struct iw_thrspy" * - Add IW_ENCODE_TEMP and iw_range->encoding_login_index * * V16 to V17 * ---------- * - Add flags to frequency -> auto/fixed * - Document (struct iw_quality *)->updated, add new flags (INVALID) * - Wireless Event capability in struct iw_range * - Add support for relative TxPower (yick !) * * V17 to V18 (From Jouni Malinen <[email protected]>) * ---------- * - Add support for WPA/WPA2 * - Add extended encoding configuration (SIOCSIWENCODEEXT and * SIOCGIWENCODEEXT) * - Add SIOCSIWGENIE/SIOCGIWGENIE * - Add SIOCSIWMLME * - Add SIOCSIWPMKSA * - Add struct iw_range bit field for supported encoding capabilities * - Add optional scan request parameters for SIOCSIWSCAN * - Add SIOCSIWAUTH/SIOCGIWAUTH for setting authentication and WPA * related parameters (extensible up to 4096 parameter values) * - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE, * IWEVASSOCREQIE, IWEVASSOCRESPIE, IWEVPMKIDCAND * * V18 to V19 * ---------- * - Remove (struct iw_point *)->pointer from events and streams * - Remove header includes to help user space * - Increase IW_ENCODING_TOKEN_MAX from 32 to 64 * - Add IW_QUAL_ALL_UPDATED and IW_QUAL_ALL_INVALID macros * - Add explicit flag to tell stats are in dBm : IW_QUAL_DBM * - Add IW_IOCTL_IDX() and IW_EVENT_IDX() macros * * V19 to V20 * ---------- * - RtNetlink requests support (SET/GET) * * V20 to V21 * ---------- * - Remove (struct net_device *)->get_wireless_stats() * - Change length in ESSID and NICK to strlen() instead of strlen()+1 * - Add IW_RETRY_SHORT/IW_RETRY_LONG retry modifiers * - Power/Retry relative values no longer * 100000 * - Add explicit flag to tell stats are in 802.11k RCPI : IW_QUAL_RCPI * * V21 to V22 * ---------- * - Prevent leaking of kernel space in stream on 64 bits. */ /**************************** CONSTANTS ****************************/ /* -------------------------- IOCTL LIST -------------------------- */ /* Wireless Identification */ #define SIOCSIWCOMMIT … #define SIOCGIWNAME … /* SIOCGIWNAME is used to verify the presence of Wireless Extensions. * Common values : "IEEE 802.11-DS", "IEEE 802.11-FH", "IEEE 802.11b"... * Don't put the name of your driver there, it's useless. */ /* Basic operations */ #define SIOCSIWNWID … #define SIOCGIWNWID … #define SIOCSIWFREQ … #define SIOCGIWFREQ … #define SIOCSIWMODE … #define SIOCGIWMODE … #define SIOCSIWSENS … #define SIOCGIWSENS … /* Informative stuff */ #define SIOCSIWRANGE … #define SIOCGIWRANGE … #define SIOCSIWPRIV … #define SIOCGIWPRIV … #define SIOCSIWSTATS … #define SIOCGIWSTATS … /* SIOCGIWSTATS is strictly used between user space and the kernel, and * is never passed to the driver (i.e. the driver will never see it). */ /* Spy support (statistics per MAC address - used for Mobile IP support) */ #define SIOCSIWSPY … #define SIOCGIWSPY … #define SIOCSIWTHRSPY … #define SIOCGIWTHRSPY … /* Access Point manipulation */ #define SIOCSIWAP … #define SIOCGIWAP … #define SIOCGIWAPLIST … #define SIOCSIWSCAN … #define SIOCGIWSCAN … /* 802.11 specific support */ #define SIOCSIWESSID … #define SIOCGIWESSID … #define SIOCSIWNICKN … #define SIOCGIWNICKN … /* As the ESSID and NICKN are strings up to 32 bytes long, it doesn't fit * within the 'iwreq' structure, so we need to use the 'data' member to * point to a string in user space, like it is done for RANGE... */ /* Other parameters useful in 802.11 and some other devices */ #define SIOCSIWRATE … #define SIOCGIWRATE … #define SIOCSIWRTS … #define SIOCGIWRTS … #define SIOCSIWFRAG … #define SIOCGIWFRAG … #define SIOCSIWTXPOW … #define SIOCGIWTXPOW … #define SIOCSIWRETRY … #define SIOCGIWRETRY … /* Encoding stuff (scrambling, hardware security, WEP...) */ #define SIOCSIWENCODE … #define SIOCGIWENCODE … /* Power saving stuff (power management, unicast and multicast) */ #define SIOCSIWPOWER … #define SIOCGIWPOWER … /* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WMM). * This ioctl uses struct iw_point and data buffer that includes IE id and len * fields. More than one IE may be included in the request. Setting the generic * IE to empty buffer (len=0) removes the generic IE from the driver. Drivers * are allowed to generate their own WPA/RSN IEs, but in these cases, drivers * are required to report the used IE as a wireless event, e.g., when * associating with an AP. */ #define SIOCSIWGENIE … #define SIOCGIWGENIE … /* WPA : IEEE 802.11 MLME requests */ #define SIOCSIWMLME … /* WPA : Authentication mode parameters */ #define SIOCSIWAUTH … #define SIOCGIWAUTH … /* WPA : Extended version of encoding configuration */ #define SIOCSIWENCODEEXT … #define SIOCGIWENCODEEXT … /* WPA2 : PMKSA cache management */ #define SIOCSIWPMKSA … /* -------------------- DEV PRIVATE IOCTL LIST -------------------- */ /* These 32 ioctl are wireless device private, for 16 commands. * Each driver is free to use them for whatever purpose it chooses, * however the driver *must* export the description of those ioctls * with SIOCGIWPRIV and *must* use arguments as defined below. * If you don't follow those rules, DaveM is going to hate you (reason : * it make mixed 32/64bit operation impossible). */ #define SIOCIWFIRSTPRIV … #define SIOCIWLASTPRIV … /* Previously, we were using SIOCDEVPRIVATE, but we now have our * separate range because of collisions with other tools such as * 'mii-tool'. * We now have 32 commands, so a bit more space ;-). * Also, all 'even' commands are only usable by root and don't return the * content of ifr/iwr to user (but you are not obliged to use the set/get * convention, just use every other two command). More details in iwpriv.c. * And I repeat : you are not forced to use them with iwpriv, but you * must be compliant with it. */ /* ------------------------- IOCTL STUFF ------------------------- */ /* The first and the last (range) */ #define SIOCIWFIRST … #define SIOCIWLAST … #define IW_IOCTL_IDX(cmd) … #define IW_HANDLER(id, func) … /* Odd : get (world access), even : set (root access) */ #define IW_IS_SET(cmd) … #define IW_IS_GET(cmd) … /* ----------------------- WIRELESS EVENTS ----------------------- */ /* Those are *NOT* ioctls, do not issue request on them !!! */ /* Most events use the same identifier as ioctl requests */ #define IWEVTXDROP … #define IWEVQUAL … #define IWEVCUSTOM … #define IWEVREGISTERED … #define IWEVEXPIRED … #define IWEVGENIE … #define IWEVMICHAELMICFAILURE … #define IWEVASSOCREQIE … #define IWEVASSOCRESPIE … #define IWEVPMKIDCAND … #define IWEVFIRST … #define IW_EVENT_IDX(cmd) … /* ------------------------- PRIVATE INFO ------------------------- */ /* * The following is used with SIOCGIWPRIV. It allow a driver to define * the interface (name, type of data) for its private ioctl. * Privates ioctl are SIOCIWFIRSTPRIV -> SIOCIWLASTPRIV */ #define IW_PRIV_TYPE_MASK … #define IW_PRIV_TYPE_NONE … #define IW_PRIV_TYPE_BYTE … #define IW_PRIV_TYPE_CHAR … #define IW_PRIV_TYPE_INT … #define IW_PRIV_TYPE_FLOAT … #define IW_PRIV_TYPE_ADDR … #define IW_PRIV_SIZE_FIXED … #define IW_PRIV_SIZE_MASK … /* * Note : if the number of args is fixed and the size < 16 octets, * instead of passing a pointer we will put args in the iwreq struct... */ /* ----------------------- OTHER CONSTANTS ----------------------- */ /* Maximum frequencies in the range struct */ #define IW_MAX_FREQUENCIES … /* Note : if you have something like 80 frequencies, * don't increase this constant and don't fill the frequency list. * The user will be able to set by channel anyway... */ /* Maximum bit rates in the range struct */ #define IW_MAX_BITRATES … /* Maximum tx powers in the range struct */ #define IW_MAX_TXPOWER … /* Note : if you more than 8 TXPowers, just set the max and min or * a few of them in the struct iw_range. */ /* Maximum of address that you may set with SPY */ #define IW_MAX_SPY … /* Maximum of address that you may get in the list of access points in range */ #define IW_MAX_AP … /* Maximum size of the ESSID and NICKN strings */ #define IW_ESSID_MAX_SIZE … /* Modes of operation */ #define IW_MODE_AUTO … #define IW_MODE_ADHOC … #define IW_MODE_INFRA … #define IW_MODE_MASTER … #define IW_MODE_REPEAT … #define IW_MODE_SECOND … #define IW_MODE_MONITOR … #define IW_MODE_MESH … /* Statistics flags (bitmask in updated) */ #define IW_QUAL_QUAL_UPDATED … #define IW_QUAL_LEVEL_UPDATED … #define IW_QUAL_NOISE_UPDATED … #define IW_QUAL_ALL_UPDATED … #define IW_QUAL_DBM … #define IW_QUAL_QUAL_INVALID … #define IW_QUAL_LEVEL_INVALID … #define IW_QUAL_NOISE_INVALID … #define IW_QUAL_RCPI … #define IW_QUAL_ALL_INVALID … /* Frequency flags */ #define IW_FREQ_AUTO … #define IW_FREQ_FIXED … /* Maximum number of size of encoding token available * they are listed in the range structure */ #define IW_MAX_ENCODING_SIZES … /* Maximum size of the encoding token in bytes */ #define IW_ENCODING_TOKEN_MAX … /* Flags for encoding (along with the token) */ #define IW_ENCODE_INDEX … #define IW_ENCODE_FLAGS … #define IW_ENCODE_MODE … #define IW_ENCODE_DISABLED … #define IW_ENCODE_ENABLED … #define IW_ENCODE_RESTRICTED … #define IW_ENCODE_OPEN … #define IW_ENCODE_NOKEY … #define IW_ENCODE_TEMP … /* Power management flags available (along with the value, if any) */ #define IW_POWER_ON … #define IW_POWER_TYPE … #define IW_POWER_PERIOD … #define IW_POWER_TIMEOUT … #define IW_POWER_MODE … #define IW_POWER_UNICAST_R … #define IW_POWER_MULTICAST_R … #define IW_POWER_ALL_R … #define IW_POWER_FORCE_S … #define IW_POWER_REPEATER … #define IW_POWER_MODIFIER … #define IW_POWER_MIN … #define IW_POWER_MAX … #define IW_POWER_RELATIVE … /* Transmit Power flags available */ #define IW_TXPOW_TYPE … #define IW_TXPOW_DBM … #define IW_TXPOW_MWATT … #define IW_TXPOW_RELATIVE … #define IW_TXPOW_RANGE … /* Retry limits and lifetime flags available */ #define IW_RETRY_ON … #define IW_RETRY_TYPE … #define IW_RETRY_LIMIT … #define IW_RETRY_LIFETIME … #define IW_RETRY_MODIFIER … #define IW_RETRY_MIN … #define IW_RETRY_MAX … #define IW_RETRY_RELATIVE … #define IW_RETRY_SHORT … #define IW_RETRY_LONG … /* Scanning request flags */ #define IW_SCAN_DEFAULT … #define IW_SCAN_ALL_ESSID … #define IW_SCAN_THIS_ESSID … #define IW_SCAN_ALL_FREQ … #define IW_SCAN_THIS_FREQ … #define IW_SCAN_ALL_MODE … #define IW_SCAN_THIS_MODE … #define IW_SCAN_ALL_RATE … #define IW_SCAN_THIS_RATE … /* struct iw_scan_req scan_type */ #define IW_SCAN_TYPE_ACTIVE … #define IW_SCAN_TYPE_PASSIVE … /* Maximum size of returned data */ #define IW_SCAN_MAX_DATA … /* Scan capability flags - in (struct iw_range *)->scan_capa */ #define IW_SCAN_CAPA_NONE … #define IW_SCAN_CAPA_ESSID … #define IW_SCAN_CAPA_BSSID … #define IW_SCAN_CAPA_CHANNEL … #define IW_SCAN_CAPA_MODE … #define IW_SCAN_CAPA_RATE … #define IW_SCAN_CAPA_TYPE … #define IW_SCAN_CAPA_TIME … /* Max number of char in custom event - use multiple of them if needed */ #define IW_CUSTOM_MAX … /* Generic information element */ #define IW_GENERIC_IE_MAX … /* MLME requests (SIOCSIWMLME / struct iw_mlme) */ #define IW_MLME_DEAUTH … #define IW_MLME_DISASSOC … #define IW_MLME_AUTH … #define IW_MLME_ASSOC … /* SIOCSIWAUTH/SIOCGIWAUTH struct iw_param flags */ #define IW_AUTH_INDEX … #define IW_AUTH_FLAGS … /* SIOCSIWAUTH/SIOCGIWAUTH parameters (0 .. 4095) * (IW_AUTH_INDEX mask in struct iw_param flags; this is the index of the * parameter that is being set/get to; value will be read/written to * struct iw_param value field) */ #define IW_AUTH_WPA_VERSION … #define IW_AUTH_CIPHER_PAIRWISE … #define IW_AUTH_CIPHER_GROUP … #define IW_AUTH_KEY_MGMT … #define IW_AUTH_TKIP_COUNTERMEASURES … #define IW_AUTH_DROP_UNENCRYPTED … #define IW_AUTH_80211_AUTH_ALG … #define IW_AUTH_WPA_ENABLED … #define IW_AUTH_RX_UNENCRYPTED_EAPOL … #define IW_AUTH_ROAMING_CONTROL … #define IW_AUTH_PRIVACY_INVOKED … #define IW_AUTH_CIPHER_GROUP_MGMT … #define IW_AUTH_MFP … /* IW_AUTH_WPA_VERSION values (bit field) */ #define IW_AUTH_WPA_VERSION_DISABLED … #define IW_AUTH_WPA_VERSION_WPA … #define IW_AUTH_WPA_VERSION_WPA2 … /* IW_AUTH_PAIRWISE_CIPHER, IW_AUTH_GROUP_CIPHER, and IW_AUTH_CIPHER_GROUP_MGMT * values (bit field) */ #define IW_AUTH_CIPHER_NONE … #define IW_AUTH_CIPHER_WEP40 … #define IW_AUTH_CIPHER_TKIP … #define IW_AUTH_CIPHER_CCMP … #define IW_AUTH_CIPHER_WEP104 … #define IW_AUTH_CIPHER_AES_CMAC … /* IW_AUTH_KEY_MGMT values (bit field) */ #define IW_AUTH_KEY_MGMT_802_1X … #define IW_AUTH_KEY_MGMT_PSK … /* IW_AUTH_80211_AUTH_ALG values (bit field) */ #define IW_AUTH_ALG_OPEN_SYSTEM … #define IW_AUTH_ALG_SHARED_KEY … #define IW_AUTH_ALG_LEAP … /* IW_AUTH_ROAMING_CONTROL values */ #define IW_AUTH_ROAMING_ENABLE … #define IW_AUTH_ROAMING_DISABLE … /* IW_AUTH_MFP (management frame protection) values */ #define IW_AUTH_MFP_DISABLED … #define IW_AUTH_MFP_OPTIONAL … #define IW_AUTH_MFP_REQUIRED … /* SIOCSIWENCODEEXT definitions */ #define IW_ENCODE_SEQ_MAX_SIZE … /* struct iw_encode_ext ->alg */ #define IW_ENCODE_ALG_NONE … #define IW_ENCODE_ALG_WEP … #define IW_ENCODE_ALG_TKIP … #define IW_ENCODE_ALG_CCMP … #define IW_ENCODE_ALG_PMK … #define IW_ENCODE_ALG_AES_CMAC … /* struct iw_encode_ext ->ext_flags */ #define IW_ENCODE_EXT_TX_SEQ_VALID … #define IW_ENCODE_EXT_RX_SEQ_VALID … #define IW_ENCODE_EXT_GROUP_KEY … #define IW_ENCODE_EXT_SET_TX_KEY … /* IWEVMICHAELMICFAILURE : struct iw_michaelmicfailure ->flags */ #define IW_MICFAILURE_KEY_ID … #define IW_MICFAILURE_GROUP … #define IW_MICFAILURE_PAIRWISE … #define IW_MICFAILURE_STAKEY … #define IW_MICFAILURE_COUNT … /* Bit field values for enc_capa in struct iw_range */ #define IW_ENC_CAPA_WPA … #define IW_ENC_CAPA_WPA2 … #define IW_ENC_CAPA_CIPHER_TKIP … #define IW_ENC_CAPA_CIPHER_CCMP … #define IW_ENC_CAPA_4WAY_HANDSHAKE … /* Event capability macros - in (struct iw_range *)->event_capa * Because we have more than 32 possible events, we use an array of * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */ #define IW_EVENT_CAPA_BASE(cmd) … #define IW_EVENT_CAPA_INDEX(cmd) … #define IW_EVENT_CAPA_MASK(cmd) … /* Event capability constants - event autogenerated by the kernel * This list is valid for most 802.11 devices, customise as needed... */ #define IW_EVENT_CAPA_K_0 … #define IW_EVENT_CAPA_K_1 … /* "Easy" macro to set events in iw_range (less efficient) */ #define IW_EVENT_CAPA_SET(event_capa, cmd) … #define IW_EVENT_CAPA_SET_KERNEL(event_capa) … /****************************** TYPES ******************************/ /* --------------------------- SUBTYPES --------------------------- */ /* * Generic format for most parameters that fit in an int */ struct iw_param { … }; /* * For all data larger than 16 octets, we need to use a * pointer to memory allocated in user space. */ struct iw_point { … }; /* * A frequency * For numbers lower than 10^9, we encode the number in 'm' and * set 'e' to 0 * For number greater than 10^9, we divide it by the lowest power * of 10 to get 'm' lower than 10^9, with 'm'= f / (10^'e')... * The power of 10 is in 'e', the result of the division is in 'm'. */ struct iw_freq { … }; /* * Quality of the link */ struct iw_quality { … }; /* * Packet discarded in the wireless adapter due to * "wireless" specific problems... * Note : the list of counter and statistics in net_device_stats * is already pretty exhaustive, and you should use that first. * This is only additional stats... */ struct iw_discarded { … }; /* * Packet/Time period missed in the wireless adapter due to * "wireless" specific problems... */ struct iw_missed { … }; /* * Quality range (for spy threshold) */ struct iw_thrspy { … }; /* * Optional data for scan request * * Note: these optional parameters are controlling parameters for the * scanning behavior, these do not apply to getting scan results * (SIOCGIWSCAN). Drivers are expected to keep a local BSS table and * provide a merged results with all BSSes even if the previous scan * request limited scanning to a subset, e.g., by specifying an SSID. * Especially, scan results are required to include an entry for the * current BSS if the driver is in Managed mode and associated with an AP. */ struct iw_scan_req { … }; /* ------------------------- WPA SUPPORT ------------------------- */ /* * Extended data structure for get/set encoding (this is used with * SIOCSIWENCODEEXT/SIOCGIWENCODEEXT. struct iw_point and IW_ENCODE_* * flags are used in the same way as with SIOCSIWENCODE/SIOCGIWENCODE and * only the data contents changes (key data -> this structure, including * key data). * * If the new key is the first group key, it will be set as the default * TX key. Otherwise, default TX key index is only changed if * IW_ENCODE_EXT_SET_TX_KEY flag is set. * * Key will be changed with SIOCSIWENCODEEXT in all cases except for * special "change TX key index" operation which is indicated by setting * key_len = 0 and ext_flags |= IW_ENCODE_EXT_SET_TX_KEY. * * tx_seq/rx_seq are only used when respective * IW_ENCODE_EXT_{TX,RX}_SEQ_VALID flag is set in ext_flags. Normal * TKIP/CCMP operation is to set RX seq with SIOCSIWENCODEEXT and start * TX seq from zero whenever key is changed. SIOCGIWENCODEEXT is normally * used only by an Authenticator (AP or an IBSS station) to get the * current TX sequence number. Using TX_SEQ_VALID for SIOCSIWENCODEEXT and * RX_SEQ_VALID for SIOCGIWENCODEEXT are optional, but can be useful for * debugging/testing. */ struct iw_encode_ext { … }; /* SIOCSIWMLME data */ struct iw_mlme { … }; /* SIOCSIWPMKSA data */ #define IW_PMKSA_ADD … #define IW_PMKSA_REMOVE … #define IW_PMKSA_FLUSH … #define IW_PMKID_LEN … struct iw_pmksa { … }; /* IWEVMICHAELMICFAILURE data */ struct iw_michaelmicfailure { … }; /* IWEVPMKIDCAND data */ #define IW_PMKID_CAND_PREAUTH … struct iw_pmkid_cand { … }; /* ------------------------ WIRELESS STATS ------------------------ */ /* * Wireless statistics (used for /proc/net/wireless) */ struct iw_statistics { … }; /* ------------------------ IOCTL REQUEST ------------------------ */ /* * This structure defines the payload of an ioctl, and is used * below. * * Note that this structure should fit on the memory footprint * of iwreq (which is the same as ifreq), which mean a max size of * 16 octets = 128 bits. Warning, pointers might be 64 bits wide... * You should check this when increasing the structures defined * above in this file... */ iwreq_data; /* * The structure to exchange data for ioctl. * This structure is the same as 'struct ifreq', but (re)defined for * convenience... * Do I need to remind you about structure size (32 octets) ? */ struct iwreq { … }; /* -------------------------- IOCTL DATA -------------------------- */ /* * For those ioctl which want to exchange mode data that what could * fit in the above structure... */ /* * Range of parameters */ struct iw_range { … }; /* * Private ioctl interface information */ struct iw_priv_args { … }; /* ----------------------- WIRELESS EVENTS ----------------------- */ /* * Wireless events are carried through the rtnetlink socket to user * space. They are encapsulated in the IFLA_WIRELESS field of * a RTM_NEWLINK message. */ /* * A Wireless Event. Contains basically the same data as the ioctl... */ struct iw_event { … }; /* Size of the Event prefix (including padding and alignement junk) */ #define IW_EV_LCP_LEN … /* Size of the various events */ #define IW_EV_CHAR_LEN … #define IW_EV_UINT_LEN … #define IW_EV_FREQ_LEN … #define IW_EV_PARAM_LEN … #define IW_EV_ADDR_LEN … #define IW_EV_QUAL_LEN … /* iw_point events are special. First, the payload (extra data) come at * the end of the event, so they are bigger than IW_EV_POINT_LEN. Second, * we omit the pointer, so start at an offset. */ #define IW_EV_POINT_OFF … #define IW_EV_POINT_LEN … /* Size of the Event prefix when packed in stream */ #define IW_EV_LCP_PK_LEN … /* Size of the various events when packed in stream */ #define IW_EV_CHAR_PK_LEN … #define IW_EV_UINT_PK_LEN … #define IW_EV_FREQ_PK_LEN … #define IW_EV_PARAM_PK_LEN … #define IW_EV_ADDR_PK_LEN … #define IW_EV_QUAL_PK_LEN … #define IW_EV_POINT_PK_LEN … #endif /* _UAPI_LINUX_WIRELESS_H */