2006-03-07 05:47:04 +00:00
|
|
|
/*
|
2007-07-09 16:15:06 +00:00
|
|
|
* EAP server/peer: Shared EAP definitions
|
|
|
|
* Copyright (c) 2004-2006, Jouni Malinen <j@w1.fi>
|
2006-03-07 05:47:04 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* Alternatively, this software may be distributed under the terms of BSD
|
|
|
|
* license.
|
|
|
|
*
|
|
|
|
* See README and COPYING for more details.
|
|
|
|
*/
|
|
|
|
|
2005-06-05 22:35:03 +00:00
|
|
|
#ifndef EAP_DEFS_H
|
|
|
|
#define EAP_DEFS_H
|
|
|
|
|
|
|
|
/* RFC 3748 - Extensible Authentication Protocol (EAP) */
|
|
|
|
|
2007-07-09 16:15:06 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma pack(push, 1)
|
|
|
|
#endif /* _MSC_VER */
|
|
|
|
|
2005-06-05 22:35:03 +00:00
|
|
|
struct eap_hdr {
|
|
|
|
u8 code;
|
|
|
|
u8 identifier;
|
2006-03-07 05:47:04 +00:00
|
|
|
u16 length; /* including code and identifier; network byte order */
|
2005-06-05 22:35:03 +00:00
|
|
|
/* followed by length-4 octets of data */
|
2007-07-09 16:15:06 +00:00
|
|
|
} STRUCT_PACKED;
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma pack(pop)
|
|
|
|
#endif /* _MSC_VER */
|
2005-06-05 22:35:03 +00:00
|
|
|
|
|
|
|
enum { EAP_CODE_REQUEST = 1, EAP_CODE_RESPONSE = 2, EAP_CODE_SUCCESS = 3,
|
|
|
|
EAP_CODE_FAILURE = 4 };
|
|
|
|
|
|
|
|
/* EAP Request and Response data begins with one octet Type. Success and
|
|
|
|
* Failure do not have additional data. */
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
EAP_TYPE_NONE = 0,
|
2006-03-07 05:47:04 +00:00
|
|
|
EAP_TYPE_IDENTITY = 1 /* RFC 3748 */,
|
|
|
|
EAP_TYPE_NOTIFICATION = 2 /* RFC 3748 */,
|
|
|
|
EAP_TYPE_NAK = 3 /* Response only, RFC 3748 */,
|
|
|
|
EAP_TYPE_MD5 = 4, /* RFC 3748 */
|
|
|
|
EAP_TYPE_OTP = 5 /* RFC 3748 */,
|
|
|
|
EAP_TYPE_GTC = 6, /* RFC 3748 */
|
2005-06-05 22:35:03 +00:00
|
|
|
EAP_TYPE_TLS = 13 /* RFC 2716 */,
|
|
|
|
EAP_TYPE_LEAP = 17 /* Cisco proprietary */,
|
2007-07-09 16:15:06 +00:00
|
|
|
EAP_TYPE_SIM = 18 /* RFC 4186 */,
|
2005-06-05 22:35:03 +00:00
|
|
|
EAP_TYPE_TTLS = 21 /* draft-ietf-pppext-eap-ttls-02.txt */,
|
2007-07-09 16:15:06 +00:00
|
|
|
EAP_TYPE_AKA = 23 /* RFC 4187 */,
|
2005-06-05 22:35:03 +00:00
|
|
|
EAP_TYPE_PEAP = 25 /* draft-josefsson-pppext-eap-tls-eap-06.txt */,
|
|
|
|
EAP_TYPE_MSCHAPV2 = 26 /* draft-kamath-pppext-eap-mschapv2-00.txt */,
|
|
|
|
EAP_TYPE_TLV = 33 /* draft-josefsson-pppext-eap-tls-eap-07.txt */,
|
2007-07-09 16:15:06 +00:00
|
|
|
EAP_TYPE_FAST = 43 /* draft-cam-winget-eap-fast-05.txt */,
|
|
|
|
EAP_TYPE_PAX = 46 /* RFC 4746 */,
|
|
|
|
EAP_TYPE_PSK = 47 /* RFC 4764 */,
|
|
|
|
EAP_TYPE_SAKE = 48 /* RFC 4763 */,
|
|
|
|
EAP_TYPE_EXPANDED = 254 /* RFC 3748 */,
|
|
|
|
EAP_TYPE_GPSK = 255 /* EXPERIMENTAL - type not yet allocated
|
|
|
|
* draft-ietf-emu-eap-gpsk-01.txt */
|
2005-06-05 22:35:03 +00:00
|
|
|
} EapType;
|
|
|
|
|
2007-07-09 16:15:06 +00:00
|
|
|
|
|
|
|
/* SMI Network Management Private Enterprise Code for vendor specific types */
|
|
|
|
enum {
|
|
|
|
EAP_VENDOR_IETF = 0
|
|
|
|
};
|
|
|
|
|
|
|
|
#define EAP_MSK_LEN 64
|
|
|
|
#define EAP_EMSK_LEN 64
|
|
|
|
|
2005-06-05 22:35:03 +00:00
|
|
|
#endif /* EAP_DEFS_H */
|