defs.h
Go to the documentation of this file.
00001 /*
00002  * WPA Supplicant - Common definitions
00003  * Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #ifndef DEFS_H
00016 #define DEFS_H
00017 
00018 #ifdef FALSE
00019 #undef FALSE
00020 #endif
00021 #ifdef TRUE
00022 #undef TRUE
00023 #endif
00024 typedef enum { FALSE = 0, TRUE = 1 } Boolean;
00025 
00026 
00027 #define WPA_CIPHER_NONE BIT(0)
00028 #define WPA_CIPHER_WEP40 BIT(1)
00029 #define WPA_CIPHER_WEP104 BIT(2)
00030 #define WPA_CIPHER_TKIP BIT(3)
00031 #define WPA_CIPHER_CCMP BIT(4)
00032 #ifdef CONFIG_IEEE80211W
00033 #define WPA_CIPHER_AES_128_CMAC BIT(5)
00034 #endif /* CONFIG_IEEE80211W */
00035 
00036 #define WPA_KEY_MGMT_IEEE8021X BIT(0)
00037 #define WPA_KEY_MGMT_PSK BIT(1)
00038 #define WPA_KEY_MGMT_NONE BIT(2)
00039 #define WPA_KEY_MGMT_IEEE8021X_NO_WPA BIT(3)
00040 #define WPA_KEY_MGMT_WPA_NONE BIT(4)
00041 #define WPA_KEY_MGMT_FT_IEEE8021X BIT(5)
00042 #define WPA_KEY_MGMT_FT_PSK BIT(6)
00043 #define WPA_KEY_MGMT_IEEE8021X_SHA256 BIT(7)
00044 #define WPA_KEY_MGMT_PSK_SHA256 BIT(8)
00045 #define WPA_KEY_MGMT_WPS BIT(9)
00046 
00047 static inline int wpa_key_mgmt_wpa_ieee8021x(int akm)
00048 {
00049         return akm == WPA_KEY_MGMT_IEEE8021X ||
00050                 akm == WPA_KEY_MGMT_FT_IEEE8021X ||
00051                 akm == WPA_KEY_MGMT_IEEE8021X_SHA256;
00052 }
00053 
00054 static inline int wpa_key_mgmt_wpa_psk(int akm)
00055 {
00056         return akm == WPA_KEY_MGMT_PSK ||
00057                 akm == WPA_KEY_MGMT_FT_PSK ||
00058                 akm == WPA_KEY_MGMT_PSK_SHA256;
00059 }
00060 
00061 static inline int wpa_key_mgmt_ft(int akm)
00062 {
00063         return akm == WPA_KEY_MGMT_FT_PSK ||
00064                 akm == WPA_KEY_MGMT_FT_IEEE8021X;
00065 }
00066 
00067 static inline int wpa_key_mgmt_sha256(int akm)
00068 {
00069         return akm == WPA_KEY_MGMT_PSK_SHA256 ||
00070                 akm == WPA_KEY_MGMT_IEEE8021X_SHA256;
00071 }
00072 
00073 
00074 #define WPA_PROTO_WPA BIT(0)
00075 #define WPA_PROTO_RSN BIT(1)
00076 
00077 #define WPA_AUTH_ALG_OPEN BIT(0)
00078 #define WPA_AUTH_ALG_SHARED BIT(1)
00079 #define WPA_AUTH_ALG_LEAP BIT(2)
00080 #define WPA_AUTH_ALG_FT BIT(3)
00081 
00082 
00083 enum wpa_alg {
00084         WPA_ALG_NONE,
00085         WPA_ALG_WEP,
00086         WPA_ALG_TKIP,
00087         WPA_ALG_CCMP,
00088         WPA_ALG_IGTK,
00089         WPA_ALG_PMK
00090 };
00091 
00095 enum wpa_cipher {
00096         CIPHER_NONE,
00097         CIPHER_WEP40,
00098         CIPHER_TKIP,
00099         CIPHER_CCMP,
00100         CIPHER_WEP104
00101 };
00102 
00106 enum wpa_key_mgmt {
00107         KEY_MGMT_802_1X,
00108         KEY_MGMT_PSK,
00109         KEY_MGMT_NONE,
00110         KEY_MGMT_802_1X_NO_WPA,
00111         KEY_MGMT_WPA_NONE,
00112         KEY_MGMT_FT_802_1X,
00113         KEY_MGMT_FT_PSK,
00114         KEY_MGMT_802_1X_SHA256,
00115         KEY_MGMT_PSK_SHA256,
00116         KEY_MGMT_WPS
00117 };
00118 
00129 enum wpa_states {
00137         WPA_DISCONNECTED,
00138 
00147         WPA_INACTIVE,
00148 
00155         WPA_SCANNING,
00156 
00165         WPA_AUTHENTICATING,
00166 
00176         WPA_ASSOCIATING,
00177 
00186         WPA_ASSOCIATED,
00187 
00196         WPA_4WAY_HANDSHAKE,
00197 
00206         WPA_GROUP_HANDSHAKE,
00207 
00224         WPA_COMPLETED
00225 };
00226 
00227 #define MLME_SETPROTECTION_PROTECT_TYPE_NONE 0
00228 #define MLME_SETPROTECTION_PROTECT_TYPE_RX 1
00229 #define MLME_SETPROTECTION_PROTECT_TYPE_TX 2
00230 #define MLME_SETPROTECTION_PROTECT_TYPE_RX_TX 3
00231 
00232 #define MLME_SETPROTECTION_KEY_TYPE_GROUP 0
00233 #define MLME_SETPROTECTION_KEY_TYPE_PAIRWISE 1
00234 
00235 
00239 enum mfp_options {
00240         NO_MGMT_FRAME_PROTECTION = 0,
00241         MGMT_FRAME_PROTECTION_OPTIONAL = 1,
00242         MGMT_FRAME_PROTECTION_REQUIRED = 2
00243 };
00244 
00248 enum hostapd_hw_mode {
00249         HOSTAPD_MODE_IEEE80211B,
00250         HOSTAPD_MODE_IEEE80211G,
00251         HOSTAPD_MODE_IEEE80211A,
00252         NUM_HOSTAPD_MODES
00253 };
00254 
00255 #endif /* DEFS_H */


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:25:12