2 * Routines for PacketCable (PKTC) Kerberized Key Management and
3 * PacketCable (PKTC) MTA FQDN packet disassembly
6 * [1] PacketCable 1.0 Security Specification, PKT-SP-SEC-I11-040730, July 30,
7 * 2004, Cable Television Laboratories, Inc., http://www.PacketCable.com/
14 * Wireshark - Network traffic analyzer
15 * By Gerald Combs <gerald@wireshark.org>
16 * Copyright 1998 Gerald Combs
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License
20 * as published by the Free Software Foundation; either version 2
21 * of the License, or (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
37 #include <epan/packet.h>
38 #include <epan/asn1.h>
39 #include "packet-pktc.h"
40 #include "packet-kerberos.h"
41 #include "packet-snmp.h"
43 #define PKTC_PORT 1293
44 #define PKTC_MTAFQDN_PORT 2246
46 static int proto_pktc = -1;
47 static gint hf_pktc_app_spec_data = -1;
48 static gint hf_pktc_list_of_ciphersuites = -1;
49 static gint hf_pktc_list_of_ciphersuites_len = -1;
50 static gint hf_pktc_kmmid = -1;
51 static gint hf_pktc_doi = -1;
52 static gint hf_pktc_version_major = -1;
53 static gint hf_pktc_version_minor = -1;
54 static gint hf_pktc_server_nonce = -1;
55 static gint hf_pktc_server_principal = -1;
56 static gint hf_pktc_timestamp = -1;
57 static gint hf_pktc_snmpEngineID_len = -1;
58 static gint hf_pktc_snmpEngineID = -1;
59 static gint hf_pktc_snmpEngineBoots = -1;
60 static gint hf_pktc_snmpEngineTime = -1;
61 static gint hf_pktc_usmUserName_len = -1;
62 static gint hf_pktc_usmUserName = -1;
63 static gint hf_pktc_ipsec_spi = -1;
64 static gint hf_pktc_snmpAuthenticationAlgorithm = -1;
65 static gint hf_pktc_snmpEncryptionTransformID = -1;
66 static gint hf_pktc_ipsecAuthenticationAlgorithm = -1;
67 static gint hf_pktc_ipsecEncryptionTransformID = -1;
68 static gint hf_pktc_reestablish_flag = -1;
69 static gint hf_pktc_ack_required_flag = -1;
70 static gint hf_pktc_sha1_hmac = -1;
71 static gint hf_pktc_sec_param_lifetime = -1;
72 static gint hf_pktc_grace_period = -1;
74 static gint hf_pktc_mtafqdn_msgtype = -1;
75 static gint hf_pktc_mtafqdn_enterprise = -1;
76 static gint hf_pktc_mtafqdn_version = -1;
77 static gint hf_pktc_mtafqdn_mac = -1;
78 static gint hf_pktc_mtafqdn_pub_key_hash = -1;
79 static gint hf_pktc_mtafqdn_manu_cert_revoked = -1;
80 static gint hf_pktc_mtafqdn_fqdn = -1;
81 static gint hf_pktc_mtafqdn_ip = -1;
83 static gint ett_pktc = -1;
84 static gint ett_pktc_app_spec_data = -1;
85 static gint ett_pktc_list_of_ciphersuites = -1;
86 static gint ett_pktc_engineid = -1;
88 static gint ett_pktc_mtafqdn = -1;
90 #define KMMID_WAKEUP 0x01
91 #define KMMID_AP_REQUEST 0x02
92 #define KMMID_AP_REPLY 0x03
93 #define KMMID_SEC_PARAM_REC 0x04
94 #define KMMID_REKEY 0x05
95 #define KMMID_ERROR_REPLY 0x06
96 static const value_string kmmid_types[] = {
97 { KMMID_WAKEUP , "Wake Up" },
98 { KMMID_AP_REQUEST , "AP Request" },
99 { KMMID_AP_REPLY , "AP Reply" },
100 { KMMID_SEC_PARAM_REC , "Security Parameter Recovered" },
101 { KMMID_REKEY , "Rekey" },
102 { KMMID_ERROR_REPLY , "Error Reply" },
108 #define SNMPv3_NULL 0x20
109 #define SNMPv3_DES 0x21
110 #define SNMPv3_HMAC_MD5 0x21
111 #define SNMPv3_HMAC_SHA1 0x22
112 #define ESP_3DES 0x03
114 #define ESP_IDEA 0x05
115 #define ESP_CAST 0x06
116 #define ESP_BLOWFISH 0x07
117 #define ESP_NULL 0x0b
119 #define HMAC_MD5_96 0x01
120 #define HMAC_SHA1_96 0x02
123 /* Domain of Interpretation */
124 static const value_string doi_types[] = {
125 { DOI_IPSEC , "IPsec" },
126 { DOI_SNMPv3 , "SNMPv3" },
130 /* SNMPv3 ciphersuites */
131 static const value_string snmp_authentication_algorithm_vals[] = {
132 { SNMPv3_HMAC_MD5 , "HMAC-MD5" },
133 { SNMPv3_HMAC_SHA1 , "HMAC-SHA1" },
136 static const value_string snmp_transform_id_vals[] = {
137 { SNMPv3_NULL , "NULL" }, /* no encryption */
138 { SNMPv3_DES , "DES" },
142 /* IPsec ciphersuites */
143 static const value_string ipsec_transform_id_vals[] = {
144 { ESP_3DES , "3DES" },
146 { ESP_IDEA , "IDEA" },
147 { ESP_CAST , "CAST" },
148 { ESP_BLOWFISH , "BLOWFISH" },
149 { ESP_NULL , "NULL" }, /* no encryption, RFC 2410 */
150 { ESP_AES , "AES-128" },
154 static const value_string ipsec_authentication_algorithm_vals[] = {
155 { HMAC_MD5_96 , "HMAC-MD5-96" }, /* RFC 2403 */
156 { HMAC_SHA1_96 , "HMAC-SHA-1-96" }, /* RFC 2404 */
160 /* MTA FQDN Message Types */
161 #define PKTC_MTAFQDN_REQ 0x01
162 #define PKTC_MTAFQDN_REP 0x02
163 #define PKTC_MTAFQDN_ERR 0x03
164 static const value_string pktc_mtafqdn_msgtype_vals[] = {
165 { PKTC_MTAFQDN_REQ, "MTA FQDN Request" },
166 { PKTC_MTAFQDN_REP, "MTA FQDN Reply" },
167 { PKTC_MTAFQDN_ERR, "MTA FQDN Error Reply" },
172 dissect_pktc_app_specific_data(packet_info *pinfo _U_, proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 doi, guint8 kmmid)
174 int old_offset=offset;
175 proto_tree *tree = NULL;
176 proto_tree *engineid_tree = NULL;
177 proto_item *item = NULL;
178 proto_item *engineid_item = NULL;
182 item = proto_tree_add_item(parent_tree, hf_pktc_app_spec_data, tvb, offset, -1, FALSE);
183 tree = proto_item_add_subtree(item, ett_pktc_app_spec_data);
189 /* we dont distinguish between manager and agent engineid.
190 feel free to add separation for this if it is imporant enough
192 case KMMID_AP_REQUEST:
194 /* snmpEngineID Length */
195 len=tvb_get_guint8(tvb, offset);
196 proto_tree_add_uint(tree, hf_pktc_snmpEngineID_len, tvb, offset, 1, len);
200 engineid_item = proto_tree_add_item(tree, hf_pktc_snmpEngineID, tvb, offset, len, FALSE);
201 engineid_tree = proto_item_add_subtree(engineid_item, ett_pktc_engineid);
202 dissect_snmp_engineid(engineid_tree, tvb, offset, len);
206 proto_tree_add_item(tree, hf_pktc_snmpEngineBoots, tvb, offset, 4, FALSE);
210 proto_tree_add_item(tree, hf_pktc_snmpEngineTime, tvb, offset, 4, FALSE);
213 /* usmUserName Length */
214 len=tvb_get_guint8(tvb, offset);
215 proto_tree_add_uint(tree, hf_pktc_usmUserName_len, tvb, offset, 1, len);
219 proto_tree_add_item(tree, hf_pktc_usmUserName, tvb, offset, len, FALSE);
224 proto_tree_add_text(tree, tvb, offset, 1, "Unknown KMMID");
225 tvb_get_guint8(tvb, 9999); /* bail out and inform user we cant dissect the packet */
230 /* we dont distinguish between SPIs for inbound Security Associations
231 of the client (AP-REQ) vs. server (AP-REP, REKEY). Feel free to add
232 separation for this if it is imporant enough for you. */
233 case KMMID_AP_REQUEST:
236 /* Security Parameter Index (SPI) */
237 proto_tree_add_item(tree, hf_pktc_ipsec_spi, tvb, offset, 4, FALSE);
242 proto_tree_add_text(tree, tvb, offset, 1, "Unknown KMMID");
243 tvb_get_guint8(tvb, 9999); /* bail out and inform user we cant dissect the packet */
247 proto_tree_add_text(tree, tvb, offset, 1, "Unknown DOI");
248 tvb_get_guint8(tvb, 9999); /* bail out and inform user we cant dissect the packet */
251 proto_item_set_len(item, offset-old_offset);
256 dissect_pktc_list_of_ciphersuites(packet_info *pinfo _U_, proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 doi)
258 int old_offset=offset;
259 proto_tree *tree = NULL;
260 proto_item *item = NULL, *hidden_item;
264 item = proto_tree_add_item(parent_tree, hf_pktc_list_of_ciphersuites, tvb, offset, -1, FALSE);
265 tree = proto_item_add_subtree(item, ett_pktc_list_of_ciphersuites);
269 /* number of ciphersuites */
270 len=tvb_get_guint8(tvb, offset);
272 proto_item_append_text(tree, " (%d):", len);
274 hidden_item = proto_tree_add_uint(tree, hf_pktc_list_of_ciphersuites_len, tvb, offset, 1, len);
275 PROTO_ITEM_SET_HIDDEN(hidden_item);
281 /* SNMPv3 authentication algorithm */
282 proto_tree_add_item(tree, hf_pktc_snmpAuthenticationAlgorithm, tvb, offset, 1, FALSE);
283 proto_item_append_text(tree, " %s", val_to_str(tvb_get_guint8(tvb, offset), snmp_authentication_algorithm_vals, "%0x"));
286 /* SNMPv3 encryption transform id */
287 proto_tree_add_item(tree, hf_pktc_snmpEncryptionTransformID, tvb, offset, 1, FALSE);
288 proto_item_append_text(tree, "/%s", val_to_str(tvb_get_guint8(tvb, offset), snmp_transform_id_vals, "%0x"));
294 /* IPsec authentication algorithm */
295 proto_tree_add_item(tree, hf_pktc_ipsecAuthenticationAlgorithm, tvb, offset, 1, FALSE);
296 proto_item_append_text(tree, " %s", val_to_str(tvb_get_guint8(tvb, offset), ipsec_authentication_algorithm_vals, "%0x"));
299 /* IPsec encryption transform id */
300 proto_tree_add_item(tree, hf_pktc_ipsecEncryptionTransformID, tvb, offset, 1, FALSE);
301 proto_item_append_text(tree, "/%s", val_to_str(tvb_get_guint8(tvb, offset), ipsec_transform_id_vals, "%0x"));
306 proto_tree_add_text(tree, tvb, offset, 1, "Unknown DOI");
307 tvb_get_guint8(tvb, 9999); /* bail out and inform user we cant dissect the packet */
310 proto_item_set_len(item, offset-old_offset);
315 dissect_pktc_wakeup(proto_tree *tree, tvbuff_t *tvb, int offset)
321 snonce=tvb_get_ntohl(tvb, offset);
322 proto_tree_add_uint(tree, hf_pktc_server_nonce, tvb, offset, 4, snonce);
325 /* Server Kerberos Principal Identifier */
326 string_len=tvb_strsize(tvb, offset);
327 proto_tree_add_item(tree, hf_pktc_server_principal, tvb, offset, string_len, FALSE);
334 dissect_pktc_ap_request(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, guint8 doi)
339 /* AP Request kerberos blob */
340 pktc_tvb = tvb_new_subset_remaining(tvb, offset);
341 offset += dissect_kerberos_main(pktc_tvb, pinfo, tree, FALSE, NULL);
344 snonce=tvb_get_ntohl(tvb, offset);
345 proto_tree_add_uint(tree, hf_pktc_server_nonce, tvb, offset, 4, snonce);
348 /* app specific data */
349 offset=dissect_pktc_app_specific_data(pinfo, tree, tvb, offset, doi, KMMID_AP_REQUEST);
351 /* list of ciphersuites */
352 offset=dissect_pktc_list_of_ciphersuites(pinfo, tree, tvb, offset, doi);
354 /* re-establish flag */
355 proto_tree_add_item(tree, hf_pktc_reestablish_flag, tvb, offset, 1, FALSE);
359 proto_tree_add_item(tree, hf_pktc_sha1_hmac, tvb, offset, 20, FALSE);
366 dissect_pktc_ap_reply(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, guint8 doi)
370 /* AP Reply kerberos blob */
371 pktc_tvb = tvb_new_subset_remaining(tvb, offset);
372 offset += dissect_kerberos_main(pktc_tvb, pinfo, tree, FALSE, NULL);
374 /* app specific data */
375 offset=dissect_pktc_app_specific_data(pinfo, tree, tvb, offset, doi, KMMID_AP_REPLY);
377 /* selected ciphersuite */
378 offset=dissect_pktc_list_of_ciphersuites(pinfo, tree, tvb, offset, doi);
380 /* sec param lifetime */
381 proto_tree_add_uint_format(tree, hf_pktc_sec_param_lifetime, tvb, offset, 4,
382 tvb_get_ntohl(tvb, offset), "%s: %s",
383 proto_registrar_get_name(hf_pktc_sec_param_lifetime),
384 time_secs_to_str(tvb_get_ntohl(tvb, offset)));
388 proto_tree_add_item(tree, hf_pktc_grace_period, tvb, offset, 4, FALSE);
391 /* re-establish flag */
392 proto_tree_add_item(tree, hf_pktc_reestablish_flag, tvb, offset, 1, FALSE);
395 /* ack required flag */
396 proto_tree_add_item(tree, hf_pktc_ack_required_flag, tvb, offset, 1, FALSE);
400 proto_tree_add_item(tree, hf_pktc_sha1_hmac, tvb, offset, 20, FALSE);
407 dissect_pktc_sec_param_rec(proto_tree *tree, tvbuff_t *tvb, int offset)
409 /* sha-1 hmac of the subkey of the preceding AP-REP */
410 proto_tree_add_item(tree, hf_pktc_sha1_hmac, tvb, offset, 20, FALSE);
417 dissect_pktc_rekey(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, guint8 doi)
421 const guint8 *timestr;
424 snonce=tvb_get_ntohl(tvb, offset);
425 proto_tree_add_uint(tree, hf_pktc_server_nonce, tvb, offset, 4, snonce);
428 /* Server Kerberos Principal Identifier */
429 string_len=tvb_strsize(tvb, offset);
430 proto_tree_add_item(tree, hf_pktc_server_principal, tvb, offset, string_len, FALSE);
433 /* Timestamp: YYMMDDhhmmssZ */
434 /* They really came up with a two-digit year in late 1990s! =8o */
435 timestr=tvb_get_ptr(tvb, offset, 13);
436 proto_tree_add_string_format(tree, hf_pktc_timestamp, tvb, offset, 13, timestr,
437 "%s: %.2s-%.2s-%.2s %.2s:%.2s:%.2s",
438 proto_registrar_get_name(hf_pktc_timestamp),
439 timestr, timestr+2, timestr+4, timestr+6, timestr+8, timestr+10);
442 /* app specific data */
443 offset=dissect_pktc_app_specific_data(pinfo, tree, tvb, offset, doi, KMMID_REKEY);
445 /* list of ciphersuites */
446 offset=dissect_pktc_list_of_ciphersuites(pinfo, tree, tvb, offset, doi);
448 /* sec param lifetime */
449 proto_tree_add_item(tree, hf_pktc_sec_param_lifetime, tvb, offset, 4, FALSE);
453 proto_tree_add_item(tree, hf_pktc_grace_period, tvb, offset, 4, FALSE);
456 /* re-establish flag */
457 proto_tree_add_item(tree, hf_pktc_reestablish_flag, tvb, offset, 1, FALSE);
461 proto_tree_add_item(tree, hf_pktc_sha1_hmac, tvb, offset, 20, FALSE);
468 dissect_pktc_error_reply(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset)
473 pktc_tvb = tvb_new_subset_remaining(tvb, offset);
474 offset += dissect_kerberos_main(pktc_tvb, pinfo, tree, FALSE, NULL);
480 dissect_pktc_mtafqdn_krbsafeuserdata(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree)
482 int offset=0, string_len=0;
488 msgtype = tvb_get_guint8(tvb, offset);
489 proto_tree_add_uint(tree, hf_pktc_mtafqdn_msgtype, tvb, offset, 1, msgtype);
492 if (check_col(pinfo->cinfo, COL_INFO))
493 col_add_str(pinfo->cinfo, COL_INFO,
494 val_to_str(msgtype, pktc_mtafqdn_msgtype_vals, "MsgType %u"));
497 proto_tree_add_uint(tree, hf_pktc_mtafqdn_enterprise, tvb, offset, 4, tvb_get_ntohl(tvb, offset));
500 /* protocol version */
501 proto_tree_add_uint(tree, hf_pktc_mtafqdn_version, tvb, offset, 1, tvb_get_guint8(tvb, offset));
505 case PKTC_MTAFQDN_REQ:
506 /* MTA MAC address */
507 proto_tree_add_ether(tree, hf_pktc_mtafqdn_mac, tvb, offset, 6, tvb_get_ptr(tvb, offset, 6));
510 /* MTA pub key hash */
511 proto_tree_add_item(tree, hf_pktc_mtafqdn_pub_key_hash, tvb, offset, 20, FALSE);
514 /* manufacturer cert revocation time */
515 bignum = tvb_get_ntohl(tvb, offset);
517 proto_tree_add_time_format(tree, hf_pktc_mtafqdn_manu_cert_revoked, tvb, offset, 4,
519 proto_registrar_get_name(hf_pktc_mtafqdn_manu_cert_revoked),
520 (bignum==0) ? "not revoked" : abs_time_secs_to_str(bignum, ABSOLUTE_TIME_LOCAL, TRUE));
523 case PKTC_MTAFQDN_REP:
525 string_len = tvb_length_remaining(tvb, offset) - 4;
527 THROW(ReportedBoundsError);
528 proto_tree_add_item(tree, hf_pktc_mtafqdn_fqdn, tvb, offset, string_len, FALSE);
532 tvb_memcpy(tvb, (guint8 *)&bignum, offset, sizeof(bignum));
533 proto_tree_add_ipv4(tree, hf_pktc_mtafqdn_ip, tvb, offset, 4, bignum);
541 static kerberos_callbacks cb[] = {
542 { KRB_CBTAG_SAFE_USER_DATA, dissect_pktc_mtafqdn_krbsafeuserdata },
547 dissect_pktc_mtafqdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
550 proto_tree *pktc_mtafqdn_tree = NULL;
551 proto_item *item = NULL;
552 tvbuff_t *pktc_mtafqdn_tvb;
554 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKTC");
557 item = proto_tree_add_item(tree, proto_pktc, tvb, 0, 0, FALSE);
558 pktc_mtafqdn_tree = proto_item_add_subtree(item, ett_pktc_mtafqdn);
561 if (check_col(pinfo->cinfo, COL_INFO)) {
562 col_add_fstr(pinfo->cinfo, COL_INFO, "MTA FQDN %s",
563 pinfo->srcport == pinfo->match_port ? "Reply":"Request");
568 pktc_mtafqdn_tvb = tvb_new_subset_remaining(tvb, offset);
569 offset += dissect_kerberos_main(pktc_mtafqdn_tvb, pinfo, pktc_mtafqdn_tree, FALSE, NULL);
572 pktc_mtafqdn_tvb = tvb_new_subset_remaining(tvb, offset);
573 offset += dissect_kerberos_main(pktc_mtafqdn_tvb, pinfo, pktc_mtafqdn_tree, FALSE, cb);
575 proto_item_set_len(item, offset);
580 dissect_pktc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
582 guint8 kmmid, doi, version;
584 proto_tree *pktc_tree = NULL;
585 proto_item *item = NULL, *hidden_item;
587 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKTC");
590 item = proto_tree_add_item(tree, proto_pktc, tvb, 0, 3, FALSE);
591 pktc_tree = proto_item_add_subtree(item, ett_pktc);
594 /* key management message id */
595 kmmid=tvb_get_guint8(tvb, offset);
596 proto_tree_add_uint(pktc_tree, hf_pktc_kmmid, tvb, offset, 1, kmmid);
599 /* domain of interpretation */
600 doi=tvb_get_guint8(tvb, offset);
601 proto_tree_add_uint(pktc_tree, hf_pktc_doi, tvb, offset, 1, doi);
605 version=tvb_get_guint8(tvb, offset);
606 proto_tree_add_text(pktc_tree, tvb, offset, 1, "Version: %d.%d", (version>>4)&0x0f, (version)&0x0f);
607 hidden_item = proto_tree_add_uint(pktc_tree, hf_pktc_version_major, tvb, offset, 1, (version>>4)&0x0f);
608 PROTO_ITEM_SET_HIDDEN(hidden_item);
609 hidden_item = proto_tree_add_uint(pktc_tree, hf_pktc_version_minor, tvb, offset, 1, (version)&0x0f);
610 PROTO_ITEM_SET_HIDDEN(hidden_item);
614 if (check_col(pinfo->cinfo, COL_INFO)) {
615 col_add_str(pinfo->cinfo, COL_INFO,
616 val_to_str(kmmid, kmmid_types, "Unknown KMMID %#x"));
617 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
618 val_to_str(doi, doi_types, "Unknown DOI %#x"));
623 offset=dissect_pktc_wakeup(pktc_tree, tvb, offset);
625 case KMMID_AP_REQUEST:
626 offset=dissect_pktc_ap_request(pinfo, pktc_tree, tvb, offset, doi);
629 offset=dissect_pktc_ap_reply(pinfo, pktc_tree, tvb, offset, doi);
631 case KMMID_SEC_PARAM_REC:
632 offset=dissect_pktc_sec_param_rec(pktc_tree, tvb, offset);
635 offset=dissect_pktc_rekey(pinfo, pktc_tree, tvb, offset, doi);
637 case KMMID_ERROR_REPLY:
638 offset=dissect_pktc_error_reply(pinfo, pktc_tree, tvb, offset);
642 proto_item_set_len(item, offset);
646 proto_register_pktc(void)
648 static hf_register_info hf[] = {
650 "Key Management Message ID", "pktc.kmmid", FT_UINT8, BASE_HEX,
651 VALS(kmmid_types), 0, NULL, HFILL }},
653 "Domain of Interpretation", "pktc.doi", FT_UINT8, BASE_DEC,
654 VALS(doi_types), 0, NULL, HFILL }},
655 { &hf_pktc_version_major, {
656 "Major version", "pktc.version.major", FT_UINT8, BASE_DEC,
657 NULL, 0, "Major version of PKTC", HFILL }},
658 { &hf_pktc_version_minor, {
659 "Minor version", "pktc.version.minor", FT_UINT8, BASE_DEC,
660 NULL, 0, "Minor version of PKTC", HFILL }},
661 { &hf_pktc_server_nonce, {
662 "Server Nonce", "pktc.server_nonce", FT_UINT32, BASE_HEX,
663 NULL, 0, "Server Nonce random number", HFILL }},
664 { &hf_pktc_server_principal, {
665 "Server Kerberos Principal Identifier", "pktc.server_principal", FT_STRING, BASE_NONE,
666 NULL, 0, NULL, HFILL }},
667 { &hf_pktc_timestamp, {
668 "Timestamp", "pktc.timestamp", FT_STRING, BASE_NONE,
669 NULL, 0, "Timestamp (UTC)", HFILL }},
670 { &hf_pktc_app_spec_data, {
671 "Application Specific Data", "pktc.asd", FT_NONE, BASE_NONE,
672 NULL, 0, "KMMID/DOI application specific data", HFILL }},
673 { &hf_pktc_list_of_ciphersuites, {
674 "List of Ciphersuites", "pktc.ciphers", FT_NONE, BASE_NONE,
675 NULL, 0, NULL, HFILL }},
676 { &hf_pktc_list_of_ciphersuites_len, {
677 "Number of Ciphersuites", "pktc.ciphers.len", FT_UINT8, BASE_DEC,
678 NULL, 0, NULL, HFILL }},
679 { &hf_pktc_snmpAuthenticationAlgorithm, {
680 "SNMPv3 Authentication Algorithm", "pktc.asd.snmp_auth_alg", FT_UINT8, BASE_HEX,
681 VALS(snmp_authentication_algorithm_vals), 0, NULL, HFILL }},
682 { &hf_pktc_snmpEncryptionTransformID, {
683 "SNMPv3 Encryption Transform ID", "pktc.asd.snmp_enc_alg", FT_UINT8, BASE_HEX,
684 VALS(snmp_transform_id_vals), 0, NULL, HFILL }},
685 { &hf_pktc_ipsecAuthenticationAlgorithm, {
686 "IPsec Authentication Algorithm", "pktc.asd.ipsec_auth_alg", FT_UINT8, BASE_HEX,
687 VALS(ipsec_authentication_algorithm_vals), 0, NULL, HFILL }},
688 { &hf_pktc_ipsecEncryptionTransformID, {
689 "IPsec Encryption Transform ID", "pktc.asd.ipsec_enc_alg", FT_UINT8, BASE_HEX,
690 VALS(ipsec_transform_id_vals), 0, NULL, HFILL }},
691 { &hf_pktc_snmpEngineID_len, {
692 "SNMPv3 Engine ID Length", "pktc.asd.snmp_engine_id.len", FT_UINT8, BASE_DEC,
693 NULL, 0, "Length of SNMPv3 Engine ID", HFILL }},
694 { &hf_pktc_snmpEngineID, {
695 "SNMPv3 Engine ID", "pktc.asd.snmp_engine_id", FT_BYTES, BASE_NONE,
696 NULL, 0, NULL, HFILL }},
697 { &hf_pktc_snmpEngineBoots, {
698 "SNMPv3 Engine Boots", "pktc.asd.snmp_engine_boots", FT_UINT32, BASE_DEC,
699 NULL, 0, NULL, HFILL }},
700 { &hf_pktc_snmpEngineTime, {
701 "SNMPv3 Engine Time", "pktc.asd.snmp_engine_time", FT_UINT32, BASE_DEC,
702 NULL, 0, "SNMPv3 Engine ID Time", HFILL }},
703 { &hf_pktc_usmUserName_len, {
704 "SNMPv3 USM User Name Length", "pktc.asd.snmp_usm_username.len", FT_UINT8, BASE_DEC,
705 NULL, 0, "Length of SNMPv3 USM User Name", HFILL }},
706 { &hf_pktc_usmUserName, {
707 "SNMPv3 USM User Name", "pktc.asd.snmp_usm_username", FT_STRING, BASE_NONE,
708 NULL, 0, NULL, HFILL }},
709 { &hf_pktc_ipsec_spi, {
710 "IPsec Security Parameter Index", "pktc.asd.ipsec_spi", FT_UINT32, BASE_HEX,
711 NULL, 0, "Security Parameter Index for inbound Security Association (IPsec)", HFILL }},
712 { &hf_pktc_reestablish_flag, {
713 "Re-establish Flag", "pktc.reestablish", FT_BOOLEAN, BASE_NONE,
714 NULL, 0x0, NULL, HFILL }},
715 { &hf_pktc_ack_required_flag, {
716 "ACK Required Flag", "pktc.ack_required", FT_BOOLEAN, BASE_NONE,
717 NULL, 0x0, NULL, HFILL }},
718 { &hf_pktc_sec_param_lifetime, {
719 "Security Parameter Lifetime", "pktc.spl", FT_UINT32, BASE_DEC,
720 NULL, 0, "Lifetime in seconds of security parameter", HFILL }},
721 { &hf_pktc_sha1_hmac, {
722 "SHA-1 HMAC", "pktc.sha1_hmac", FT_BYTES, BASE_NONE,
723 NULL, 0, NULL, HFILL }},
724 { &hf_pktc_grace_period, {
725 "Grace Period", "pktc.grace_period", FT_UINT32, BASE_DEC,
726 NULL, 0, "Grace Period in seconds", HFILL }},
728 static gint *ett[] = {
730 &ett_pktc_app_spec_data,
731 &ett_pktc_list_of_ciphersuites,
735 proto_pktc = proto_register_protocol("PacketCable", "PKTC", "pktc");
736 proto_register_field_array(proto_pktc, hf, array_length(hf));
737 proto_register_subtree_array(ett, array_length(ett));
741 proto_reg_handoff_pktc(void)
743 dissector_handle_t pktc_handle;
745 pktc_handle = create_dissector_handle(dissect_pktc, proto_pktc);
746 dissector_add("udp.port", PKTC_PORT, pktc_handle);
751 proto_register_pktc_mtafqdn(void)
753 static hf_register_info hf[] = {
754 { &hf_pktc_mtafqdn_msgtype, {
755 "Message Type", "pktc.mtafqdn.msgtype", FT_UINT8, BASE_DEC,
756 VALS(pktc_mtafqdn_msgtype_vals), 0, "MTA FQDN Message Type", HFILL }},
757 { &hf_pktc_mtafqdn_enterprise, {
758 "Enterprise Number", "pktc.mtafqdn.enterprise", FT_UINT32, BASE_DEC,
759 NULL, 0, NULL, HFILL }},
760 { &hf_pktc_mtafqdn_version, {
761 "Protocol Version", "pktc.mtafqdn.version", FT_UINT8, BASE_DEC,
762 NULL, 0, "MTA FQDN Protocol Version", HFILL }},
764 { &hf_pktc_mtafqdn_mac, {
765 "MTA MAC address", "pktc.mtafqdn.mac", FT_ETHER, BASE_NONE,
766 NULL, 0, NULL, HFILL }},
767 { &hf_pktc_mtafqdn_pub_key_hash, {
768 "MTA Public Key Hash", "pktc.mtafqdn.pub_key_hash", FT_BYTES, BASE_NONE,
769 NULL, 0, "MTA Public Key Hash (SHA-1)", HFILL }},
770 { &hf_pktc_mtafqdn_manu_cert_revoked, {
771 "Manufacturer Cert Revocation Time", "pktc.mtafqdn.manu_cert_revoked", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL,
772 NULL, 0, "Manufacturer Cert Revocation Time (UTC) or 0 if not revoked", HFILL }},
774 { &hf_pktc_mtafqdn_fqdn, {
775 "MTA FQDN", "pktc.mtafqdn.fqdn", FT_STRING, BASE_NONE,
776 NULL, 0, NULL, HFILL }},
777 { &hf_pktc_mtafqdn_ip, {
778 "MTA IP Address", "pktc.mtafqdn.ip", FT_IPv4, BASE_NONE,
779 NULL, 0, "MTA IP Address (all zeros if not supplied)", HFILL }},
781 static gint *ett[] = {
785 proto_register_field_array(proto_pktc, hf, array_length(hf));
786 proto_register_subtree_array(ett, array_length(ett));
790 proto_reg_handoff_pktc_mtafqdn(void)
792 dissector_handle_t pktc_mtafqdn_handle;
794 pktc_mtafqdn_handle = create_dissector_handle(dissect_pktc_mtafqdn, proto_pktc);
795 dissector_add("udp.port", PKTC_MTAFQDN_PORT, pktc_mtafqdn_handle);