aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2004-08-30 04:07:10 (GMT)
committerJouni Malinen <j@w1.fi>2004-08-30 04:07:10 (GMT)
commit98e1c6dff078757f26d389068ac2050c3770097b (patch)
tree703b2d2ca56c2f662b52453d8a46de98248a5fb6
parent3165774ce93cb003ad6ca0c67cd9cf74a58a829f (diff)
downloadhostap-history-98e1c6dff078757f26d389068ac2050c3770097b.zip
hostap-history-98e1c6dff078757f26d389068ac2050c3770097b.tar.gz
hostap-history-98e1c6dff078757f26d389068ac2050c3770097b.tar.bz2
Updated WE-18 header files with bug fixes to WPA functionality needed
to get wpa_supplicant working.
-rw-r--r--testing/wireless/wireless-18.h89
-rw-r--r--utils/wireless_copy.h89
2 files changed, 122 insertions, 56 deletions
diff --git a/testing/wireless/wireless-18.h b/testing/wireless/wireless-18.h
index ff82b59..c3ec197 100644
--- a/testing/wireless/wireless-18.h
+++ b/testing/wireless/wireless-18.h
@@ -1,7 +1,7 @@
/*
* This file define a set of standard wireless extensions
*
- * Version : 18 24.6.04
+ * Version : 18 29.8.04
*
* Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
* Copyright (c) 1997-2004 Jean Tourrilhes, All Rights Reserved.
@@ -191,10 +191,10 @@
* - Add SIOCSIWGENIE/SIOCGIWGENIE
* - Add SIOCSIWMLME
* - Add struct iw_range bit field for supported encoding capabilities
- * - Add optional parameter structure for SIOCSIWSCAN
+ * - Add extended scan request (SIOCSIWSCANEXT)
* - Add SIOCSIWAUTH/SIOCGIWAUTH for setting authentication and WPA
* related parameters (extensible up to 4096 parameter values)
- * - Add wireless events: IWEVWPAIE, IWEVRSNIE, IWEVMICHAELMICFAILURE
+ * - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE
*/
/**************************** CONSTANTS ****************************/
@@ -269,7 +269,10 @@
#define SIOCSIWPOWER 0x8B2C /* set Power Management settings */
#define SIOCGIWPOWER 0x8B2D /* get Power Management settings */
-/* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WME) */
+/* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WMM).
+ * This ioctl uses struct iw_point and data buffer that includes IE id and len
+ * fields. More than one IE may be included in the request. Setting the generic
+ * IE to empty buffer (len=0) removes the generic IE from the driver. */
#define SIOCSIWGENIE 0x8B30 /* set generic IE */
#define SIOCGIWGENIE 0x8B31 /* get generic IE */
@@ -284,6 +287,11 @@
#define SIOCSIWENCODEEXT 0x8B34 /* set encoding token & mode */
#define SIOCGIWENCODEEXT 0x8B35 /* get encoding token & mode */
+/* Extended scan request; like SIOCSIWSCAN, but with additional parameters in
+ * struct iw_scan_req buffer. This shares SIOCGIWSCAN for reading the results.
+ */
+#define SIOCSIWSCANEXT 0x8B36 /* trigger scanning (extended) */
+
/* -------------------- DEV PRIVATE IOCTL LIST -------------------- */
/* These 32 ioctl are wireless device private, for 16 commands.
@@ -325,9 +333,13 @@
#define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */
#define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) */
#define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */
-#define IWEVWPAIE 0x8C05 /* WPA IE (scan results) */
-#define IWEVRSNIE 0x8C06 /* RSN IE (WPA2) (scan results) */
-#define IWEVMICHAELMICFAILURE 0x8C07 /* Michael MIC failure
+#define IWEVGENIE 0x8C05 /* Generic IE (WPA, RSN, WMM, ..)
+ * (scan results); This includes id and
+ * length fields. One IWEVGENIE may
+ * contain more than one IE. Scan
+ * results may contain one or more
+ * IWEVGENIE events. */
+#define IWEVMICHAELMICFAILURE 0x8C06 /* Michael MIC failure
* (struct iw_michaelmicfailure)
*/
@@ -475,7 +487,7 @@
#define IW_CUSTOM_MAX 256 /* In bytes */
/* Generic information element */
-#define IW_GENERIC_IE_MAX 256
+#define IW_GENERIC_IE_MAX 1024
/* MLME requests (SIOCSIWMLME / struct iw_mlme) */
#define IW_MLME_DEAUTH 0
@@ -488,33 +500,36 @@
* (IW_AUTH_INDEX mask in struct iw_param flags; this is the index of the
* parameter that is being set/get to; value will be read/written to
* struct iw_param value field) */
-#define IW_AUTH_WPA_VERSION 0
-#define IW_AUTH_CIPHER_PAIRWISE 1
-#define IW_AUTH_CIPHER_GROUP 2
-#define IW_AUTH_KEY_MGMT 3
+#define IW_AUTH_WPA_VERSION 0
+#define IW_AUTH_CIPHER_PAIRWISE 1
+#define IW_AUTH_CIPHER_GROUP 2
+#define IW_AUTH_KEY_MGMT 3
#define IW_AUTH_TKIP_COUNTERMEASURES 4
#define IW_AUTH_DROP_UNENCRYPTED 5
-#define IW_AUTH_80211_AUTH_ALG 6
-
-/* IW_AUTH_WPA_VERSION values */
-#define IW_AUTH_WPA_VERSION_DISABLED 0
-#define IW_AUTH_WPA_VERSION_WPA 1
-#define IW_AUTH_WPA_VERSION_WPA2 2
-
-/* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values */
-#define IW_AUTH_CIPHER_NONE 0
-#define IW_AUTH_CIPHER_WEP40 1
-#define IW_AUTH_CIPHER_TKIP 2
-#define IW_AUTH_CIPHER_CCMP 4
-#define IW_AUTH_CIPHER_WEP104 5
-
-/* IW_AUTH_KEY_MGMT values */
+#define IW_AUTH_80211_AUTH_ALG 6
+#define IW_AUTH_WPA_ENABLED 7
+#define IW_AUTH_RX_UNENCRYPTED_EAPOL 8
+
+/* IW_AUTH_WPA_VERSION values (bit field) */
+#define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
+#define IW_AUTH_WPA_VERSION_WPA 0x00000002
+#define IW_AUTH_WPA_VERSION_WPA2 0x00000004
+
+/* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values (bit field) */
+#define IW_AUTH_CIPHER_NONE 0x00000001
+#define IW_AUTH_CIPHER_WEP40 0x00000002
+#define IW_AUTH_CIPHER_TKIP 0x00000004
+#define IW_AUTH_CIPHER_CCMP 0x00000008
+#define IW_AUTH_CIPHER_WEP104 0x00000010
+
+/* IW_AUTH_KEY_MGMT values (bit field) */
#define IW_AUTH_KEY_MGMT_802_1X 1
#define IW_AUTH_KEY_MGMT_PSK 2
/* IW_AUTH_80211_AUTH_ALG values (bit field) */
#define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
#define IW_AUTH_ALG_SHARED_KEY 0x00000002
+#define IW_AUTH_ALG_LEAP 0x00000004
/* SIOCSIWENCODEEXT definitions */
#define IW_ENCODE_SEQ_MAX_SIZE 8
@@ -527,6 +542,7 @@
#define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001
#define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002
#define IW_ENCODE_EXT_GROUP_KEY 0x00000004
+#define IW_ENCODE_EXT_SET_TX_KEY 0x00000008
/* IWEVMICHAELMICFAILURE : struct iw_michaelmicfailure ->flags */
#define IW_MICFAILURE_KEY_ID 0x00000003 /* Key ID 0..3 */
@@ -651,7 +667,7 @@ struct iw_thrspy
};
/*
- * Optional data for scan request (MLME-SCAN.request)
+ * Data for extended scan request (MLME-SCAN.request)
*/
struct iw_scan_req
{
@@ -683,6 +699,23 @@ struct iw_scan_req
* flags are used in the same way as with SIOCSIWENCODE/SIOCGIWENCODE and
* only the data contents changes (key data -> this structure, including
* key data).
+ *
+ * If the new key is the first group key, it will be set as the default
+ * TX key. Otherwise, default TX key index is only changed if
+ * IW_ENCODE_EXT_SET_TX_KEY flag is set.
+ *
+ * Key will be changed with SIOCSIWENCODEEXT in all cases except for
+ * special "change TX key index" operation which is indicated by setting
+ * key_len = 0 and ext_flags |= IW_ENCODE_EXT_SET_TX_KEY.
+ *
+ * tx_seq/rx_seq are only used when respective
+ * IW_ENCODE_EXT_{TX,RX}_SEQ_VALID flag is set in ext_flags. Normal
+ * TKIP/CCMP operation is to set RX seq with SIOCSIWENCODEEXT and start
+ * TX seq from zero whenever key is changed. SIOCGIWENCODEEXT is normally
+ * used only by an Authenticator (AP or an IBSS station) to get the
+ * current TX sequence number. Using TX_SEQ_VALID for SIOCSIWENCODEEXT and
+ * RX_SEQ_VALID for SIOCGIWENCODEEXT are optional, but can be useful for
+ * debugging/testing.
*/
struct iw_encode_ext
{
diff --git a/utils/wireless_copy.h b/utils/wireless_copy.h
index f03a608..24a56c2 100644
--- a/utils/wireless_copy.h
+++ b/utils/wireless_copy.h
@@ -8,7 +8,7 @@
/*
* This file define a set of standard wireless extensions
*
- * Version : 18 24.6.04
+ * Version : 18 29.8.04
*
* Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
* Copyright (c) 1997-2004 Jean Tourrilhes, All Rights Reserved.
@@ -212,10 +212,10 @@ typedef __uint8_t __u8;
* - Add SIOCSIWGENIE/SIOCGIWGENIE
* - Add SIOCSIWMLME
* - Add struct iw_range bit field for supported encoding capabilities
- * - Add optional parameter structure for SIOCSIWSCAN
+ * - Add extended scan request (SIOCSIWSCANEXT)
* - Add SIOCSIWAUTH/SIOCGIWAUTH for setting authentication and WPA
* related parameters (extensible up to 4096 parameter values)
- * - Add wireless events: IWEVWPAIE, IWEVRSNIE, IWEVMICHAELMICFAILURE
+ * - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE
*/
/**************************** CONSTANTS ****************************/
@@ -290,7 +290,10 @@ typedef __uint8_t __u8;
#define SIOCSIWPOWER 0x8B2C /* set Power Management settings */
#define SIOCGIWPOWER 0x8B2D /* get Power Management settings */
-/* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WME) */
+/* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WMM).
+ * This ioctl uses struct iw_point and data buffer that includes IE id and len
+ * fields. More than one IE may be included in the request. Setting the generic
+ * IE to empty buffer (len=0) removes the generic IE from the driver. */
#define SIOCSIWGENIE 0x8B30 /* set generic IE */
#define SIOCGIWGENIE 0x8B31 /* get generic IE */
@@ -305,6 +308,11 @@ typedef __uint8_t __u8;
#define SIOCSIWENCODEEXT 0x8B34 /* set encoding token & mode */
#define SIOCGIWENCODEEXT 0x8B35 /* get encoding token & mode */
+/* Extended scan request; like SIOCSIWSCAN, but with additional parameters in
+ * struct iw_scan_req buffer. This shares SIOCGIWSCAN for reading the results.
+ */
+#define SIOCSIWSCANEXT 0x8B36 /* trigger scanning (extended) */
+
/* -------------------- DEV PRIVATE IOCTL LIST -------------------- */
/* These 32 ioctl are wireless device private, for 16 commands.
@@ -346,9 +354,13 @@ typedef __uint8_t __u8;
#define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */
#define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) */
#define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */
-#define IWEVWPAIE 0x8C05 /* WPA IE (scan results) */
-#define IWEVRSNIE 0x8C06 /* RSN IE (WPA2) (scan results) */
-#define IWEVMICHAELMICFAILURE 0x8C07 /* Michael MIC failure
+#define IWEVGENIE 0x8C05 /* Generic IE (WPA, RSN, WMM, ..)
+ * (scan results); This includes id and
+ * length fields. One IWEVGENIE may
+ * contain more than one IE. Scan
+ * results may contain one or more
+ * IWEVGENIE events. */
+#define IWEVMICHAELMICFAILURE 0x8C06 /* Michael MIC failure
* (struct iw_michaelmicfailure)
*/
@@ -496,7 +508,7 @@ typedef __uint8_t __u8;
#define IW_CUSTOM_MAX 256 /* In bytes */
/* Generic information element */
-#define IW_GENERIC_IE_MAX 256
+#define IW_GENERIC_IE_MAX 1024
/* MLME requests (SIOCSIWMLME / struct iw_mlme) */
#define IW_MLME_DEAUTH 0
@@ -509,33 +521,36 @@ typedef __uint8_t __u8;
* (IW_AUTH_INDEX mask in struct iw_param flags; this is the index of the
* parameter that is being set/get to; value will be read/written to
* struct iw_param value field) */
-#define IW_AUTH_WPA_VERSION 0
-#define IW_AUTH_CIPHER_PAIRWISE 1
-#define IW_AUTH_CIPHER_GROUP 2
-#define IW_AUTH_KEY_MGMT 3
+#define IW_AUTH_WPA_VERSION 0
+#define IW_AUTH_CIPHER_PAIRWISE 1
+#define IW_AUTH_CIPHER_GROUP 2
+#define IW_AUTH_KEY_MGMT 3
#define IW_AUTH_TKIP_COUNTERMEASURES 4
#define IW_AUTH_DROP_UNENCRYPTED 5
-#define IW_AUTH_80211_AUTH_ALG 6
-
-/* IW_AUTH_WPA_VERSION values */
-#define IW_AUTH_WPA_VERSION_DISABLED 0
-#define IW_AUTH_WPA_VERSION_WPA 1
-#define IW_AUTH_WPA_VERSION_WPA2 2
-
-/* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values */
-#define IW_AUTH_CIPHER_NONE 0
-#define IW_AUTH_CIPHER_WEP40 1
-#define IW_AUTH_CIPHER_TKIP 2
-#define IW_AUTH_CIPHER_CCMP 4
-#define IW_AUTH_CIPHER_WEP104 5
-
-/* IW_AUTH_KEY_MGMT values */
+#define IW_AUTH_80211_AUTH_ALG 6
+#define IW_AUTH_WPA_ENABLED 7
+#define IW_AUTH_RX_UNENCRYPTED_EAPOL 8
+
+/* IW_AUTH_WPA_VERSION values (bit field) */
+#define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
+#define IW_AUTH_WPA_VERSION_WPA 0x00000002
+#define IW_AUTH_WPA_VERSION_WPA2 0x00000004
+
+/* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values (bit field) */
+#define IW_AUTH_CIPHER_NONE 0x00000001
+#define IW_AUTH_CIPHER_WEP40 0x00000002
+#define IW_AUTH_CIPHER_TKIP 0x00000004
+#define IW_AUTH_CIPHER_CCMP 0x00000008
+#define IW_AUTH_CIPHER_WEP104 0x00000010
+
+/* IW_AUTH_KEY_MGMT values (bit field) */
#define IW_AUTH_KEY_MGMT_802_1X 1
#define IW_AUTH_KEY_MGMT_PSK 2
/* IW_AUTH_80211_AUTH_ALG values (bit field) */
#define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
#define IW_AUTH_ALG_SHARED_KEY 0x00000002
+#define IW_AUTH_ALG_LEAP 0x00000004
/* SIOCSIWENCODEEXT definitions */
#define IW_ENCODE_SEQ_MAX_SIZE 8
@@ -548,6 +563,7 @@ typedef __uint8_t __u8;
#define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001
#define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002
#define IW_ENCODE_EXT_GROUP_KEY 0x00000004
+#define IW_ENCODE_EXT_SET_TX_KEY 0x00000008
/* IWEVMICHAELMICFAILURE : struct iw_michaelmicfailure ->flags */
#define IW_MICFAILURE_KEY_ID 0x00000003 /* Key ID 0..3 */
@@ -672,7 +688,7 @@ struct iw_thrspy
};
/*
- * Optional data for scan request (MLME-SCAN.request)
+ * Data for extended scan request (MLME-SCAN.request)
*/
struct iw_scan_req
{
@@ -704,6 +720,23 @@ struct iw_scan_req
* flags are used in the same way as with SIOCSIWENCODE/SIOCGIWENCODE and
* only the data contents changes (key data -> this structure, including
* key data).
+ *
+ * If the new key is the first group key, it will be set as the default
+ * TX key. Otherwise, default TX key index is only changed if
+ * IW_ENCODE_EXT_SET_TX_KEY flag is set.
+ *
+ * Key will be changed with SIOCSIWENCODEEXT in all cases except for
+ * special "change TX key index" operation which is indicated by setting
+ * key_len = 0 and ext_flags |= IW_ENCODE_EXT_SET_TX_KEY.
+ *
+ * tx_seq/rx_seq are only used when respective
+ * IW_ENCODE_EXT_{TX,RX}_SEQ_VALID flag is set in ext_flags. Normal
+ * TKIP/CCMP operation is to set RX seq with SIOCSIWENCODEEXT and start
+ * TX seq from zero whenever key is changed. SIOCGIWENCODEEXT is normally
+ * used only by an Authenticator (AP or an IBSS station) to get the
+ * current TX sequence number. Using TX_SEQ_VALID for SIOCSIWENCODEEXT and
+ * RX_SEQ_VALID for SIOCGIWENCODEEXT are optional, but can be useful for
+ * debugging/testing.
*/
struct iw_encode_ext
{