wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
eap_defs.h
Go to the documentation of this file.
1 
5 #ifndef EAP_DEFS_H
6 #define EAP_DEFS_H
7 
8 /* RFC 3748 - Extensible Authentication Protocol (EAP) */
9 
10 #ifdef _MSC_VER
11 #pragma pack(push, 1)
12 #endif /* _MSC_VER */
13 
14 struct eap_hdr {
15  u8 code;
16  u8 identifier;
17  be16 length; /* including code and identifier; network byte order */
18  /* followed by length-4 octets of data */
19 } STRUCT_PACKED;
20 
21 #ifdef _MSC_VER
22 #pragma pack(pop)
23 #endif /* _MSC_VER */
24 
25 enum { EAP_CODE_REQUEST = 1, EAP_CODE_RESPONSE = 2, EAP_CODE_SUCCESS = 3,
26  EAP_CODE_FAILURE = 4, EAP_CODE_INITIATE = 5, EAP_CODE_FINISH = 6 };
27 
28 /* EAP Request and Response data begins with one octet Type. Success and
29  * Failure do not have additional data. */
30 
31 /* Type field in EAP-Initiate and EAP-Finish messages */
32 enum eap_erp_type {
33  EAP_ERP_TYPE_REAUTH_START = 1,
34  EAP_ERP_TYPE_REAUTH = 2,
35 };
36 
37 /* ERP TV/TLV types */
38 enum eap_erp_tlv_type {
39  EAP_ERP_TLV_KEYNAME_NAI = 1,
40  EAP_ERP_TV_RRK_LIFETIME = 2,
41  EAP_ERP_TV_RMSK_LIFETIME = 3,
42  EAP_ERP_TLV_DOMAIN_NAME = 4,
43  EAP_ERP_TLV_CRYPTOSUITES = 5,
44  EAP_ERP_TLV_AUTHORIZATION_INDICATION = 6,
45  EAP_ERP_TLV_CALLED_STATION_ID = 128,
46  EAP_ERP_TLV_CALLING_STATION_ID = 129,
47  EAP_ERP_TLV_NAS_IDENTIFIER = 130,
48  EAP_ERP_TLV_NAS_IP_ADDRESS = 131,
49  EAP_ERP_TLV_NAS_IPV6_ADDRESS = 132,
50 };
51 
52 /* ERP Cryptosuite */
53 enum eap_erp_cryptosuite {
54  EAP_ERP_CS_HMAC_SHA256_64 = 1,
55  EAP_ERP_CS_HMAC_SHA256_128 = 2,
56  EAP_ERP_CS_HMAC_SHA256_256 = 3,
57 };
58 
59 /*
60  * EAP Method Types as allocated by IANA:
61  * http://www.iana.org/assignments/eap-numbers
62  */
63 typedef enum {
64  EAP_TYPE_NONE = 0,
65  EAP_TYPE_IDENTITY = 1 /* RFC 3748 */,
66  EAP_TYPE_NOTIFICATION = 2 /* RFC 3748 */,
67  EAP_TYPE_NAK = 3 /* Response only, RFC 3748 */,
68  EAP_TYPE_MD5 = 4, /* RFC 3748 */
69  EAP_TYPE_OTP = 5 /* RFC 3748 */,
70  EAP_TYPE_GTC = 6, /* RFC 3748 */
71  EAP_TYPE_TLS = 13 /* RFC 2716 */,
72  EAP_TYPE_LEAP = 17 /* Cisco proprietary */,
73  EAP_TYPE_SIM = 18 /* RFC 4186 */,
74  EAP_TYPE_TTLS = 21 /* RFC 5281 */,
75  EAP_TYPE_AKA = 23 /* RFC 4187 */,
76  EAP_TYPE_PEAP = 25 /* draft-josefsson-pppext-eap-tls-eap-06.txt */,
77  EAP_TYPE_MSCHAPV2 = 26 /* draft-kamath-pppext-eap-mschapv2-00.txt */,
78  EAP_TYPE_TLV = 33 /* draft-josefsson-pppext-eap-tls-eap-07.txt */,
79  EAP_TYPE_TNC = 38 /* TNC IF-T v1.0-r3; note: tentative assignment;
80  * type 38 has previously been allocated for
81  * EAP-HTTP Digest, (funk.com) */,
82  EAP_TYPE_FAST = 43 /* RFC 4851 */,
83  EAP_TYPE_PAX = 46 /* RFC 4746 */,
84  EAP_TYPE_PSK = 47 /* RFC 4764 */,
85  EAP_TYPE_SAKE = 48 /* RFC 4763 */,
86  EAP_TYPE_IKEV2 = 49 /* RFC 5106 */,
87  EAP_TYPE_AKA_PRIME = 50 /* RFC 5448 */,
88  EAP_TYPE_GPSK = 51 /* RFC 5433 */,
89  EAP_TYPE_PWD = 52 /* RFC 5931 */,
90  EAP_TYPE_EKE = 53 /* RFC 6124 */,
91  EAP_TYPE_EXPANDED = 254 /* RFC 3748 */
92 } EapType;
93 
94 
95 /* SMI Network Management Private Enterprise Code for vendor specific types */
96 enum {
97  EAP_VENDOR_IETF = 0,
98  EAP_VENDOR_MICROSOFT = 0x000137 /* Microsoft */,
99  EAP_VENDOR_WFA = 0x00372A /* Wi-Fi Alliance (moved to WBA) */,
100  EAP_VENDOR_HOSTAP = 39068 /* hostapd/wpa_supplicant project */,
101  EAP_VENDOR_WFA_NEW = 40808 /* Wi-Fi Alliance */
102 };
103 
104 #define EAP_VENDOR_UNAUTH_TLS EAP_VENDOR_HOSTAP
105 #define EAP_VENDOR_TYPE_UNAUTH_TLS 1
106 
107 #define EAP_VENDOR_WFA_UNAUTH_TLS 13
108 
109 #define EAP_MSK_LEN 64
110 #define EAP_EMSK_LEN 64
111 #define EAP_EMSK_NAME_LEN 8
112 #define ERP_MAX_KEY_LEN 64
113 
114 #endif /* EAP_DEFS_H */
Definition: eap_defs.h:14