00001 00016 #ifndef CONFIG_SSID_H 00017 #define CONFIG_SSID_H 00018 00019 #define WPA_CIPHER_NONE BIT(0) 00020 #define WPA_CIPHER_WEP40 BIT(1) 00021 #define WPA_CIPHER_WEP104 BIT(2) 00022 #define WPA_CIPHER_TKIP BIT(3) 00023 #define WPA_CIPHER_CCMP BIT(4) 00024 00025 #define WPA_KEY_MGMT_IEEE8021X BIT(0) 00026 #define WPA_KEY_MGMT_PSK BIT(1) 00027 #define WPA_KEY_MGMT_NONE BIT(2) 00028 #define WPA_KEY_MGMT_IEEE8021X_NO_WPA BIT(3) 00029 #define WPA_KEY_MGMT_WPA_NONE BIT(4) 00030 00031 #define WPA_PROTO_WPA BIT(0) 00032 #define WPA_PROTO_RSN BIT(1) 00033 00034 #define WPA_AUTH_ALG_OPEN BIT(0) 00035 #define WPA_AUTH_ALG_SHARED BIT(1) 00036 #define WPA_AUTH_ALG_LEAP BIT(2) 00037 00038 #define MAX_SSID_LEN 32 00039 #define PMK_LEN 32 00040 #define EAP_PSK_LEN 16 00041 00042 00043 #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1) 00044 #define DEFAULT_EAPOL_FLAGS (EAPOL_FLAG_REQUIRE_KEY_UNICAST | \ 00045 EAPOL_FLAG_REQUIRE_KEY_BROADCAST) 00046 #define DEFAULT_PROTO (WPA_PROTO_WPA | WPA_PROTO_RSN) 00047 #define DEFAULT_KEY_MGMT (WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_IEEE8021X) 00048 #define DEFAULT_PAIRWISE (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP) 00049 #define DEFAULT_GROUP (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP | \ 00050 WPA_CIPHER_WEP104 | WPA_CIPHER_WEP40) 00051 00061 struct wpa_ssid { 00069 struct wpa_ssid *next; 00070 00079 struct wpa_ssid *pnext; 00080 00090 int id; 00091 00110 int priority; 00111 00124 u8 *ssid; 00125 00130 size_t ssid_len; 00131 00139 u8 bssid[ETH_ALEN]; 00140 00145 int bssid_set; 00146 00151 u8 psk[PMK_LEN]; 00152 00157 int psk_set; 00158 00167 char *passphrase; 00168 00173 int pairwise_cipher; 00174 00179 int group_cipher; 00180 00187 int key_mgmt; 00188 00193 int proto; 00194 00201 int auth_alg; 00202 00211 int scan_ssid; 00212 00217 u8 *identity; 00218 00223 size_t identity_len; 00224 00233 u8 *anonymous_identity; 00234 00239 size_t anonymous_identity_len; 00240 00245 u8 *eappsk; 00246 00253 size_t eappsk_len; 00254 00259 u8 *nai; 00260 00265 size_t nai_len; 00266 00271 u8 *password; 00272 00277 size_t password_len; 00278 00297 u8 *ca_cert; 00298 00309 u8 *ca_path; 00310 00324 u8 *client_cert; 00325 00348 u8 *private_key; 00349 00356 u8 *private_key_passwd; 00357 00375 u8 *dh_file; 00376 00388 u8 *subject_match; 00389 00405 u8 *altsubject_match; 00406 00424 u8 *ca_cert2; 00425 00439 u8 *ca_path2; 00440 00453 u8 *client_cert2; 00454 00467 u8 *private_key2; 00468 00476 u8 *private_key2_passwd; 00477 00490 u8 *dh_file2; 00491 00499 u8 *subject_match2; 00500 00508 u8 *altsubject_match2; 00509 00517 u8 *eap_methods; 00518 00553 char *phase1; 00554 00562 char *phase2; 00563 00574 char *pcsc; 00575 00586 char *pin; 00587 00595 int engine; 00596 00607 char *engine_id; 00608 00616 char *key_id; 00617 00618 #define EAPOL_FLAG_REQUIRE_KEY_UNICAST BIT(0) 00619 #define EAPOL_FLAG_REQUIRE_KEY_BROADCAST BIT(1) 00620 00624 int eapol_flags; 00625 00626 #define NUM_WEP_KEYS 4 00627 #define MAX_WEP_KEY_LEN 16 00628 00632 u8 wep_key[NUM_WEP_KEYS][MAX_WEP_KEY_LEN]; 00633 00638 size_t wep_key_len[NUM_WEP_KEYS]; 00639 00644 int wep_tx_keyidx; 00645 00660 int proactive_key_caching; 00661 00669 u8 *otp; 00670 00675 size_t otp_len; 00676 00685 int pending_req_identity; 00686 00695 int pending_req_password; 00696 00705 int pending_req_pin; 00706 00715 int pending_req_new_password; 00716 00725 int pending_req_passphrase; 00726 00735 char *pending_req_otp; 00736 00741 size_t pending_req_otp_len; 00742 00750 int leap; 00751 00760 int non_leap; 00761 00774 unsigned int eap_workaround; 00775 00787 char *pac_file; 00788 00804 int mode; 00805 00813 int mschapv2_retry; 00814 00823 u8 *new_password; 00824 00829 size_t new_password_len; 00830 00839 int disabled; 00840 }; 00841 00842 int wpa_config_allowed_eap_method(struct wpa_ssid *ssid, int method); 00843 00844 #endif /* CONFIG_SSID_H */ 00845