14 typedef enum { FALSE = 0, TRUE = 1 } Boolean;
17 #define WPA_CIPHER_NONE BIT(0)
18 #define WPA_CIPHER_WEP40 BIT(1)
19 #define WPA_CIPHER_WEP104 BIT(2)
20 #define WPA_CIPHER_TKIP BIT(3)
21 #define WPA_CIPHER_CCMP BIT(4)
22 #define WPA_CIPHER_AES_128_CMAC BIT(5)
23 #define WPA_CIPHER_GCMP BIT(6)
24 #define WPA_CIPHER_SMS4 BIT(7)
25 #define WPA_CIPHER_GCMP_256 BIT(8)
26 #define WPA_CIPHER_CCMP_256 BIT(9)
27 #define WPA_CIPHER_BIP_GMAC_128 BIT(11)
28 #define WPA_CIPHER_BIP_GMAC_256 BIT(12)
29 #define WPA_CIPHER_BIP_CMAC_256 BIT(13)
30 #define WPA_CIPHER_GTK_NOT_USED BIT(14)
32 #define WPA_KEY_MGMT_IEEE8021X BIT(0)
33 #define WPA_KEY_MGMT_PSK BIT(1)
34 #define WPA_KEY_MGMT_NONE BIT(2)
35 #define WPA_KEY_MGMT_IEEE8021X_NO_WPA BIT(3)
36 #define WPA_KEY_MGMT_WPA_NONE BIT(4)
37 #define WPA_KEY_MGMT_FT_IEEE8021X BIT(5)
38 #define WPA_KEY_MGMT_FT_PSK BIT(6)
39 #define WPA_KEY_MGMT_IEEE8021X_SHA256 BIT(7)
40 #define WPA_KEY_MGMT_PSK_SHA256 BIT(8)
41 #define WPA_KEY_MGMT_WPS BIT(9)
42 #define WPA_KEY_MGMT_SAE BIT(10)
43 #define WPA_KEY_MGMT_FT_SAE BIT(11)
44 #define WPA_KEY_MGMT_WAPI_PSK BIT(12)
45 #define WPA_KEY_MGMT_WAPI_CERT BIT(13)
46 #define WPA_KEY_MGMT_CCKM BIT(14)
47 #define WPA_KEY_MGMT_OSEN BIT(15)
48 #define WPA_KEY_MGMT_IEEE8021X_SUITE_B BIT(16)
49 #define WPA_KEY_MGMT_IEEE8021X_SUITE_B_192 BIT(17)
51 static inline int wpa_key_mgmt_wpa_ieee8021x(
int akm)
53 return !!(akm & (WPA_KEY_MGMT_IEEE8021X |
54 WPA_KEY_MGMT_FT_IEEE8021X |
57 WPA_KEY_MGMT_IEEE8021X_SHA256 |
58 WPA_KEY_MGMT_IEEE8021X_SUITE_B |
59 WPA_KEY_MGMT_IEEE8021X_SUITE_B_192));
62 static inline int wpa_key_mgmt_wpa_psk(
int akm)
64 return !!(akm & (WPA_KEY_MGMT_PSK |
66 WPA_KEY_MGMT_PSK_SHA256 |
68 WPA_KEY_MGMT_FT_SAE));
71 static inline int wpa_key_mgmt_ft(
int akm)
73 return !!(akm & (WPA_KEY_MGMT_FT_PSK |
74 WPA_KEY_MGMT_FT_IEEE8021X |
75 WPA_KEY_MGMT_FT_SAE));
78 static inline int wpa_key_mgmt_sae(
int akm)
80 return !!(akm & (WPA_KEY_MGMT_SAE |
81 WPA_KEY_MGMT_FT_SAE));
84 static inline int wpa_key_mgmt_sha256(
int akm)
86 return !!(akm & (WPA_KEY_MGMT_PSK_SHA256 |
87 WPA_KEY_MGMT_IEEE8021X_SHA256 |
89 WPA_KEY_MGMT_IEEE8021X_SUITE_B));
92 static inline int wpa_key_mgmt_sha384(
int akm)
94 return !!(akm & WPA_KEY_MGMT_IEEE8021X_SUITE_B_192);
97 static inline int wpa_key_mgmt_suite_b(
int akm)
99 return !!(akm & (WPA_KEY_MGMT_IEEE8021X_SUITE_B |
100 WPA_KEY_MGMT_IEEE8021X_SUITE_B_192));
103 static inline int wpa_key_mgmt_wpa(
int akm)
105 return wpa_key_mgmt_wpa_ieee8021x(akm) ||
106 wpa_key_mgmt_wpa_psk(akm) ||
107 wpa_key_mgmt_sae(akm);
110 static inline int wpa_key_mgmt_wpa_any(
int akm)
112 return wpa_key_mgmt_wpa(akm) || (akm & WPA_KEY_MGMT_WPA_NONE);
115 static inline int wpa_key_mgmt_cckm(
int akm)
117 return akm == WPA_KEY_MGMT_CCKM;
121 #define WPA_PROTO_WPA BIT(0)
122 #define WPA_PROTO_RSN BIT(1)
123 #define WPA_PROTO_WAPI BIT(2)
124 #define WPA_PROTO_OSEN BIT(3)
126 #define WPA_AUTH_ALG_OPEN BIT(0)
127 #define WPA_AUTH_ALG_SHARED BIT(1)
128 #define WPA_AUTH_ALG_LEAP BIT(2)
129 #define WPA_AUTH_ALG_FT BIT(3)
130 #define WPA_AUTH_ALG_SAE BIT(4)
145 WPA_ALG_BIP_GMAC_128,
146 WPA_ALG_BIP_GMAC_256,
278 #define MLME_SETPROTECTION_PROTECT_TYPE_NONE 0
279 #define MLME_SETPROTECTION_PROTECT_TYPE_RX 1
280 #define MLME_SETPROTECTION_PROTECT_TYPE_TX 2
281 #define MLME_SETPROTECTION_PROTECT_TYPE_RX_TX 3
283 #define MLME_SETPROTECTION_KEY_TYPE_GROUP 0
284 #define MLME_SETPROTECTION_KEY_TYPE_PAIRWISE 1
292 NO_MGMT_FRAME_PROTECTION = 0,
293 MGMT_FRAME_PROTECTION_OPTIONAL = 1,
294 MGMT_FRAME_PROTECTION_REQUIRED = 2,
296 #define MGMT_FRAME_PROTECTION_DEFAULT 3
303 HOSTAPD_MODE_IEEE80211B,
304 HOSTAPD_MODE_IEEE80211G,
305 HOSTAPD_MODE_IEEE80211A,
306 HOSTAPD_MODE_IEEE80211AD,
307 HOSTAPD_MODE_IEEE80211ANY,
316 WPA_CTRL_REQ_UNKNOWN,
317 WPA_CTRL_REQ_EAP_IDENTITY,
318 WPA_CTRL_REQ_EAP_PASSWORD,
319 WPA_CTRL_REQ_EAP_NEW_PASSWORD,
320 WPA_CTRL_REQ_EAP_PIN,
321 WPA_CTRL_REQ_EAP_OTP,
322 WPA_CTRL_REQ_EAP_PASSPHRASE,
324 WPA_CTRL_REQ_PSK_PASSPHRASE,
329 #define EAP_MAX_METHODS 8
331 enum mesh_plink_state {
Inactive state (wpa_supplicant disabled)
Definition: defs.h:191
Association completed.
Definition: defs.h:234
All authentication completed.
Definition: defs.h:275
Trying to authenticate with a BSS/SSID.
Definition: defs.h:211
wpa_states
wpa_supplicant state
Definition: defs.h:161
Scanning for a network.
Definition: defs.h:200
Trying to associate with a BSS/SSID.
Definition: defs.h:223
hostapd_hw_mode
Hardware mode.
Definition: defs.h:302
WPA 4-Way Key Handshake in progress.
Definition: defs.h:245
wpa_ctrl_req_type
Control interface request types.
Definition: defs.h:315
mfp_options
Management frame protection (IEEE 802.11w) options.
Definition: defs.h:291
Disconnected state.
Definition: defs.h:170
WPA Group Key Handshake in progress.
Definition: defs.h:256
Interface disabled.
Definition: defs.h:180