config_ssid.h

Go to the documentation of this file.
00001 
00016 #ifndef CONFIG_SSID_H
00017 #define CONFIG_SSID_H
00018 
00019 #ifndef BIT
00020 #define BIT(n) (1 << (n))
00021 #endif
00022 
00023 #define WPA_CIPHER_NONE BIT(0)
00024 #define WPA_CIPHER_WEP40 BIT(1)
00025 #define WPA_CIPHER_WEP104 BIT(2)
00026 #define WPA_CIPHER_TKIP BIT(3)
00027 #define WPA_CIPHER_CCMP BIT(4)
00028 #ifdef CONFIG_IEEE80211W
00029 #define WPA_CIPHER_AES_128_CMAC BIT(5)
00030 #endif /* CONFIG_IEEE80211W */
00031 
00032 #define WPA_KEY_MGMT_IEEE8021X BIT(0)
00033 #define WPA_KEY_MGMT_PSK BIT(1)
00034 #define WPA_KEY_MGMT_NONE BIT(2)
00035 #define WPA_KEY_MGMT_IEEE8021X_NO_WPA BIT(3)
00036 #define WPA_KEY_MGMT_WPA_NONE BIT(4)
00037 
00038 #define WPA_PROTO_WPA BIT(0)
00039 #define WPA_PROTO_RSN BIT(1)
00040 
00041 #define WPA_AUTH_ALG_OPEN BIT(0)
00042 #define WPA_AUTH_ALG_SHARED BIT(1)
00043 #define WPA_AUTH_ALG_LEAP BIT(2)
00044 
00045 #define MAX_SSID_LEN 32
00046 #define PMK_LEN 32
00047 #define EAP_PSK_LEN_MIN 16
00048 #define EAP_PSK_LEN_MAX 32
00049 
00050 
00051 #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1)
00052 #define DEFAULT_EAPOL_FLAGS (EAPOL_FLAG_REQUIRE_KEY_UNICAST | \
00053                              EAPOL_FLAG_REQUIRE_KEY_BROADCAST)
00054 #define DEFAULT_PROTO (WPA_PROTO_WPA | WPA_PROTO_RSN)
00055 #define DEFAULT_KEY_MGMT (WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_IEEE8021X)
00056 #define DEFAULT_PAIRWISE (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP)
00057 #define DEFAULT_GROUP (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP | \
00058                        WPA_CIPHER_WEP104 | WPA_CIPHER_WEP40)
00059 #define DEFAULT_FRAGMENT_SIZE 1398
00060 
00070 struct wpa_ssid {
00078         struct wpa_ssid *next;
00079 
00088         struct wpa_ssid *pnext;
00089 
00099         int id;
00100 
00119         int priority;
00120 
00133         u8 *ssid;
00134 
00139         size_t ssid_len;
00140 
00148         u8 bssid[ETH_ALEN];
00149 
00154         int bssid_set;
00155 
00160         u8 psk[PMK_LEN];
00161 
00166         int psk_set;
00167 
00176         char *passphrase;
00177 
00182         int pairwise_cipher;
00183 
00188         int group_cipher;
00189 
00196         int key_mgmt;
00197 
00202         int proto;
00203 
00210         int auth_alg;
00211 
00220         int scan_ssid;
00221 
00222 #ifdef IEEE8021X_EAPOL
00223 
00228         u8 *identity;
00229 
00234         size_t identity_len;
00235 
00244         u8 *anonymous_identity;
00245 
00250         size_t anonymous_identity_len;
00251 
00256         u8 *eappsk;
00257 
00265         size_t eappsk_len;
00266 
00271         u8 *nai;
00272 
00277         size_t nai_len;
00278 
00283         u8 *password;
00284 
00289         size_t password_len;
00290 
00312         u8 *ca_cert;
00313 
00324         u8 *ca_path;
00325 
00339         u8 *client_cert;
00340 
00367         u8 *private_key;
00368 
00375         u8 *private_key_passwd;
00376 
00394         u8 *dh_file;
00395 
00407         u8 *subject_match;
00408 
00426         u8 *altsubject_match;
00427 
00445         u8 *ca_cert2;
00446 
00460         u8 *ca_path2;
00461 
00474         u8 *client_cert2;
00475 
00488         u8 *private_key2;
00489 
00497         u8 *private_key2_passwd;
00498 
00511         u8 *dh_file2;
00512 
00520         u8 *subject_match2;
00521 
00529         u8 *altsubject_match2;
00530 
00538         struct eap_method_type *eap_methods;
00539 
00574         char *phase1;
00575 
00583         char *phase2;
00584 
00595         char *pcsc;
00596 
00607         char *pin;
00608 
00616         int engine;
00617 
00628         char *engine_id;
00629 
00637         char *key_id;
00638 
00639 #define EAPOL_FLAG_REQUIRE_KEY_UNICAST BIT(0)
00640 #define EAPOL_FLAG_REQUIRE_KEY_BROADCAST BIT(1)
00641 
00645         int eapol_flags;
00646 
00647 #endif /* IEEE8021X_EAPOL */
00648 
00649 #define NUM_WEP_KEYS 4
00650 #define MAX_WEP_KEY_LEN 16
00651 
00655         u8 wep_key[NUM_WEP_KEYS][MAX_WEP_KEY_LEN];
00656 
00661         size_t wep_key_len[NUM_WEP_KEYS];
00662 
00667         int wep_tx_keyidx;
00668 
00683         int proactive_key_caching;
00684 
00685 #ifdef IEEE8021X_EAPOL
00686 
00694         u8 *otp;
00695 
00700         size_t otp_len;
00701 
00710         int pending_req_identity;
00711 
00720         int pending_req_password;
00721 
00730         int pending_req_pin;
00731 
00740         int pending_req_new_password;
00741 
00750         int pending_req_passphrase;
00751 
00760         char *pending_req_otp;
00761 
00766         size_t pending_req_otp_len;
00767 
00775         int leap;
00776 
00785         int non_leap;
00786 
00799         unsigned int eap_workaround;
00800 
00812         char *pac_file;
00813 
00814 #endif /* IEEE8021X_EAPOL */
00815 
00831         int mode;
00832 
00833 #ifdef IEEE8021X_EAPOL
00834 
00842         int mschapv2_retry;
00843 
00852         u8 *new_password;
00853 
00858         size_t new_password_len;
00859 
00860 #endif /* IEEE8021X_EAPOL */
00861 
00870         int disabled;
00871 
00882         int peerkey;
00883 
00884 #ifdef IEEE8021X_EAPOL
00885 
00896         int fragment_size;
00897 
00898 #endif /* IEEE8021X_EAPOL */
00899 
00908         char *id_str;
00909 
00910 #ifdef CONFIG_IEEE80211W
00911 
00918         enum {
00919                 NO_IEEE80211W = 0,
00920                 IEEE80211W_OPTIONAL = 1,
00921                 IEEE80211W_REQUIRED = 2
00922         } ieee80211w;
00923 #endif /* CONFIG_IEEE80211W */
00924 };
00925 
00926 int wpa_config_allowed_eap_method(struct wpa_ssid *ssid, int vendor,
00927                                   u32 method);
00928 
00929 #endif /* CONFIG_SSID_H */
00930 

Generated on Sun Dec 31 13:48:51 2006 for wpa_supplicant by  doxygen 1.4.2