eapol_common.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * EAPOL definitions shared between hostapd and wpa_supplicant
  3. * Copyright (c) 2002-2007, Jouni Malinen <j@w1.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. #ifndef EAPOL_COMMON_H
  15. #define EAPOL_COMMON_H
  16. /* IEEE Std 802.1X-2004 */
  17. #ifdef _MSC_VER
  18. #pragma pack(push, 1)
  19. #endif /* _MSC_VER */
  20. struct ieee802_1x_hdr {
  21. u8 version;
  22. u8 type;
  23. be16 length;
  24. /* followed by length octets of data */
  25. } STRUCT_PACKED;
  26. #ifdef _MSC_VER
  27. #pragma pack(pop)
  28. #endif /* _MSC_VER */
  29. #define EAPOL_VERSION 2
  30. enum { IEEE802_1X_TYPE_EAP_PACKET = 0,
  31. IEEE802_1X_TYPE_EAPOL_START = 1,
  32. IEEE802_1X_TYPE_EAPOL_LOGOFF = 2,
  33. IEEE802_1X_TYPE_EAPOL_KEY = 3,
  34. IEEE802_1X_TYPE_EAPOL_ENCAPSULATED_ASF_ALERT = 4
  35. };
  36. enum { EAPOL_KEY_TYPE_RC4 = 1, EAPOL_KEY_TYPE_RSN = 2,
  37. EAPOL_KEY_TYPE_WPA = 254 };
  38. #endif /* EAPOL_COMMON_H */