Home | History | Annotate | Download | only in common
      1 /*
      2  * EAPOL definitions shared between hostapd and wpa_supplicant
      3  * Copyright (c) 2002-2007, Jouni Malinen <j (at) w1.fi>
      4  *
      5  * This software may be distributed under the terms of the BSD license.
      6  * See README for more details.
      7  */
      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 
     18 struct 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 
     31 enum { 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 
     38 enum { EAPOL_KEY_TYPE_RC4 = 1, EAPOL_KEY_TYPE_RSN = 2,
     39        EAPOL_KEY_TYPE_WPA = 254 };
     40 
     41 #endif /* EAPOL_COMMON_H */
     42