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

📄 ieee80211.h

📁 intelWiFi 芯片linux下 802.11 driver
💻 H
📖 第 1 页 / 共 3 页
字号:
	unsigned int rx_message_in_bad_msg_fragments;};struct ieee80211_device;#include "ieee80211_crypt.h"#define SEC_KEY_1		(1<<0)#define SEC_KEY_2		(1<<1)#define SEC_KEY_3		(1<<2)#define SEC_KEY_4		(1<<3)#define SEC_ACTIVE_KEY		(1<<4)#define SEC_AUTH_MODE		(1<<5)#define SEC_UNICAST_GROUP	(1<<6)#define SEC_LEVEL		(1<<7)#define SEC_ENABLED		(1<<8)#define SEC_ENCRYPT		(1<<9)#define SEC_LEVEL_0		0	/* None */#define SEC_LEVEL_1		1	/* WEP 40 and 104 bit */#define SEC_LEVEL_2		2	/* Level 1 + TKIP */#define SEC_LEVEL_2_CKIP	3	/* Level 1 + CKIP */#define SEC_LEVEL_3		4	/* Level 2 + CCMP */#define SEC_ALG_NONE		0#define SEC_ALG_WEP		1#define SEC_ALG_TKIP		2#define SEC_ALG_CCMP		3#define WEP_KEYS		4#define WEP_KEY_LEN		13#define SCM_KEY_LEN		32#define SCM_TEMPORAL_KEY_LENGTH	16struct ieee80211_security {	u16 active_key:2,	    enabled:1,	    auth_mode:2, auth_algo:4, unicast_uses_group:1, encrypt:1;	u8 encode_alg[WEP_KEYS];	u8 key_sizes[WEP_KEYS];	u8 keys[WEP_KEYS][SCM_KEY_LEN];	u8 level;	u16 flags;} __attribute__ ((packed));/* 802.11 data frame from AP      ,-------------------------------------------------------------------.Bytes |  2   |  2   |    6    |    6    |    6    |  2   | 0..2312 |   4  |      |------|------|---------|---------|---------|------|---------|------|Desc. | ctrl | dura |  DA/RA  |   TA    |    SA   | Sequ |  frame  |  fcs |      |      | tion | (BSSID) |         |         | ence |  data   |      |      `-------------------------------------------------------------------'Total: 28-2340 bytes*/#define BEACON_PROBE_SSID_ID_POSITION 12/* Management Frame Information Element Types */enum ieee80211_mfie {	MFIE_TYPE_SSID = 0,	MFIE_TYPE_RATES = 1,	MFIE_TYPE_FH_SET = 2,	MFIE_TYPE_DS_SET = 3,	MFIE_TYPE_CF_SET = 4,	MFIE_TYPE_TIM = 5,	MFIE_TYPE_IBSS_SET = 6,	MFIE_TYPE_COUNTRY = 7,	MFIE_TYPE_HOP_PARAMS = 8,	MFIE_TYPE_HOP_TABLE = 9,	MFIE_TYPE_REQUEST = 10,	MFIE_TYPE_CHALLENGE = 16,	MFIE_TYPE_POWER_CONSTRAINT = 32,	MFIE_TYPE_POWER_CAPABILITY = 33,	MFIE_TYPE_TPC_REQUEST = 34,	MFIE_TYPE_TPC_REPORT = 35,	MFIE_TYPE_SUPP_CHANNELS = 36,	MFIE_TYPE_CSA = 37,	MFIE_TYPE_MEASURE_REQUEST = 38,	MFIE_TYPE_MEASURE_REPORT = 39,	MFIE_TYPE_QUIET = 40,	MFIE_TYPE_IBSS_DFS = 41,	MFIE_TYPE_ERP_INFO = 42,	MFIE_TYPE_RSN = 48,	MFIE_TYPE_RATES_EX = 50,	MFIE_TYPE_GENERIC = 221,	MFIE_TYPE_QOS_PARAMETER = 222,};/* Minimal header; can be used for passing 802.11 frames with sufficient * information to determine what type of underlying data type is actually * stored in the data. */struct ieee80211_hdr {	__le16 frame_ctl;	__le16 duration_id;	u8 payload[0];} __attribute__ ((packed));struct ieee80211_hdr_1addr {	__le16 frame_ctl;	__le16 duration_id;	u8 addr1[ETH_ALEN];	u8 payload[0];} __attribute__ ((packed));struct ieee80211_hdr_2addr {	__le16 frame_ctl;	__le16 duration_id;	u8 addr1[ETH_ALEN];	u8 addr2[ETH_ALEN];	u8 payload[0];} __attribute__ ((packed));struct ieee80211_hdr_3addr {	__le16 frame_ctl;	__le16 duration_id;	u8 addr1[ETH_ALEN];	u8 addr2[ETH_ALEN];	u8 addr3[ETH_ALEN];	__le16 seq_ctl;	u8 payload[0];} __attribute__ ((packed));struct ieee80211_hdr_4addr {	__le16 frame_ctl;	__le16 duration_id;	u8 addr1[ETH_ALEN];	u8 addr2[ETH_ALEN];	u8 addr3[ETH_ALEN];	__le16 seq_ctl;	u8 addr4[ETH_ALEN];	u8 payload[0];} __attribute__ ((packed));struct ieee80211_hdr_3addrqos {	__le16 frame_ctl;	__le16 duration_id;	u8 addr1[ETH_ALEN];	u8 addr2[ETH_ALEN];	u8 addr3[ETH_ALEN];	__le16 seq_ctl;	u8 payload[0];	__le16 qos_ctl;} __attribute__ ((packed));struct ieee80211_hdr_4addrqos {	__le16 frame_ctl;	__le16 duration_id;	u8 addr1[ETH_ALEN];	u8 addr2[ETH_ALEN];	u8 addr3[ETH_ALEN];	__le16 seq_ctl;	u8 addr4[ETH_ALEN];	u8 payload[0];	__le16 qos_ctl;} __attribute__ ((packed));struct ieee80211_info_element {	u8 id;	u8 len;	u8 data[0];} __attribute__ ((packed));/* * These are the data types that can make up management packets *	u16 auth_algorithm;	u16 auth_sequence;	u16 beacon_interval;	u16 capability;	u8 current_ap[ETH_ALEN];	u16 listen_interval;	struct {		u16 association_id:14, reserved:2;	} __attribute__ ((packed));	u32 time_stamp[2];	u16 reason;	u16 status;*/struct ieee80211_auth {	struct ieee80211_hdr_3addr header;	__le16 algorithm;	__le16 transaction;	__le16 status;	/* challenge */	struct ieee80211_info_element info_element[0];} __attribute__ ((packed));struct ieee80211_channel_switch {	u8 id;	u8 len;	u8 mode;	u8 channel;	u8 count;} __attribute__ ((packed));struct ieee80211_action {	struct ieee80211_hdr_3addr header;	u8 category;	u8 action;	union {		struct ieee80211_action_exchange {			u8 token;			struct ieee80211_info_element info_element[0];		} exchange;		struct ieee80211_channel_switch channel_switch;	} format;} __attribute__ ((packed));struct ieee80211_disassoc {	struct ieee80211_hdr_3addr header;	__le16 reason;} __attribute__ ((packed));/* Alias deauth for disassoc */#define ieee80211_deauth ieee80211_disassocstruct ieee80211_probe_request {	struct ieee80211_hdr_3addr header;	/* SSID, supported rates */	struct ieee80211_info_element info_element[0];} __attribute__ ((packed));struct ieee80211_probe_response {	struct ieee80211_hdr_3addr header;	u32 time_stamp[2];	__le16 beacon_interval;	__le16 capability;	/* SSID, supported rates, FH params, DS params,	 * CF params, IBSS params, TIM (if beacon), RSN */	struct ieee80211_info_element info_element[0];} __attribute__ ((packed));/* Alias beacon for probe_response */#define ieee80211_beacon ieee80211_probe_responsestruct ieee80211_assoc_request {	struct ieee80211_hdr_3addr header;	__le16 capability;	__le16 listen_interval;	/* SSID, supported rates, RSN */	struct ieee80211_info_element info_element[0];} __attribute__ ((packed));struct ieee80211_reassoc_request {	struct ieee80211_hdr_3addr header;	__le16 capability;	__le16 listen_interval;	u8 current_ap[ETH_ALEN];	struct ieee80211_info_element info_element[0];} __attribute__ ((packed));struct ieee80211_assoc_response {	struct ieee80211_hdr_3addr header;	__le16 capability;	__le16 status;	__le16 aid;	/* supported rates */	struct ieee80211_info_element info_element[0];} __attribute__ ((packed));struct ieee80211_txb {	u8 nr_frags;	u8 encrypted;	u8 rts_included;	u8 reserved;	__le16 frag_size;	__le16 payload_size;	struct sk_buff *fragments[0];};/* SWEEP TABLE ENTRIES NUMBER */#define MAX_SWEEP_TAB_ENTRIES		  42#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET  7/* MAX_RATES_LENGTH needs to be 12.  The spec says 8, and many APs * only use 8, and then use extended rates for the remaining supported * rates.  Other APs, however, stick all of their supported rates on the * main rates information element... */#define MAX_RATES_LENGTH                  ((u8)12)#define MAX_RATES_EX_LENGTH               ((u8)16)#define MAX_NETWORK_COUNT                  128#define CRC_LENGTH                 4U#define MAX_WPA_IE_LEN 64#define NETWORK_EMPTY_ESSID    (1<<0)#define NETWORK_HAS_OFDM       (1<<1)#define NETWORK_HAS_CCK        (1<<2)/* QoS structure */#define NETWORK_HAS_QOS_PARAMETERS      (1<<3)#define NETWORK_HAS_QOS_INFORMATION     (1<<4)#define NETWORK_HAS_QOS_MASK            (NETWORK_HAS_QOS_PARAMETERS | \					 NETWORK_HAS_QOS_INFORMATION)/* 802.11h */#define NETWORK_HAS_POWER_CONSTRAINT    (1<<5)#define NETWORK_HAS_CSA                 (1<<6)#define NETWORK_HAS_QUIET               (1<<7)#define NETWORK_HAS_IBSS_DFS            (1<<8)#define NETWORK_HAS_TPC_REPORT          (1<<9)#define NETWORK_HAS_ERP_VALUE           (1<<10)#define QOS_QUEUE_NUM                   4#define QOS_OUI_LEN                     3#define QOS_OUI_TYPE                    2#define QOS_ELEMENT_ID                  221#define QOS_OUI_INFO_SUB_TYPE           0#define QOS_OUI_PARAM_SUB_TYPE          1#define QOS_VERSION_1                   1#define QOS_AIFSN_MIN_VALUE             2struct ieee80211_qos_information_element {	u8 elementID;	u8 length;	u8 qui[QOS_OUI_LEN];	u8 qui_type;	u8 qui_subtype;	u8 version;	u8 ac_info;} __attribute__ ((packed));struct ieee80211_qos_ac_parameter {	u8 aci_aifsn;	u8 ecw_min_max;	__le16 tx_op_limit;} __attribute__ ((packed));struct ieee80211_qos_parameter_info {	struct ieee80211_qos_information_element info_element;	u8 reserved;	struct ieee80211_qos_ac_parameter ac_params_record[QOS_QUEUE_NUM];} __attribute__ ((packed));struct ieee80211_qos_parameters {	__le16 cw_min[QOS_QUEUE_NUM];	__le16 cw_max[QOS_QUEUE_NUM];	u8 aifs[QOS_QUEUE_NUM];	u8 flag[QOS_QUEUE_NUM];	__le16 tx_op_limit[QOS_QUEUE_NUM];} __attribute__ ((packed));struct ieee80211_qos_data {	struct ieee80211_qos_parameters parameters;	int active;	int supported;	u8 param_count;	u8 old_param_count;};struct ieee80211_tim_parameters {	u8 tim_count;	u8 tim_period;} __attribute__ ((packed));/*******************************************************/enum {				/* ieee80211_basic_report.map */	IEEE80211_BASIC_MAP_BSS = (1 << 0),	IEEE80211_BASIC_MAP_OFDM = (1 << 1),	IEEE80211_BASIC_MAP_UNIDENTIFIED = (1 << 2),	IEEE80211_BASIC_MAP_RADAR = (1 << 3),	IEEE80211_BASIC_MAP_UNMEASURED = (1 << 4),	/* Bits 5-7 are reserved */};struct ieee80211_basic_report {	u8 channel;	__le64 start_time;	__le16 duration;	u8 map;} __attribute__ ((packed));enum {				/* ieee80211_measurement_request.mode */	/* Bit 0 is reserved */	IEEE80211_MEASUREMENT_ENABLE = (1 << 1),	IEEE80211_MEASUREMENT_REQUEST = (1 << 2),	IEEE80211_MEASUREMENT_REPORT = (1 << 3),	/* Bits 4-7 are reserved */};enum {	IEEE80211_REPORT_BASIC = 0,	/* required */	IEEE80211_REPORT_CCA = 1,	/* optional */	IEEE80211_REPORT_RPI = 2,	/* optional */	/* 3-255 reserved */};struct ieee80211_measurement_params {	u8 channel;	__le64 start_time;	__le16 duration;} __attribute__ ((packed));struct ieee80211_measurement_request {	struct ieee80211_info_element ie;	u8 token;	u8 mode;	u8 type;	struct ieee80211_measurement_params params[0];} __attribute__ ((packed));struct ieee80211_measurement_report {	struct ieee80211_info_element ie;	u8 token;	u8 mode;	u8 type;	union {		struct ieee80211_basic_report basic[0];	} u;} __attribute__ ((packed));struct ieee80211_tpc_report {	u8 transmit_power;	u8 link_margin;} __attribute__ ((packed));struct ieee80211_channel_map {	u8 channel;	u8 map;} __attribute__ ((packed));struct ieee80211_ibss_dfs {	struct ieee80211_info_element ie;	u8 owner[ETH_ALEN];	u8 recovery_interval;	struct ieee80211_channel_map channel_map[0];};struct ieee80211_csa {	u8 mode;	u8 channel;	u8 count;} __attribute__ ((packed));struct ieee80211_quiet {	u8 count;

⌨️ 快捷键说明

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