/* * 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. *//* ... */#ifndefEAPOL_COMMON_H#defineEAPOL_COMMON_H/* IEEE Std 802.1X-2004 */structieee802_1x_hdr{u8version;u8type;be16length;/* followed by length octets of data */}{ ... }STRUCT_PACKED;#defineEAPOL_VERSION2#defineSPP_AMSDU_CAP_ENABLE1#defineSPP_AMSDU_REQ_ENABLE1#defineSPP_AMSDU_CAP_DISABLE0#defineSPP_AMSDU_REQ_DISABLE05 definesenum{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}{ ... };#defineIEEE8021X_REPLAY_COUNTER_LEN8#defineIEEE8021X_KEY_SIGN_LEN16#defineIEEE8021X_KEY_IV_LEN16#defineIEEE8021X_KEY_INDEX_FLAG0x80#defineIEEE8021X_KEY_INDEX_MASK0x035 definesstructieee802_1x_eapol_key{u8type;/* Note: key_length is unaligned */u8key_length[2];/* does not repeat within the life of the keying material used to * encrypt the Key field; 64-bit NTP timestamp MAY be used here *//* ... */u8replay_counter[IEEE8021X_REPLAY_COUNTER_LEN];u8key_iv[IEEE8021X_KEY_IV_LEN];/* cryptographically random number */u8key_index;/* key flag in the most significant bit: * 0 = broadcast (default key), * 1 = unicast (key mapping key); key index is in the * 7 least significant bits *//* ... *//* HMAC-MD5 message integrity check computed with MS-MPPE-Send-Key as * the key *//* ... */u8key_signature[IEEE8021X_KEY_SIGN_LEN];/* followed by key: if packet body length = 44 + key length, then the * key field (of key_length bytes) contains the key in encrypted form; * if packet body length = 44, key field is absent and key_length * represents the number of least significant octets from * MS-MPPE-Send-Key attribute to be used as the keying material; * RC4 key used in encryption = Key-IV + MS-MPPE-Recv-Key *//* ... */}{ ... }STRUCT_PACKED;/* ... */#endif/* EAPOL_COMMON_H */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.