⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wireless.13.h

📁 This package contains the Wireless tools, used to manipulate the Wireless Extensions. The Wireless
💻 H
📖 第 1 页 / 共 2 页
字号:
#define IW_ENCODING_TOKEN_MAX	32	/* 256 bits (for now) *//* Flags for encoding (along with the token) */#define IW_ENCODE_INDEX		0x00FF	/* Token index (if needed) */#define IW_ENCODE_FLAGS		0xFF00	/* Flags defined below */#define IW_ENCODE_MODE		0xF000	/* Modes defined below */#define IW_ENCODE_DISABLED	0x8000	/* Encoding disabled */#define IW_ENCODE_ENABLED	0x0000	/* Encoding enabled */#define IW_ENCODE_RESTRICTED	0x4000	/* Refuse non-encoded packets */#define IW_ENCODE_OPEN		0x2000	/* Accept non-encoded packets */#define IW_ENCODE_NOKEY         0x0800  /* Key is write only, so not present *//* Power management flags available (along with the value, if any) */#define IW_POWER_ON		0x0000	/* No details... */#define IW_POWER_TYPE		0xF000	/* Type of parameter */#define IW_POWER_PERIOD		0x1000	/* Value is a period/duration of  */#define IW_POWER_TIMEOUT	0x2000	/* Value is a timeout (to go asleep) */#define IW_POWER_MODE		0x0F00	/* Power Management mode */#define IW_POWER_UNICAST_R	0x0100	/* Receive only unicast 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_FORCE_S	0x0400	/* Force PM procedure for sending unicast */#define IW_POWER_REPEATER	0x0800	/* Repeat broadcast messages in PM period */#define IW_POWER_MODIFIER	0x000F	/* Modify a parameter */#define IW_POWER_MIN		0x0001	/* Value is a minimum  */#define IW_POWER_MAX		0x0002	/* Value is a maximum */#define IW_POWER_RELATIVE	0x0004	/* Value is not in seconds/ms/us *//* Transmit Power flags available */#define IW_TXPOW_DBM		0x0000	/* Value is in dBm */#define IW_TXPOW_MWATT		0x0001	/* Value is in mW *//* Retry limits and lifetime flags available */#define IW_RETRY_ON		0x0000	/* No details... */#define IW_RETRY_TYPE		0xF000	/* Type of parameter */#define IW_RETRY_LIMIT		0x1000	/* Maximum number of retries*/#define IW_RETRY_LIFETIME	0x2000	/* Maximum duration of retries in us */#define IW_RETRY_MODIFIER	0x000F	/* Modify a parameter */#define IW_RETRY_MIN		0x0001	/* Value is a minimum  */#define IW_RETRY_MAX		0x0002	/* Value is a maximum */#define IW_RETRY_RELATIVE	0x0004	/* Value is not in seconds/ms/us *//****************************** TYPES ******************************//* --------------------------- SUBTYPES --------------------------- *//* *	Generic format for most parameters that fit in an int */struct	iw_param{  __s32		value;		/* The value of the parameter itself */  __u8		fixed;		/* Hardware should not use auto select */  __u8		disabled;	/* Disable the feature */  __u16		flags;		/* Various specifc flags (if any) */};/* *	For all data larger than 16 octets, we need to use a *	pointer to memory allocated in user space. */struct	iw_point{  caddr_t	pointer;	/* Pointer to the data  (in user space) */  __u16		length;		/* number of fields or size in bytes */  __u16		flags;		/* Optional params */};/* *	A frequency *	For numbers lower than 10^9, we encode the number in 'm' and *	set 'e' to 0 *	For number greater than 10^9, we divide it by the lowest power *	of 10 to get 'm' lower than 10^9, with 'm'= f / (10^'e')... *	The power of 10 is in 'e', the result of the division is in 'm'. */struct	iw_freq{	__u32		m;		/* Mantissa */	__u16		e;		/* Exponent */	__u8		i;		/* List index (when in range struct) */};/* *	Quality of the link */struct	iw_quality{	__u8		qual;		/* link quality (%retries, SNR,					   %missed beacons or better...) */	__u8		level;		/* signal level (dBm) */	__u8		noise;		/* noise level (dBm) */	__u8		updated;	/* Flags to know if updated */};/* *	Packet discarded in the wireless adapter due to *	"wireless" specific problems... *	Note : the list of counter and statistics in net_device_stats *	is already pretty exhaustive, and you should use that first. *	This is only additional stats... */struct	iw_discarded{	__u32		nwid;		/* Rx : Wrong nwid/essid */	__u32		code;		/* Rx : Unable to code/decode (WEP) */	__u32		fragment;	/* Rx : Can't perform MAC reassembly */	__u32		retries;	/* Tx : Max MAC retries num reached */	__u32		misc;		/* Others cases */};/* *	Packet/Time period missed in the wireless adapter due to *	"wireless" specific problems... */struct	iw_missed{	__u32		beacon;		/* Missed beacons/superframe */};/* ------------------------ WIRELESS STATS ------------------------ *//* * Wireless statistics (used for /proc/net/wireless) */struct	iw_statistics{	__u16		status;		/* Status					 * - device dependent for now */	struct iw_quality	qual;		/* Quality of the link						 * (instant/mean/max) */	struct iw_discarded	discard;	/* Packet discarded counts */	struct iw_missed	miss;		/* Packet missed counts */};/* ------------------------ IOCTL REQUEST ------------------------ *//* * This structure defines the payload of an ioctl, and is used  * below. * * Note that this structure should fit on the memory footprint * of iwreq (which is the same as ifreq), which mean a max size of * 16 octets = 128 bits. Warning, pointers might be 64 bits wide... * You should check this when increasing the structures defined * above in this file... */union	iwreq_data{	/* Config - generic */	char		name[IFNAMSIZ];	/* Name : used to verify the presence of  wireless extensions.	 * Name of the protocol/provider... */	struct iw_point	essid;		/* Extended network name */	struct iw_param	nwid;		/* network id (or domain - the cell) */	struct iw_freq	freq;		/* frequency or channel :					 * 0-1000 = channel					 * > 1000 = frequency in Hz */	struct iw_param	sens;		/* signal level threshold */	struct iw_param	bitrate;	/* default bit rate */	struct iw_param	txpower;	/* default transmit power */	struct iw_param	rts;		/* RTS threshold threshold */	struct iw_param	frag;		/* Fragmentation threshold */	__u32		mode;		/* Operation mode */	struct iw_param	retry;		/* Retry limits & lifetime */	struct iw_point	encoding;	/* Encoding stuff : tokens */	struct iw_param	power;		/* PM duration/timeout */	struct sockaddr	ap_addr;	/* Access point address */	struct iw_point	data;		/* Other large parameters */};/* * The structure to exchange data for ioctl. * This structure is the same as 'struct ifreq', but (re)defined for * convenience... * Do I need to remind you about structure size (32 octets) ? */struct	iwreq {	union	{		char	ifrn_name[IFNAMSIZ];	/* if name, e.g. "eth0" */	} ifr_ifrn;	/* Data part (defined just above) */	union	iwreq_data	u;};/* -------------------------- IOCTL DATA -------------------------- *//* *	For those ioctl which want to exchange mode data that what could *	fit in the above structure... *//* *	Range of parameters */struct	iw_range{	/* Informative stuff (to choose between different interface) */	__u32		throughput;	/* To give an idea... */	/* In theory this value should be the maximum benchmarked	 * TCP/IP throughput, because with most of these devices the	 * bit rate is meaningless (overhead an co) to estimate how	 * fast the connection will go and pick the fastest one.	 * I suggest people to play with Netperf or any benchmark...	 */	/* NWID (or domain id) */	__u32		min_nwid;	/* Minimal NWID we are able to set */	__u32		max_nwid;	/* Maximal NWID we are able to set */	/* Frequency */	__u16		num_channels;	/* Number of channels [0; num - 1] */	__u8		num_frequency;	/* Number of entry in the list */	struct iw_freq	freq[IW_MAX_FREQUENCIES];	/* list */	/* Note : this frequency list doesn't need to fit channel numbers */	/* signal level threshold range */	__s32	sensitivity;	/* Quality of link & SNR stuff */	struct iw_quality	max_qual;	/* Quality of the link */	/* Rates */	__u8		num_bitrates;	/* Number of entries in the list */	__s32		bitrate[IW_MAX_BITRATES];	/* list, in bps */	/* RTS threshold */	__s32		min_rts;	/* Minimal RTS threshold */	__s32		max_rts;	/* Maximal RTS threshold */	/* Frag threshold */	__s32		min_frag;	/* Minimal frag threshold */	__s32		max_frag;	/* Maximal frag threshold */	/* Power Management duration & timeout */	__s32		min_pmp;	/* Minimal PM period */	__s32		max_pmp;	/* Maximal PM period */	__s32		min_pmt;	/* Minimal PM timeout */	__s32		max_pmt;	/* Maximal PM timeout */	__u16		pmp_flags;	/* How to decode max/min PM period */	__u16		pmt_flags;	/* How to decode max/min PM timeout */	__u16		pm_capa;	/* What PM options are supported */	/* Encoder stuff */	__u16	encoding_size[IW_MAX_ENCODING_SIZES];	/* Different token sizes */	__u8	num_encoding_sizes;	/* Number of entry in the list */	__u8	max_encoding_tokens;	/* Max number of tokens */	/* Transmit power */	__u16		txpower_capa;	/* What options are supported */	__u8		num_txpower;	/* Number of entries in the list */	__s32		txpower[IW_MAX_TXPOWER];	/* list, in bps */	/* Wireless Extension version info */	__u8		we_version_compiled;	/* Must be WIRELESS_EXT */	__u8		we_version_source;	/* Last update of source */	/* Retry limits and lifetime */	__u16		retry_capa;	/* What retry options are supported */	__u16		retry_flags;	/* How to decode max/min retry limit */	__u16		r_time_flags;	/* How to decode max/min retry life */	__s32		min_retry;	/* Minimal number of retries */	__s32		max_retry;	/* Maximal number of retries */	__s32		min_r_time;	/* Minimal retry lifetime */	__s32		max_r_time;	/* Maximal retry lifetime */	/* Average quality of link & SNR */	struct iw_quality	avg_qual;	/* Quality of the link */	/* This should contain the average/typical values of the quality	 * indicator. This should be the threshold between a "good" and	 * a "bad" link (example : monitor going from green to orange).	 * Currently, user space apps like quality monitors don't have any	 * way to calibrate the measurement. With this, they can split	 * the range between 0 and max_qual in different quality level	 * (using a geometric subdivision centered on the average).	 * I expect that people doing the user space apps will feedback	 * us on which value we need to put in each driver...	 */};/* * Private ioctl interface information */ struct	iw_priv_args{	__u32		cmd;		/* Number of the ioctl to issue */	__u16		set_args;	/* Type and number of args */	__u16		get_args;	/* Type and number of args */	char		name[IFNAMSIZ];	/* Name of the extension */};#endif	/* _LINUX_WIRELESS_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -