wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
eap_tlv_common.h
Go to the documentation of this file.
1 
5 #ifndef EAP_TLV_COMMON_H
6 #define EAP_TLV_COMMON_H
7 
8 /* EAP-TLV TLVs (draft-josefsson-ppext-eap-tls-eap-10.txt) */
9 #define EAP_TLV_RESULT_TLV 3 /* Acknowledged Result */
10 #define EAP_TLV_NAK_TLV 4
11 #define EAP_TLV_ERROR_CODE_TLV 5
12 #define EAP_TLV_CONNECTION_BINDING_TLV 6
13 #define EAP_TLV_VENDOR_SPECIFIC_TLV 7
14 #define EAP_TLV_URI_TLV 8
15 #define EAP_TLV_EAP_PAYLOAD_TLV 9
16 #define EAP_TLV_INTERMEDIATE_RESULT_TLV 10
17 #define EAP_TLV_PAC_TLV 11 /* RFC 5422, Section 4.2 */
18 #define EAP_TLV_CRYPTO_BINDING_TLV 12
19 #define EAP_TLV_CALLING_STATION_ID_TLV 13
20 #define EAP_TLV_CALLED_STATION_ID_TLV 14
21 #define EAP_TLV_NAS_PORT_TYPE_TLV 15
22 #define EAP_TLV_SERVER_IDENTIFIER_TLV 16
23 #define EAP_TLV_IDENTITY_TYPE_TLV 17
24 #define EAP_TLV_SERVER_TRUSTED_ROOT_TLV 18
25 #define EAP_TLV_REQUEST_ACTION_TLV 19
26 #define EAP_TLV_PKCS7_TLV 20
27 
28 #define EAP_TLV_RESULT_SUCCESS 1
29 #define EAP_TLV_RESULT_FAILURE 2
30 
31 #define EAP_TLV_TYPE_MANDATORY 0x8000
32 #define EAP_TLV_TYPE_MASK 0x3fff
33 
34 #ifdef _MSC_VER
35 #pragma pack(push, 1)
36 #endif /* _MSC_VER */
37 
38 struct eap_tlv_hdr {
39  be16 tlv_type;
40  be16 length;
41 } STRUCT_PACKED;
42 
44  be16 tlv_type;
45  be16 length;
46  be32 vendor_id;
47  be16 nak_type;
48 } STRUCT_PACKED;
49 
51  be16 tlv_type;
52  be16 length;
53  be16 status;
54 } STRUCT_PACKED;
55 
56 /* RFC 4851, Section 4.2.7 - Intermediate-Result TLV */
58  be16 tlv_type;
59  be16 length;
60  be16 status;
61  /* Followed by optional TLVs */
62 } STRUCT_PACKED;
63 
64 /* RFC 4851, Section 4.2.8 - Crypto-Binding TLV */
66  be16 tlv_type;
67  be16 length;
68  u8 reserved;
69  u8 version;
70  u8 received_version;
71  u8 subtype;
72  u8 nonce[32];
73  u8 compound_mac[20];
74 } STRUCT_PACKED;
75 
77  be16 tlv_type;
78  be16 length;
79  be16 pac_type;
80  be16 pac_len;
81  be16 result;
82 } STRUCT_PACKED;
83 
84 /* RFC 4851, Section 4.2.9 - Request-Action TLV */
86  be16 tlv_type;
87  be16 length;
88  be16 action;
89 } STRUCT_PACKED;
90 
91 /* RFC 5422, Section 4.2.6 - PAC-Type TLV */
93  be16 tlv_type; /* PAC_TYPE_PAC_TYPE */
94  be16 length;
95  be16 pac_type;
96 } STRUCT_PACKED;
97 
98 #ifdef _MSC_VER
99 #pragma pack(pop)
100 #endif /* _MSC_VER */
101 
102 #define EAP_TLV_CRYPTO_BINDING_SUBTYPE_REQUEST 0
103 #define EAP_TLV_CRYPTO_BINDING_SUBTYPE_RESPONSE 1
104 
105 #define EAP_TLV_ACTION_PROCESS_TLV 1
106 #define EAP_TLV_ACTION_NEGOTIATE_EAP 2
107 
108 #endif /* EAP_TLV_COMMON_H */
Definition: eap_tlv_common.h:50
Definition: eap_tlv_common.h:85
Definition: eap_tlv_common.h:76
Definition: eap_tlv_common.h:57
Definition: eap_tlv_common.h:65
Definition: eap_tlv_common.h:43
Definition: eap_tlv_common.h:92
Definition: eap_tlv_common.h:38