aboutsummaryrefslogtreecommitdiff
path: root/src/common/eapol_common.h
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2009-03-01 22:10:07 +0000
committerSam Leffler <sam@FreeBSD.org>2009-03-01 22:10:07 +0000
commitb2cbddbd4361766d55c5f9dae81f71f44577bb6a (patch)
tree372b16f9e6ccba7284b53135005cc85cc6545185 /src/common/eapol_common.h
parent514fff2b7c1f2e25e5c0611b598797f32aff1042 (diff)
parent22188e6ab4f02f981de3b9f228a40b1e8f98e6a1 (diff)
Notes
Diffstat (limited to 'src/common/eapol_common.h')
-rw-r--r--src/common/eapol_common.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/common/eapol_common.h b/src/common/eapol_common.h
new file mode 100644
index 0000000000000..d70e62d2f6487
--- /dev/null
+++ b/src/common/eapol_common.h
@@ -0,0 +1,47 @@
+/*
+ * EAPOL definitions shared between hostapd and wpa_supplicant
+ * Copyright (c) 2002-2007, Jouni Malinen <j@w1.fi>
+ *
+ * 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.
+ */
+
+#ifndef EAPOL_COMMON_H
+#define EAPOL_COMMON_H
+
+/* IEEE Std 802.1X-2004 */
+
+#ifdef _MSC_VER
+#pragma pack(push, 1)
+#endif /* _MSC_VER */
+
+struct ieee802_1x_hdr {
+ u8 version;
+ u8 type;
+ be16 length;
+ /* followed by length octets of data */
+} STRUCT_PACKED;
+
+#ifdef _MSC_VER
+#pragma pack(pop)
+#endif /* _MSC_VER */
+
+#define EAPOL_VERSION 2
+
+enum { IEEE802_1X_TYPE_EAP_PACKET = 0,
+ IEEE802_1X_TYPE_EAPOL_START = 1,
+ IEEE802_1X_TYPE_EAPOL_LOGOFF = 2,
+ IEEE802_1X_TYPE_EAPOL_KEY = 3,
+ IEEE802_1X_TYPE_EAPOL_ENCAPSULATED_ASF_ALERT = 4
+};
+
+enum { EAPOL_KEY_TYPE_RC4 = 1, EAPOL_KEY_TYPE_RSN = 2,
+ EAPOL_KEY_TYPE_WPA = 254 };
+
+#endif /* EAPOL_COMMON_H */