iwlib.h   iwlib.h 
skipping to change at line 48 skipping to change at line 48
#ifndef LINUX_VERSION_CODE #ifndef LINUX_VERSION_CODE
#include <linux/version.h> #include <linux/version.h>
#endif #endif
/* Kernel headers 2.4.X + Glibc 2.2 - Mandrake 8.0, Debian 2.3, RH 7.1 /* Kernel headers 2.4.X + Glibc 2.2 - Mandrake 8.0, Debian 2.3, RH 7.1
* Kernel headers 2.2.X + Glibc 2.2 - Slackware 8.0 */ * Kernel headers 2.2.X + Glibc 2.2 - Slackware 8.0 */
#if defined(__GLIBC__) \ #if defined(__GLIBC__) \
&& __GLIBC__ == 2 \ && __GLIBC__ == 2 \
&& __GLIBC_MINOR__ >= 2 \ && __GLIBC_MINOR__ >= 2 \
&& LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
//#define GLIBC22_HEADERS #define HEADERS_GENERIC
#define GENERIC_HEADERS
/* Kernel headers 2.4.X + Glibc 2.1 - Debian 2.2 upgraded, RH 7.0 /* Kernel headers 2.4.X + Glibc 2.1 - Debian 2.2 upgraded, RH 7.0
* Kernel headers 2.2.X + Glibc 2.1 - Debian 2.2, RH 6.1 */ * Kernel headers 2.2.X + Glibc 2.1 - Debian 2.2, RH 6.1 */
#elif defined(__GLIBC__) \ #elif defined(__GLIBC__) \
&& __GLIBC__ == 2 \ && __GLIBC__ == 2 \
&& __GLIBC_MINOR__ == 1 \ && __GLIBC_MINOR__ == 1 \
&& LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
//#define GLIBC_HEADERS #define HEADERS_GENERIC
#define GENERIC_HEADERS #define HEADERS_KERNEL
/* Kernel headers 2.2.X + Glibc 2.0 - Debian 2.1 */
#elif defined(__GLIBC__) \
&& __GLIBC__ == 2 \
&& __GLIBC_MINOR__ == 0 \
&& LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0) \
&& LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0)
#define GLIBC_HEADERS
#define KLUDGE_HEADERS
/* Note : is it really worth supporting kernel 2.0.X, knowing that
* we require WE v9, which is only available in 2.2.X and higher ?
* I guess one could use 2.0.x with an upgraded wireless.h... */
/* Kernel headers 2.0.X + Glibc 2.0 - Debian 2.0, RH 5 */
#elif defined(__GLIBC__) \
&& __GLIBC__ == 2 \
&& __GLIBC_MINOR__ == 0 \
&& LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) \
&& LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0)
#define GLIBC_HEADERS
/* Kernel headers 2.0.X + libc5 - old systems */
#elif defined(_LINUX_C_LIB_VERSION_MAJOR) \
&& _LINUX_C_LIB_VERSION_MAJOR == 5 \
&& LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0) \
&& LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0)
#define LIBC5_HEADERS
/* Unsupported combination */ /* Unsupported combination */
#else #else
#error "Your kernel/libc combination is not supported" #error "Your kernel/libc combination is not supported"
#endif #endif
#ifdef GENERIC_HEADERS #ifdef HEADERS_GENERIC
/* Proposed by Dr. Michael Rietz <rietz@mail.amps.de>, 27.3.2 */ /* Proposed by Dr. Michael Rietz <rietz@mail.amps.de>, 27.3.2 */
/* If this works for all, it might be more stable on the long term - Jean I I */
#include <net/if_arp.h> /* For ARPHRD_ETHER */ #include <net/if_arp.h> /* For ARPHRD_ETHER */
#include <sys/socket.h> /* For AF_INET & struct sockaddr */ #include <sys/socket.h> /* For AF_INET & struct sockaddr */
#include <netinet/in.h> /* For struct sockaddr_in */ #include <netinet/in.h> /* For struct sockaddr_in */
#include <netinet/if_ether.h> #include <netinet/if_ether.h>
#endif /* GENERIC_HEADERS */ #endif /* HEADERS_GENERIC */
#ifdef GLIBC22_HEADERS
/* Added by Ross G. Miller <Ross_Miller@baylor.edu>, 3/28/01 */
#include <linux/if_arp.h> /* For ARPHRD_ETHER */
#include <linux/socket.h> /* For AF_INET & struct sockaddr */
#include <sys/socket.h>
#endif /* GLIBC22_HEADERS */
#ifdef KLUDGE_HEADERS
#include <socketbits.h>
#endif /* KLUDGE_HEADERS */
#ifdef GLIBC_HEADERS
#include <linux/if_arp.h> /* For ARPHRD_ETHER */
#include <linux/socket.h> /* For AF_INET & struct sockaddr */
#include <linux/in.h> /* For struct sockaddr_in */
#endif /* KLUDGE_HEADERS || GLIBC_HEADERS */
#ifdef LIBC5_HEADERS /* Fixup to be able to include kernel includes in userspace.
#include <sys/socket.h> /* For AF_INET & struct sockaddr & s * Basically, kill the sparse annotations... Jean II */
ocket() */ #ifndef __user
#include <linux/if_arp.h> /* For ARPHRD_ETHER */ #define __user
#include <linux/in.h> /* For struct sockaddr_in */ #endif
#endif /* LIBC5_HEADERS */
/* Those 3 headers were previously included in wireless.h */
#include <linux/types.h> /* for "caddr_t" et al */ #include <linux/types.h> /* for "caddr_t" et al */
#ifdef HEADERS_KERNEL
/* Traditionally we have used kernel headers, included in wireless.h */
#include <linux/socket.h> /* for "struct sockaddr" et al */ #include <linux/socket.h> /* for "struct sockaddr" et al */
#include <linux/if.h> /* for IFNAMSIZ and co... */ #include <linux/if.h> /* for IFNAMSIZ and co... */
#else /* !HEADERS_KERNEL */
/* Glibc systems headers are supposedly less problematic than kernel ones *
/
#include <sys/socket.h> /* for "struct sockaddr" et
al */
#include <net/if.h> /* for IFNAMSIZ and co... */
#endif /* !HEADERS_KERNEL */
/* Private copy of Wireless extensions */ /* Private copy of Wireless extensions (in this directoty) */
#include <wireless.h> #include "wireless.h"
/* Make gcc understant that when we say inline, we mean it. /* Make gcc understant that when we say inline, we mean it.
* I really hate when the compiler is trying to be more clever than me, * I really hate when the compiler is trying to be more clever than me,
* because in this case gcc is not able to figure out functions with a * because in this case gcc is not able to figure out functions with a
* single call site, so not only I have to tag those functions inline * single call site, so not only I have to tag those functions inline
* by hand, but then it refuse to inline them properly. * by hand, but then it refuse to inline them properly.
* Total saving for iwevent : 150B = 0.7%. * Total saving for iwevent : 150B = 0.7%.
* Fortunately, in gcc 3.4, they now automatically inline static functions * Fortunately, in gcc 3.4, they now automatically inline static functions
* with a single call site. Hurrah ! * with a single call site. Hurrah !
* Jean II */ * Jean II */
#undef IW_GCC_HAS_BROKEN_INLINE
#if __GNUC__ == 3 #if __GNUC__ == 3
#if __GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 4 #if __GNUC_MINOR__ >= 1 && __GNUC_MINOR__ < 4
#define IW_GCC_HAS_BROKEN_INLINE 1
#endif /* __GNUC_MINOR__ */
#endif /* __GNUC__ */
/* However, gcc 4.0 has introduce a new "feature", when compiling with
* '-Os', it does not want to inline iw_ether_cmp() and friends.
* So, we need to fix inline again !
* Jean II */
#if __GNUC__ == 4
#define IW_GCC_HAS_BROKEN_INLINE 1
#endif /* __GNUC__ */
/* Now, really fix the inline */
#ifdef IW_GCC_HAS_BROKEN_INLINE
#ifdef inline
#undef inline
#endif /* inline */
#define inline inline __attribute__((always_inline)) #define inline inline __attribute__((always_inline))
#endif #endif /* IW_GCC_HAS_BROKEN_INLINE */
#endif /* __GNUC__ */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/****************************** DEBUG ******************************/ /****************************** DEBUG ******************************/
/************************ CONSTANTS & MACROS ************************/ /************************ CONSTANTS & MACROS ************************/
/* Various versions information */ /* Various versions information */
/* Recommended Wireless Extension version */ /* Recommended Wireless Extension version */
#define WE_VERSION 17 #define WE_VERSION 20
/* Maximum forward compatibility built in this version of WT */
#define WE_MAX_VERSION 21
/* Version of Wireless Tools */ /* Version of Wireless Tools */
#define WT_VERSION 27 #define WT_VERSION 28
/* Paths */ /* Paths */
#define PROC_NET_WIRELESS "/proc/net/wireless" #define PROC_NET_WIRELESS "/proc/net/wireless"
#define PROC_NET_DEV "/proc/net/dev" #define PROC_NET_DEV "/proc/net/dev"
/* Some usefull constants */ /* Some usefull constants */
#define KILO 1e3 #define KILO 1e3
#define MEGA 1e6 #define MEGA 1e6
#define GIGA 1e9 #define GIGA 1e9
/* For doing log10/exp10 without libm */ /* For doing log10/exp10 without libm */
#define LOG10_MAGIC 1.25892541179 #define LOG10_MAGIC 1.25892541179
/* Backward compatibility for Wireless Extension 9 */ /* Backward compatibility for network headers */
#ifndef IW_POWER_MODIFIER #ifndef ARPHRD_IEEE80211
#define IW_POWER_MODIFIER 0x000F /* Modify a parameter */ #define ARPHRD_IEEE80211 801 /* IEEE 802.11 */
#define IW_POWER_MIN 0x0001 /* Value is a minimum */ #endif /* ARPHRD_IEEE80211 */
#define IW_POWER_MAX 0x0002 /* Value is a maximum */
#define IW_POWER_RELATIVE 0x0004 /* Value is not in seconds/ms/us */
#endif /* IW_POWER_MODIFIER */
#ifndef IW_ENCODE_NOKEY
#define IW_ENCODE_NOKEY 0x0800 /* Key is write only, so not here *
/
#define IW_ENCODE_MODE 0xF000 /* Modes defined below */
#endif /* IW_ENCODE_NOKEY */
#ifndef IW_ENCODE_TEMP
#define IW_ENCODE_TEMP 0x0400 /* Temporary key */
#endif /* IW_ENCODE_TEMP */
/* More backward compatibility */
#ifndef SIOCSIWCOMMIT
#define SIOCSIWCOMMIT SIOCSIWNAME
#endif /* SIOCSIWCOMMIT */
/* Still more backward compatibility */
#ifndef IW_FREQ_FIXED
#define IW_FREQ_FIXED 0x01
#endif /* IW_FREQ_FIXED */
/****************************** TYPES ******************************/ /****************************** TYPES ******************************/
/* Shortcuts */ /* Shortcuts */
typedef struct iw_statistics iwstats; typedef struct iw_statistics iwstats;
typedef struct iw_range iwrange; typedef struct iw_range iwrange;
typedef struct iw_param iwparam; typedef struct iw_param iwparam;
typedef struct iw_freq iwfreq; typedef struct iw_freq iwfreq;
typedef struct iw_quality iwqual; typedef struct iw_quality iwqual;
typedef struct iw_priv_args iwprivargs; typedef struct iw_priv_args iwprivargs;
skipping to change at line 263 skipping to change at line 219
int has_txpower; int has_txpower;
iwparam txpower; /* Transmit Power in dBm */ iwparam txpower; /* Transmit Power in dBm */
int has_retry; int has_retry;
iwparam retry; /* Retry limit or lifetime */ iwparam retry; /* Retry limit or lifetime */
/* Stats */ /* Stats */
iwstats stats; iwstats stats;
int has_stats; int has_stats;
iwrange range; iwrange range;
int has_range; int has_range;
/* Auth params for WPA/802.1x/802.11i */
int auth_key_mgmt;
int has_auth_key_mgmt;
int auth_cipher_pairwise;
int has_auth_cipher_pairwise;
int auth_cipher_group;
int has_auth_cipher_group;
} wireless_info; } wireless_info;
/* Structure for storing an entry of a wireless scan. /* Structure for storing an entry of a wireless scan.
* This is only a subset of all possible information, the flexible * This is only a subset of all possible information, the flexible
* structure of scan results make it impossible to capture all * structure of scan results make it impossible to capture all
* information in such a static structure. */ * information in such a static structure. */
typedef struct wireless_scan typedef struct wireless_scan
{ {
/* Linked list */ /* Linked list */
struct wireless_scan * next; struct wireless_scan * next;
skipping to change at line 430 skipping to change at line 394
int buflen, int buflen,
int flags); int flags);
/* --------------- RETRY LIMIT/LIFETIME SUBROUTINES --------------- */ /* --------------- RETRY LIMIT/LIFETIME SUBROUTINES --------------- */
void void
iw_print_retry_value(char * buffer, iw_print_retry_value(char * buffer,
int buflen, int buflen,
int value, int value,
int flags); int flags);
/* ----------------------- TIME SUBROUTINES ----------------------- */ /* ----------------------- TIME SUBROUTINES ----------------------- */
void void
iw_print_timeval(char * buffer, iw_print_timeval(char * buffer,
int buflen, int buflen,
const struct timeval * time); const struct timeval * time,
const struct timezone * tz);
/* --------------------- ADDRESS SUBROUTINES ---------------------- */ /* --------------------- ADDRESS SUBROUTINES ---------------------- */
int int
iw_check_mac_addr_type(int skfd, iw_check_mac_addr_type(int skfd,
char * ifname); const char * ifname);
int int
iw_check_if_addr_type(int skfd, iw_check_if_addr_type(int skfd,
char * ifname); const char * ifname);
#if 0 #if 0
int int
iw_check_addr_type(int skfd, iw_check_addr_type(int skfd,
char * ifname); const char * ifname);
#endif #endif
#if 0
int int
iw_get_mac_addr(int skfd, iw_get_mac_addr(int skfd,
const char * name, const char * name,
struct ether_addr * eth, struct ether_addr * eth,
unsigned short * ptype); unsigned short * ptype);
#endif
char *
iw_mac_ntop(const unsigned char * mac,
int maclen,
char * buf,
int buflen);
void void
iw_ether_ntop(const struct ether_addr* eth, char* buf); iw_ether_ntop(const struct ether_addr * eth,
char* char * buf);
iw_ether_ntoa(const struct ether_addr* eth); char *
iw_sawap_ntop(const struct sockaddr * sap,
char * buf);
int
iw_mac_aton(const char * orig,
unsigned char * mac,
int macmax);
int int
iw_ether_aton(const char* bufp, struct ether_addr* eth); iw_ether_aton(const char* bufp, struct ether_addr* eth);
int int
iw_in_inet(char *bufp, struct sockaddr *sap); iw_in_inet(char *bufp, struct sockaddr *sap);
int int
iw_in_addr(int skfd, iw_in_addr(int skfd,
char * ifname, const char * ifname,
char * bufp, char * bufp,
struct sockaddr * sap); struct sockaddr * sap);
/* ----------------------- MISC SUBROUTINES ------------------------ */ /* ----------------------- MISC SUBROUTINES ------------------------ */
int int
iw_get_priv_size(int args); iw_get_priv_size(int args);
/* ---------------------- EVENT SUBROUTINES ---------------------- */ /* ---------------------- EVENT SUBROUTINES ---------------------- */
void void
iw_init_event_stream(struct stream_descr * stream, iw_init_event_stream(struct stream_descr * stream,
char * data, char * data,
skipping to change at line 547 skipping to change at line 525
/* /*
* Close the socket used for ioctl. * Close the socket used for ioctl.
*/ */
static inline void static inline void
iw_sockets_close(int skfd) iw_sockets_close(int skfd)
{ {
close(skfd); close(skfd);
} }
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* Backwards compatability /*
* Actually, those form are much easier to use when dealing with * Display an Ethernet Socket Address in readable format.
* struct sockaddr... */ */
static inline char* static inline char *
iw_pr_ether(char* bufp, const unsigned char* addr) iw_saether_ntop(const struct sockaddr *sap, char* bufp)
{ {
iw_ether_ntop((const struct ether_addr *) addr, bufp); iw_ether_ntop((const struct ether_addr *) sap->sa_data, bufp);
return bufp; return bufp;
} }
/* Backwards compatability */ /*------------------------------------------------------------------*/
/*
* Input an Ethernet Socket Address and convert to binary.
*/
static inline int static inline int
iw_in_ether(const char *bufp, struct sockaddr *sap) iw_saether_aton(const char *bufp, struct sockaddr *sap)
{ {
sap->sa_family = ARPHRD_ETHER; sap->sa_family = ARPHRD_ETHER;
return iw_ether_aton(bufp, (struct ether_addr *) sap->sa_data) ? 0 : -1; return iw_ether_aton(bufp, (struct ether_addr *) sap->sa_data);
} }
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* /*
* Create an Ethernet broadcast address * Create an Ethernet broadcast address
*/ */
static inline void static inline void
iw_broad_ether(struct sockaddr *sap) iw_broad_ether(struct sockaddr *sap)
{ {
sap->sa_family = ARPHRD_ETHER; sap->sa_family = ARPHRD_ETHER;
skipping to change at line 586 skipping to change at line 567
/* /*
* Create an Ethernet NULL address * Create an Ethernet NULL address
*/ */
static inline void static inline void
iw_null_ether(struct sockaddr *sap) iw_null_ether(struct sockaddr *sap)
{ {
sap->sa_family = ARPHRD_ETHER; sap->sa_family = ARPHRD_ETHER;
memset((char *) sap->sa_data, 0x00, ETH_ALEN); memset((char *) sap->sa_data, 0x00, ETH_ALEN);
} }
/*------------------------------------------------------------------*/
/*
* Compare two ethernet addresses
*/
static inline int
iw_ether_cmp(const struct ether_addr* eth1, const struct ether_addr* eth2)
{
return memcmp(eth1, eth2, sizeof(*eth1));
}
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* IWLIB_H */ #endif /* IWLIB_H */
 End of changes. 31 change blocks. 
112 lines changed or deleted 103 lines changed or added


 wireless.h   wireless.h 
/* /*
* This file define a set of standard wireless extensions * This file define a set of standard wireless extensions
* *
* Version : 17 21.6.04 * Version : 20 17.2.06
* *
* Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com> * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
* Copyright (c) 1997-2004 Jean Tourrilhes, All Rights Reserved. * Copyright (c) 1997-2006 Jean Tourrilhes, All Rights Reserved.
*/ */
#ifndef _LINUX_WIRELESS_H #ifndef _LINUX_WIRELESS_H
#define _LINUX_WIRELESS_H #define _LINUX_WIRELESS_H
/************************** DOCUMENTATION **************************/ /************************** DOCUMENTATION **************************/
/* /*
* Initial APIs (1996 -> onward) : * Initial APIs (1996 -> onward) :
* ----------------------------- * -----------------------------
* Basically, the wireless extensions are for now a set of standard ioctl * Basically, the wireless extensions are for now a set of standard ioctl
skipping to change at line 72 skipping to change at line 72
* *
* These wireless extensions are not magic : each driver has to provide * These wireless extensions are not magic : each driver has to provide
* support for them... * support for them...
* *
* IMPORTANT NOTE : As everything in the kernel, this is very much a * IMPORTANT NOTE : As everything in the kernel, this is very much a
* work in progress. Contact me if you have ideas of improvements... * work in progress. Contact me if you have ideas of improvements...
*/ */
/***************************** INCLUDES *****************************/ /***************************** INCLUDES *****************************/
/* To minimise problems in user space, I might remove those headers /* Do not put any header in this file, this creates a mess when
* at some point. Jean II */ * exported to user space. Most users have included all the
#include <linux/types.h> /* for "caddr_t" et al */ * relevant headers anyway... Jean II */
#include <linux/socket.h> /* for "struct sockaddr" et al */ /*#include <linux/types.h>*/ /* for "caddr_t" et al */
#include <linux/if.h> /* for IFNAMSIZ and co... */ /*#include <linux/socket.h>*/ /* for "struct sockaddr" et al */
/*#include <linux/if.h>*/ /* for IFNAMSIZ and co... */
/***************************** VERSION *****************************/ /***************************** VERSION *****************************/
/* /*
* This constant is used to know the availability of the wireless * This constant is used to know the availability of the wireless
* extensions and to know which version of wireless extensions it is * extensions and to know which version of wireless extensions it is
* (there is some stuff that will be added in the future...) * (there is some stuff that will be added in the future...)
* I just plan to increment with each new version. * I just plan to increment with each new version.
*/ */
#define WIRELESS_EXT 17 #define WIRELESS_EXT 20
/* /*
* Changes : * Changes :
* *
* V2 to V3 * V2 to V3
* -------- * --------
* Alan Cox start some incompatibles changes. I've integrated a bit mor e. * Alan Cox start some incompatibles changes. I've integrated a bit mor e.
* - Encryption renamed to Encode to avoid US regulation problems * - Encryption renamed to Encode to avoid US regulation problems
* - Frequency changed from float to struct to avoid problems on old 38 6 * - Frequency changed from float to struct to avoid problems on old 38 6
* *
skipping to change at line 185 skipping to change at line 186
* - Remove IW_MAX_GET_SPY because conflict with enhanced spy support * - Remove IW_MAX_GET_SPY because conflict with enhanced spy support
* - Add SIOCSIWTHRSPY/SIOCGIWTHRSPY and "struct iw_thrspy" * - Add SIOCSIWTHRSPY/SIOCGIWTHRSPY and "struct iw_thrspy"
* - Add IW_ENCODE_TEMP and iw_range->encoding_login_index * - Add IW_ENCODE_TEMP and iw_range->encoding_login_index
* *
* V16 to V17 * V16 to V17
* ---------- * ----------
* - Add flags to frequency -> auto/fixed * - Add flags to frequency -> auto/fixed
* - Document (struct iw_quality *)->updated, add new flags (INVALID) * - Document (struct iw_quality *)->updated, add new flags (INVALID)
* - Wireless Event capability in struct iw_range * - Wireless Event capability in struct iw_range
* - Add support for relative TxPower (yick !) * - Add support for relative TxPower (yick !)
*
* V17 to V18 (From Jouni Malinen <jkmaline@cc.hut.fi>)
* ----------
* - 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)
*/ */
/**************************** CONSTANTS ****************************/ /**************************** CONSTANTS ****************************/
/* -------------------------- IOCTL LIST -------------------------- */ /* -------------------------- IOCTL LIST -------------------------- */
/* Wireless Identification */ /* Wireless Identification */
#define SIOCSIWCOMMIT 0x8B00 /* Commit pending changes to driver */ #define SIOCSIWCOMMIT 0x8B00 /* Commit pending changes to driver */
#define SIOCGIWNAME 0x8B01 /* get name == wireless protocol */ #define SIOCGIWNAME 0x8B01 /* get name == wireless protocol */
/* SIOCGIWNAME is used to verify the presence of Wireless Extensions. /* SIOCGIWNAME is used to verify the presence of Wireless Extensions.
skipping to change at line 259 skipping to change at line 288
#define SIOCSIWRETRY 0x8B28 /* set retry limits and lifetime */ #define SIOCSIWRETRY 0x8B28 /* set retry limits and lifetime */
#define SIOCGIWRETRY 0x8B29 /* get retry limits and lifetime */ #define SIOCGIWRETRY 0x8B29 /* get retry limits and lifetime */
/* Encoding stuff (scrambling, hardware security, WEP...) */ /* Encoding stuff (scrambling, hardware security, WEP...) */
#define SIOCSIWENCODE 0x8B2A /* set encoding token & mode */ #define SIOCSIWENCODE 0x8B2A /* set encoding token & mode */
#define SIOCGIWENCODE 0x8B2B /* get encoding token & mode */ #define SIOCGIWENCODE 0x8B2B /* get encoding token & mode */
/* Power saving stuff (power management, unicast and multicast) */ /* Power saving stuff (power management, unicast and multicast) */
#define SIOCSIWPOWER 0x8B2C /* set Power Management settings */ #define SIOCSIWPOWER 0x8B2C /* set Power Management settings */
#define SIOCGIWPOWER 0x8B2D /* get Power Management settings */ #define SIOCGIWPOWER 0x8B2D /* get Power Management settings */
/* 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 gen
eric
* IE to empty buffer (len=0) removes the generic IE from the driver. Drive
rs
* are allowed to generate their own WPA/RSN IEs, but in these cases, drive
rs
* are required to report the used IE as a wireless event, e.g., when
* associating with an AP. */
#define SIOCSIWGENIE 0x8B30 /* set generic IE */
#define SIOCGIWGENIE 0x8B31 /* get generic IE */
/* WPA : IEEE 802.11 MLME requests */
#define SIOCSIWMLME 0x8B16 /* request MLME operation; uses
* struct iw_mlme */
/* WPA : Authentication mode parameters */
#define SIOCSIWAUTH 0x8B32 /* set authentication mode params */
#define SIOCGIWAUTH 0x8B33 /* get authentication mode params */
/* WPA : Extended version of encoding configuration */
#define SIOCSIWENCODEEXT 0x8B34 /* set encoding token & mode
*/
#define SIOCGIWENCODEEXT 0x8B35 /* get encoding token & mode
*/
/* WPA2 : PMKSA cache management */
#define SIOCSIWPMKSA 0x8B36 /* PMKSA cache operation */
/* -------------------- DEV PRIVATE IOCTL LIST -------------------- */ /* -------------------- DEV PRIVATE IOCTL LIST -------------------- */
/* These 32 ioctl are wireless device private, for 16 commands. /* These 32 ioctl are wireless device private, for 16 commands.
* Each driver is free to use them for whatever purpose it chooses, * Each driver is free to use them for whatever purpose it chooses,
* however the driver *must* export the description of those ioctls * however the driver *must* export the description of those ioctls
* with SIOCGIWPRIV and *must* use arguments as defined below. * with SIOCGIWPRIV and *must* use arguments as defined below.
* If you don't follow those rules, DaveM is going to hate you (reason : * If you don't follow those rules, DaveM is going to hate you (reason :
* it make mixed 32/64bit operation impossible). * it make mixed 32/64bit operation impossible).
*/ */
#define SIOCIWFIRSTPRIV 0x8BE0 #define SIOCIWFIRSTPRIV 0x8BE0
skipping to change at line 286 skipping to change at line 339
* convention, just use every other two command). More details in iwpriv.c. * 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 * And I repeat : you are not forced to use them with iwpriv, but you
* must be compliant with it. * must be compliant with it.
*/ */
/* ------------------------- IOCTL STUFF ------------------------- */ /* ------------------------- IOCTL STUFF ------------------------- */
/* The first and the last (range) */ /* The first and the last (range) */
#define SIOCIWFIRST 0x8B00 #define SIOCIWFIRST 0x8B00
#define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */ #define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */
#define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST)
/* Even : get (world access), odd : set (root access) */ /* Even : get (world access), odd : set (root access) */
#define IW_IS_SET(cmd) (!((cmd) & 0x1)) #define IW_IS_SET(cmd) (!((cmd) & 0x1))
#define IW_IS_GET(cmd) ((cmd) & 0x1) #define IW_IS_GET(cmd) ((cmd) & 0x1)
/* ----------------------- WIRELESS EVENTS ----------------------- */ /* ----------------------- WIRELESS EVENTS ----------------------- */
/* Those are *NOT* ioctls, do not issue request on them !!! */ /* Those are *NOT* ioctls, do not issue request on them !!! */
/* Most events use the same identifier as ioctl requests */ /* Most events use the same identifier as ioctl requests */
#define IWEVTXDROP 0x8C00 /* Packet dropped to excessive retry */ #define IWEVTXDROP 0x8C00 /* Packet dropped to excessive retry */
#define IWEVQUAL 0x8C01 /* Quality part of statistics (scan) */ #define IWEVQUAL 0x8C01 /* Quality part of statistics (scan) */
#define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */ #define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */
#define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) * / #define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) * /
#define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */ #define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */
#define IWEVGENIE 0x8C05 /* Generic IE (WPA, RSN, WMM, ..)
* (scan results); This includes id
and
* length fields. One IWEVGENIE may
* contain more than one IE. Scan
* results may contain one or more
* IWEVGENIE events. */
#define IWEVMICHAELMICFAILURE 0x8C06 /* Michael MIC failure
* (struct iw_michaelmicfailure)
*/
#define IWEVASSOCREQIE 0x8C07 /* IEs used in (Re)Association Reque
st.
* The data includes id and length
* fields and may contain more than
one
* IE. This event is required in
* Managed mode if the driver
* generates its own WPA/RSN IE. Thi
s
* should be sent just before
* IWEVREGISTERED event for the
* association. */
#define IWEVASSOCRESPIE 0x8C08 /* IEs used in (Re)Associati
on
* Response. The data includes id an
d
* length fields and may contain mor
e
* than one IE. This may be sent
* between IWEVASSOCREQIE and
* IWEVREGISTERED events for the
* association. */
#define IWEVPMKIDCAND 0x8C09 /* PMKID candidate for RSN
* pre-authentication
* (struct iw_pmkid_cand) */
#define IWEVFIRST 0x8C00 #define IWEVFIRST 0x8C00
#define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST)
/* ------------------------- PRIVATE INFO ------------------------- */ /* ------------------------- PRIVATE INFO ------------------------- */
/* /*
* The following is used with SIOCGIWPRIV. It allow a driver to define * The following is used with SIOCGIWPRIV. It allow a driver to define
* the interface (name, type of data) for its private ioctl. * the interface (name, type of data) for its private ioctl.
* Privates ioctl are SIOCIWFIRSTPRIV -> SIOCIWLASTPRIV * Privates ioctl are SIOCIWFIRSTPRIV -> SIOCIWLASTPRIV
*/ */
#define IW_PRIV_TYPE_MASK 0x7000 /* Type of arguments */ #define IW_PRIV_TYPE_MASK 0x7000 /* Type of arguments */
#define IW_PRIV_TYPE_NONE 0x0000 #define IW_PRIV_TYPE_NONE 0x0000
skipping to change at line 363 skipping to change at line 446
/* Modes of operation */ /* Modes of operation */
#define IW_MODE_AUTO 0 /* Let the driver decides */ #define IW_MODE_AUTO 0 /* Let the driver decides */
#define IW_MODE_ADHOC 1 /* Single cell network */ #define IW_MODE_ADHOC 1 /* Single cell network */
#define IW_MODE_INFRA 2 /* Multi cell network, roaming, ... */ #define IW_MODE_INFRA 2 /* Multi cell network, roaming, ... */
#define IW_MODE_MASTER 3 /* Synchronisation master or Access Point */ #define IW_MODE_MASTER 3 /* Synchronisation master or Access Point */
#define IW_MODE_REPEAT 4 /* Wireless Repeater (forwarder) */ #define IW_MODE_REPEAT 4 /* Wireless Repeater (forwarder) */
#define IW_MODE_SECOND 5 /* Secondary master/repeater (backup) */ #define IW_MODE_SECOND 5 /* Secondary master/repeater (backup) */
#define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */ #define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */
/* Statistics flags (bitmask in updated) */ /* Statistics flags (bitmask in updated) */
#define IW_QUAL_QUAL_UPDATED 0x1 /* Value was updated since last read #define IW_QUAL_QUAL_UPDATED 0x01 /* Value was updated since last read
*/ */
#define IW_QUAL_LEVEL_UPDATED 0x2 #define IW_QUAL_LEVEL_UPDATED 0x02
#define IW_QUAL_NOISE_UPDATED 0x4 #define IW_QUAL_NOISE_UPDATED 0x04
#define IW_QUAL_ALL_UPDATED 0x07
#define IW_QUAL_DBM 0x08 /* Level + Noise are dBm */
#define IW_QUAL_QUAL_INVALID 0x10 /* Driver doesn't provide value */ #define IW_QUAL_QUAL_INVALID 0x10 /* Driver doesn't provide value */
#define IW_QUAL_LEVEL_INVALID 0x20 #define IW_QUAL_LEVEL_INVALID 0x20
#define IW_QUAL_NOISE_INVALID 0x40 #define IW_QUAL_NOISE_INVALID 0x40
#define IW_QUAL_ALL_INVALID 0x70
/* Frequency flags */ /* Frequency flags */
#define IW_FREQ_AUTO 0x00 /* Let the driver decides */ #define IW_FREQ_AUTO 0x00 /* Let the driver decides */
#define IW_FREQ_FIXED 0x01 /* Force a specific value */ #define IW_FREQ_FIXED 0x01 /* Force a specific value */
/* Maximum number of size of encoding token available /* Maximum number of size of encoding token available
* they are listed in the range structure */ * they are listed in the range structure */
#define IW_MAX_ENCODING_SIZES 8 #define IW_MAX_ENCODING_SIZES 8
/* Maximum size of the encoding token in bytes */ /* Maximum size of the encoding token in bytes */
#define IW_ENCODING_TOKEN_MAX 32 /* 256 bits (for now) */ #define IW_ENCODING_TOKEN_MAX 64 /* 512 bits (for now) */
/* Flags for encoding (along with the token) */ /* Flags for encoding (along with the token) */
#define IW_ENCODE_INDEX 0x00FF /* Token index (if needed) * / #define IW_ENCODE_INDEX 0x00FF /* Token index (if needed) * /
#define IW_ENCODE_FLAGS 0xFF00 /* Flags defined below */ #define IW_ENCODE_FLAGS 0xFF00 /* Flags defined below */
#define IW_ENCODE_MODE 0xF000 /* Modes defined below */ #define IW_ENCODE_MODE 0xF000 /* Modes defined below */
#define IW_ENCODE_DISABLED 0x8000 /* Encoding disabled */ #define IW_ENCODE_DISABLED 0x8000 /* Encoding disabled */
#define IW_ENCODE_ENABLED 0x0000 /* Encoding enabled */ #define IW_ENCODE_ENABLED 0x0000 /* Encoding enabled */
#define IW_ENCODE_RESTRICTED 0x4000 /* Refuse non-encoded packets */ #define IW_ENCODE_RESTRICTED 0x4000 /* Refuse non-encoded packets */
#define IW_ENCODE_OPEN 0x2000 /* Accept non-encoded packets */ #define IW_ENCODE_OPEN 0x2000 /* Accept non-encoded packets */
#define IW_ENCODE_NOKEY 0x0800 /* Key is write only, so not present */ #define IW_ENCODE_NOKEY 0x0800 /* Key is write only, so not present */
skipping to change at line 435 skipping to change at line 521
/* Scanning request flags */ /* Scanning request flags */
#define IW_SCAN_DEFAULT 0x0000 /* Default scan of the drive r */ #define IW_SCAN_DEFAULT 0x0000 /* Default scan of the drive r */
#define IW_SCAN_ALL_ESSID 0x0001 /* Scan all ESSIDs */ #define IW_SCAN_ALL_ESSID 0x0001 /* Scan all ESSIDs */
#define IW_SCAN_THIS_ESSID 0x0002 /* Scan only this ESSID */ #define IW_SCAN_THIS_ESSID 0x0002 /* Scan only this ESSID */
#define IW_SCAN_ALL_FREQ 0x0004 /* Scan all Frequencies */ #define IW_SCAN_ALL_FREQ 0x0004 /* Scan all Frequencies */
#define IW_SCAN_THIS_FREQ 0x0008 /* Scan only this Frequency */ #define IW_SCAN_THIS_FREQ 0x0008 /* Scan only this Frequency */
#define IW_SCAN_ALL_MODE 0x0010 /* Scan all Modes */ #define IW_SCAN_ALL_MODE 0x0010 /* Scan all Modes */
#define IW_SCAN_THIS_MODE 0x0020 /* Scan only this Mode */ #define IW_SCAN_THIS_MODE 0x0020 /* Scan only this Mode */
#define IW_SCAN_ALL_RATE 0x0040 /* Scan all Bit-Rates */ #define IW_SCAN_ALL_RATE 0x0040 /* Scan all Bit-Rates */
#define IW_SCAN_THIS_RATE 0x0080 /* Scan only this Bit-Rate */ #define IW_SCAN_THIS_RATE 0x0080 /* Scan only this Bit-Rate */
/* struct iw_scan_req scan_type */
#define IW_SCAN_TYPE_ACTIVE 0
#define IW_SCAN_TYPE_PASSIVE 1
/* Maximum size of returned data */ /* Maximum size of returned data */
#define IW_SCAN_MAX_DATA 4096 /* In bytes */ #define IW_SCAN_MAX_DATA 4096 /* In bytes */
/* Max number of char in custom event - use multiple of them if needed */ /* Max number of char in custom event - use multiple of them if needed */
#define IW_CUSTOM_MAX 256 /* In bytes */ #define IW_CUSTOM_MAX 256 /* In bytes */
/* Generic information element */
#define IW_GENERIC_IE_MAX 1024
/* MLME requests (SIOCSIWMLME / struct iw_mlme) */
#define IW_MLME_DEAUTH 0
#define IW_MLME_DISASSOC 1
/* SIOCSIWAUTH/SIOCGIWAUTH struct iw_param flags */
#define IW_AUTH_INDEX 0x0FFF
#define IW_AUTH_FLAGS 0xF000
/* 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 0
#define IW_AUTH_CIPHER_PAIRWISE 1
#define IW_AUTH_CIPHER_GROUP 2
#define IW_AUTH_KEY_MGMT 3
#define IW_AUTH_TKIP_COUNTERMEASURES 4
#define IW_AUTH_DROP_UNENCRYPTED 5
#define IW_AUTH_80211_AUTH_ALG 6
#define IW_AUTH_WPA_ENABLED 7
#define IW_AUTH_RX_UNENCRYPTED_EAPOL 8
#define IW_AUTH_ROAMING_CONTROL 9
#define IW_AUTH_PRIVACY_INVOKED 10
/* IW_AUTH_WPA_VERSION values (bit field) */
#define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
#define IW_AUTH_WPA_VERSION_WPA 0x00000002
#define IW_AUTH_WPA_VERSION_WPA2 0x00000004
/* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values (bit field) */
#define IW_AUTH_CIPHER_NONE 0x00000001
#define IW_AUTH_CIPHER_WEP40 0x00000002
#define IW_AUTH_CIPHER_TKIP 0x00000004
#define IW_AUTH_CIPHER_CCMP 0x00000008
#define IW_AUTH_CIPHER_WEP104 0x00000010
/* IW_AUTH_KEY_MGMT values (bit field) */
#define IW_AUTH_KEY_MGMT_802_1X 1
#define IW_AUTH_KEY_MGMT_PSK 2
/* IW_AUTH_80211_AUTH_ALG values (bit field) */
#define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
#define IW_AUTH_ALG_SHARED_KEY 0x00000002
#define IW_AUTH_ALG_LEAP 0x00000004
/* IW_AUTH_ROAMING_CONTROL values */
#define IW_AUTH_ROAMING_ENABLE 0 /* driver/firmware based roaming */
#define IW_AUTH_ROAMING_DISABLE 1 /* user space program used f
or roaming
* control */
/* SIOCSIWENCODEEXT definitions */
#define IW_ENCODE_SEQ_MAX_SIZE 8
/* struct iw_encode_ext ->alg */
#define IW_ENCODE_ALG_NONE 0
#define IW_ENCODE_ALG_WEP 1
#define IW_ENCODE_ALG_TKIP 2
#define IW_ENCODE_ALG_CCMP 3
/* struct iw_encode_ext ->ext_flags */
#define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001
#define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002
#define IW_ENCODE_EXT_GROUP_KEY 0x00000004
#define IW_ENCODE_EXT_SET_TX_KEY 0x00000008
/* IWEVMICHAELMICFAILURE : struct iw_michaelmicfailure ->flags */
#define IW_MICFAILURE_KEY_ID 0x00000003 /* Key ID 0..3 */
#define IW_MICFAILURE_GROUP 0x00000004
#define IW_MICFAILURE_PAIRWISE 0x00000008
#define IW_MICFAILURE_STAKEY 0x00000010
#define IW_MICFAILURE_COUNT 0x00000060 /* 1 or 2 (0 = count not supporte
d)
*/
/* Bit field values for enc_capa in struct iw_range */
#define IW_ENC_CAPA_WPA 0x00000001
#define IW_ENC_CAPA_WPA2 0x00000002
#define IW_ENC_CAPA_CIPHER_TKIP 0x00000004
#define IW_ENC_CAPA_CIPHER_CCMP 0x00000008
/* Event capability macros - in (struct iw_range *)->event_capa /* Event capability macros - in (struct iw_range *)->event_capa
* Because we have more than 32 possible events, we use an array of * Because we have more than 32 possible events, we use an array of
* 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */ * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */
#define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? \ #define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? \
(cmd - SIOCIWFIRSTPRIV + 0x60) : \ (cmd - SIOCIWFIRSTPRIV + 0x60) : \
(cmd - SIOCSIWCOMMIT)) (cmd - SIOCSIWCOMMIT))
#define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5) #define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5)
#define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cm d) & 0x1F)) #define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cm d) & 0x1F))
/* Event capability constants - event autogenerated by the kernel /* Event capability constants - event autogenerated by the kernel
* This list is valid for most 802.11 devices, customise as needed... */ * This list is valid for most 802.11 devices, customise as needed... */
skipping to change at line 479 skipping to change at line 647
__u8 disabled; /* Disable the feature */ __u8 disabled; /* Disable the feature */
__u16 flags; /* Various specifc flags (if any) */ __u16 flags; /* Various specifc flags (if any) */
}; };
/* /*
* For all data larger than 16 octets, we need to use a * For all data larger than 16 octets, we need to use a
* pointer to memory allocated in user space. * pointer to memory allocated in user space.
*/ */
struct iw_point struct iw_point
{ {
caddr_t pointer; /* Pointer to the data (in user space) */ void __user *pointer; /* Pointer to the data (in user space) */
__u16 length; /* number of fields or size in bytes */ __u16 length; /* number of fields or size in bytes */
__u16 flags; /* Optional params */ __u16 flags; /* Optional params */
}; };
/* /*
* A frequency * A frequency
* For numbers lower than 10^9, we encode the number in 'm' and * For numbers lower than 10^9, we encode the number in 'm' and
* set 'e' to 0 * set 'e' to 0
* For number greater than 10^9, we divide it by the lowest power * 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')... * of 10 to get 'm' lower than 10^9, with 'm'= f / (10^'e')...
skipping to change at line 548 skipping to change at line 716
* Quality range (for spy threshold) * Quality range (for spy threshold)
*/ */
struct iw_thrspy struct iw_thrspy
{ {
struct sockaddr addr; /* Source address (hw/mac) * / struct sockaddr addr; /* Source address (hw/mac) * /
struct iw_quality qual; /* Quality of the link */ struct iw_quality qual; /* Quality of the link */
struct iw_quality low; /* Low threshold */ struct iw_quality low; /* Low threshold */
struct iw_quality high; /* High threshold */ struct iw_quality high; /* High threshold */
}; };
/*
* 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
{
__u8 scan_type; /* IW_SCAN_TYPE_{ACTIVE,PASSIVE} */
__u8 essid_len;
__u8 num_channels; /* num entries in channel_list;
* 0 = scan all allowed channels */
__u8 flags; /* reserved as padding; use zero, this may
* be used in the future for adding flags
* to request different scan behavior */
struct sockaddr bssid; /* ff:ff:ff:ff:ff:ff for broadcast BSSID or
* individual address of a specific BSS */
/*
* Use this ESSID if IW_SCAN_THIS_ESSID flag is used instead of usin
g
* the current ESSID. This allows scan requests for specific ESSID
* without having to change the current ESSID and potentially breaki
ng
* the current association.
*/
__u8 essid[IW_ESSID_MAX_SIZE];
/*
* Optional parameters for changing the default scanning behavior.
* These are based on the MLME-SCAN.request from IEEE Std 802.11.
* TU is 1.024 ms. If these are set to 0, driver is expected to use
* reasonable default values. min_channel_time defines the time that
* will be used to wait for the first reply on each channel. If no
* replies are received, next channel will be scanned after this. If
* replies are received, total time waited on the channel is defined
by
* max_channel_time.
*/
__u32 min_channel_time; /* in TU */
__u32 max_channel_time; /* in TU */
struct iw_freq channel_list[IW_MAX_FREQUENCIES];
};
/* ------------------------- 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 a
nd
* only the data contents changes (key data -> this structure, includin
g
* 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 settin
g
* 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 normal
ly
* 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 fo
r
* debugging/testing.
*/
struct iw_encode_ext
{
__u32 ext_flags; /* IW_ENCODE_EXT_* */
__u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
__u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for broadcast/multicast
* (group) keys or unicast address for
* individual keys */
__u16 alg; /* IW_ENCODE_ALG_* */
__u16 key_len;
__u8 key[0];
};
/* SIOCSIWMLME data */
struct iw_mlme
{
__u16 cmd; /* IW_MLME_* */
__u16 reason_code;
struct sockaddr addr;
};
/* SIOCSIWPMKSA data */
#define IW_PMKSA_ADD 1
#define IW_PMKSA_REMOVE 2
#define IW_PMKSA_FLUSH 3
#define IW_PMKID_LEN 16
struct iw_pmksa
{
__u32 cmd; /* IW_PMKSA_* */
struct sockaddr bssid;
__u8 pmkid[IW_PMKID_LEN];
};
/* IWEVMICHAELMICFAILURE data */
struct iw_michaelmicfailure
{
__u32 flags;
struct sockaddr src_addr;
__u8 tsc[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
};
/* IWEVPMKIDCAND data */
#define IW_PMKID_CAND_PREAUTH 0x00000001 /* RNS pre-authentication enabled
*/
struct iw_pmkid_cand
{
__u32 flags; /* IW_PMKID_CAND_* */
__u32 index; /* the smaller the index, the higher the
* priority */
struct sockaddr bssid;
};
/* ------------------------ WIRELESS STATS ------------------------ */ /* ------------------------ WIRELESS STATS ------------------------ */
/* /*
* Wireless statistics (used for /proc/net/wireless) * Wireless statistics (used for /proc/net/wireless)
*/ */
struct iw_statistics struct iw_statistics
{ {
__u16 status; /* Status __u16 status; /* Status
* - device dependent for now */ * - device dependent for now */
struct iw_quality qual; /* Quality of the link struct iw_quality qual; /* Quality of the link
skipping to change at line 727 skipping to change at line 1021
__s32 max_retry; /* Maximal number of retries */ __s32 max_retry; /* Maximal number of retries */
__s32 min_r_time; /* Minimal retry lifetime */ __s32 min_r_time; /* Minimal retry lifetime */
__s32 max_r_time; /* Maximal retry lifetime */ __s32 max_r_time; /* Maximal retry lifetime */
/* Frequency */ /* Frequency */
__u16 num_channels; /* Number of channels [0; num - 1] * / __u16 num_channels; /* Number of channels [0; num - 1] * /
__u8 num_frequency; /* Number of entry in the list */ __u8 num_frequency; /* Number of entry in the list */
struct iw_freq freq[IW_MAX_FREQUENCIES]; /* list */ struct iw_freq freq[IW_MAX_FREQUENCIES]; /* list */
/* Note : this frequency list doesn't need to fit channel numbers, /* Note : this frequency list doesn't need to fit channel numbers,
* because each entry contain its channel index */ * because each entry contain its channel index */
__u32 enc_capa; /* IW_ENC_CAPA_* bit field */
}; };
/* /*
* Private ioctl interface information * Private ioctl interface information
*/ */
struct iw_priv_args struct iw_priv_args
{ {
__u32 cmd; /* Number of the ioctl to issue */ __u32 cmd; /* Number of the ioctl to issue */
__u16 set_args; /* Type and number of args */ __u16 set_args; /* Type and number of args */
skipping to change at line 764 skipping to change at line 1060
__u16 cmd; /* Wireless IOCTL */ __u16 cmd; /* Wireless IOCTL */
union iwreq_data u; /* IOCTL fixed payload */ union iwreq_data u; /* IOCTL fixed payload */
}; };
/* Size of the Event prefix (including padding and alignement junk) */ /* Size of the Event prefix (including padding and alignement junk) */
#define IW_EV_LCP_LEN (sizeof(struct iw_event) - sizeof(union iwreq_data)) #define IW_EV_LCP_LEN (sizeof(struct iw_event) - sizeof(union iwreq_data))
/* Size of the various events */ /* Size of the various events */
#define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ) #define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ)
#define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(__u32)) #define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(__u32))
#define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq)) #define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq))
#define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point))
#define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param)) #define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param))
#define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr)) #define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr))
#define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality)) #define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality))
/* Note : in the case of iw_point, the extra data will come at the /* iw_point events are special. First, the payload (extra data) come at
* end of the event */ * 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 (((char *) &(((struct iw_point *) NULL)->length)) -
\
(char *) NULL)
#define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - \
IW_EV_POINT_OFF)
#endif /* _LINUX_WIRELESS_H */ #endif /* _LINUX_WIRELESS_H */
 End of changes. 19 change blocks. 
17 lines changed or deleted 344 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/