📄 wlioctl.h
字号:
/* * Custom OID/ioctl definitions for * Broadcom 802.11abg Networking Device Driver * * Definitions subject to change without notice. * * Copyright 2005-2006, Broadcom Corporation * All Rights Reserved. * * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. * * $Id$ */#ifndef _wlioctl_h_#define _wlioctl_h_#include <typedefs.h>#include <proto/ethernet.h>#include <proto/bcmeth.h>#include <proto/bcmevent.h>#include <proto/802.11.h>/* require default structure packing */#if !defined(__GNUC__)#pragma pack(push, 8)#endif#define WL_NUMRATES 255 /* max # of rates in a rateset */typedef struct wl_rateset { uint32 count; /* # rates in this set */ uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */} wl_rateset_t;#define WL_CHANSPEC_CHAN_MASK 0x0fff#define WL_CHANSPEC_BAND_MASK 0xf000#define WL_CHANSPEC_BAND_SHIFT 12#define WL_CHANSPEC_BAND_5G 0x1000#define WL_CHANSPEC_BAND_2G 0x2000/* * Per-bss information structure. */#define WL_BSS_INFO_VERSION 107 /* current version of wl_bss_info struct */typedef struct wl_bss_info { uint32 version; /* version field */ uint32 length; /* byte length of data in this record, * starting at version and including IEs */ struct ether_addr BSSID; uint16 beacon_period; /* units are Kusec */ uint16 capability; /* Capability information */ uint8 SSID_len; uint8 SSID[32]; struct { uint count; /* # rates in this set */ uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */ } rateset; /* supported rates */ uint8 channel; /* Channel no. */ uint16 atim_window; /* units are Kusec */ uint8 dtim_period; /* DTIM period */ int16 RSSI; /* receive signal strength (in dBm) */ int8 phy_noise; /* noise (in dBm) */ uint32 ie_length; /* byte length of Information Elements */ /* variable length Information Elements */} wl_bss_info_t;typedef struct wlc_ssid { uint32 SSID_len; uchar SSID[32];} wlc_ssid_t;typedef struct wl_scan_params { wlc_ssid_t ssid; /* default: {0, ""} */ struct ether_addr bssid; /* default: bcast */ int8 bss_type; /* default: any, * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT */ int8 scan_type; /* -1 use default, DOT11_SCANTYPE_ACTIVE/PASSIVE */ int32 nprobes; /* -1 use default, number of probes per channel */ int32 active_time; /* -1 use default, dwell time per channel for * active scanning */ int32 passive_time; /* -1 use default, dwell time per channel * for passive scanning */ int32 home_time; /* -1 use default, dwell time for the home channel * between channel scans */ int32 channel_num; /* 0 use default (all available channels), count of * channels in channel_list */ uint16 channel_list[1]; /* list of chanspecs */} wl_scan_params_t;/* size of wl_scan_params not including variable length array */#define WL_SCAN_PARAMS_FIXED_SIZE 64typedef struct wl_scan_results { uint32 buflen; uint32 version; uint32 count; wl_bss_info_t bss_info[1];} wl_scan_results_t;/* size of wl_scan_results not including variable length array */#define WL_SCAN_RESULTS_FIXED_SIZE 12/* uint32 list */typedef struct wl_uint32_list { /* in - # of elements, out - # of entries */ uint32 count; /* variable length uint32 list */ uint32 element[1];} wl_uint32_list_t;#define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NULL */typedef struct wl_channels_in_country { uint32 buflen; uint32 band; char country_abbrev[WLC_CNTRY_BUF_SZ]; uint32 count; uint32 channel[1];} wl_channels_in_country_t;typedef struct wl_country_list { uint32 buflen; uint32 band_set; uint32 band; uint32 count; char country_abbrev[1];} wl_country_list_t;#define WL_RM_TYPE_BASIC 1#define WL_RM_TYPE_CCA 2#define WL_RM_TYPE_RPI 3#define WL_RM_FLAG_PARALLEL (1<<0)#define WL_RM_FLAG_LATE (1<<1)#define WL_RM_FLAG_INCAPABLE (1<<2)#define WL_RM_FLAG_REFUSED (1<<3)typedef struct wl_rm_req_elt { int8 type; int8 flags; uint16 chanspec; uint32 token; /* token for this measurement */ uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ uint32 tsf_l; /* TSF low 32-bits */ uint32 dur; /* TUs */} wl_rm_req_elt_t;typedef struct wl_rm_req { uint32 token; /* overall measurement set token */ uint32 count; /* number of measurement requests */ wl_rm_req_elt_t req[1]; /* variable length block of requests */} wl_rm_req_t;#define WL_RM_REQ_FIXED_LEN 8typedef struct wl_rm_rep_elt { int8 type; int8 flags; uint16 chanspec; uint32 token; /* token for this measurement */ uint32 tsf_h; /* TSF high 32-bits of Measurement start time */ uint32 tsf_l; /* TSF low 32-bits */ uint32 dur; /* TUs */ uint32 len; /* byte length of data block */ uint8 data[1]; /* variable length data block */} wl_rm_rep_elt_t;#define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */#define WL_RPI_REP_BIN_NUM 8typedef struct wl_rm_rpi_rep { uint8 rpi[WL_RPI_REP_BIN_NUM]; int8 rpi_max[WL_RPI_REP_BIN_NUM];} wl_rm_rpi_rep_t;typedef struct wl_rm_rep { uint32 token; /* overall measurement set token */ uint32 len; /* length of measurement report block */ wl_rm_rep_elt_t rep[1]; /* variable length block of reports */} wl_rm_rep_t;#define WL_RM_REP_FIXED_LEN 8/* Enumerate crypto algorithms */#define CRYPTO_ALGO_OFF 0#define CRYPTO_ALGO_WEP1 1#define CRYPTO_ALGO_TKIP 2#define CRYPTO_ALGO_WEP128 3#define CRYPTO_ALGO_AES_CCM 4#define CRYPTO_ALGO_AES_OCB_MSDU 5#define CRYPTO_ALGO_AES_OCB_MPDU 6#define CRYPTO_ALGO_NALG 7#define WSEC_GEN_MIC_ERROR 0x0001#define WSEC_GEN_REPLAY 0x0002#define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */#define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */#define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */#define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */typedef struct wl_wsec_key { uint32 index; /* key index */ uint32 len; /* key length */ uint8 data[DOT11_MAX_KEY_SIZE]; /* key data */ uint32 pad_1[18]; uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ uint32 flags; /* misc flags */ uint32 pad_2[2]; int pad_3; int iv_initialized; /* has IV been initialized already? */ int pad_4; /* Rx IV */ struct { uint32 hi; /* upper 32 bits of IV */ uint16 lo; /* lower 16 bits of IV */ } rxiv; uint32 pad_5[2]; struct ether_addr ea; /* per station */} wl_wsec_key_t;#define WSEC_MIN_PSK_LEN 8#define WSEC_MAX_PSK_LEN 64/* Flag for key material needing passhash'ing */#define WSEC_PASSPHRASE (1<<0)/* receptacle for WLC_SET_WSEC_PMK parameter */typedef struct { ushort key_len; /* octets in key material */ ushort flags; /* key handling qualification */ uint8 key[WSEC_MAX_PSK_LEN]; /* PMK material */} wsec_pmk_t;/* wireless security bitvec */#define WEP_ENABLED 0x0001#define TKIP_ENABLED 0x0002#define AES_ENABLED 0x0004#define WSEC_SWFLAG 0x0008/* WPA authentication mode bitvec */#define WPA_AUTH_DISABLED 0x0000 /* Legacy (i.e., non-WPA) */#define WPA_AUTH_NONE 0x0001 /* none (IBSS) */#define WPA_AUTH_UNSPECIFIED 0x0002 /* over 802.1x */#define WPA_AUTH_PSK 0x0004 /* Pre-shared key *//* #define WPA_AUTH_8021X 0x0020 */ /* 802.1x, reserved */#ifdef BCMWPA2#define WPA2_AUTH_UNSPECIFIED 0x0040 /* over 802.1x */#define WPA2_AUTH_PSK 0x0080 /* Pre-shared key *//* pmkid */#define MAXPMKID 16 typedef struct _pmkid { struct ether_addr BSSID; uint8 PMKID[WPA2_PMKID_LEN];} pmkid_t;typedef struct _pmkid_list{ uint32 npmkid; pmkid_t pmkid[1];} pmkid_list_t;typedef struct _pmkid_cand { struct ether_addr BSSID; uint8 preauth;} pmkid_cand_t;typedef struct _pmkid_cand_list { uint32 npmkid_cand; pmkid_cand_t pmkid_cand[1];} pmkid_cand_list_t;#endif /* BCMWPA2 */typedef struct wl_led_info { uint32 index; /* led index */ uint32 behavior; bool activehi;} wl_led_info_t;typedef struct wlc_assoc_info { uint32 req_len; uint32 resp_len; uint32 flags; struct dot11_assoc_req req; struct ether_addr reassoc_bssid; /* used in reassoc's */ struct dot11_assoc_resp resp;} wl_assoc_info_t;/* flags */#define WLC_ASSOC_REQ_IS_REASSOC 0x01 /* assoc req was actually a reassoc *//* Used to get specific STA parameters */typedef struct { uint32 val; struct ether_addr ea;} scb_val_t;/* Event data type */typedef struct wlc_event { wl_event_msg_t event; /* encapsulated event */ struct ether_addr *addr; /* used to keep a trace of the potential present of * an address in wlc_event_msg_t */ void *data; /* used to hang additional data on an event */ struct wlc_event *next; /* enables ordered list of pending events */} wlc_event_t;#define BCM_MAC_STATUS_INDICATION (0x40010200L)typedef struct { uint16 ver; /* version of this struct */ uint16 len; /* length in bytes of this structure */ uint16 cap; /* sta's advertised capabilities */ uint32 flags; /* flags defined below */ uint32 idle; /* time since data pkt rx'd from sta */ struct ether_addr ea; /* Station address */ wl_rateset_t rateset; /* rateset in use */ uint32 in; /* seconds elapsed since associated */ uint32 listen_interval_inms; /* Min Listen interval in ms for this STA */} sta_info_t;#define WL_STA_VER 2/* Flags for sta_info_t indicating properties of STA */#define WL_STA_BRCM 0x1 /* Running a Broadcom driver */#define WL_STA_WME 0x2 /* WMM association */#define WL_STA_AUTHE 0x8 /* Authenticated */#define WL_STA_ASSOC 0x10 /* Associated */#define WL_STA_AUTHO 0x20 /* Authorized */#define WL_STA_PS 0x100 /* STA is in power save mode from AP's viewpoint */#define WL_STA_APSD_BE 0x200 /* APSD delv/trigger for AC_BE is default enabled */#define WL_STA_APSD_BK 0x400 /* APSD delv/trigger for AC_BK is default enabled */#define WL_STA_APSD_VI 0x800 /* APSD delv/trigger for AC_VI is default enabled */#define WL_STA_APSD_VO 0x1000 /* APSD delv/trigger for AC_VO is default enabled */#define WL_WDS_LINKUP WL_STA_WDS_LINKUP /* deprecated *//* channel encoding */typedef struct channel_info { int hw_channel; int target_channel; int scan_channel;} channel_info_t;/* For ioctls that take a list of MAC addresses */struct maclist { uint count; /* number of MAC addresses */ struct ether_addr ea[1]; /* variable length array of MAC addresses */};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -