Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: wireless.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* This file define a set of standard wireless extensions
[2] Fix | Delete
*
[3] Fix | Delete
* Version : 22 16.3.07
[4] Fix | Delete
*
[5] Fix | Delete
* Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
[6] Fix | Delete
* Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved.
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
#ifndef _LINUX_WIRELESS_H
[10] Fix | Delete
#define _LINUX_WIRELESS_H
[11] Fix | Delete
[12] Fix | Delete
/************************** DOCUMENTATION **************************/
[13] Fix | Delete
/*
[14] Fix | Delete
* Initial APIs (1996 -> onward) :
[15] Fix | Delete
* -----------------------------
[16] Fix | Delete
* Basically, the wireless extensions are for now a set of standard ioctl
[17] Fix | Delete
* call + /proc/net/wireless
[18] Fix | Delete
*
[19] Fix | Delete
* The entry /proc/net/wireless give statistics and information on the
[20] Fix | Delete
* driver.
[21] Fix | Delete
* This is better than having each driver having its entry because
[22] Fix | Delete
* its centralised and we may remove the driver module safely.
[23] Fix | Delete
*
[24] Fix | Delete
* Ioctl are used to configure the driver and issue commands. This is
[25] Fix | Delete
* better than command line options of insmod because we may want to
[26] Fix | Delete
* change dynamically (while the driver is running) some parameters.
[27] Fix | Delete
*
[28] Fix | Delete
* The ioctl mechanimsm are copied from standard devices ioctl.
[29] Fix | Delete
* We have the list of command plus a structure descibing the
[30] Fix | Delete
* data exchanged...
[31] Fix | Delete
* Note that to add these ioctl, I was obliged to modify :
[32] Fix | Delete
* # net/core/dev.c (two place + add include)
[33] Fix | Delete
* # net/ipv4/af_inet.c (one place + add include)
[34] Fix | Delete
*
[35] Fix | Delete
* /proc/net/wireless is a copy of /proc/net/dev.
[36] Fix | Delete
* We have a structure for data passed from the driver to /proc/net/wireless
[37] Fix | Delete
* Too add this, I've modified :
[38] Fix | Delete
* # net/core/dev.c (two other places)
[39] Fix | Delete
* # include/linux/netdevice.h (one place)
[40] Fix | Delete
* # include/linux/proc_fs.h (one place)
[41] Fix | Delete
*
[42] Fix | Delete
* New driver API (2002 -> onward) :
[43] Fix | Delete
* -------------------------------
[44] Fix | Delete
* This file is only concerned with the user space API and common definitions.
[45] Fix | Delete
* The new driver API is defined and documented in :
[46] Fix | Delete
* # include/net/iw_handler.h
[47] Fix | Delete
*
[48] Fix | Delete
* Note as well that /proc/net/wireless implementation has now moved in :
[49] Fix | Delete
* # net/core/wireless.c
[50] Fix | Delete
*
[51] Fix | Delete
* Wireless Events (2002 -> onward) :
[52] Fix | Delete
* --------------------------------
[53] Fix | Delete
* Events are defined at the end of this file, and implemented in :
[54] Fix | Delete
* # net/core/wireless.c
[55] Fix | Delete
*
[56] Fix | Delete
* Other comments :
[57] Fix | Delete
* --------------
[58] Fix | Delete
* Do not add here things that are redundant with other mechanisms
[59] Fix | Delete
* (drivers init, ifconfig, /proc/net/dev, ...) and with are not
[60] Fix | Delete
* wireless specific.
[61] Fix | Delete
*
[62] Fix | Delete
* These wireless extensions are not magic : each driver has to provide
[63] Fix | Delete
* support for them...
[64] Fix | Delete
*
[65] Fix | Delete
* IMPORTANT NOTE : As everything in the kernel, this is very much a
[66] Fix | Delete
* work in progress. Contact me if you have ideas of improvements...
[67] Fix | Delete
*/
[68] Fix | Delete
[69] Fix | Delete
/***************************** INCLUDES *****************************/
[70] Fix | Delete
[71] Fix | Delete
#include <linux/types.h> /* for __u* and __s* typedefs */
[72] Fix | Delete
#include <linux/socket.h> /* for "struct sockaddr" et al */
[73] Fix | Delete
#include <linux/if.h> /* for IFNAMSIZ and co... */
[74] Fix | Delete
[75] Fix | Delete
/***************************** VERSION *****************************/
[76] Fix | Delete
/*
[77] Fix | Delete
* This constant is used to know the availability of the wireless
[78] Fix | Delete
* extensions and to know which version of wireless extensions it is
[79] Fix | Delete
* (there is some stuff that will be added in the future...)
[80] Fix | Delete
* I just plan to increment with each new version.
[81] Fix | Delete
*/
[82] Fix | Delete
#define WIRELESS_EXT 22
[83] Fix | Delete
[84] Fix | Delete
/*
[85] Fix | Delete
* Changes :
[86] Fix | Delete
*
[87] Fix | Delete
* V2 to V3
[88] Fix | Delete
* --------
[89] Fix | Delete
* Alan Cox start some incompatibles changes. I've integrated a bit more.
[90] Fix | Delete
* - Encryption renamed to Encode to avoid US regulation problems
[91] Fix | Delete
* - Frequency changed from float to struct to avoid problems on old 386
[92] Fix | Delete
*
[93] Fix | Delete
* V3 to V4
[94] Fix | Delete
* --------
[95] Fix | Delete
* - Add sensitivity
[96] Fix | Delete
*
[97] Fix | Delete
* V4 to V5
[98] Fix | Delete
* --------
[99] Fix | Delete
* - Missing encoding definitions in range
[100] Fix | Delete
* - Access points stuff
[101] Fix | Delete
*
[102] Fix | Delete
* V5 to V6
[103] Fix | Delete
* --------
[104] Fix | Delete
* - 802.11 support (ESSID ioctls)
[105] Fix | Delete
*
[106] Fix | Delete
* V6 to V7
[107] Fix | Delete
* --------
[108] Fix | Delete
* - define IW_ESSID_MAX_SIZE and IW_MAX_AP
[109] Fix | Delete
*
[110] Fix | Delete
* V7 to V8
[111] Fix | Delete
* --------
[112] Fix | Delete
* - Changed my e-mail address
[113] Fix | Delete
* - More 802.11 support (nickname, rate, rts, frag)
[114] Fix | Delete
* - List index in frequencies
[115] Fix | Delete
*
[116] Fix | Delete
* V8 to V9
[117] Fix | Delete
* --------
[118] Fix | Delete
* - Support for 'mode of operation' (ad-hoc, managed...)
[119] Fix | Delete
* - Support for unicast and multicast power saving
[120] Fix | Delete
* - Change encoding to support larger tokens (>64 bits)
[121] Fix | Delete
* - Updated iw_params (disable, flags) and use it for NWID
[122] Fix | Delete
* - Extracted iw_point from iwreq for clarity
[123] Fix | Delete
*
[124] Fix | Delete
* V9 to V10
[125] Fix | Delete
* ---------
[126] Fix | Delete
* - Add PM capability to range structure
[127] Fix | Delete
* - Add PM modifier : MAX/MIN/RELATIVE
[128] Fix | Delete
* - Add encoding option : IW_ENCODE_NOKEY
[129] Fix | Delete
* - Add TxPower ioctls (work like TxRate)
[130] Fix | Delete
*
[131] Fix | Delete
* V10 to V11
[132] Fix | Delete
* ----------
[133] Fix | Delete
* - Add WE version in range (help backward/forward compatibility)
[134] Fix | Delete
* - Add retry ioctls (work like PM)
[135] Fix | Delete
*
[136] Fix | Delete
* V11 to V12
[137] Fix | Delete
* ----------
[138] Fix | Delete
* - Add SIOCSIWSTATS to get /proc/net/wireless programatically
[139] Fix | Delete
* - Add DEV PRIVATE IOCTL to avoid collisions in SIOCDEVPRIVATE space
[140] Fix | Delete
* - Add new statistics (frag, retry, beacon)
[141] Fix | Delete
* - Add average quality (for user space calibration)
[142] Fix | Delete
*
[143] Fix | Delete
* V12 to V13
[144] Fix | Delete
* ----------
[145] Fix | Delete
* - Document creation of new driver API.
[146] Fix | Delete
* - Extract union iwreq_data from struct iwreq (for new driver API).
[147] Fix | Delete
* - Rename SIOCSIWNAME as SIOCSIWCOMMIT
[148] Fix | Delete
*
[149] Fix | Delete
* V13 to V14
[150] Fix | Delete
* ----------
[151] Fix | Delete
* - Wireless Events support : define struct iw_event
[152] Fix | Delete
* - Define additional specific event numbers
[153] Fix | Delete
* - Add "addr" and "param" fields in union iwreq_data
[154] Fix | Delete
* - AP scanning stuff (SIOCSIWSCAN and friends)
[155] Fix | Delete
*
[156] Fix | Delete
* V14 to V15
[157] Fix | Delete
* ----------
[158] Fix | Delete
* - Add IW_PRIV_TYPE_ADDR for struct sockaddr private arg
[159] Fix | Delete
* - Make struct iw_freq signed (both m & e), add explicit padding
[160] Fix | Delete
* - Add IWEVCUSTOM for driver specific event/scanning token
[161] Fix | Delete
* - Add IW_MAX_GET_SPY for driver returning a lot of addresses
[162] Fix | Delete
* - Add IW_TXPOW_RANGE for range of Tx Powers
[163] Fix | Delete
* - Add IWEVREGISTERED & IWEVEXPIRED events for Access Points
[164] Fix | Delete
* - Add IW_MODE_MONITOR for passive monitor
[165] Fix | Delete
*
[166] Fix | Delete
* V15 to V16
[167] Fix | Delete
* ----------
[168] Fix | Delete
* - Increase the number of bitrates in iw_range to 32 (for 802.11g)
[169] Fix | Delete
* - Increase the number of frequencies in iw_range to 32 (for 802.11b+a)
[170] Fix | Delete
* - Reshuffle struct iw_range for increases, add filler
[171] Fix | Delete
* - Increase IW_MAX_AP to 64 for driver returning a lot of addresses
[172] Fix | Delete
* - Remove IW_MAX_GET_SPY because conflict with enhanced spy support
[173] Fix | Delete
* - Add SIOCSIWTHRSPY/SIOCGIWTHRSPY and "struct iw_thrspy"
[174] Fix | Delete
* - Add IW_ENCODE_TEMP and iw_range->encoding_login_index
[175] Fix | Delete
*
[176] Fix | Delete
* V16 to V17
[177] Fix | Delete
* ----------
[178] Fix | Delete
* - Add flags to frequency -> auto/fixed
[179] Fix | Delete
* - Document (struct iw_quality *)->updated, add new flags (INVALID)
[180] Fix | Delete
* - Wireless Event capability in struct iw_range
[181] Fix | Delete
* - Add support for relative TxPower (yick !)
[182] Fix | Delete
*
[183] Fix | Delete
* V17 to V18 (From Jouni Malinen <j@w1.fi>)
[184] Fix | Delete
* ----------
[185] Fix | Delete
* - Add support for WPA/WPA2
[186] Fix | Delete
* - Add extended encoding configuration (SIOCSIWENCODEEXT and
[187] Fix | Delete
* SIOCGIWENCODEEXT)
[188] Fix | Delete
* - Add SIOCSIWGENIE/SIOCGIWGENIE
[189] Fix | Delete
* - Add SIOCSIWMLME
[190] Fix | Delete
* - Add SIOCSIWPMKSA
[191] Fix | Delete
* - Add struct iw_range bit field for supported encoding capabilities
[192] Fix | Delete
* - Add optional scan request parameters for SIOCSIWSCAN
[193] Fix | Delete
* - Add SIOCSIWAUTH/SIOCGIWAUTH for setting authentication and WPA
[194] Fix | Delete
* related parameters (extensible up to 4096 parameter values)
[195] Fix | Delete
* - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE,
[196] Fix | Delete
* IWEVASSOCREQIE, IWEVASSOCRESPIE, IWEVPMKIDCAND
[197] Fix | Delete
*
[198] Fix | Delete
* V18 to V19
[199] Fix | Delete
* ----------
[200] Fix | Delete
* - Remove (struct iw_point *)->pointer from events and streams
[201] Fix | Delete
* - Remove header includes to help user space
[202] Fix | Delete
* - Increase IW_ENCODING_TOKEN_MAX from 32 to 64
[203] Fix | Delete
* - Add IW_QUAL_ALL_UPDATED and IW_QUAL_ALL_INVALID macros
[204] Fix | Delete
* - Add explicit flag to tell stats are in dBm : IW_QUAL_DBM
[205] Fix | Delete
* - Add IW_IOCTL_IDX() and IW_EVENT_IDX() macros
[206] Fix | Delete
*
[207] Fix | Delete
* V19 to V20
[208] Fix | Delete
* ----------
[209] Fix | Delete
* - RtNetlink requests support (SET/GET)
[210] Fix | Delete
*
[211] Fix | Delete
* V20 to V21
[212] Fix | Delete
* ----------
[213] Fix | Delete
* - Remove (struct net_device *)->get_wireless_stats()
[214] Fix | Delete
* - Change length in ESSID and NICK to strlen() instead of strlen()+1
[215] Fix | Delete
* - Add IW_RETRY_SHORT/IW_RETRY_LONG retry modifiers
[216] Fix | Delete
* - Power/Retry relative values no longer * 100000
[217] Fix | Delete
* - Add explicit flag to tell stats are in 802.11k RCPI : IW_QUAL_RCPI
[218] Fix | Delete
*
[219] Fix | Delete
* V21 to V22
[220] Fix | Delete
* ----------
[221] Fix | Delete
* - Prevent leaking of kernel space in stream on 64 bits.
[222] Fix | Delete
*/
[223] Fix | Delete
[224] Fix | Delete
/**************************** CONSTANTS ****************************/
[225] Fix | Delete
[226] Fix | Delete
/* -------------------------- IOCTL LIST -------------------------- */
[227] Fix | Delete
[228] Fix | Delete
/* Wireless Identification */
[229] Fix | Delete
#define SIOCSIWCOMMIT 0x8B00 /* Commit pending changes to driver */
[230] Fix | Delete
#define SIOCGIWNAME 0x8B01 /* get name == wireless protocol */
[231] Fix | Delete
/* SIOCGIWNAME is used to verify the presence of Wireless Extensions.
[232] Fix | Delete
* Common values : "IEEE 802.11-DS", "IEEE 802.11-FH", "IEEE 802.11b"...
[233] Fix | Delete
* Don't put the name of your driver there, it's useless. */
[234] Fix | Delete
[235] Fix | Delete
/* Basic operations */
[236] Fix | Delete
#define SIOCSIWNWID 0x8B02 /* set network id (pre-802.11) */
[237] Fix | Delete
#define SIOCGIWNWID 0x8B03 /* get network id (the cell) */
[238] Fix | Delete
#define SIOCSIWFREQ 0x8B04 /* set channel/frequency (Hz) */
[239] Fix | Delete
#define SIOCGIWFREQ 0x8B05 /* get channel/frequency (Hz) */
[240] Fix | Delete
#define SIOCSIWMODE 0x8B06 /* set operation mode */
[241] Fix | Delete
#define SIOCGIWMODE 0x8B07 /* get operation mode */
[242] Fix | Delete
#define SIOCSIWSENS 0x8B08 /* set sensitivity (dBm) */
[243] Fix | Delete
#define SIOCGIWSENS 0x8B09 /* get sensitivity (dBm) */
[244] Fix | Delete
[245] Fix | Delete
/* Informative stuff */
[246] Fix | Delete
#define SIOCSIWRANGE 0x8B0A /* Unused */
[247] Fix | Delete
#define SIOCGIWRANGE 0x8B0B /* Get range of parameters */
[248] Fix | Delete
#define SIOCSIWPRIV 0x8B0C /* Unused */
[249] Fix | Delete
#define SIOCGIWPRIV 0x8B0D /* get private ioctl interface info */
[250] Fix | Delete
#define SIOCSIWSTATS 0x8B0E /* Unused */
[251] Fix | Delete
#define SIOCGIWSTATS 0x8B0F /* Get /proc/net/wireless stats */
[252] Fix | Delete
/* SIOCGIWSTATS is strictly used between user space and the kernel, and
[253] Fix | Delete
* is never passed to the driver (i.e. the driver will never see it). */
[254] Fix | Delete
[255] Fix | Delete
/* Spy support (statistics per MAC address - used for Mobile IP support) */
[256] Fix | Delete
#define SIOCSIWSPY 0x8B10 /* set spy addresses */
[257] Fix | Delete
#define SIOCGIWSPY 0x8B11 /* get spy info (quality of link) */
[258] Fix | Delete
#define SIOCSIWTHRSPY 0x8B12 /* set spy threshold (spy event) */
[259] Fix | Delete
#define SIOCGIWTHRSPY 0x8B13 /* get spy threshold */
[260] Fix | Delete
[261] Fix | Delete
/* Access Point manipulation */
[262] Fix | Delete
#define SIOCSIWAP 0x8B14 /* set access point MAC addresses */
[263] Fix | Delete
#define SIOCGIWAP 0x8B15 /* get access point MAC addresses */
[264] Fix | Delete
#define SIOCGIWAPLIST 0x8B17 /* Deprecated in favor of scanning */
[265] Fix | Delete
#define SIOCSIWSCAN 0x8B18 /* trigger scanning (list cells) */
[266] Fix | Delete
#define SIOCGIWSCAN 0x8B19 /* get scanning results */
[267] Fix | Delete
[268] Fix | Delete
/* 802.11 specific support */
[269] Fix | Delete
#define SIOCSIWESSID 0x8B1A /* set ESSID (network name) */
[270] Fix | Delete
#define SIOCGIWESSID 0x8B1B /* get ESSID */
[271] Fix | Delete
#define SIOCSIWNICKN 0x8B1C /* set node name/nickname */
[272] Fix | Delete
#define SIOCGIWNICKN 0x8B1D /* get node name/nickname */
[273] Fix | Delete
/* As the ESSID and NICKN are strings up to 32 bytes long, it doesn't fit
[274] Fix | Delete
* within the 'iwreq' structure, so we need to use the 'data' member to
[275] Fix | Delete
* point to a string in user space, like it is done for RANGE... */
[276] Fix | Delete
[277] Fix | Delete
/* Other parameters useful in 802.11 and some other devices */
[278] Fix | Delete
#define SIOCSIWRATE 0x8B20 /* set default bit rate (bps) */
[279] Fix | Delete
#define SIOCGIWRATE 0x8B21 /* get default bit rate (bps) */
[280] Fix | Delete
#define SIOCSIWRTS 0x8B22 /* set RTS/CTS threshold (bytes) */
[281] Fix | Delete
#define SIOCGIWRTS 0x8B23 /* get RTS/CTS threshold (bytes) */
[282] Fix | Delete
#define SIOCSIWFRAG 0x8B24 /* set fragmentation thr (bytes) */
[283] Fix | Delete
#define SIOCGIWFRAG 0x8B25 /* get fragmentation thr (bytes) */
[284] Fix | Delete
#define SIOCSIWTXPOW 0x8B26 /* set transmit power (dBm) */
[285] Fix | Delete
#define SIOCGIWTXPOW 0x8B27 /* get transmit power (dBm) */
[286] Fix | Delete
#define SIOCSIWRETRY 0x8B28 /* set retry limits and lifetime */
[287] Fix | Delete
#define SIOCGIWRETRY 0x8B29 /* get retry limits and lifetime */
[288] Fix | Delete
[289] Fix | Delete
/* Encoding stuff (scrambling, hardware security, WEP...) */
[290] Fix | Delete
#define SIOCSIWENCODE 0x8B2A /* set encoding token & mode */
[291] Fix | Delete
#define SIOCGIWENCODE 0x8B2B /* get encoding token & mode */
[292] Fix | Delete
/* Power saving stuff (power management, unicast and multicast) */
[293] Fix | Delete
#define SIOCSIWPOWER 0x8B2C /* set Power Management settings */
[294] Fix | Delete
#define SIOCGIWPOWER 0x8B2D /* get Power Management settings */
[295] Fix | Delete
[296] Fix | Delete
/* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WMM).
[297] Fix | Delete
* This ioctl uses struct iw_point and data buffer that includes IE id and len
[298] Fix | Delete
* fields. More than one IE may be included in the request. Setting the generic
[299] Fix | Delete
* IE to empty buffer (len=0) removes the generic IE from the driver. Drivers
[300] Fix | Delete
* are allowed to generate their own WPA/RSN IEs, but in these cases, drivers
[301] Fix | Delete
* are required to report the used IE as a wireless event, e.g., when
[302] Fix | Delete
* associating with an AP. */
[303] Fix | Delete
#define SIOCSIWGENIE 0x8B30 /* set generic IE */
[304] Fix | Delete
#define SIOCGIWGENIE 0x8B31 /* get generic IE */
[305] Fix | Delete
[306] Fix | Delete
/* WPA : IEEE 802.11 MLME requests */
[307] Fix | Delete
#define SIOCSIWMLME 0x8B16 /* request MLME operation; uses
[308] Fix | Delete
* struct iw_mlme */
[309] Fix | Delete
/* WPA : Authentication mode parameters */
[310] Fix | Delete
#define SIOCSIWAUTH 0x8B32 /* set authentication mode params */
[311] Fix | Delete
#define SIOCGIWAUTH 0x8B33 /* get authentication mode params */
[312] Fix | Delete
[313] Fix | Delete
/* WPA : Extended version of encoding configuration */
[314] Fix | Delete
#define SIOCSIWENCODEEXT 0x8B34 /* set encoding token & mode */
[315] Fix | Delete
#define SIOCGIWENCODEEXT 0x8B35 /* get encoding token & mode */
[316] Fix | Delete
[317] Fix | Delete
/* WPA2 : PMKSA cache management */
[318] Fix | Delete
#define SIOCSIWPMKSA 0x8B36 /* PMKSA cache operation */
[319] Fix | Delete
[320] Fix | Delete
/* -------------------- DEV PRIVATE IOCTL LIST -------------------- */
[321] Fix | Delete
[322] Fix | Delete
/* These 32 ioctl are wireless device private, for 16 commands.
[323] Fix | Delete
* Each driver is free to use them for whatever purpose it chooses,
[324] Fix | Delete
* however the driver *must* export the description of those ioctls
[325] Fix | Delete
* with SIOCGIWPRIV and *must* use arguments as defined below.
[326] Fix | Delete
* If you don't follow those rules, DaveM is going to hate you (reason :
[327] Fix | Delete
* it make mixed 32/64bit operation impossible).
[328] Fix | Delete
*/
[329] Fix | Delete
#define SIOCIWFIRSTPRIV 0x8BE0
[330] Fix | Delete
#define SIOCIWLASTPRIV 0x8BFF
[331] Fix | Delete
/* Previously, we were using SIOCDEVPRIVATE, but we now have our
[332] Fix | Delete
* separate range because of collisions with other tools such as
[333] Fix | Delete
* 'mii-tool'.
[334] Fix | Delete
* We now have 32 commands, so a bit more space ;-).
[335] Fix | Delete
* Also, all 'even' commands are only usable by root and don't return the
[336] Fix | Delete
* content of ifr/iwr to user (but you are not obliged to use the set/get
[337] Fix | Delete
* convention, just use every other two command). More details in iwpriv.c.
[338] Fix | Delete
* And I repeat : you are not forced to use them with iwpriv, but you
[339] Fix | Delete
* must be compliant with it.
[340] Fix | Delete
*/
[341] Fix | Delete
[342] Fix | Delete
/* ------------------------- IOCTL STUFF ------------------------- */
[343] Fix | Delete
[344] Fix | Delete
/* The first and the last (range) */
[345] Fix | Delete
#define SIOCIWFIRST 0x8B00
[346] Fix | Delete
#define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */
[347] Fix | Delete
#define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST)
[348] Fix | Delete
#define IW_HANDLER(id, func) \
[349] Fix | Delete
[IW_IOCTL_IDX(id)] = func
[350] Fix | Delete
[351] Fix | Delete
/* Odd : get (world access), even : set (root access) */
[352] Fix | Delete
#define IW_IS_SET(cmd) (!((cmd) & 0x1))
[353] Fix | Delete
#define IW_IS_GET(cmd) ((cmd) & 0x1)
[354] Fix | Delete
[355] Fix | Delete
/* ----------------------- WIRELESS EVENTS ----------------------- */
[356] Fix | Delete
/* Those are *NOT* ioctls, do not issue request on them !!! */
[357] Fix | Delete
/* Most events use the same identifier as ioctl requests */
[358] Fix | Delete
[359] Fix | Delete
#define IWEVTXDROP 0x8C00 /* Packet dropped to excessive retry */
[360] Fix | Delete
#define IWEVQUAL 0x8C01 /* Quality part of statistics (scan) */
[361] Fix | Delete
#define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */
[362] Fix | Delete
#define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) */
[363] Fix | Delete
#define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */
[364] Fix | Delete
#define IWEVGENIE 0x8C05 /* Generic IE (WPA, RSN, WMM, ..)
[365] Fix | Delete
* (scan results); This includes id and
[366] Fix | Delete
* length fields. One IWEVGENIE may
[367] Fix | Delete
* contain more than one IE. Scan
[368] Fix | Delete
* results may contain one or more
[369] Fix | Delete
* IWEVGENIE events. */
[370] Fix | Delete
#define IWEVMICHAELMICFAILURE 0x8C06 /* Michael MIC failure
[371] Fix | Delete
* (struct iw_michaelmicfailure)
[372] Fix | Delete
*/
[373] Fix | Delete
#define IWEVASSOCREQIE 0x8C07 /* IEs used in (Re)Association Request.
[374] Fix | Delete
* The data includes id and length
[375] Fix | Delete
* fields and may contain more than one
[376] Fix | Delete
* IE. This event is required in
[377] Fix | Delete
* Managed mode if the driver
[378] Fix | Delete
* generates its own WPA/RSN IE. This
[379] Fix | Delete
* should be sent just before
[380] Fix | Delete
* IWEVREGISTERED event for the
[381] Fix | Delete
* association. */
[382] Fix | Delete
#define IWEVASSOCRESPIE 0x8C08 /* IEs used in (Re)Association
[383] Fix | Delete
* Response. The data includes id and
[384] Fix | Delete
* length fields and may contain more
[385] Fix | Delete
* than one IE. This may be sent
[386] Fix | Delete
* between IWEVASSOCREQIE and
[387] Fix | Delete
* IWEVREGISTERED events for the
[388] Fix | Delete
* association. */
[389] Fix | Delete
#define IWEVPMKIDCAND 0x8C09 /* PMKID candidate for RSN
[390] Fix | Delete
* pre-authentication
[391] Fix | Delete
* (struct iw_pmkid_cand) */
[392] Fix | Delete
[393] Fix | Delete
#define IWEVFIRST 0x8C00
[394] Fix | Delete
#define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST)
[395] Fix | Delete
[396] Fix | Delete
/* ------------------------- PRIVATE INFO ------------------------- */
[397] Fix | Delete
/*
[398] Fix | Delete
* The following is used with SIOCGIWPRIV. It allow a driver to define
[399] Fix | Delete
* the interface (name, type of data) for its private ioctl.
[400] Fix | Delete
* Privates ioctl are SIOCIWFIRSTPRIV -> SIOCIWLASTPRIV
[401] Fix | Delete
*/
[402] Fix | Delete
[403] Fix | Delete
#define IW_PRIV_TYPE_MASK 0x7000 /* Type of arguments */
[404] Fix | Delete
#define IW_PRIV_TYPE_NONE 0x0000
[405] Fix | Delete
#define IW_PRIV_TYPE_BYTE 0x1000 /* Char as number */
[406] Fix | Delete
#define IW_PRIV_TYPE_CHAR 0x2000 /* Char as character */
[407] Fix | Delete
#define IW_PRIV_TYPE_INT 0x4000 /* 32 bits int */
[408] Fix | Delete
#define IW_PRIV_TYPE_FLOAT 0x5000 /* struct iw_freq */
[409] Fix | Delete
#define IW_PRIV_TYPE_ADDR 0x6000 /* struct sockaddr */
[410] Fix | Delete
[411] Fix | Delete
#define IW_PRIV_SIZE_FIXED 0x0800 /* Variable or fixed number of args */
[412] Fix | Delete
[413] Fix | Delete
#define IW_PRIV_SIZE_MASK 0x07FF /* Max number of those args */
[414] Fix | Delete
[415] Fix | Delete
/*
[416] Fix | Delete
* Note : if the number of args is fixed and the size < 16 octets,
[417] Fix | Delete
* instead of passing a pointer we will put args in the iwreq struct...
[418] Fix | Delete
*/
[419] Fix | Delete
[420] Fix | Delete
/* ----------------------- OTHER CONSTANTS ----------------------- */
[421] Fix | Delete
[422] Fix | Delete
/* Maximum frequencies in the range struct */
[423] Fix | Delete
#define IW_MAX_FREQUENCIES 32
[424] Fix | Delete
/* Note : if you have something like 80 frequencies,
[425] Fix | Delete
* don't increase this constant and don't fill the frequency list.
[426] Fix | Delete
* The user will be able to set by channel anyway... */
[427] Fix | Delete
[428] Fix | Delete
/* Maximum bit rates in the range struct */
[429] Fix | Delete
#define IW_MAX_BITRATES 32
[430] Fix | Delete
[431] Fix | Delete
/* Maximum tx powers in the range struct */
[432] Fix | Delete
#define IW_MAX_TXPOWER 8
[433] Fix | Delete
/* Note : if you more than 8 TXPowers, just set the max and min or
[434] Fix | Delete
* a few of them in the struct iw_range. */
[435] Fix | Delete
[436] Fix | Delete
/* Maximum of address that you may set with SPY */
[437] Fix | Delete
#define IW_MAX_SPY 8
[438] Fix | Delete
[439] Fix | Delete
/* Maximum of address that you may get in the
[440] Fix | Delete
list of access points in range */
[441] Fix | Delete
#define IW_MAX_AP 64
[442] Fix | Delete
[443] Fix | Delete
/* Maximum size of the ESSID and NICKN strings */
[444] Fix | Delete
#define IW_ESSID_MAX_SIZE 32
[445] Fix | Delete
[446] Fix | Delete
/* Modes of operation */
[447] Fix | Delete
#define IW_MODE_AUTO 0 /* Let the driver decides */
[448] Fix | Delete
#define IW_MODE_ADHOC 1 /* Single cell network */
[449] Fix | Delete
#define IW_MODE_INFRA 2 /* Multi cell network, roaming, ... */
[450] Fix | Delete
#define IW_MODE_MASTER 3 /* Synchronisation master or Access Point */
[451] Fix | Delete
#define IW_MODE_REPEAT 4 /* Wireless Repeater (forwarder) */
[452] Fix | Delete
#define IW_MODE_SECOND 5 /* Secondary master/repeater (backup) */
[453] Fix | Delete
#define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */
[454] Fix | Delete
#define IW_MODE_MESH 7 /* Mesh (IEEE 802.11s) network */
[455] Fix | Delete
[456] Fix | Delete
/* Statistics flags (bitmask in updated) */
[457] Fix | Delete
#define IW_QUAL_QUAL_UPDATED 0x01 /* Value was updated since last read */
[458] Fix | Delete
#define IW_QUAL_LEVEL_UPDATED 0x02
[459] Fix | Delete
#define IW_QUAL_NOISE_UPDATED 0x04
[460] Fix | Delete
#define IW_QUAL_ALL_UPDATED 0x07
[461] Fix | Delete
#define IW_QUAL_DBM 0x08 /* Level + Noise are dBm */
[462] Fix | Delete
#define IW_QUAL_QUAL_INVALID 0x10 /* Driver doesn't provide value */
[463] Fix | Delete
#define IW_QUAL_LEVEL_INVALID 0x20
[464] Fix | Delete
#define IW_QUAL_NOISE_INVALID 0x40
[465] Fix | Delete
#define IW_QUAL_RCPI 0x80 /* Level + Noise are 802.11k RCPI */
[466] Fix | Delete
#define IW_QUAL_ALL_INVALID 0x70
[467] Fix | Delete
[468] Fix | Delete
/* Frequency flags */
[469] Fix | Delete
#define IW_FREQ_AUTO 0x00 /* Let the driver decides */
[470] Fix | Delete
#define IW_FREQ_FIXED 0x01 /* Force a specific value */
[471] Fix | Delete
[472] Fix | Delete
/* Maximum number of size of encoding token available
[473] Fix | Delete
* they are listed in the range structure */
[474] Fix | Delete
#define IW_MAX_ENCODING_SIZES 8
[475] Fix | Delete
[476] Fix | Delete
/* Maximum size of the encoding token in bytes */
[477] Fix | Delete
#define IW_ENCODING_TOKEN_MAX 64 /* 512 bits (for now) */
[478] Fix | Delete
[479] Fix | Delete
/* Flags for encoding (along with the token) */
[480] Fix | Delete
#define IW_ENCODE_INDEX 0x00FF /* Token index (if needed) */
[481] Fix | Delete
#define IW_ENCODE_FLAGS 0xFF00 /* Flags defined below */
[482] Fix | Delete
#define IW_ENCODE_MODE 0xF000 /* Modes defined below */
[483] Fix | Delete
#define IW_ENCODE_DISABLED 0x8000 /* Encoding disabled */
[484] Fix | Delete
#define IW_ENCODE_ENABLED 0x0000 /* Encoding enabled */
[485] Fix | Delete
#define IW_ENCODE_RESTRICTED 0x4000 /* Refuse non-encoded packets */
[486] Fix | Delete
#define IW_ENCODE_OPEN 0x2000 /* Accept non-encoded packets */
[487] Fix | Delete
#define IW_ENCODE_NOKEY 0x0800 /* Key is write only, so not present */
[488] Fix | Delete
#define IW_ENCODE_TEMP 0x0400 /* Temporary key */
[489] Fix | Delete
[490] Fix | Delete
/* Power management flags available (along with the value, if any) */
[491] Fix | Delete
#define IW_POWER_ON 0x0000 /* No details... */
[492] Fix | Delete
#define IW_POWER_TYPE 0xF000 /* Type of parameter */
[493] Fix | Delete
#define IW_POWER_PERIOD 0x1000 /* Value is a period/duration of */
[494] Fix | Delete
#define IW_POWER_TIMEOUT 0x2000 /* Value is a timeout (to go asleep) */
[495] Fix | Delete
#define IW_POWER_MODE 0x0F00 /* Power Management mode */
[496] Fix | Delete
#define IW_POWER_UNICAST_R 0x0100 /* Receive only unicast messages */
[497] Fix | Delete
#define IW_POWER_MULTICAST_R 0x0200 /* Receive only multicast messages */
[498] Fix | Delete
#define IW_POWER_ALL_R 0x0300 /* Receive all messages though PM */
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function