eap_tlv_common.h

Go to the documentation of this file.
00001 
00016 #ifndef EAP_TLV_COMMON_H
00017 #define EAP_TLV_COMMON_H
00018 
00019 /* EAP-TLV TLVs (draft-josefsson-ppext-eap-tls-eap-10.txt) */
00020 #define EAP_TLV_RESULT_TLV 3 /* Acknowledged Result */
00021 #define EAP_TLV_NAK_TLV 4
00022 #define EAP_TLV_ERROR_CODE_TLV 5
00023 #define EAP_TLV_CONNECTION_BINDING_TLV 6
00024 #define EAP_TLV_VENDOR_SPECIFIC_TLV 7
00025 #define EAP_TLV_URI_TLV 8
00026 #define EAP_TLV_EAP_PAYLOAD_TLV 9
00027 #define EAP_TLV_INTERMEDIATE_RESULT_TLV 10
00028 #define EAP_TLV_PAC_TLV 11 /* RFC 5422, Section 4.2 */
00029 #define EAP_TLV_CRYPTO_BINDING_TLV 12
00030 #define EAP_TLV_CALLING_STATION_ID_TLV 13
00031 #define EAP_TLV_CALLED_STATION_ID_TLV 14
00032 #define EAP_TLV_NAS_PORT_TYPE_TLV 15
00033 #define EAP_TLV_SERVER_IDENTIFIER_TLV 16
00034 #define EAP_TLV_IDENTITY_TYPE_TLV 17
00035 #define EAP_TLV_SERVER_TRUSTED_ROOT_TLV 18
00036 #define EAP_TLV_REQUEST_ACTION_TLV 19
00037 #define EAP_TLV_PKCS7_TLV 20
00038 
00039 #define EAP_TLV_RESULT_SUCCESS 1
00040 #define EAP_TLV_RESULT_FAILURE 2
00041 
00042 #define EAP_TLV_TYPE_MANDATORY 0x8000
00043 #define EAP_TLV_TYPE_MASK 0x3fff
00044 
00045 #ifdef _MSC_VER
00046 #pragma pack(push, 1)
00047 #endif /* _MSC_VER */
00048 
00049 struct eap_tlv_hdr {
00050         be16 tlv_type;
00051         be16 length;
00052 } STRUCT_PACKED;
00053 
00054 struct eap_tlv_nak_tlv {
00055         be16 tlv_type;
00056         be16 length;
00057         be32 vendor_id;
00058         be16 nak_type;
00059 } STRUCT_PACKED;
00060 
00061 struct eap_tlv_result_tlv {
00062         be16 tlv_type;
00063         be16 length;
00064         be16 status;
00065 } STRUCT_PACKED;
00066 
00067 /* RFC 4851, Section 4.2.7 - Intermediate-Result TLV */
00068 struct eap_tlv_intermediate_result_tlv {
00069         be16 tlv_type;
00070         be16 length;
00071         be16 status;
00072         /* Followed by optional TLVs */
00073 } STRUCT_PACKED;
00074 
00075 /* RFC 4851, Section 4.2.8 - Crypto-Binding TLV */
00076 struct eap_tlv_crypto_binding_tlv {
00077         be16 tlv_type;
00078         be16 length;
00079         u8 reserved;
00080         u8 version;
00081         u8 received_version;
00082         u8 subtype;
00083         u8 nonce[32];
00084         u8 compound_mac[20];
00085 } STRUCT_PACKED;
00086 
00087 struct eap_tlv_pac_ack_tlv {
00088         be16 tlv_type;
00089         be16 length;
00090         be16 pac_type;
00091         be16 pac_len;
00092         be16 result;
00093 } STRUCT_PACKED;
00094 
00095 /* RFC 4851, Section 4.2.9 - Request-Action TLV */
00096 struct eap_tlv_request_action_tlv {
00097         be16 tlv_type;
00098         be16 length;
00099         be16 action;
00100 } STRUCT_PACKED;
00101 
00102 /* RFC 5422, Section 4.2.6 - PAC-Type TLV */
00103 struct eap_tlv_pac_type_tlv {
00104         be16 tlv_type; /* PAC_TYPE_PAC_TYPE */
00105         be16 length;
00106         be16 pac_type;
00107 } STRUCT_PACKED;
00108 
00109 #ifdef _MSC_VER
00110 #pragma pack(pop)
00111 #endif /* _MSC_VER */
00112 
00113 #define EAP_TLV_CRYPTO_BINDING_SUBTYPE_REQUEST 0
00114 #define EAP_TLV_CRYPTO_BINDING_SUBTYPE_RESPONSE 1
00115 
00116 #define EAP_TLV_ACTION_PROCESS_TLV 1
00117 #define EAP_TLV_ACTION_NEGOTIATE_EAP 2
00118 
00119 #endif /* EAP_TLV_COMMON_H */
00120 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:16:51 2009 for hostapd by  doxygen 1.6.1