driver_hostap.h

Go to the documentation of this file.
00001 
00016 #ifndef HOSTAP_DRIVER_H
00017 #define HOSTAP_DRIVER_H
00018 
00019 #define PRISM2_IOCTL_PRISM2_PARAM (SIOCIWFIRSTPRIV + 0)
00020 #define PRISM2_IOCTL_RESET (SIOCIWFIRSTPRIV + 6)
00021 #define PRISM2_IOCTL_HOSTAPD (SIOCDEVPRIVATE + 14)
00022 
00023 /* PRISM2_IOCTL_PRISM2_PARAM ioctl() subtypes: */
00024 enum {
00025         /* PRISM2_PARAM_PTYPE = 1, */ /* REMOVED 2003-10-22 */
00026         PRISM2_PARAM_TXRATECTRL = 2,
00027         PRISM2_PARAM_BEACON_INT = 3,
00028         PRISM2_PARAM_PSEUDO_IBSS = 4,
00029         PRISM2_PARAM_ALC = 5,
00030         /* PRISM2_PARAM_TXPOWER = 6, */ /* REMOVED 2003-10-22 */
00031         PRISM2_PARAM_DUMP = 7,
00032         PRISM2_PARAM_OTHER_AP_POLICY = 8,
00033         PRISM2_PARAM_AP_MAX_INACTIVITY = 9,
00034         PRISM2_PARAM_AP_BRIDGE_PACKETS = 10,
00035         PRISM2_PARAM_DTIM_PERIOD = 11,
00036         PRISM2_PARAM_AP_NULLFUNC_ACK = 12,
00037         PRISM2_PARAM_MAX_WDS = 13,
00038         PRISM2_PARAM_AP_AUTOM_AP_WDS = 14,
00039         PRISM2_PARAM_AP_AUTH_ALGS = 15,
00040         PRISM2_PARAM_MONITOR_ALLOW_FCSERR = 16,
00041         PRISM2_PARAM_HOST_ENCRYPT = 17,
00042         PRISM2_PARAM_HOST_DECRYPT = 18,
00043         PRISM2_PARAM_BUS_MASTER_THRESHOLD_RX = 19,
00044         PRISM2_PARAM_BUS_MASTER_THRESHOLD_TX = 20,
00045         PRISM2_PARAM_HOST_ROAMING = 21,
00046         PRISM2_PARAM_BCRX_STA_KEY = 22,
00047         PRISM2_PARAM_IEEE_802_1X = 23,
00048         PRISM2_PARAM_ANTSEL_TX = 24,
00049         PRISM2_PARAM_ANTSEL_RX = 25,
00050         PRISM2_PARAM_MONITOR_TYPE = 26,
00051         PRISM2_PARAM_WDS_TYPE = 27,
00052         PRISM2_PARAM_HOSTSCAN = 28,
00053         PRISM2_PARAM_AP_SCAN = 29,
00054         PRISM2_PARAM_ENH_SEC = 30,
00055         PRISM2_PARAM_IO_DEBUG = 31,
00056         PRISM2_PARAM_BASIC_RATES = 32,
00057         PRISM2_PARAM_OPER_RATES = 33,
00058         PRISM2_PARAM_HOSTAPD = 34,
00059         PRISM2_PARAM_HOSTAPD_STA = 35,
00060         PRISM2_PARAM_WPA = 36,
00061         PRISM2_PARAM_PRIVACY_INVOKED = 37,
00062         PRISM2_PARAM_TKIP_COUNTERMEASURES = 38,
00063         PRISM2_PARAM_DROP_UNENCRYPTED = 39,
00064         PRISM2_PARAM_SCAN_CHANNEL_MASK = 40,
00065 };
00066 
00067 /* PRISM2_IOCTL_HOSTAPD ioctl() cmd: */
00068 enum {
00069         PRISM2_HOSTAPD_FLUSH = 1,
00070         PRISM2_HOSTAPD_ADD_STA = 2,
00071         PRISM2_HOSTAPD_REMOVE_STA = 3,
00072         PRISM2_HOSTAPD_GET_INFO_STA = 4,
00073         /* REMOVED: PRISM2_HOSTAPD_RESET_TXEXC_STA = 5, */
00074         PRISM2_SET_ENCRYPTION = 6,
00075         PRISM2_GET_ENCRYPTION = 7,
00076         PRISM2_HOSTAPD_SET_FLAGS_STA = 8,
00077         PRISM2_HOSTAPD_GET_RID = 9,
00078         PRISM2_HOSTAPD_SET_RID = 10,
00079         PRISM2_HOSTAPD_SET_ASSOC_AP_ADDR = 11,
00080         PRISM2_HOSTAPD_SET_GENERIC_ELEMENT = 12,
00081         PRISM2_HOSTAPD_MLME = 13,
00082         PRISM2_HOSTAPD_SCAN_REQ = 14,
00083         PRISM2_HOSTAPD_STA_CLEAR_STATS = 15,
00084 };
00085 
00086 #define PRISM2_HOSTAPD_MAX_BUF_SIZE 1024
00087 #define PRISM2_HOSTAPD_RID_HDR_LEN \
00088 ((int) (&((struct prism2_hostapd_param *) 0)->u.rid.data))
00089 #define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \
00090 ((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data))
00091 
00092 /* Maximum length for algorithm names (-1 for nul termination) used in ioctl()
00093  */
00094 #define HOSTAP_CRYPT_ALG_NAME_LEN 16
00095 
00096 
00097 struct prism2_hostapd_param {
00098         u32 cmd;
00099         u8 sta_addr[ETH_ALEN];
00100         union {
00101                 struct {
00102                         u16 aid;
00103                         u16 capability;
00104                         u8 tx_supp_rates;
00105                 } add_sta;
00106                 struct {
00107                         u32 inactive_sec;
00108                 } get_info_sta;
00109                 struct {
00110                         u8 alg[HOSTAP_CRYPT_ALG_NAME_LEN];
00111                         u32 flags;
00112                         u32 err;
00113                         u8 idx;
00114                         u8 seq[8]; /* sequence counter (set: RX, get: TX) */
00115                         u16 key_len;
00116                         u8 key[0];
00117                 } crypt;
00118                 struct {
00119                         u32 flags_and;
00120                         u32 flags_or;
00121                 } set_flags_sta;
00122                 struct {
00123                         u16 rid;
00124                         u16 len;
00125                         u8 data[0];
00126                 } rid;
00127                 struct {
00128                         u8 len;
00129                         u8 data[0];
00130                 } generic_elem;
00131                 struct {
00132 #define MLME_STA_DEAUTH 0
00133 #define MLME_STA_DISASSOC 1
00134                         u16 cmd;
00135                         u16 reason_code;
00136                 } mlme;
00137                 struct {
00138                         u8 ssid_len;
00139                         u8 ssid[32];
00140                 } scan_req;
00141         } u;
00142 };
00143 
00144 #define HOSTAP_CRYPT_FLAG_SET_TX_KEY 0x01
00145 #define HOSTAP_CRYPT_FLAG_PERMANENT 0x02
00146 
00147 #define HOSTAP_CRYPT_ERR_UNKNOWN_ALG 2
00148 #define HOSTAP_CRYPT_ERR_UNKNOWN_ADDR 3
00149 #define HOSTAP_CRYPT_ERR_CRYPT_INIT_FAILED 4
00150 #define HOSTAP_CRYPT_ERR_KEY_SET_FAILED 5
00151 #define HOSTAP_CRYPT_ERR_TX_KEY_SET_FAILED 6
00152 #define HOSTAP_CRYPT_ERR_CARD_CONF_FAILED 7
00153 
00154 #endif /* HOSTAP_DRIVER_H */
00155 

Generated on Sat May 6 21:13:32 2006 for wpa_supplicant by  doxygen 1.4.2