2 * Routines for PacketCable (PKTC) Kerberized Key Management and
3 * PacketCable (PKTC) MTA FQDN packet disassembly
6 * [1] PacketCable Security Specification, PKT-SP-SEC-I10-040113, January 13,
7 * 2004, Cable Television Laboratories, Inc., http://www.PacketCable.com/
14 * Ethereal - Network traffic analyzer
15 * By Gerald Combs <gerald@ethereal.com>
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 "packet-pktc.h"
39 #include "packet-kerberos.h"
41 #define PKTC_PORT 1293
42 #define PKTC_MTAFQDN_PORT 2246
44 static int proto_pktc = -1;
45 static gint hf_pktc_app_spec_data = -1;
46 static gint hf_pktc_list_of_ciphersuites = -1;
47 static gint hf_pktc_list_of_ciphersuites_len = -1;
48 static gint hf_pktc_kmmid = -1;
49 static gint hf_pktc_doi = -1;
50 static gint hf_pktc_version_major = -1;
51 static gint hf_pktc_version_minor = -1;
52 static gint hf_pktc_server_nonce = -1;
53 static gint hf_pktc_server_principal = -1;
54 static gint hf_pktc_timestamp = -1;
55 static gint hf_pktc_snmpEngineID_len = -1;
56 static gint hf_pktc_snmpEngineID = -1;
57 static gint hf_pktc_snmpEngineBoots = -1;
58 static gint hf_pktc_snmpEngineTime = -1;
59 static gint hf_pktc_usmUserName_len = -1;
60 static gint hf_pktc_usmUserName = -1;
61 static gint hf_pktc_ipsec_spi = -1;
62 static gint hf_pktc_snmpAuthenticationAlgorithm = -1;
63 static gint hf_pktc_snmpEncryptionTransformID = -1;
64 static gint hf_pktc_ipsecAuthenticationAlgorithm = -1;
65 static gint hf_pktc_ipsecEncryptionTransformID = -1;
66 static gint hf_pktc_reestablish_flag = -1;
67 static gint hf_pktc_ack_required_flag = -1;
68 static gint hf_pktc_sha1_hmac = -1;
69 static gint hf_pktc_sec_param_lifetime = -1;
70 static gint hf_pktc_grace_period = -1;
72 static gint hf_pktc_mtafqdn_msgtype = -1;
73 static gint hf_pktc_mtafqdn_enterprise = -1;
74 static gint hf_pktc_mtafqdn_version = -1;
75 static gint hf_pktc_mtafqdn_mac = -1;
76 static gint hf_pktc_mtafqdn_pub_key_hash = -1;
77 static gint hf_pktc_mtafqdn_manu_cert_revoked = -1;
78 static gint hf_pktc_mtafqdn_fqdn = -1;
79 static gint hf_pktc_mtafqdn_ip = -1;
81 static gint ett_pktc = -1;
82 static gint ett_pktc_app_spec_data = -1;
83 static gint ett_pktc_list_of_ciphersuites = -1;
85 static gint ett_pktc_mtafqdn = -1;
87 #define KMMID_WAKEUP 0x01
88 #define KMMID_AP_REQUEST 0x02
89 #define KMMID_AP_REPLY 0x03
90 #define KMMID_SEC_PARAM_REC 0x04
91 #define KMMID_REKEY 0x05
92 #define KMMID_ERROR_REPLY 0x06
93 static const value_string kmmid_types[] = {
94 { KMMID_WAKEUP , "Wake Up" },
95 { KMMID_AP_REQUEST , "AP Request" },
96 { KMMID_AP_REPLY , "AP Reply" },
97 { KMMID_SEC_PARAM_REC , "Security Parameter Recovered" },
98 { KMMID_REKEY , "Rekey" },
99 { KMMID_ERROR_REPLY , "Error Reply" },
105 #define SNMPv3_NULL 0x20
106 #define SNMPv3_DES 0x21
107 #define SNMPv3_HMAC_MD5 0x21
108 #define SNMPv3_HMAC_SHA1 0x22
109 #define ESP_3DES 0x03
111 #define ESP_IDEA 0x05
112 #define ESP_CAST 0x06
113 #define ESP_BLOWFISH 0x07
114 #define ESP_NULL 0x0b
116 #define HMAC_MD5_96 0x01
117 #define HMAC_SHA1_96 0x02
120 /* Domain of Interpretation */
121 static const value_string doi_types[] = {
122 { DOI_IPSEC , "IPsec" },
123 { DOI_SNMPv3 , "SNMPv3" },
127 /* SNMPv3 ciphersuites */
128 static const value_string snmp_authentication_algorithm_vals[] = {
129 { SNMPv3_HMAC_MD5 , "HMAC-MD5" },
130 { SNMPv3_HMAC_SHA1 , "HMAC-SHA1" },
133 static const value_string snmp_transform_id_vals[] = {
134 { SNMPv3_NULL , "NULL" }, /* no encryption */
135 { SNMPv3_DES , "DES" },
139 /* IPsec ciphersuites */
140 static const value_string ipsec_transform_id_vals[] = {
141 { ESP_3DES , "3DES" },
143 { ESP_IDEA , "IDEA" },
144 { ESP_CAST , "CAST" },
145 { ESP_BLOWFISH , "BLOWFISH" },
146 { ESP_NULL , "NULL" }, /* no encryption, RFC 2410 */
147 { ESP_AES , "AES-128" },
151 static const value_string ipsec_authentication_algorithm_vals[] = {
152 { HMAC_MD5_96 , "HMAC-MD5-96" }, /* RFC 2403 */
153 { HMAC_SHA1_96 , "HMAC-SHA-1-96" }, /* RFC 2404 */
157 /* MTA FQDN Message Types */
158 #define PKTC_MTAFQDN_REQ 0x01
159 #define PKTC_MTAFQDN_REP 0x02
160 #define PKTC_MTAFQDN_ERR 0x03
161 static const value_string pktc_mtafqdn_msgtype_vals[] = {
162 { PKTC_MTAFQDN_REQ, "MTA FQDN Request" },
163 { PKTC_MTAFQDN_REP, "MTA FQDN Reply" },
164 { PKTC_MTAFQDN_ERR, "MTA FQDN Error Reply" },
169 dissect_pktc_app_specific_data(packet_info *pinfo _U_, proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 doi, guint8 kmmid)
171 int old_offset=offset;
172 proto_tree *tree = NULL;
173 proto_item *item = NULL;
177 item = proto_tree_add_item(parent_tree, hf_pktc_app_spec_data, tvb, offset, -1, FALSE);
178 tree = proto_item_add_subtree(item, ett_pktc_app_spec_data);
184 /* we dont distinguish between manager and agent engineid.
185 feel free to add separation for this if it is imporant enough
187 case KMMID_AP_REQUEST:
189 /* snmpEngineID Length */
190 len=tvb_get_guint8(tvb, offset);
191 proto_tree_add_uint(tree, hf_pktc_snmpEngineID_len, tvb, offset, 1, len);
195 proto_tree_add_item(tree, hf_pktc_snmpEngineID, tvb, offset, len, FALSE);
199 proto_tree_add_item(tree, hf_pktc_snmpEngineBoots, tvb, offset, 4, FALSE);
203 proto_tree_add_item(tree, hf_pktc_snmpEngineTime, tvb, offset, 4, FALSE);
206 /* usmUserName Length */
207 len=tvb_get_guint8(tvb, offset);
208 proto_tree_add_uint(tree, hf_pktc_usmUserName_len, tvb, offset, 1, len);
212 proto_tree_add_item(tree, hf_pktc_usmUserName, tvb, offset, len, FALSE);
217 proto_tree_add_text(tree, tvb, offset, 1, "Unknown KMMID");
218 tvb_get_guint8(tvb, 9999); /* bail out and inform user we cant dissect the packet */
223 /* we dont distinguish between SPIs for inbound Security Associations
224 of the client (AP-REQ) vs. server (AP-REP, REKEY). Feel free to add
225 separation for this if it is imporant enough for you. */
226 case KMMID_AP_REQUEST:
229 /* Security Parameter Index (SPI) */
230 proto_tree_add_item(tree, hf_pktc_ipsec_spi, tvb, offset, 4, FALSE);
235 proto_tree_add_text(tree, tvb, offset, 1, "Unknown KMMID");
236 tvb_get_guint8(tvb, 9999); /* bail out and inform user we cant dissect the packet */
240 proto_tree_add_text(tree, tvb, offset, 1, "Unknown DOI");
241 tvb_get_guint8(tvb, 9999); /* bail out and inform user we cant dissect the packet */
244 proto_item_set_len(item, offset-old_offset);
249 dissect_pktc_list_of_ciphersuites(packet_info *pinfo _U_, proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 doi)
251 int old_offset=offset;
252 proto_tree *tree = NULL;
253 proto_item *item = NULL;
257 item = proto_tree_add_item(parent_tree, hf_pktc_list_of_ciphersuites, tvb, offset, -1, FALSE);
258 tree = proto_item_add_subtree(item, ett_pktc_list_of_ciphersuites);
262 /* number of ciphersuites */
263 len=tvb_get_guint8(tvb, offset);
265 proto_item_append_text(tree, " (%d):", len);
267 proto_tree_add_uint_hidden(tree, hf_pktc_list_of_ciphersuites_len, tvb, offset, 1, len);
273 /* SNMPv3 authentication algorithm */
274 proto_tree_add_item(tree, hf_pktc_snmpAuthenticationAlgorithm, tvb, offset, 1, FALSE);
275 proto_item_append_text(tree, " %s", val_to_str(tvb_get_guint8(tvb, offset), snmp_authentication_algorithm_vals, "%0x"));
278 /* SNMPv3 encryption transform id */
279 proto_tree_add_item(tree, hf_pktc_snmpEncryptionTransformID, tvb, offset, 1, FALSE);
285 /* IPsec authentication algorithm */
286 proto_tree_add_item(tree, hf_pktc_ipsecAuthenticationAlgorithm, tvb, offset, 1, FALSE);
287 proto_item_append_text(tree, " %s", val_to_str(tvb_get_guint8(tvb, offset), ipsec_authentication_algorithm_vals, "%0x"));
290 /* IPsec encryption transform id */
291 proto_tree_add_item(tree, hf_pktc_ipsecEncryptionTransformID, tvb, offset, 1, FALSE);
292 proto_item_append_text(tree, "/%s", val_to_str(tvb_get_guint8(tvb, offset), snmp_transform_id_vals, "%0x"));
297 proto_tree_add_text(tree, tvb, offset, 1, "Unknown DOI");
298 tvb_get_guint8(tvb, 9999); /* bail out and inform user we cant dissect the packet */
301 proto_item_set_len(item, offset-old_offset);
306 dissect_pktc_wakeup(proto_tree *tree, tvbuff_t *tvb, int offset)
312 snonce=tvb_get_ntohl(tvb, offset);
313 proto_tree_add_uint(tree, hf_pktc_server_nonce, tvb, offset, 4, snonce);
316 /* Server Kerberos Principal Identifier */
317 string_len=tvb_strsize(tvb, offset);
318 proto_tree_add_item(tree, hf_pktc_server_principal, tvb, offset, string_len, FALSE);
325 dissect_pktc_ap_request(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, guint8 doi)
330 /* AP Request kerberos blob */
331 pktc_tvb = tvb_new_subset(tvb, offset, -1, -1);
332 offset += dissect_kerberos_main(pktc_tvb, pinfo, tree, FALSE, NULL);
335 snonce=tvb_get_ntohl(tvb, offset);
336 proto_tree_add_uint(tree, hf_pktc_server_nonce, tvb, offset, 4, snonce);
339 /* app specific data */
340 offset=dissect_pktc_app_specific_data(pinfo, tree, tvb, offset, doi, KMMID_AP_REQUEST);
342 /* list of ciphersuites */
343 offset=dissect_pktc_list_of_ciphersuites(pinfo, tree, tvb, offset, doi);
345 /* re-establish flag */
346 proto_tree_add_item(tree, hf_pktc_reestablish_flag, tvb, offset, 1, FALSE);
350 proto_tree_add_item(tree, hf_pktc_sha1_hmac, tvb, offset, 20, FALSE);
357 dissect_pktc_ap_reply(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, guint8 doi)
361 /* AP Reply kerberos blob */
362 pktc_tvb = tvb_new_subset(tvb, offset, -1, -1);
363 offset += dissect_kerberos_main(pktc_tvb, pinfo, tree, FALSE, NULL);
365 /* app specific data */
366 offset=dissect_pktc_app_specific_data(pinfo, tree, tvb, offset, doi, KMMID_AP_REPLY);
368 /* selected ciphersuite */
369 offset=dissect_pktc_list_of_ciphersuites(pinfo, tree, tvb, offset, doi);
371 /* sec param lifetime */
372 proto_tree_add_uint_format(tree, hf_pktc_sec_param_lifetime, tvb, offset, 4,
373 tvb_get_ntohl(tvb, offset), "%s: %s",
374 proto_registrar_get_name(hf_pktc_sec_param_lifetime),
375 time_secs_to_str(tvb_get_ntohl(tvb, offset)));
379 proto_tree_add_item(tree, hf_pktc_grace_period, tvb, offset, 4, FALSE);
382 /* re-establish flag */
383 proto_tree_add_item(tree, hf_pktc_reestablish_flag, tvb, offset, 1, FALSE);
386 /* ack required flag */
387 proto_tree_add_item(tree, hf_pktc_ack_required_flag, tvb, offset, 1, FALSE);
391 proto_tree_add_item(tree, hf_pktc_sha1_hmac, tvb, offset, 20, FALSE);
398 dissect_pktc_sec_param_rec(proto_tree *tree, tvbuff_t *tvb, int offset)
400 /* sha-1 hmac of the subkey of the preceding AP-REP */
401 proto_tree_add_item(tree, hf_pktc_sha1_hmac, tvb, offset, 20, FALSE);
408 dissect_pktc_rekey(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, guint8 doi)
412 const guint8 *timestr;
415 snonce=tvb_get_ntohl(tvb, offset);
416 proto_tree_add_uint(tree, hf_pktc_server_nonce, tvb, offset, 4, snonce);
419 /* Server Kerberos Principal Identifier */
420 string_len=tvb_strsize(tvb, offset);
421 proto_tree_add_item(tree, hf_pktc_server_principal, tvb, offset, string_len, FALSE);
424 /* Timestamp: YYMMDDhhmmssZ */
425 /* They really came up with a two-digit year in late 1990s! =8o */
426 timestr=tvb_get_ptr(tvb, offset, 13);
427 proto_tree_add_string_format(tree, hf_pktc_timestamp, tvb, offset, 13, timestr,
428 "%s: %.2s-%.2s-%.2s %.2s:%.2s:%.2s",
429 proto_registrar_get_name(hf_pktc_timestamp),
430 timestr, timestr+2, timestr+4, timestr+6, timestr+8, timestr+10);
433 /* app specific data */
434 offset=dissect_pktc_app_specific_data(pinfo, tree, tvb, offset, doi, KMMID_REKEY);
436 /* list of ciphersuites */
437 offset=dissect_pktc_list_of_ciphersuites(pinfo, tree, tvb, offset, doi);
439 /* sec param lifetime */
440 proto_tree_add_item(tree, hf_pktc_sec_param_lifetime, tvb, offset, 4, FALSE);
444 proto_tree_add_item(tree, hf_pktc_grace_period, tvb, offset, 4, FALSE);
447 /* re-establish flag */
448 proto_tree_add_item(tree, hf_pktc_reestablish_flag, tvb, offset, 1, FALSE);
452 proto_tree_add_item(tree, hf_pktc_sha1_hmac, tvb, offset, 20, FALSE);
459 dissect_pktc_error_reply(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset)
464 pktc_tvb = tvb_new_subset(tvb, offset, -1, -1);
465 offset += dissect_kerberos_main(pktc_tvb, pinfo, tree, FALSE, NULL);
471 dissect_pktc_mtafqdn_krbsafeuserdata(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree)
473 int offset=0, string_len=0;
479 msgtype = tvb_get_guint8(tvb, offset);
480 proto_tree_add_uint(tree, hf_pktc_mtafqdn_msgtype, tvb, offset, 1, msgtype);
483 if (check_col(pinfo->cinfo, COL_INFO))
484 col_set_str(pinfo->cinfo, COL_INFO,
485 val_to_str(msgtype, pktc_mtafqdn_msgtype_vals, "MsgType %u"));
488 proto_tree_add_uint(tree, hf_pktc_mtafqdn_enterprise, tvb, offset, 4, tvb_get_ntohl(tvb, offset));
491 /* protocol version */
492 proto_tree_add_uint(tree, hf_pktc_mtafqdn_version, tvb, offset, 1, tvb_get_guint8(tvb, offset));
496 case PKTC_MTAFQDN_REQ:
497 /* MTA MAC address */
498 proto_tree_add_ether(tree, hf_pktc_mtafqdn_mac, tvb, offset, 6, tvb_get_ptr(tvb, offset, 6));
501 /* MTA pub key hash */
502 proto_tree_add_item(tree, hf_pktc_mtafqdn_pub_key_hash, tvb, offset, 20, FALSE);
505 /* manufacturer cert revocation time */
506 bignum = tvb_get_ntohl(tvb, offset);
508 proto_tree_add_time_format(tree, hf_pktc_mtafqdn_manu_cert_revoked, tvb, offset, 4,
510 proto_registrar_get_name(hf_pktc_mtafqdn_manu_cert_revoked),
511 (bignum==0) ? "not revoked" : abs_time_secs_to_str(bignum));
514 case PKTC_MTAFQDN_REP:
516 string_len = tvb_length_remaining(tvb, offset) - 4;
517 proto_tree_add_item(tree, hf_pktc_mtafqdn_fqdn, tvb, offset, string_len, FALSE);
521 tvb_memcpy(tvb, (guint8 *)&bignum, offset, sizeof(bignum));
522 proto_tree_add_ipv4(tree, hf_pktc_mtafqdn_ip, tvb, offset, 4, bignum);
530 static kerberos_callbacks cb[] = {
531 { KRB_CBTAG_SAFE_USER_DATA, dissect_pktc_mtafqdn_krbsafeuserdata },
536 dissect_pktc_mtafqdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
539 proto_tree *pktc_mtafqdn_tree = NULL;
540 proto_item *item = NULL;
541 tvbuff_t *pktc_mtafqdn_tvb;
543 if (check_col(pinfo->cinfo, COL_PROTOCOL))
544 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKTC");
547 item = proto_tree_add_item(tree, proto_pktc, tvb, 0, 0, FALSE);
548 pktc_mtafqdn_tree = proto_item_add_subtree(item, ett_pktc_mtafqdn);
551 if (check_col(pinfo->cinfo, COL_INFO)) {
552 col_add_fstr(pinfo->cinfo, COL_INFO, "MTA FQDN %s",
553 pinfo->srcport == pinfo->match_port ? "Reply":"Request");
558 pktc_mtafqdn_tvb = tvb_new_subset(tvb, offset, -1, -1);
559 offset += dissect_kerberos_main(pktc_mtafqdn_tvb, pinfo, pktc_mtafqdn_tree, FALSE, NULL);
562 pktc_mtafqdn_tvb = tvb_new_subset(tvb, offset, -1, -1);
563 offset += dissect_kerberos_main(pktc_mtafqdn_tvb, pinfo, pktc_mtafqdn_tree, FALSE, cb);
565 proto_item_set_len(item, offset);
570 dissect_pktc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
572 guint8 kmmid, doi, version;
574 proto_tree *pktc_tree = NULL;
575 proto_item *item = NULL;
577 if (check_col(pinfo->cinfo, COL_PROTOCOL))
578 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKTC");
581 item = proto_tree_add_item(tree, proto_pktc, tvb, 0, 3, FALSE);
582 pktc_tree = proto_item_add_subtree(item, ett_pktc);
585 /* key management message id */
586 kmmid=tvb_get_guint8(tvb, offset);
587 proto_tree_add_uint(pktc_tree, hf_pktc_kmmid, tvb, offset, 1, kmmid);
590 /* domain of interpretation */
591 doi=tvb_get_guint8(tvb, offset);
592 proto_tree_add_uint(pktc_tree, hf_pktc_doi, tvb, offset, 1, doi);
596 version=tvb_get_guint8(tvb, offset);
597 proto_tree_add_text(pktc_tree, tvb, offset, 1, "Version: %d.%d", (version>>4)&0x0f, (version)&0x0f);
598 proto_tree_add_uint_hidden(pktc_tree, hf_pktc_version_major, tvb, offset, 1, (version>>4)&0x0f);
599 proto_tree_add_uint_hidden(pktc_tree, hf_pktc_version_minor, tvb, offset, 1, (version)&0x0f);
603 if (check_col(pinfo->cinfo, COL_INFO)) {
604 col_add_str(pinfo->cinfo, COL_INFO,
605 val_to_str(kmmid, kmmid_types, "Unknown KMMID %#x"));
606 col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
607 val_to_str(doi, doi_types, "Unknown DOI %#x"));
612 offset=dissect_pktc_wakeup(pktc_tree, tvb, offset);
614 case KMMID_AP_REQUEST:
615 offset=dissect_pktc_ap_request(pinfo, pktc_tree, tvb, offset, doi);
618 offset=dissect_pktc_ap_reply(pinfo, pktc_tree, tvb, offset, doi);
620 case KMMID_SEC_PARAM_REC:
621 offset=dissect_pktc_sec_param_rec(pktc_tree, tvb, offset);
624 offset=dissect_pktc_rekey(pinfo, pktc_tree, tvb, offset, doi);
626 case KMMID_ERROR_REPLY:
627 offset=dissect_pktc_error_reply(pinfo, pktc_tree, tvb, offset);
631 proto_item_set_len(item, offset);
635 proto_register_pktc(void)
637 static hf_register_info hf[] = {
639 "Key Management Message ID", "pktc.kmmid", FT_UINT8, BASE_HEX,
640 VALS(kmmid_types), 0, "Key Management Message ID", HFILL }},
642 "Domain of Interpretation", "pktc.doi", FT_UINT8, BASE_DEC,
643 VALS(doi_types), 0, "Domain of Interpretation", HFILL }},
644 { &hf_pktc_version_major, {
645 "Major version", "pktc.version.major", FT_UINT8, BASE_DEC,
646 NULL, 0, "Major version of PKTC", HFILL }},
647 { &hf_pktc_version_minor, {
648 "Minor version", "pktc.version.minor", FT_UINT8, BASE_DEC,
649 NULL, 0, "Minor version of PKTC", HFILL }},
650 { &hf_pktc_server_nonce, {
651 "Server Nonce", "pktc.server_nonce", FT_UINT32, BASE_HEX,
652 NULL, 0, "Server Nonce random number", HFILL }},
653 { &hf_pktc_server_principal, {
654 "Server Kerberos Principal Identifier", "pktc.server_principal", FT_STRING, BASE_DEC,
655 NULL, 0, "Server Kerberos Principal Identifier", HFILL }},
656 { &hf_pktc_timestamp, {
657 "Timestamp", "pktc.timestamp", FT_STRING, BASE_NONE,
658 NULL, 0, "Timestamp (UTC)", HFILL }},
659 { &hf_pktc_app_spec_data, {
660 "Application Specific Data", "pktc.asd", FT_NONE, BASE_HEX,
661 NULL, 0, "KMMID/DOI application specific data", HFILL }},
662 { &hf_pktc_list_of_ciphersuites, {
663 "List of Ciphersuites", "pktc.ciphers", FT_NONE, BASE_HEX,
664 NULL, 0, "List of Ciphersuites", HFILL }},
665 { &hf_pktc_list_of_ciphersuites_len, {
666 "Number of Ciphersuites", "pktc.ciphers.len", FT_UINT8, BASE_DEC,
667 NULL, 0, "Number of Ciphersuites", HFILL }},
668 { &hf_pktc_snmpAuthenticationAlgorithm, {
669 "SNMPv3 Authentication Algorithm", "pktc.asd.snmp_auth_alg", FT_UINT8, BASE_HEX,
670 VALS(snmp_authentication_algorithm_vals), 0, "SNMPv3 Authentication Algorithm", HFILL }},
671 { &hf_pktc_snmpEncryptionTransformID, {
672 "SNMPv3 Encryption Transform ID", "pktc.asd.snmp_enc_alg", FT_UINT8, BASE_HEX,
673 VALS(snmp_transform_id_vals), 0, "SNMPv3 Encryption Transform ID", HFILL }},
674 { &hf_pktc_ipsecAuthenticationAlgorithm, {
675 "IPsec Authentication Algorithm", "pktc.asd.ipsec_auth_alg", FT_UINT8, BASE_HEX,
676 VALS(ipsec_authentication_algorithm_vals), 0, "IPsec Authentication Algorithm", HFILL }},
677 { &hf_pktc_ipsecEncryptionTransformID, {
678 "IPsec Encryption Transform ID", "pktc.asd.ipsec_enc_alg", FT_UINT8, BASE_HEX,
679 VALS(ipsec_transform_id_vals), 0, "IPsec Encryption Transform ID", HFILL }},
680 { &hf_pktc_snmpEngineID_len, {
681 "SNMPv3 Engine ID Length", "pktc.asd.snmp_engine_id.len", FT_UINT8, BASE_DEC,
682 NULL, 0, "Length of SNMPv3 Engine ID", HFILL }},
683 { &hf_pktc_snmpEngineID, {
684 "SNMPv3 Engine ID", "pktc.asd.snmp_engine_id", FT_BYTES, BASE_HEX,
685 NULL, 0, "SNMPv3 Engine ID", HFILL }},
686 { &hf_pktc_snmpEngineBoots, {
687 "SNMPv3 Engine Boots", "pktc.asd.snmp_engine_boots", FT_UINT32, BASE_DEC,
688 NULL, 0, "SNMPv3 Engine Boots", HFILL }},
689 { &hf_pktc_snmpEngineTime, {
690 "SNMPv3 Engine Time", "pktc.asd.snmp_engine_time", FT_UINT32, BASE_DEC,
691 NULL, 0, "SNMPv3 Engine ID Time", HFILL }},
692 { &hf_pktc_usmUserName_len, {
693 "SNMPv3 USM User Name Length", "pktc.asd.snmp_usm_username.len", FT_UINT8, BASE_DEC,
694 NULL, 0, "Length of SNMPv3 USM User Name", HFILL }},
695 { &hf_pktc_usmUserName, {
696 "SNMPv3 USM User Name", "pktc.asd.snmp_usm_username", FT_STRING, BASE_DEC,
697 NULL, 0, "SNMPv3 USM User Name", HFILL }},
698 { &hf_pktc_ipsec_spi, {
699 "IPsec Security Parameter Index", "pktc.asd.ipsec_spi", FT_UINT32, BASE_DEC,
700 NULL, 0, "Security Parameter Index for inbound Security Association (IPsec)", HFILL }},
701 { &hf_pktc_reestablish_flag, {
702 "Re-establish Flag", "pktc.reestablish", FT_BOOLEAN, BASE_NONE,
703 NULL, 0, "Re-establish Flag", HFILL }},
704 { &hf_pktc_ack_required_flag, {
705 "ACK Required Flag", "pktc.ack_required", FT_BOOLEAN, BASE_NONE,
706 NULL, 0, "ACK Required Flag", HFILL }},
707 { &hf_pktc_sec_param_lifetime, {
708 "Security Parameter Lifetime", "pktc.spl", FT_UINT32, BASE_DEC,
709 NULL, 0, "Lifetime in seconds of security parameter", HFILL }},
710 { &hf_pktc_sha1_hmac, {
711 "SHA-1 HMAC", "pktc.sha1_hmac", FT_BYTES, BASE_HEX,
712 NULL, 0, "SHA-1 HMAC", HFILL }},
713 { &hf_pktc_grace_period, {
714 "Grace Period", "pktc.grace_period", FT_UINT32, BASE_DEC,
715 NULL, 0, "Grace Period in seconds", HFILL }},
717 static gint *ett[] = {
719 &ett_pktc_app_spec_data,
720 &ett_pktc_list_of_ciphersuites,
723 proto_pktc = proto_register_protocol("PacketCable", "PKTC", "pktc");
724 proto_register_field_array(proto_pktc, hf, array_length(hf));
725 proto_register_subtree_array(ett, array_length(ett));
729 proto_reg_handoff_pktc(void)
731 dissector_handle_t pktc_handle;
733 pktc_handle = create_dissector_handle(dissect_pktc, proto_pktc);
734 dissector_add("udp.port", PKTC_PORT, pktc_handle);
739 proto_register_pktc_mtafqdn(void)
741 static hf_register_info hf[] = {
742 { &hf_pktc_mtafqdn_msgtype, {
743 "Message Type", "pktc.mtafqdn.msgtype", FT_UINT8, BASE_DEC,
744 VALS(pktc_mtafqdn_msgtype_vals), 0, "MTA FQDN Message Type", HFILL }},
745 { &hf_pktc_mtafqdn_enterprise, {
746 "Enterprise Number", "pktc.mtafqdn.enterprise", FT_UINT32, BASE_DEC,
747 NULL, 0, "Enterprise Number", HFILL }},
748 { &hf_pktc_mtafqdn_version, {
749 "Protocol Version", "pktc.mtafqdn.version", FT_UINT8, BASE_DEC,
750 NULL, 0, "MTA FQDN Protocol Version", HFILL }},
752 { &hf_pktc_mtafqdn_mac, {
753 "MTA MAC address", "pktc.mtafqdn.mac", FT_ETHER, BASE_NONE,
754 NULL, 0, "MTA MAC address", HFILL }},
755 { &hf_pktc_mtafqdn_pub_key_hash, {
756 "MTA Public Key Hash", "pktc.mtafqdn.pub_key_hash", FT_BYTES, BASE_HEX,
757 NULL, 0, "MTA Public Key Hash (SHA-1)", HFILL }},
758 { &hf_pktc_mtafqdn_manu_cert_revoked, {
759 "Manufacturer Cert Revocation Time", "pktc.mtafqdn.manu_cert_revoked", FT_ABSOLUTE_TIME, BASE_NONE,
760 NULL, 0, "Manufacturer Cert Revocation Time (UTC) or 0 if not revoked", HFILL }},
762 { &hf_pktc_mtafqdn_fqdn, {
763 "MTA FQDN", "pktc.mtafqdn.fqdn", FT_STRING, BASE_NONE,
764 NULL, 0, "MTA FQDN", HFILL }},
765 { &hf_pktc_mtafqdn_ip, {
766 "MTA IP Address", "pktc.mtafqdn.ip", FT_IPv4, BASE_NONE,
767 NULL, 0, "MTA IP Address (all zeros if not supplied)", HFILL }},
769 static gint *ett[] = {
773 proto_register_field_array(proto_pktc, hf, array_length(hf));
774 proto_register_subtree_array(ett, array_length(ett));
778 proto_reg_handoff_pktc_mtafqdn(void)
780 dissector_handle_t pktc_mtafqdn_handle;
782 pktc_mtafqdn_handle = create_dissector_handle(dissect_pktc_mtafqdn, proto_pktc);
783 dissector_add("udp.port", PKTC_MTAFQDN_PORT, pktc_mtafqdn_handle);