blob: 4e392e7cb68a636a697880852dfdaa6e26febcd8 [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001/*
2 * EAPOL definitions shared between hostapd and wpa_supplicant
3 * Copyright (c) 2002-2007, Jouni Malinen <j@w1.fi>
4 *
Dmitry Shmidtc5ec7f52012-03-06 16:33:24 -08005 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07007 */
8
9#ifndef EAPOL_COMMON_H
10#define EAPOL_COMMON_H
11
12/* IEEE Std 802.1X-2004 */
13
14#ifdef _MSC_VER
15#pragma pack(push, 1)
16#endif /* _MSC_VER */
17
18struct ieee802_1x_hdr {
19 u8 version;
20 u8 type;
21 be16 length;
22 /* followed by length octets of data */
23} STRUCT_PACKED;
24
25#ifdef _MSC_VER
26#pragma pack(pop)
27#endif /* _MSC_VER */
28
29#define EAPOL_VERSION 2
30
31enum { IEEE802_1X_TYPE_EAP_PACKET = 0,
32 IEEE802_1X_TYPE_EAPOL_START = 1,
33 IEEE802_1X_TYPE_EAPOL_LOGOFF = 2,
34 IEEE802_1X_TYPE_EAPOL_KEY = 3,
35 IEEE802_1X_TYPE_EAPOL_ENCAPSULATED_ASF_ALERT = 4
36};
37
38enum { EAPOL_KEY_TYPE_RC4 = 1, EAPOL_KEY_TYPE_RSN = 2,
39 EAPOL_KEY_TYPE_WPA = 254 };
40
41#endif /* EAPOL_COMMON_H */