2 * Routines for TEAP (Tunnel Extensible Authentication Protocol)
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
14 #include <epan/packet.h>
15 #include <epan/expert.h>
16 #include <epan/proto_data.h>
18 void proto_register_teap(void);
19 void proto_reg_handoff_teap(void);
21 static int proto_teap
;
24 static int ett_teap_tlv
;
25 static int ett_pac_attr_tlv
;
27 static expert_field ei_teap_bad_length
;
29 static dissector_handle_t teap_handle
;
31 static dissector_handle_t eap_handle
;
37 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
38 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
39 |M|R| TLV Type | Length |
40 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
42 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
45 #define TEAP_TLV_MANDATORY 0x8000
46 #define TEAP_TLV_RESERVED 0x4000
47 #define TEAP_TLV_TYPE 0x3FFF
49 #define TEAP_CRYPTO_FLAGS 0xF0
50 #define TEAP_CRYPTO_SUBTYPE 0x0F
52 #define TEAP_UNASSIGNED 0
53 #define TEAP_AUTHORITY_ID 1
54 #define TEAP_IDENTITY 2
58 #define TEAP_CHANNEL_BINDING 6
59 #define TEAP_VENDOR_SPECIFIC 7
60 #define TEAP_REQUEST_ACTION 8
61 #define TEAP_EAP_PAYLOAD 9
62 #define TEAP_INTERMEDIATE_RESULT 10
64 #define TEAP_CRYPTO_BINDING 12
65 #define TEAP_BASIC_PWD_AUTH_REQUEST 13
66 #define TEAP_BASIC_PWD_AUTH_RESPONSE 14
68 #define TEAP_PKCS10 16
69 #define TEAP_TRUSTED_SERVER_ROOT 17
71 static const value_string teap_tlv_type_vals
[] = {
72 { TEAP_UNASSIGNED
, "Unassigned" },
73 { TEAP_AUTHORITY_ID
, "Authority-ID" },
74 { TEAP_IDENTITY
, "Identity-Type" },
75 { TEAP_RESULT
, "Result" },
77 { TEAP_ERROR
, "Error" },
78 { TEAP_CHANNEL_BINDING
, "Channel-Binding" },
79 { TEAP_VENDOR_SPECIFIC
, "Vendor-Specific" },
80 { TEAP_REQUEST_ACTION
, "Request-Action" },
81 { TEAP_EAP_PAYLOAD
, "EAP-Payload" },
82 { TEAP_INTERMEDIATE_RESULT
, "Intermediate-Result" },
84 { TEAP_CRYPTO_BINDING
, "Crypto-Binding" },
85 { TEAP_BASIC_PWD_AUTH_REQUEST
, "Basic-Password-Auth-Req" },
86 { TEAP_BASIC_PWD_AUTH_RESPONSE
, "Basic-Password-Auth-Resp" },
87 { TEAP_PKCS7
, "PKCS#7" },
88 { TEAP_PKCS10
, "PKCS#10" },
89 { TEAP_TRUSTED_SERVER_ROOT
, "Trusted-Server-Root" },
93 static const value_string teap_identity_vals
[] = {
99 static const value_string teap_status_vals
[] = {
105 static const value_string teap_request_action_status_vals
[] = {
111 static const value_string teap_request_action_action_vals
[] = {
112 { 1, "Process-TLV" },
113 { 2, "Negotiate-EAP" },
117 #define FLAG_EMSK_PRESENT 1
118 #define FLAG_MSK_PRESENT 2
119 #define FLAG_BOTH_PRESENT 3
121 static const value_string teap_crypto_flags_vals
[] = {
122 { FLAG_EMSK_PRESENT
, "EMSK Compound MAC is present" },
123 { FLAG_MSK_PRESENT
, "MSK Compound MAC is present" },
124 { FLAG_BOTH_PRESENT
, "Both EMSK and MSK Compound MAC are present" },
128 static const value_string teap_crypto_subtype_vals
[] = {
129 { 0, "Binding Request" },
130 { 1, "Binding Response" },
134 static const value_string teap_error_code_vals
[] = {
135 { 1, "User account expires soon" },
136 { 2, "User account credential expires soon" },
137 { 3, "User account authorizations change soon" },
138 { 4, "Clock skew detected" },
139 { 5, "Contact administrator" },
140 { 6, "User account credentials change required" },
141 { 1001, "Inner Method Error" },
142 { 1002, "Unspecified authentication infrastructure problem" },
143 { 1003, "Unspecified authentication failure" },
144 { 1004, "Unspecified authorization failure" },
145 { 1005, "User account credentials unavailable" },
146 { 1006, "User account expired" },
147 { 1007, "User account locked: try again later" },
148 { 1008, "User account locked: admin intervention required" },
149 { 1009, "Authentication infrastructure unavailable" },
150 { 1010, "Authentication infrastructure not trusted" },
151 { 1011, "Clock skew too great" },
152 { 1012, "Invalid inner realm" },
153 { 1013, "Token out of sync: administrator intervention required" },
154 { 1014, "Token out of sync: PIN change required" },
155 { 1015, "Token revoked" },
156 { 1016, "Tokens exhausted" },
157 { 1017, "Challenge expired" },
158 { 1018, "Challenge algorithm mismatch" },
159 { 1019, "Client certificate not supplied" },
160 { 1020, "Client certificate rejected" },
161 { 1021, "Realm mismatch between inner and outer identity" },
162 { 1022, "Unsupported Algorithm In Certificate Signing Request" },
163 { 1023, "Unsupported Extension In Certificate Signing Request" },
164 { 1024, "Bad Identity In Certificate Signing Request" },
165 { 1025, "Bad Certificate Signing Request" },
166 { 1026, "Internal CA Error" },
167 { 1027, "General PKI Error" },
168 { 1028, "Inner method's channel-binding data required but not supplied" },
169 { 1029, "Inner method's channel-binding data did not include required information" },
170 { 1030, "Inner method's channel binding failed" },
171 { 1031, "User account credentials incorrect [USAGE NOT RECOMMENDED]" },
172 { 2001, "Tunnel Compromise Error" },
173 { 2002, "Unexpected TLVs Exchanged" },
179 #define PAC_LIFETIME 3
182 #define PAC_RESERVED 6
183 #define PAC_A_ID_INFO 7
188 static const value_string pac_attr_type_vals
[] = {
189 { PAC_KEY
, "PAC-Key" },
190 { PAC_OPAQUE
, "PAC-Opaque" },
191 { PAC_LIFETIME
, "PAC-Lifetime" },
192 { PAC_A_ID
, "A-ID" },
193 { PAC_I_ID
, "I-ID" },
194 { PAC_RESERVED
, "Reserved" },
195 { PAC_A_ID_INFO
, "A-ID-Info" },
196 { PAC_ACK
, "PAC-Acknowledgement" },
197 { PAC_INFO
, "PAC-Info" },
198 { PAC_TYPE
, "PAC-Type" },
202 static const value_string pac_result_vals
[] = {
208 static const value_string pac_type_vals
[] = {
213 static int hf_teap_tlv_mandatory
;
214 static int hf_teap_tlv_reserved
;
215 static int hf_teap_tlv_type
;
216 static int hf_teap_tlv_len
;
217 static int hf_teap_tlv_val
;
218 static int hf_teap_auth_id
;
219 static int hf_teap_identity
;
220 static int hf_teap_status
;
221 static int hf_teap_vendor_id
;
222 static int hf_teap_request_action_status
;
223 static int hf_teap_request_action_action
;
224 static int hf_teap_crypto_reserved
;
225 static int hf_teap_crypto_version
;
226 static int hf_teap_crypto_rcv_version
;
227 static int hf_teap_crypto_flags
;
228 static int hf_teap_crypto_subtype
;
229 static int hf_teap_crypto_nonce
;
230 static int hf_teap_crypto_emsk
;
231 static int hf_teap_crypto_msk
;
232 static int hf_teap_nak_type
;
233 static int hf_teap_error_code
;
234 static int hf_teap_prompt
;
235 static int hf_teap_user_len
;
236 static int hf_teap_username
;
237 static int hf_teap_pass_len
;
238 static int hf_teap_password
;
240 static int hf_pac_attr_type
;
241 static int hf_pac_attr_pac_key
;
242 static int hf_pac_attr_pac_opaque
;
243 static int hf_pac_attr_pac_lifetime
;
244 static int hf_pac_attr_pac_a_id
;
245 static int hf_pac_attr_pac_i_id
;
246 static int hf_pac_attr_pac_reserved
;
247 static int hf_pac_attr_pac_a_id_info
;
248 static int hf_pac_attr_pac_result
;
249 static int hf_pac_attr_pac_type
;
250 static int hf_pac_attr_val
;
253 dissect_teap(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
);
256 dissect_teap_tlv_pac(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, int offset
, uint16_t len
);
259 // NOLINTNEXTLINE(misc-no-recursion)
260 dissect_pac_attr(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, int offset
)
264 int start_offset
= offset
;
266 type
= tvb_get_uint16(tvb
, offset
, ENC_BIG_ENDIAN
);
267 len
= tvb_get_uint16(tvb
, offset
+ 2, ENC_BIG_ENDIAN
);
269 proto_tree_add_item(tree
, hf_pac_attr_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
272 proto_tree_add_item(tree
, hf_teap_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
277 proto_tree_add_item(tree
, hf_pac_attr_pac_key
, tvb
, offset
, len
, ENC_NA
);
282 proto_tree_add_item(tree
, hf_pac_attr_pac_opaque
, tvb
, offset
, len
, ENC_NA
);
287 proto_tree_add_item(tree
, hf_pac_attr_pac_lifetime
, tvb
, offset
, 4, ENC_NA
);
292 proto_tree_add_item(tree
, hf_pac_attr_pac_a_id
, tvb
, offset
, len
, ENC_ASCII
| ENC_NA
);
297 proto_tree_add_item(tree
, hf_pac_attr_pac_i_id
, tvb
, offset
, len
, ENC_ASCII
| ENC_NA
);
302 proto_tree_add_item(tree
, hf_pac_attr_pac_reserved
, tvb
, offset
, len
, ENC_NA
);
307 proto_tree_add_item(tree
, hf_pac_attr_pac_a_id_info
, tvb
, offset
, len
, ENC_ASCII
| ENC_NA
);
312 proto_tree_add_item(tree
, hf_pac_attr_pac_result
, tvb
, offset
, len
, ENC_NA
);
317 offset
+= dissect_teap_tlv_pac(tvb
, pinfo
, tree
, offset
, len
);
321 proto_tree_add_item(tree
, hf_pac_attr_pac_type
, tvb
, offset
, len
, ENC_NA
);
326 proto_tree_add_item(tree
, hf_pac_attr_val
, tvb
, offset
, len
, ENC_NA
);
330 return offset
- start_offset
;
334 // NOLINTNEXTLINE(misc-no-recursion)
335 dissect_teap_tlv_pac(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, int offset
, uint16_t len
)
337 int start_offset
= offset
;
339 increment_dissection_depth(pinfo
);
340 while (offset
- start_offset
< len
) {
341 offset
+= dissect_pac_attr(tvb
, pinfo
, tree
, offset
);
343 decrement_dissection_depth(pinfo
);
344 return offset
- start_offset
;
348 // NOLINTNEXTLINE(misc-no-recursion)
349 dissect_teap_tlv(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, int offset
, bool top
)
351 int start_offset
= offset
;
354 proto_tree
*tlv_tree
;
358 type
= tvb_get_uint16(tvb
, offset
, ENC_BIG_ENDIAN
) & TEAP_TLV_TYPE
;
359 len
= tvb_get_uint16(tvb
, offset
+ 2, ENC_BIG_ENDIAN
);
361 tlv_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, 4 + len
,
362 ett_teap_tlv
, NULL
, "TLV %s (%u): ",
363 val_to_str_const(type
, teap_tlv_type_vals
, "Unknown"), type
);
365 proto_tree_add_item(tlv_tree
, hf_teap_tlv_mandatory
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
366 proto_tree_add_item(tlv_tree
, hf_teap_tlv_reserved
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
367 proto_tree_add_item(tlv_tree
, hf_teap_tlv_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
370 proto_tree_add_item(tlv_tree
, hf_teap_tlv_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
374 col_add_str(pinfo
->cinfo
, COL_INFO
,
375 val_to_str(type
, teap_tlv_type_vals
, "Unknown TLV (0x%02X)"));
378 case TEAP_AUTHORITY_ID
:
379 proto_tree_add_item(tlv_tree
, hf_teap_auth_id
, tvb
, offset
, len
, ENC_NA
);
384 proto_tree_add_item(tlv_tree
, hf_teap_identity
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
389 proto_tree_add_item(tlv_tree
, hf_teap_status
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
394 proto_tree_add_item(tlv_tree
, hf_teap_vendor_id
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
396 proto_tree_add_item(tlv_tree
, hf_teap_nak_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
400 next_tvb
= tvb_new_subset_length(tvb
, offset
, len
- 6);
401 increment_dissection_depth(pinfo
);
402 offset
+= dissect_teap(next_tvb
, pinfo
, tlv_tree
, NULL
);
403 decrement_dissection_depth(pinfo
);
409 proto_tree_add_item(tlv_tree
, hf_teap_error_code
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
413 case TEAP_VENDOR_SPECIFIC
:
414 proto_tree_add_item(tlv_tree
, hf_teap_vendor_id
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
418 case TEAP_REQUEST_ACTION
:
419 proto_tree_add_item(tlv_tree
, hf_teap_request_action_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
421 proto_tree_add_item(tlv_tree
, hf_teap_request_action_action
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
425 next_tvb
= tvb_new_subset_length(tvb
, offset
, len
- 2);
426 offset
+= dissect_teap(next_tvb
, pinfo
, tlv_tree
, NULL
);
431 case TEAP_EAP_PAYLOAD
:
433 uint16_t eaplen
= tvb_get_uint16(tvb
, offset
+ 2, ENC_BIG_ENDIAN
);
435 next_tvb
= tvb_new_subset_length(tvb
, offset
, eaplen
);
436 call_dissector(eap_handle
, next_tvb
, pinfo
, tlv_tree
);
440 next_tvb
= tvb_new_subset_length(tvb
, offset
, len
- eaplen
);
441 offset
+= dissect_teap(next_tvb
, pinfo
, tlv_tree
, NULL
);
446 case TEAP_INTERMEDIATE_RESULT
:
447 proto_tree_add_item(tlv_tree
, hf_teap_status
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
451 next_tvb
= tvb_new_subset_length(tvb
, offset
, len
- 2);
452 offset
+= dissect_teap(next_tvb
, pinfo
, tlv_tree
, NULL
);
458 offset
+= dissect_teap_tlv_pac(tvb
, pinfo
, tlv_tree
, offset
, len
);
461 case TEAP_CRYPTO_BINDING
:
464 proto_tree_add_item(tlv_tree
, hf_teap_crypto_reserved
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
466 proto_tree_add_item(tlv_tree
, hf_teap_crypto_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
468 proto_tree_add_item(tlv_tree
, hf_teap_crypto_rcv_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
470 flags
= (tvb_get_uint8(tvb
, offset
) & TEAP_CRYPTO_FLAGS
) >> 4;
471 proto_tree_add_item(tlv_tree
, hf_teap_crypto_flags
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
472 proto_tree_add_item(tlv_tree
, hf_teap_crypto_subtype
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
474 proto_tree_add_item(tlv_tree
, hf_teap_crypto_nonce
, tvb
, offset
, 32, ENC_NA
);
476 if (flags
== FLAG_EMSK_PRESENT
|| flags
== FLAG_BOTH_PRESENT
) {
477 proto_tree_add_item(tlv_tree
, hf_teap_crypto_emsk
, tvb
, offset
, 20, ENC_NA
);
480 if (flags
== FLAG_MSK_PRESENT
|| flags
== FLAG_BOTH_PRESENT
) {
481 proto_tree_add_item(tlv_tree
, hf_teap_crypto_msk
, tvb
, offset
, 20, ENC_NA
);
487 case TEAP_BASIC_PWD_AUTH_REQUEST
:
489 proto_tree_add_item(tlv_tree
, hf_teap_prompt
, tvb
, offset
, len
, ENC_ASCII
| ENC_NA
);
494 case TEAP_BASIC_PWD_AUTH_RESPONSE
:
497 auth_len
= tvb_get_uint8(tvb
, offset
);
498 proto_tree_add_item(tlv_tree
, hf_teap_user_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
500 proto_tree_add_item(tlv_tree
, hf_teap_username
, tvb
, offset
, auth_len
, ENC_ASCII
| ENC_NA
);
503 auth_len
= tvb_get_uint8(tvb
, offset
);
504 proto_tree_add_item(tlv_tree
, hf_teap_pass_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
506 proto_tree_add_item(tlv_tree
, hf_teap_password
, tvb
, offset
, auth_len
, ENC_ASCII
| ENC_NA
);
511 case TEAP_CHANNEL_BINDING
:
512 case TEAP_TRUSTED_SERVER_ROOT
:
516 ti_len
= proto_tree_add_item(tlv_tree
, hf_teap_tlv_val
, tvb
, offset
, len
, ENC_NA
);
517 if ((unsigned)len
+ 4 > tvb_reported_length(tvb
)) {
518 expert_add_info(pinfo
, ti_len
, &ei_teap_bad_length
);
524 return offset
- start_offset
;
528 // NOLINTNEXTLINE(misc-no-recursion)
529 dissect_teap(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
532 proto_tree
*teap_tree
;
535 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "TEAP");
536 col_clear(pinfo
->cinfo
, COL_INFO
);
538 ti
= proto_tree_add_item(tree
, proto_teap
, tvb
, 0, tvb_captured_length(tvb
), ENC_NA
);
539 teap_tree
= proto_item_add_subtree(ti
, ett_teap
);
541 while (offset
< (int)tvb_captured_length(tvb
)) {
542 offset
+= dissect_teap_tlv(tvb
, pinfo
, teap_tree
, offset
, offset
== 0);
545 return tvb_captured_length(tvb
);
549 proto_register_teap(void)
551 static hf_register_info hf
[] = {
552 { &hf_teap_tlv_mandatory
, {
553 "Mandatory", "teap.tlv.mandatory",
554 FT_BOOLEAN
, 16, NULL
, TEAP_TLV_MANDATORY
,
557 { &hf_teap_tlv_reserved
, {
558 "Reserved", "teap.tlv.reserved",
559 FT_UINT16
, BASE_DEC
, NULL
, TEAP_TLV_RESERVED
,
562 { &hf_teap_tlv_type
, {
563 "Type", "teap.tlv.type",
564 FT_UINT16
, BASE_DEC
, VALS(teap_tlv_type_vals
), TEAP_TLV_TYPE
,
567 { &hf_teap_tlv_len
, {
568 "Length", "teap.tlv.len",
569 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
572 { &hf_teap_auth_id
, {
573 "ID", "teap.authority-id",
574 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
577 { &hf_teap_identity
, {
578 "Identity", "teap.identity",
579 FT_UINT16
, BASE_DEC
, VALS(teap_identity_vals
), 0x0,
583 "Status", "teap.status",
584 FT_UINT16
, BASE_DEC
, VALS(teap_status_vals
), 0x0,
587 { &hf_teap_vendor_id
, {
588 "Vendor-Id", "teap.vendor-id",
589 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
592 { &hf_teap_crypto_reserved
, {
593 "Reserved", "teap.crypto.reserved",
594 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
597 { &hf_teap_crypto_version
, {
598 "Version", "teap.crypto.version",
599 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
602 { &hf_teap_crypto_rcv_version
, {
603 "Received Version", "teap.crypto.received-version",
604 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
607 { &hf_teap_crypto_flags
, {
608 "Flags", "teap.crypto.flags",
609 FT_UINT8
, BASE_DEC
, VALS(teap_crypto_flags_vals
), TEAP_CRYPTO_FLAGS
,
612 { &hf_teap_crypto_subtype
, {
613 "Subtype", "teap.crypto.subtype",
614 FT_UINT8
, BASE_DEC
, VALS(teap_crypto_subtype_vals
), TEAP_CRYPTO_SUBTYPE
,
617 { &hf_teap_crypto_nonce
, {
618 "Nonce", "teap.crypto.nonce",
619 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
622 { &hf_teap_crypto_emsk
, {
623 "EMSK Compound MAC", "teap.crypto.emsk",
624 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
627 { &hf_teap_crypto_msk
, {
628 "MSK Compound MAC", "teap.crypto.msk",
629 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
632 { &hf_teap_nak_type
, {
633 "NAK-Type", "teap.nak-type",
634 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
637 { &hf_teap_error_code
, {
638 "Error-Code", "teap.error-code",
639 FT_UINT32
, BASE_DEC
, VALS(teap_error_code_vals
), 0x0,
642 { &hf_teap_request_action_action
, {
643 "Action", "teap.request-action.action",
644 FT_UINT8
, BASE_DEC
, VALS(teap_request_action_action_vals
), 0x0,
647 { &hf_teap_request_action_status
, {
648 "Status", "teap.request-action.status",
649 FT_UINT8
, BASE_DEC
, VALS(teap_request_action_status_vals
), 0x0,
653 "Prompt", "teap.prompt",
654 FT_STRING
, BASE_NONE
, NULL
, 0x0,
657 { &hf_teap_user_len
, {
658 "Userlen", "teap.user_len",
659 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
662 { &hf_teap_username
, {
663 "Username", "teap.username",
664 FT_STRING
, BASE_NONE
, NULL
, 0x0,
667 { &hf_teap_pass_len
, {
668 "Passlen", "teap.pass_len",
669 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
672 { &hf_teap_password
, {
673 "Password", "teap.password",
674 FT_STRING
, BASE_NONE
, NULL
, 0x0,
677 { &hf_teap_tlv_val
, {
678 "Value", "teap.tlv.val",
679 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
682 { &hf_pac_attr_type
, {
683 "Type", "teap.pac.type",
684 FT_UINT16
, BASE_DEC
, VALS(pac_attr_type_vals
), 0x0,
687 { &hf_pac_attr_pac_key
, {
688 "Key", "teap.pac.key",
689 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
692 { &hf_pac_attr_pac_opaque
, {
693 "Opaque", "teap.pac.opaque",
694 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
697 { &hf_pac_attr_pac_lifetime
, {
698 "Lifetime", "teap.pac.lifetime",
699 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
702 { &hf_pac_attr_pac_a_id
, {
703 "A-ID", "teap.pac.a-id",
704 FT_STRING
, BASE_NONE
, NULL
, 0x0,
707 { &hf_pac_attr_pac_i_id
, {
708 "I-ID", "teap.pac.i-id",
709 FT_STRING
, BASE_NONE
, NULL
, 0x0,
712 { &hf_pac_attr_pac_reserved
, {
713 "Reserved", "teap.pac.reserved",
714 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
717 { &hf_pac_attr_pac_a_id_info
, {
718 "A-ID-Info", "teap.pac.a-id-info",
719 FT_STRING
, BASE_NONE
, NULL
, 0x0,
722 { &hf_pac_attr_pac_result
, {
723 "Type", "teap.pac.result",
724 FT_UINT16
, BASE_DEC
, VALS(pac_result_vals
), 0x0,
727 { &hf_pac_attr_pac_type
, {
728 "Type", "teap.pac.pac-type",
729 FT_UINT16
, BASE_DEC
, VALS(pac_type_vals
), 0x0,
732 { &hf_pac_attr_val
, {
733 "Value", "teap.pac.val",
734 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
738 static int *ett
[] = {
743 static ei_register_info ei
[] = {
744 { &ei_teap_bad_length
, { "teap.bad_length", PI_PROTOCOL
, PI_WARN
, "Bad length (too large)", EXPFILL
}},
747 expert_module_t
* expert_teap
;
749 proto_teap
= proto_register_protocol("Tunnel Extensible Authentication Protocol",
751 proto_register_field_array(proto_teap
, hf
, array_length(hf
));
752 proto_register_subtree_array(ett
, array_length(ett
));
753 expert_teap
= expert_register_protocol(proto_teap
);
754 expert_register_field_array(expert_teap
, ei
, array_length(ei
));
756 teap_handle
= register_dissector("teap", dissect_teap
, proto_teap
);
760 proto_reg_handoff_teap(void)
762 eap_handle
= find_dissector_add_dependency("eap", proto_teap
);
770 * indent-tabs-mode: nil
773 * ex: set shiftwidth=2 tabstop=8 expandtab:
774 * :indentSize=2:tabSize=8:noTabs=true: