[PATCH] adding wpa_common.h

Leonardo Maccari maccari-thisaintpartofmyaddress-
Thu Nov 24 03:28:58 PST 2005


On Sat, Nov 19, 2005 at 07:37:55PM -0800, Jouni Malinen wrote:
> On Thu, Nov 17, 2005 at 11:50:10AM +0100, Leonardo Maccari wrote:
> 
> Please re-diff your changes with -N option for diff so that the new file
> (wpa_common.h) is included.

here it is.

ciao,
leonardo.

-- 
   Key fingerprint = 3129 C583 F03B 2E73 0115  C040 3489 0185 B592 19FE
 Obviously -thisaintpartofmyaddress- is not part of my real email address 

-------------- next part --------------
Common subdirectories: wpa_supplicant-0.4.6/doc and wpa_supplicant-0.4.6-dev/doc
Common subdirectories: wpa_supplicant-0.4.6/examples and wpa_supplicant-0.4.6-dev/examples
diff --exclude .config --exclude defconfig --exclude '*.swp' --exclude cscope.out --exclude tags -u -N wpa_supplicant-0.4.6/wpa_common.h wpa_supplicant-0.4.6-dev/wpa_common.h
--- wpa_supplicant-0.4.6/wpa_common.h	1970-01-01 01:00:00.000000000 +0100
+++ wpa_supplicant-0.4.6-dev/wpa_common.h	2005-11-17 11:16:04.000000000 +0100
@@ -0,0 +1,28 @@
+
+/* Common structs/defines between supplicant and authenticator*/
+#define WPA_REPLAY_COUNTER_LEN 8
+#define WPA_NONCE_LEN 32
+#define WPA_KEY_RSC_LEN 8
+
+#define EAPOL_VERSION 2
+
+
+struct ieee802_1x_hdr {
+	u8 version;
+	u8 type;
+	u16 length;
+	/* followed by length octets of data */
+} __attribute__ ((packed));
+
+
+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 };
+
+
Common subdirectories: wpa_supplicant-0.4.6/wpa_gui and wpa_supplicant-0.4.6-dev/wpa_gui
Common subdirectories: wpa_supplicant-0.4.6/wpa_gui-qt4 and wpa_supplicant-0.4.6-dev/wpa_gui-qt4
diff --exclude .config --exclude defconfig --exclude '*.swp' --exclude cscope.out --exclude tags -u -N wpa_supplicant-0.4.6/wpa.h wpa_supplicant-0.4.6-dev/wpa.h
--- wpa_supplicant-0.4.6/wpa.h	2005-10-02 01:34:36.000000000 +0200
+++ wpa_supplicant-0.4.6-dev/wpa.h	2005-11-17 11:28:05.000000000 +0100
@@ -16,29 +16,10 @@
 #define WPA_H
 
 #include "defs.h"
+#include "wpa_common.h"
 
 #define BIT(n) (1 << (n))
 
-struct ieee802_1x_hdr {
-	u8 version;
-	u8 type;
-	u16 length;
-	/* followed by length octets of data */
-} __attribute__ ((packed));
-
-#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 };
-
-
 #define WPA_CAPABILITY_PREAUTH BIT(0)
 
 #define GENERIC_INFO_ELEM 0xdd
diff --exclude .config --exclude defconfig --exclude '*.swp' --exclude cscope.out --exclude tags -u -N wpa_supplicant-0.4.6/wpa_i.h wpa_supplicant-0.4.6-dev/wpa_i.h
--- wpa_supplicant-0.4.6/wpa_i.h	2005-09-12 22:16:15.000000000 +0200
+++ wpa_supplicant-0.4.6-dev/wpa_i.h	2005-11-17 11:27:09.000000000 +0100
@@ -15,10 +15,6 @@
 #ifndef WPA_I_H
 #define WPA_I_H
 
-#define WPA_NONCE_LEN 32
-#define WPA_REPLAY_COUNTER_LEN 8
-
-
 struct rsn_pmksa_candidate;
 
 /**
-------------- next part --------------
diff --exclude .config --exclude defconfig --exclude '*.swp' --exclude cscope.out --exclude tags -u -N hostapd-0.4.6/ieee802_1x.h hostapd-0.4.6-dev/ieee802_1x.h
--- hostapd-0.4.6/ieee802_1x.h	2005-08-29 06:05:12.000000000 +0200
+++ hostapd-0.4.6-dev/ieee802_1x.h	2005-11-17 11:18:14.000000000 +0100
@@ -1,23 +1,6 @@
 #ifndef IEEE802_1X_H
 #define IEEE802_1X_H
 
-/* IEEE Std 802.1X-REV-d11, 7.2 */
-
-struct ieee802_1x_hdr {
-	u8 version;
-	u8 type;
-	u16 length;
-	/* followed by length octets of data */
-} __attribute__ ((packed));
-
-#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
-};
 
 /* draft-congdon-radius-8021x-20.txt */
 
@@ -43,9 +26,6 @@
 	 * RC4 key used in encryption = Key-IV + MS-MPPE-Recv-Key */
 } __attribute__ ((packed));
 
-enum { EAPOL_KEY_TYPE_RC4 = 1, EAPOL_KEY_TYPE_RSN = 2,
-       EAPOL_KEY_TYPE_WPA = 254 };
-
 
 void ieee802_1x_receive(struct hostapd_data *hapd, const u8 *sa, const u8 *buf,
 			size_t len);
Common subdirectories: hostapd-0.4.6/logwatch and hostapd-0.4.6-dev/logwatch
diff --exclude .config --exclude defconfig --exclude '*.swp' --exclude cscope.out --exclude tags -u -N hostapd-0.4.6/wpa_common.h hostapd-0.4.6-dev/wpa_common.h
--- hostapd-0.4.6/wpa_common.h	1970-01-01 01:00:00.000000000 +0100
+++ hostapd-0.4.6-dev/wpa_common.h	2005-11-17 11:15:57.000000000 +0100
@@ -0,0 +1,28 @@
+
+/* Common structs/defines between supplicant and authenticator*/
+#define WPA_REPLAY_COUNTER_LEN 8
+#define WPA_NONCE_LEN 32
+#define WPA_KEY_RSC_LEN 8
+
+#define EAPOL_VERSION 2
+
+
+struct ieee802_1x_hdr {
+	u8 version;
+	u8 type;
+	u16 length;
+	/* followed by length octets of data */
+} __attribute__ ((packed));
+
+
+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 };
+
+
diff --exclude .config --exclude defconfig --exclude '*.swp' --exclude cscope.out --exclude tags -u -N hostapd-0.4.6/wpa.h hostapd-0.4.6-dev/wpa.h
--- hostapd-0.4.6/wpa.h	2005-06-26 20:27:44.000000000 +0200
+++ hostapd-0.4.6-dev/wpa.h	2005-11-17 11:32:37.000000000 +0100
@@ -1,14 +1,14 @@
 #ifndef WPA_H
 #define WPA_H
 
-#define WPA_NONCE_LEN 32
+#include "wpa_common.h"
+
 #define WPA_PMK_LEN PMK_LEN
-#define WPA_REPLAY_COUNTER_LEN 8
 #define WPA_GMK_LEN 32
 #define WPA_GTK_MAX_LEN 32
-#define WPA_KEY_RSC_LEN 8
 #define PMKID_LEN 16
 
+
 struct rsn_pmksa_cache {
 	struct rsn_pmksa_cache *next, *hnext;
 	u8 pmkid[PMKID_LEN];



More information about the Hostap mailing list