an, awi, cue and kue don't use the miibus interface.
[dragonfly.git] / contrib / hostapd-0.4.9 / eap_defs.h
1 /*
2  * WPA Supplicant/hostapd / Shared EAP definitions
3  * Copyright (c) 2004-2005, Jouni Malinen <jkmaline@cc.hut.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 EAP_DEFS_H
16 #define EAP_DEFS_H
17
18 /* RFC 3748 - Extensible Authentication Protocol (EAP) */
19
20 struct eap_hdr {
21         u8 code;
22         u8 identifier;
23         u16 length; /* including code and identifier; network byte order */
24         /* followed by length-4 octets of data */
25 } __attribute__ ((packed));
26
27 enum { EAP_CODE_REQUEST = 1, EAP_CODE_RESPONSE = 2, EAP_CODE_SUCCESS = 3,
28        EAP_CODE_FAILURE = 4 };
29
30 /* EAP Request and Response data begins with one octet Type. Success and
31  * Failure do not have additional data. */
32
33 typedef enum {
34         EAP_TYPE_NONE = 0,
35         EAP_TYPE_IDENTITY = 1 /* RFC 3748 */,
36         EAP_TYPE_NOTIFICATION = 2 /* RFC 3748 */,
37         EAP_TYPE_NAK = 3 /* Response only, RFC 3748 */,
38         EAP_TYPE_MD5 = 4, /* RFC 3748 */
39         EAP_TYPE_OTP = 5 /* RFC 3748 */,
40         EAP_TYPE_GTC = 6, /* RFC 3748 */
41         EAP_TYPE_TLS = 13 /* RFC 2716 */,
42         EAP_TYPE_LEAP = 17 /* Cisco proprietary */,
43         EAP_TYPE_SIM = 18 /* draft-haverinen-pppext-eap-sim-12.txt */,
44         EAP_TYPE_TTLS = 21 /* draft-ietf-pppext-eap-ttls-02.txt */,
45         EAP_TYPE_AKA = 23 /* draft-arkko-pppext-eap-aka-12.txt */,
46         EAP_TYPE_PEAP = 25 /* draft-josefsson-pppext-eap-tls-eap-06.txt */,
47         EAP_TYPE_MSCHAPV2 = 26 /* draft-kamath-pppext-eap-mschapv2-00.txt */,
48         EAP_TYPE_TLV = 33 /* draft-josefsson-pppext-eap-tls-eap-07.txt */,
49         EAP_TYPE_FAST = 43 /* draft-cam-winget-eap-fast-00.txt */,
50         EAP_TYPE_PAX = 46, /* draft-clancy-eap-pax-04.txt */
51         EAP_TYPE_EXPANDED_NAK = 254 /* RFC 3748 */,
52         EAP_TYPE_PSK = 255 /* EXPERIMENTAL - type not yet allocated
53                             * draft-bersani-eap-psk-09 */
54 } EapType;
55
56 #endif /* EAP_DEFS_H */