iwlib.h   iwlib.h 
/* /*
* Wireless Tools * Wireless Tools
* *
* Jean II - HPLB 97->99 - HPL 99->04 * Jean II - HPLB 97->99 - HPL 99->07
* *
* Common header for the Wireless Extension library... * Common header for the Wireless Extension library...
* *
* This file is released under the GPL license. * This file is released under the GPL license.
* Copyright (c) 1997-2004 Jean Tourrilhes <jt@hpl.hp.com> * Copyright (c) 1997-2007 Jean Tourrilhes <jt@hpl.hp.com>
*/ */
#ifndef IWLIB_H #ifndef IWLIB_H
#define IWLIB_H #define IWLIB_H
/*#include "CHANGELOG.h"*/ /*#include "CHANGELOG.h"*/
/***************************** INCLUDES *****************************/ /***************************** INCLUDES *****************************/
/* Standard headers */ /* Standard headers */
skipping to change at line 36 skipping to change at line 36
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <netdb.h> /* gethostbyname, getnetbyname */ #include <netdb.h> /* gethostbyname, getnetbyname */
#include <net/ethernet.h> /* struct ether_addr */ #include <net/ethernet.h> /* struct ether_addr */
#include <sys/time.h> /* struct timeval */ #include <sys/time.h> /* struct timeval */
#include <unistd.h> #include <unistd.h>
/* This is our header selection. Try to hide the mess and the misery :-( /* This is our header selection. Try to hide the mess and the misery :-(
* Don't look, you would go blind ;-) */ * Don't look, you would go blind ;-)
* Note : compatibility with *old* distributions has been removed,
#ifndef LINUX_VERSION_CODE * you will need Glibc 2.2 and older to compile (which means
#include <linux/version.h> * Mandrake 8.0, Debian 2.3, RH 7.1 or older).
#endif */
/* 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 */
#if defined(__GLIBC__) \
&& __GLIBC__ == 2 \
&& __GLIBC_MINOR__ >= 2 \
&& LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
#define HEADERS_GENERIC
/* 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 */
#elif defined(__GLIBC__) \
&& __GLIBC__ == 2 \
&& __GLIBC_MINOR__ == 1 \
&& LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
#define HEADERS_GENERIC
#define HEADERS_KERNEL
/* Unsupported combination */
#else
#error "Your kernel/libc combination is not supported"
#endif
#ifdef HEADERS_GENERIC /* Set of headers proposed by Dr. Michael Rietz <rietz@mail.amps.de>, 27.3.
/* Proposed by Dr. Michael Rietz <rietz@mail.amps.de>, 27.3.2 */ 2 */
#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 /* HEADERS_GENERIC */
/* Fixup to be able to include kernel includes in userspace. /* Fixup to be able to include kernel includes in userspace.
* Basically, kill the sparse annotations... Jean II */ * Basically, kill the sparse annotations... Jean II */
#ifndef __user #ifndef __user
#define __user #define __user
#endif #endif
#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/if.h> /* for IFNAMSIZ and co... */
#else /* !HEADERS_KERNEL */
/* Glibc systems headers are supposedly less problematic than kernel ones * / /* Glibc systems headers are supposedly less problematic than kernel ones * /
#include <sys/socket.h> /* for "struct sockaddr" et al */ #include <sys/socket.h> /* for "struct sockaddr" et al */
#include <net/if.h> /* for IFNAMSIZ and co... */ #include <net/if.h> /* for IFNAMSIZ and co... */
#endif /* !HEADERS_KERNEL */
/* Private copy of Wireless extensions (in this directoty) */ /* 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%.
skipping to change at line 129 skipping to change at line 99
#endif /* inline */ #endif /* inline */
#define inline inline __attribute__((always_inline)) #define inline inline __attribute__((always_inline))
#endif /* IW_GCC_HAS_BROKEN_INLINE */ #endif /* IW_GCC_HAS_BROKEN_INLINE */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/****************************** DEBUG ******************************/ /****************************** DEBUG ******************************/
//#define DEBUG 1
/************************ CONSTANTS & MACROS ************************/ /************************ CONSTANTS & MACROS ************************/
/* Various versions information */ /* Various versions information */
/* Recommended Wireless Extension version */ /* Recommended Wireless Extension version */
#define WE_VERSION 20 #define WE_VERSION 21
/* Maximum forward compatibility built in this version of WT */ /* Maximum forward compatibility built in this version of WT */
#define WE_MAX_VERSION 21 #define WE_MAX_VERSION 22
/* Version of Wireless Tools */ /* Version of Wireless Tools */
#define WT_VERSION 28 #define WT_VERSION 29
/* 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 network headers */ /* Backward compatibility for network headers */
#ifndef ARPHRD_IEEE80211 #ifndef ARPHRD_IEEE80211
#define ARPHRD_IEEE80211 801 /* IEEE 802.11 */ #define ARPHRD_IEEE80211 801 /* IEEE 802.11 */
#endif /* ARPHRD_IEEE80211 */ #endif /* ARPHRD_IEEE80211 */
#ifndef IW_EV_LCP_PK_LEN
/* Size of the Event prefix when packed in stream */
#define IW_EV_LCP_PK_LEN (4)
/* Size of the various events when packed in stream */
#define IW_EV_CHAR_PK_LEN (IW_EV_LCP_PK_LEN + IFNAMSIZ)
#define IW_EV_UINT_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(__u32))
#define IW_EV_FREQ_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_freq))
#define IW_EV_PARAM_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_param))
#define IW_EV_ADDR_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct sockaddr))
#define IW_EV_QUAL_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_quality
))
#define IW_EV_POINT_PK_LEN (IW_EV_LCP_PK_LEN + 4)
struct iw_pk_event
{
__u16 len; /* Real lenght of this stuff
*/
__u16 cmd; /* Wireless IOCTL */
union iwreq_data u; /* IOCTL fixed payload */
} __attribute__ ((packed));
struct iw_pk_point
{
void __user *pointer; /* Pointer to the data (in user space) */
__u16 length; /* number of fields or size in bytes
*/
__u16 flags; /* Optional params */
} __attribute__ ((packed));
#define IW_EV_LCP_PK2_LEN (sizeof(struct iw_pk_event) - sizeof(union i
wreq_data))
#define IW_EV_POINT_PK2_LEN (IW_EV_LCP_PK2_LEN + sizeof(struct iw_pk_poi
nt) - IW_EV_POINT_OFF)
#endif /* IW_EV_LCP_PK_LEN */
/****************************** 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;
typedef struct sockaddr sockaddr; typedef struct sockaddr sockaddr;
skipping to change at line 246 skipping to change at line 248
struct wireless_scan * next; struct wireless_scan * next;
/* Cell identifiaction */ /* Cell identifiaction */
int has_ap_addr; int has_ap_addr;
sockaddr ap_addr; /* Access point address */ sockaddr ap_addr; /* Access point address */
/* Other information */ /* Other information */
struct wireless_config b; /* Basic information */ struct wireless_config b; /* Basic information */
iwstats stats; /* Signal strength */ iwstats stats; /* Signal strength */
int has_stats; int has_stats;
iwparam maxbitrate; /* Max bit rate in bps */
int has_maxbitrate;
} wireless_scan; } wireless_scan;
/* /*
* Context used for non-blocking scan. * Context used for non-blocking scan.
*/ */
typedef struct wireless_scan_head typedef struct wireless_scan_head
{ {
wireless_scan * result; /* Result of the scan */ wireless_scan * result; /* Result of the scan */
int retry; /* Retry level */ int retry; /* Retry level */
} wireless_scan_head; } wireless_scan_head;
skipping to change at line 273 skipping to change at line 277
char * value; /* Current value in event */ char * value; /* Current value in event */
} stream_descr; } stream_descr;
/* Prototype for handling display of each single interface on the /* Prototype for handling display of each single interface on the
* system - see iw_enum_devices() */ * system - see iw_enum_devices() */
typedef int (*iw_enum_handler)(int skfd, typedef int (*iw_enum_handler)(int skfd,
char * ifname, char * ifname,
char * args[], char * args[],
int count); int count);
/* Describe a modulation */
typedef struct iw_modul_descr
{
unsigned int mask; /* Modulation bitmask */
char cmd[8]; /* Short name */
char * verbose; /* Verbose description */
} iw_modul_descr;
/**************************** PROTOTYPES ****************************/ /**************************** PROTOTYPES ****************************/
/* /*
* All the functions in iwcommon.c * All the functions in iwcommon.c
*/ */
/* ---------------------- SOCKET SUBROUTINES -----------------------*/ /* ---------------------- SOCKET SUBROUTINES -----------------------*/
int int
iw_sockets_open(void); iw_sockets_open(void);
void void
iw_enum_devices(int skfd, iw_enum_devices(int skfd,
skipping to change at line 381 skipping to change at line 393
iw_in_key_full(int skfd, iw_in_key_full(int skfd,
const char * ifname, const char * ifname,
const char * input, const char * input,
unsigned char * key, unsigned char * key,
__u16 * flags); __u16 * flags);
/* ----------------- POWER MANAGEMENT SUBROUTINES ----------------- */ /* ----------------- POWER MANAGEMENT SUBROUTINES ----------------- */
void void
iw_print_pm_value(char * buffer, iw_print_pm_value(char * buffer,
int buflen, int buflen,
int value, int value,
int flags); int flags,
int we_version);
void void
iw_print_pm_mode(char * buffer, iw_print_pm_mode(char * buffer,
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,
int we_version);
/* ----------------------- 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); const struct timezone * tz);
/* --------------------- ADDRESS SUBROUTINES ---------------------- */ /* --------------------- ADDRESS SUBROUTINES ---------------------- */
int int
iw_check_mac_addr_type(int skfd, iw_check_mac_addr_type(int skfd,
const char * ifname); const char * ifname);
skipping to change at line 471 skipping to change at line 485
iw_scan(int skfd, iw_scan(int skfd,
char * ifname, char * ifname,
int we_version, int we_version,
wireless_scan_head * context); wireless_scan_head * context);
/**************************** VARIABLES ****************************/ /**************************** VARIABLES ****************************/
/* Modes as human readable strings */ /* Modes as human readable strings */
extern const char * const iw_operation_mode[]; extern const char * const iw_operation_mode[];
#define IW_NUM_OPER_MODE 7 #define IW_NUM_OPER_MODE 7
#define IW_NUM_OPER_MODE_EXT 8
/* Modulations as human readable strings */
extern const struct iw_modul_descr iw_modul_list[];
#define IW_SIZE_MODUL_LIST 16
/************************* INLINE FUNTIONS *************************/ /************************* INLINE FUNTIONS *************************/
/* /*
* Functions that are so simple that it's more efficient inlining them * Functions that are so simple that it's more efficient inlining them
*/ */
/* /*
* Note : I've defined wrapper for the ioctl request so that * Note : I've defined wrapper for the ioctl request so that
* it will be easier to migrate to other kernel API if needed * it will be easier to migrate to other kernel API if needed
*/ */
 End of changes. 17 change blocks. 
43 lines changed or deleted 68 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 : 20 17.2.06 * Version : 21 14.3.06
* *
* Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com> * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
* Copyright (c) 1997-2006 Jean Tourrilhes, All Rights Reserved. * Copyright (c) 1997-2005 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 *****************************/
/* Do not put any header in this file, this creates a mess when /* This header is used in user-space, therefore need to be sanitised
* exported to user space. Most users have included all the * for that purpose. Those includes are usually not compatible with glibc.
* relevant headers anyway... Jean II */ * To know which includes to use in user-space, check iwlib.h. */
/*#include <linux/types.h>*/ /* for "caddr_t" et al */ #ifdef __KERNEL__
/*#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... */
#endif /* __KERNEL__ */
/***************************** 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 20 #define WIRELESS_EXT 21
/* /*
* 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 211 skipping to change at line 213
* *
* V18 to V19 * V18 to V19
* ---------- * ----------
* - Remove (struct iw_point *)->pointer from events and streams * - Remove (struct iw_point *)->pointer from events and streams
* - Remove header includes to help user space * - Remove header includes to help user space
* - Increase IW_ENCODING_TOKEN_MAX from 32 to 64 * - Increase IW_ENCODING_TOKEN_MAX from 32 to 64
* - Add IW_QUAL_ALL_UPDATED and IW_QUAL_ALL_INVALID macros * - Add IW_QUAL_ALL_UPDATED and IW_QUAL_ALL_INVALID macros
* - Add explicit flag to tell stats are in dBm : IW_QUAL_DBM * - Add explicit flag to tell stats are in dBm : IW_QUAL_DBM
* - Add IW_IOCTL_IDX() and IW_EVENT_IDX() macros * - Add IW_IOCTL_IDX() and IW_EVENT_IDX() macros
* *
* V19 to V20 * V20 to V21
* ---------- * ----------
* - RtNetlink requests support (SET/GET) * - Remove (struct net_device *)->get_wireless_stats()
* - Change length in ESSID and NICK to strlen() instead of strlen()+1
* - Add SIOCSIWMODUL/SIOCGIWMODUL for modulation setting
* - Add IW_RETRY_SHORT/IW_RETRY_LONG retry modifiers
* - Add IW_POWER_SAVING power type
* - Power/Retry relative values no longer * 100000
* - Add bitrate flags for unicast/broadcast
*/ */
/**************************** 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 287 skipping to change at line 295
#define SIOCGIWTXPOW 0x8B27 /* get transmit power (dBm) */ #define SIOCGIWTXPOW 0x8B27 /* get transmit power (dBm) */
#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 */
/* Modulation bitmask */
#define SIOCSIWMODUL 0x8B2E /* set Modulations settings */
#define SIOCGIWMODUL 0x8B2F /* get Modulations settings */
/* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WMM). /* 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 * 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 * 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 * 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 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 * are required to report the used IE as a wireless event, e.g., when
* associating with an AP. */ * associating with an AP. */
#define SIOCSIWGENIE 0x8B30 /* set generic IE */ #define SIOCSIWGENIE 0x8B30 /* set generic IE */
#define SIOCGIWGENIE 0x8B31 /* get generic IE */ #define SIOCGIWGENIE 0x8B31 /* get generic IE */
skipping to change at line 454 skipping to change at line 465
/* Statistics flags (bitmask in updated) */ /* Statistics flags (bitmask in updated) */
#define IW_QUAL_QUAL_UPDATED 0x01 /* Value was updated since last read */ #define IW_QUAL_QUAL_UPDATED 0x01 /* Value was updated since last read */
#define IW_QUAL_LEVEL_UPDATED 0x02 #define IW_QUAL_LEVEL_UPDATED 0x02
#define IW_QUAL_NOISE_UPDATED 0x04 #define IW_QUAL_NOISE_UPDATED 0x04
#define IW_QUAL_ALL_UPDATED 0x07 #define IW_QUAL_ALL_UPDATED 0x07
#define IW_QUAL_DBM 0x08 /* Level + Noise are dBm */ #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_RCPI 0x80 /* Level + Noise are 802.11k RCPI */
#define IW_QUAL_ALL_INVALID 0x70 #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
skipping to change at line 483 skipping to change at line 495
#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 */
#define IW_ENCODE_TEMP 0x0400 /* Temporary key */ #define IW_ENCODE_TEMP 0x0400 /* Temporary key */
/* Power management flags available (along with the value, if any) */ /* Power management flags available (along with the value, if any) */
#define IW_POWER_ON 0x0000 /* No details... */ #define IW_POWER_ON 0x0000 /* No details... */
#define IW_POWER_TYPE 0xF000 /* Type of parameter */ #define IW_POWER_TYPE 0xF000 /* Type of parameter */
#define IW_POWER_PERIOD 0x1000 /* Value is a period/duratio n of */ #define IW_POWER_PERIOD 0x1000 /* Value is a period/duratio n of */
#define IW_POWER_TIMEOUT 0x2000 /* Value is a timeout (to go asleep) */ #define IW_POWER_TIMEOUT 0x2000 /* Value is a timeout (to go asleep) */
#define IW_POWER_SAVING 0x4000 /* Value is relative (how ag gressive)*/
#define IW_POWER_MODE 0x0F00 /* Power Management mode */ #define IW_POWER_MODE 0x0F00 /* Power Management mode */
#define IW_POWER_UNICAST_R 0x0100 /* Receive only unicast messages */ #define IW_POWER_UNICAST_R 0x0100 /* Receive only unicast messages */
#define IW_POWER_MULTICAST_R 0x0200 /* Receive only multicast messages * / #define IW_POWER_MULTICAST_R 0x0200 /* Receive only multicast messages * /
#define IW_POWER_ALL_R 0x0300 /* Receive all messages though PM */ #define IW_POWER_ALL_R 0x0300 /* Receive all messages though PM */
#define IW_POWER_FORCE_S 0x0400 /* Force PM procedure for sending un icast */ #define IW_POWER_FORCE_S 0x0400 /* Force PM procedure for sending un icast */
#define IW_POWER_REPEATER 0x0800 /* Repeat broadcast messages in PM p eriod */ #define IW_POWER_REPEATER 0x0800 /* Repeat broadcast messages in PM p eriod */
#define IW_POWER_MODIFIER 0x000F /* Modify a parameter */ #define IW_POWER_MODIFIER 0x000F /* Modify a parameter */
#define IW_POWER_MIN 0x0001 /* Value is a minimum */ #define IW_POWER_MIN 0x0001 /* Value is a minimum */
#define IW_POWER_MAX 0x0002 /* Value is a maximum */ #define IW_POWER_MAX 0x0002 /* Value is a maximum */
#define IW_POWER_RELATIVE 0x0004 /* Value is not in seconds/ms/us */ #define IW_POWER_RELATIVE 0x0004 /* Value is not in seconds/ms/us */
skipping to change at line 506 skipping to change at line 519
#define IW_TXPOW_DBM 0x0000 /* Value is in dBm */ #define IW_TXPOW_DBM 0x0000 /* Value is in dBm */
#define IW_TXPOW_MWATT 0x0001 /* Value is in mW */ #define IW_TXPOW_MWATT 0x0001 /* Value is in mW */
#define IW_TXPOW_RELATIVE 0x0002 /* Value is in arbitrary units */ #define IW_TXPOW_RELATIVE 0x0002 /* Value is in arbitrary units */
#define IW_TXPOW_RANGE 0x1000 /* Range of value between min/max */ #define IW_TXPOW_RANGE 0x1000 /* Range of value between min/max */
/* Retry limits and lifetime flags available */ /* Retry limits and lifetime flags available */
#define IW_RETRY_ON 0x0000 /* No details... */ #define IW_RETRY_ON 0x0000 /* No details... */
#define IW_RETRY_TYPE 0xF000 /* Type of parameter */ #define IW_RETRY_TYPE 0xF000 /* Type of parameter */
#define IW_RETRY_LIMIT 0x1000 /* Maximum number of retries*/ #define IW_RETRY_LIMIT 0x1000 /* Maximum number of retries*/
#define IW_RETRY_LIFETIME 0x2000 /* Maximum duration of retries in us */ #define IW_RETRY_LIFETIME 0x2000 /* Maximum duration of retries in us */
#define IW_RETRY_MODIFIER 0x000F /* Modify a parameter */ #define IW_RETRY_MODIFIER 0x00FF /* Modify a parameter */
#define IW_RETRY_MIN 0x0001 /* Value is a minimum */ #define IW_RETRY_MIN 0x0001 /* Value is a minimum */
#define IW_RETRY_MAX 0x0002 /* Value is a maximum */ #define IW_RETRY_MAX 0x0002 /* Value is a maximum */
#define IW_RETRY_RELATIVE 0x0004 /* Value is not in seconds/ms/us */ #define IW_RETRY_RELATIVE 0x0004 /* Value is not in seconds/ms/us */
#define IW_RETRY_SHORT 0x0010 /* Value is for short packets */
#define IW_RETRY_LONG 0x0020 /* Value is for long packets */
/* 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 */
skipping to change at line 627 skipping to change at line 642
/* 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... */
#define IW_EVENT_CAPA_K_0 (IW_EVENT_CAPA_MASK(0x8B04) | \ #define IW_EVENT_CAPA_K_0 (IW_EVENT_CAPA_MASK(0x8B04) | \
IW_EVENT_CAPA_MASK(0x8B06) | \ IW_EVENT_CAPA_MASK(0x8B06) | \
IW_EVENT_CAPA_MASK(0x8B1A)) IW_EVENT_CAPA_MASK(0x8B1A))
#define IW_EVENT_CAPA_K_1 (IW_EVENT_CAPA_MASK(0x8B2A)) #define IW_EVENT_CAPA_K_1 (IW_EVENT_CAPA_MASK(0x8B2A))
/* "Easy" macro to set events in iw_range (less efficient) */ /* "Easy" macro to set events in iw_range (less efficient) */
#define IW_EVENT_CAPA_SET(event_capa, cmd) (event_capa[IW_EVENT_CAPA_INDEX( cmd)] |= IW_EVENT_CAPA_MASK(cmd)) #define IW_EVENT_CAPA_SET(event_capa, cmd) (event_capa[IW_EVENT_CAPA_INDEX( cmd)] |= IW_EVENT_CAPA_MASK(cmd))
#define IW_EVENT_CAPA_SET_KERNEL(event_capa) {event_capa[0] |= IW_EVENT_CAP A_K_0; event_capa[1] |= IW_EVENT_CAPA_K_1; } #define IW_EVENT_CAPA_SET_KERNEL(event_capa) {event_capa[0] |= IW_EVENT_CAP A_K_0; event_capa[1] |= IW_EVENT_CAPA_K_1; }
/* Modulations bitmasks */
#define IW_MODUL_ALL 0x00000000 /* Everything supported */
#define IW_MODUL_FH 0x00000001 /* Frequency Hopping */
#define IW_MODUL_DS 0x00000002 /* Original Direct Sequence
*/
#define IW_MODUL_CCK 0x00000004 /* 802.11b : 5.5 + 11 Mb/s *
/
#define IW_MODUL_11B (IW_MODUL_DS | IW_MODUL_CCK)
#define IW_MODUL_PBCC 0x00000008 /* TI : 5.5 + 11 + 22 Mb/s *
/
#define IW_MODUL_OFDM_A 0x00000010 /* 802.11a : 54 Mb/s
*/
#define IW_MODUL_11A (IW_MODUL_OFDM_A)
#define IW_MODUL_11AB (IW_MODUL_11B | IW_MODUL_11A)
#define IW_MODUL_OFDM_G 0x00000020 /* 802.11g : 54 Mb/s
*/
#define IW_MODUL_11G (IW_MODUL_11B | IW_MODUL_OFDM_G)
#define IW_MODUL_11AG (IW_MODUL_11G | IW_MODUL_11A)
#define IW_MODUL_TURBO 0x00000040 /* ATH : bonding, 108 Mb/s *
/
/* In here we should define MIMO stuff. Later... */
#define IW_MODUL_CUSTOM 0x40000000 /* Driver specific *
/
/* Bitrate flags available */
#define IW_BITRATE_TYPE 0x00FF /* Type of value */
#define IW_BITRATE_UNICAST 0x0001 /* Maximum/Fixed unicast bitrate */
#define IW_BITRATE_BROADCAST 0x0002 /* Fixed broadcast bitrate */
/****************************** TYPES ******************************/ /****************************** TYPES ******************************/
/* --------------------------- SUBTYPES --------------------------- */ /* --------------------------- SUBTYPES --------------------------- */
/* /*
* Generic format for most parameters that fit in an int * Generic format for most parameters that fit in an int
*/ */
struct iw_param struct iw_param
{ {
__s32 value; /* The value of the parameter itself */ __s32 value; /* The value of the parameter itself */
__u8 fixed; /* Hardware should not use auto select */ __u8 fixed; /* Hardware should not use auto select */
skipping to change at line 1022 skipping to change at line 1059
__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 */ __u32 enc_capa; /* IW_ENC_CAPA_* bit field */
/* More power management stuff */
__s32 min_pms; /* Minimal PM saving */
__s32 max_pms; /* Maximal PM saving */
__u16 pms_flags; /* How to decode max/min PM saving *
/
/* All available modulations for driver (hw may support less) */
__s32 modul_capa; /* IW_MODUL_* bit field */
/* More bitrate stuff */
__u32 bitrate_capa; /* Types of bitrates supported */
}; };
/* /*
* 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 */
 End of changes. 13 change blocks. 
13 lines changed or deleted 69 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/