~ubuntu-branches/ubuntu/lucid/wpasupplicant/lucid

« back to all changes in this revision

Viewing changes to config_ssid.h

  • Committer: Bazaar Package Importer
  • Author(s): Kyle McMartin
  • Date: 2005-02-15 00:51:28 UTC
  • Revision ID: james.westby@ubuntu.com-20050215005128-xr4m8owiunur2008
Tags: upstream-0.3.8
ImportĀ upstreamĀ versionĀ 0.3.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef CONFIG_SSID_H
 
2
#define CONFIG_SSID_H
 
3
 
 
4
#define WPA_CIPHER_NONE BIT(0)
 
5
#define WPA_CIPHER_WEP40 BIT(1)
 
6
#define WPA_CIPHER_WEP104 BIT(2)
 
7
#define WPA_CIPHER_TKIP BIT(3)
 
8
#define WPA_CIPHER_CCMP BIT(4)
 
9
 
 
10
#define WPA_KEY_MGMT_IEEE8021X BIT(0)
 
11
#define WPA_KEY_MGMT_PSK BIT(1)
 
12
#define WPA_KEY_MGMT_NONE BIT(2)
 
13
#define WPA_KEY_MGMT_IEEE8021X_NO_WPA BIT(3)
 
14
#define WPA_KEY_MGMT_WPA_NONE BIT(4)
 
15
 
 
16
#define WPA_PROTO_WPA BIT(0)
 
17
#define WPA_PROTO_RSN BIT(1)
 
18
 
 
19
#define WPA_AUTH_ALG_OPEN BIT(0)
 
20
#define WPA_AUTH_ALG_SHARED BIT(1)
 
21
#define WPA_AUTH_ALG_LEAP BIT(2)
 
22
 
 
23
#define MAX_SSID_LEN 32
 
24
#define PMK_LEN 32
 
25
#define EAP_PSK_LEN 16
 
26
 
 
27
struct wpa_ssid {
 
28
        struct wpa_ssid *next; /* next network in global list */
 
29
        struct wpa_ssid *pnext; /* next network in per-priority list */
 
30
        int id; /* unique id for ctrl_iface */
 
31
        int priority;
 
32
        u8 *ssid;
 
33
        size_t ssid_len;
 
34
        u8 bssid[ETH_ALEN];
 
35
        int bssid_set;
 
36
        u8 psk[PMK_LEN];
 
37
        int psk_set;
 
38
        char *passphrase;
 
39
        /* Bitfields of allowed Pairwise/Group Ciphers, WPA_CIPHER_* */
 
40
        int pairwise_cipher;
 
41
        int group_cipher;
 
42
        int key_mgmt;
 
43
        int proto; /* Bitfield of allowed protocols (WPA_PROTO_*) */
 
44
        int auth_alg; /* Bitfield of allow authentication algorithms
 
45
                       * (WPA_AUTH_ALG_*) */
 
46
        int scan_ssid; /* scan this SSID with Probe Requests */
 
47
        u8 *identity; /* EAP Identity */
 
48
        size_t identity_len;
 
49
        u8 *anonymous_identity; /* Anonymous EAP Identity (for unencrypted use
 
50
                                 * with EAP types that support different
 
51
                                 * tunnelled identity, e.g., EAP-TTLS) */
 
52
        size_t anonymous_identity_len;
 
53
        u8 *eappsk;
 
54
        size_t eappsk_len;
 
55
        u8 *nai;
 
56
        size_t nai_len;
 
57
        u8 *server_nai;
 
58
        size_t server_nai_len;
 
59
        u8 *password;
 
60
        size_t password_len;
 
61
        u8 *ca_cert;
 
62
        u8 *client_cert;
 
63
        u8 *private_key;
 
64
        u8 *private_key_passwd;
 
65
        u8 *dh_file;
 
66
        u8 *subject_match;
 
67
        u8 *ca_cert2;
 
68
        u8 *client_cert2;
 
69
        u8 *private_key2;
 
70
        u8 *private_key2_passwd;
 
71
        u8 *dh_file2;
 
72
        u8 *subject_match2;
 
73
        u8 *eap_methods; /* zero (EAP_TYPE_NONE) terminated list of allowed
 
74
                          * EAP methods or NULL = any */
 
75
        char *phase1;
 
76
        char *phase2;
 
77
        char *pcsc;
 
78
        char *pin;
 
79
 
 
80
#define EAPOL_FLAG_REQUIRE_KEY_UNICAST BIT(0)
 
81
#define EAPOL_FLAG_REQUIRE_KEY_BROADCAST BIT(1)
 
82
        int eapol_flags; /* bit field of IEEE 802.1X/EAPOL options */
 
83
 
 
84
#define NUM_WEP_KEYS 4
 
85
#define MAX_WEP_KEY_LEN 16
 
86
        u8 wep_key[NUM_WEP_KEYS][MAX_WEP_KEY_LEN];
 
87
        size_t wep_key_len[NUM_WEP_KEYS];
 
88
        int wep_tx_keyidx;
 
89
 
 
90
        /* Per SSID variables that are not read from the configuration file */
 
91
        u8 *otp;
 
92
        size_t otp_len;
 
93
        int pending_req_identity, pending_req_password;
 
94
        char *pending_req_otp;
 
95
        size_t pending_req_otp_len;
 
96
        int leap, non_leap;
 
97
 
 
98
        unsigned int eap_workaround;
 
99
 
 
100
        char *pac_file;
 
101
 
 
102
        int mode;
 
103
};
 
104
 
 
105
int wpa_config_allowed_eap_method(struct wpa_ssid *ssid, int method);
 
106
const char * wpa_cipher_txt(int cipher);
 
107
const char * wpa_key_mgmt_txt(int key_mgmt, int proto);
 
108
 
 
109
#endif /* CONFIG_SSID_H */