~ubuntu-branches/ubuntu/hardy/wpasupplicant/hardy

« back to all changes in this revision

Viewing changes to src/common/defs.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler, Alexander Sack
  • Date: 2007-08-26 16:06:57 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20070826160657-2m8pxoweuxe8f93t
Tags: 0.6.0+0.5.8-0ubuntu1
* New upstream release
* remove patch 11_erroneous_manpage_ref, applied upstream
* remove patch 25_wpas_dbus_unregister_iface_fix, applied upstream

[ Alexander Sack ]
* bumping upstream version to replace development version 0.6.0 with
  this package from stable release branch.
* attempt to fix wierd timeout and high latency issues by going
  back to stable upstream version (0.5.9) (LP: #140763,
  LP: #141233).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * WPA Supplicant - Common definitions
3
 
 * Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi>
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or modify
6
 
 * it under the terms of the GNU General Public License version 2 as
7
 
 * published by the Free Software Foundation.
8
 
 *
9
 
 * Alternatively, this software may be distributed under the terms of BSD
10
 
 * license.
11
 
 *
12
 
 * See README and COPYING for more details.
13
 
 */
14
 
 
15
 
#ifndef DEFS_H
16
 
#define DEFS_H
17
 
 
18
 
#ifdef FALSE
19
 
#undef FALSE
20
 
#endif
21
 
#ifdef TRUE
22
 
#undef TRUE
23
 
#endif
24
 
typedef enum { FALSE = 0, TRUE = 1 } Boolean;
25
 
 
26
 
 
27
 
#define WPA_CIPHER_NONE BIT(0)
28
 
#define WPA_CIPHER_WEP40 BIT(1)
29
 
#define WPA_CIPHER_WEP104 BIT(2)
30
 
#define WPA_CIPHER_TKIP BIT(3)
31
 
#define WPA_CIPHER_CCMP BIT(4)
32
 
#ifdef CONFIG_IEEE80211W
33
 
#define WPA_CIPHER_AES_128_CMAC BIT(5)
34
 
#endif /* CONFIG_IEEE80211W */
35
 
 
36
 
#define WPA_KEY_MGMT_IEEE8021X BIT(0)
37
 
#define WPA_KEY_MGMT_PSK BIT(1)
38
 
#define WPA_KEY_MGMT_NONE BIT(2)
39
 
#define WPA_KEY_MGMT_IEEE8021X_NO_WPA BIT(3)
40
 
#define WPA_KEY_MGMT_WPA_NONE BIT(4)
41
 
#define WPA_KEY_MGMT_FT_IEEE8021X BIT(5)
42
 
#define WPA_KEY_MGMT_FT_PSK BIT(6)
43
 
 
44
 
#define WPA_PROTO_WPA BIT(0)
45
 
#define WPA_PROTO_RSN BIT(1)
46
 
 
47
 
#define WPA_AUTH_ALG_OPEN BIT(0)
48
 
#define WPA_AUTH_ALG_SHARED BIT(1)
49
 
#define WPA_AUTH_ALG_LEAP BIT(2)
50
 
 
51
 
 
52
 
typedef enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP,
53
 
               WPA_ALG_IGTK } wpa_alg;
54
 
typedef enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
55
 
               CIPHER_WEP104 } wpa_cipher;
56
 
typedef enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE,
57
 
               KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE,
58
 
               KEY_MGMT_FT_802_1X, KEY_MGMT_FT_PSK } wpa_key_mgmt;
59
 
 
60
 
/**
61
 
 * enum wpa_states - wpa_supplicant state
62
 
 *
63
 
 * These enumeration values are used to indicate the current wpa_supplicant
64
 
 * state (wpa_s->wpa_state). The current state can be retrieved with
65
 
 * wpa_supplicant_get_state() function and the state can be changed by calling
66
 
 * wpa_supplicant_set_state(). In WPA state machine (wpa.c and preauth.c), the
67
 
 * wrapper functions wpa_sm_get_state() and wpa_sm_set_state() should be used
68
 
 * to access the state variable.
69
 
 */
70
 
typedef enum {
71
 
        /**
72
 
         * WPA_DISCONNECTED - Disconnected state
73
 
         *
74
 
         * This state indicates that client is not associated, but is likely to
75
 
         * start looking for an access point. This state is entered when a
76
 
         * connection is lost.
77
 
         */
78
 
        WPA_DISCONNECTED,
79
 
 
80
 
        /**
81
 
         * WPA_INACTIVE - Inactive state (wpa_supplicant disabled)
82
 
         *
83
 
         * This state is entered if there are no enabled networks in the
84
 
         * configuration. wpa_supplicant is not trying to associate with a new
85
 
         * network and external interaction (e.g., ctrl_iface call to add or
86
 
         * enable a network) is needed to start association.
87
 
         */
88
 
        WPA_INACTIVE,
89
 
 
90
 
        /**
91
 
         * WPA_SCANNING - Scanning for a network
92
 
         *
93
 
         * This state is entered when wpa_supplicant starts scanning for a
94
 
         * network.
95
 
         */
96
 
        WPA_SCANNING,
97
 
 
98
 
        /**
99
 
         * WPA_ASSOCIATING - Trying to associate with a BSS/SSID
100
 
         *
101
 
         * This state is entered when wpa_supplicant has found a suitable BSS
102
 
         * to associate with and the driver is configured to try to associate
103
 
         * with this BSS in ap_scan=1 mode. When using ap_scan=2 mode, this
104
 
         * state is entered when the driver is configured to try to associate
105
 
         * with a network using the configured SSID and security policy.
106
 
         */
107
 
        WPA_ASSOCIATING,
108
 
 
109
 
        /**
110
 
         * WPA_ASSOCIATED - Association completed
111
 
         *
112
 
         * This state is entered when the driver reports that association has
113
 
         * been successfully completed with an AP. If IEEE 802.1X is used
114
 
         * (with or without WPA/WPA2), wpa_supplicant remains in this state
115
 
         * until the IEEE 802.1X/EAPOL authentication has been completed.
116
 
         */
117
 
        WPA_ASSOCIATED,
118
 
 
119
 
        /**
120
 
         * WPA_4WAY_HANDSHAKE - WPA 4-Way Key Handshake in progress
121
 
         *
122
 
         * This state is entered when WPA/WPA2 4-Way Handshake is started. In
123
 
         * case of WPA-PSK, this happens when receiving the first EAPOL-Key
124
 
         * frame after association. In case of WPA-EAP, this state is entered
125
 
         * when the IEEE 802.1X/EAPOL authentication has been completed.
126
 
         */
127
 
        WPA_4WAY_HANDSHAKE,
128
 
 
129
 
        /**
130
 
         * WPA_GROUP_HANDSHAKE - WPA Group Key Handshake in progress
131
 
         *
132
 
         * This state is entered when 4-Way Key Handshake has been completed
133
 
         * (i.e., when the supplicant sends out message 4/4) and when Group
134
 
         * Key rekeying is started by the AP (i.e., when supplicant receives
135
 
         * message 1/2).
136
 
         */
137
 
        WPA_GROUP_HANDSHAKE,
138
 
 
139
 
        /**
140
 
         * WPA_COMPLETED - All authentication completed
141
 
         *
142
 
         * This state is entered when the full authentication process is
143
 
         * completed. In case of WPA2, this happens when the 4-Way Handshake is
144
 
         * successfully completed. With WPA, this state is entered after the
145
 
         * Group Key Handshake; with IEEE 802.1X (non-WPA) connection is
146
 
         * completed after dynamic keys are received (or if not used, after
147
 
         * the EAP authentication has been completed). With static WEP keys and
148
 
         * plaintext connections, this state is entered when an association
149
 
         * has been completed.
150
 
         *
151
 
         * This state indicates that the supplicant has completed its
152
 
         * processing for the association phase and that data connection is
153
 
         * fully configured.
154
 
         */
155
 
        WPA_COMPLETED
156
 
} wpa_states;
157
 
 
158
 
#define MLME_SETPROTECTION_PROTECT_TYPE_NONE 0
159
 
#define MLME_SETPROTECTION_PROTECT_TYPE_RX 1
160
 
#define MLME_SETPROTECTION_PROTECT_TYPE_TX 2
161
 
#define MLME_SETPROTECTION_PROTECT_TYPE_RX_TX 3
162
 
 
163
 
#define MLME_SETPROTECTION_KEY_TYPE_GROUP 0
164
 
#define MLME_SETPROTECTION_KEY_TYPE_PAIRWISE 1
165
 
 
166
 
#endif /* DEFS_H */