2002-09-10 19:07:40 +00:00
|
|
|
/* packet-vendor.c
|
|
|
|
* Routines for Vendor Specific Encodings dissection
|
2003-05-28 14:52:53 +00:00
|
|
|
* Copyright 2002, Anand V. Narwani <anand[AT]narwani.org>
|
2002-09-10 19:07:40 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2002-09-10 19:07:40 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-09 08:52:20 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2002-09-10 19:07:40 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2020-10-28 13:58:38 +00:00
|
|
|
/* Notes to Adding dissectors for Vendor specific TLVs:
|
2002-09-10 19:07:40 +00:00
|
|
|
* 1. Create a dissect_<vendorname> function with the following prototype:
|
2003-12-13 02:45:30 +00:00
|
|
|
* dissect_foovendor(tvbuff_t *tvb, proto_tree *tree, gint vsif_len)
|
2011-02-08 00:24:10 +00:00
|
|
|
* 2. vsif_len will be the *entire* length of the vsif TLV (including the
|
2020-10-28 13:58:38 +00:00
|
|
|
* Vendor ID TLV, which is 5 bytes long).
|
2002-09-10 19:07:40 +00:00
|
|
|
* 3. Create a new 'case' statement in dissect_vsif, for your specific Vendor
|
2020-10-28 13:58:38 +00:00
|
|
|
* ID.
|
2002-09-10 19:07:40 +00:00
|
|
|
* 4. In that 'case' statement you will make the following calls:
|
2020-10-28 13:58:38 +00:00
|
|
|
* (assume for this example that your vendor ID is 0x000054)
|
2011-02-08 00:24:10 +00:00
|
|
|
* #define VENDOR_FOOVENDOR 0x00054
|
2002-09-10 19:07:40 +00:00
|
|
|
* case VENDOR_FOOVENDOR:
|
|
|
|
* proto_item_append_text (it, " (foo vendor)");
|
|
|
|
* dissect_foovendor (tvb, vsif_tree, vsif_len);
|
|
|
|
* break;
|
|
|
|
* 5. Please see dissect_cisco for an example of how to do this.
|
|
|
|
*/
|
|
|
|
|
2012-09-20 01:29:52 +00:00
|
|
|
#include "config.h"
|
2002-09-10 19:07:40 +00:00
|
|
|
|
|
|
|
#include <epan/packet.h>
|
2017-05-03 13:38:29 +00:00
|
|
|
#include <epan/expert.h>
|
2002-09-10 19:07:40 +00:00
|
|
|
|
|
|
|
/* Define Vendor ID's here */
|
|
|
|
#define VENDOR_CISCO 0x00000C
|
2017-10-05 08:34:18 +00:00
|
|
|
#define VENDOR_GENERAL 0xFFFFFF
|
2002-09-10 19:07:40 +00:00
|
|
|
|
2013-11-19 06:06:38 +00:00
|
|
|
void proto_register_docsis_vsif(void);
|
|
|
|
void proto_reg_handoff_docsis_vsif(void);
|
2013-11-18 06:22:09 +00:00
|
|
|
|
2002-09-10 19:07:40 +00:00
|
|
|
/* Initialize the protocol and registered fields */
|
|
|
|
static int proto_docsis_vsif = -1;
|
|
|
|
static int hf_docsis_vsif_vendorid = -1;
|
|
|
|
static int hf_docsis_vsif_vendor_unknown = -1;
|
|
|
|
static int hf_docsis_vsif_cisco_numphones = -1;
|
2013-02-10 16:31:52 +00:00
|
|
|
/* static int hf_docsis_vsif_cisco_ipprec = -1; */
|
2002-09-10 19:07:40 +00:00
|
|
|
static int hf_docsis_vsif_cisco_ipprec_val = -1;
|
|
|
|
static int hf_docsis_vsif_cisco_ipprec_bw = -1;
|
|
|
|
static int hf_docsis_vsif_cisco_config_file = -1;
|
|
|
|
|
2017-10-05 08:34:18 +00:00
|
|
|
static int hf_docsis_vsif_gex_loadbal_policy_id = -1;
|
|
|
|
static int hf_docsis_vsif_gex_loadbal_priority = -1;
|
|
|
|
static int hf_docsis_vsif_gex_loadbal_group_id = -1;
|
|
|
|
static int hf_docsis_vsif_gex_ranging_class_id_extension = -1;
|
|
|
|
static int hf_docsis_vsif_gex_l2vpn_encoding = -1;
|
|
|
|
static int hf_docsis_vsif_gex_ecm = -1;
|
|
|
|
static int hf_docsis_vsif_gex_sav = -1;
|
|
|
|
static int hf_docsis_vsif_gex_cmam = -1;
|
|
|
|
static int hf_docsis_vsif_gex_imja = -1;
|
|
|
|
static int hf_docsis_vsif_gex_service_type_identifier = -1;
|
|
|
|
|
|
|
|
static int hf_docsis_vsif_gex_ecm_extended_cmts_mic_hmac_type = -1;
|
|
|
|
static int hf_docsis_vsif_gex_ecm_extended_cmts_mic_bitmap = -1;
|
|
|
|
static int hf_docsis_vsif_gex_ecm_explicit_extended_cmts_mic_digest_subtype = -1;
|
|
|
|
|
|
|
|
static int hf_docsis_vsif_gex_sav_group_name = -1;
|
|
|
|
static int hf_docsis_vsif_gex_sav_static_prefix_rule = -1;
|
|
|
|
|
|
|
|
static int hf_docsis_vsif_gex_sav_static_prefix_addressv4 = -1;
|
|
|
|
static int hf_docsis_vsif_gex_sav_static_prefix_addressv6 = -1;
|
|
|
|
static int hf_docsis_vsif_gex_sav_static_prefix_length = -1;
|
|
|
|
|
|
|
|
static int hf_docsis_vsif_gex_cmam_cm_required_downstream_attribute_mask = -1;
|
|
|
|
static int hf_docsis_vsif_gex_cmam_cm_forbidden_downstream_attribute_mask = -1;
|
|
|
|
static int hf_docsis_vsif_gex_cmam_cm_required_upstream_attribute_mask = -1;
|
|
|
|
static int hf_docsis_vsif_gex_cmam_cm_forbidden_upstream_attribute_mask = -1;
|
|
|
|
|
|
|
|
static int hf_docsis_vsif_gex_imja_ip_multicast_profile_name = -1;
|
|
|
|
static int hf_docsis_vsif_gex_imja_ssr = -1;
|
|
|
|
static int hf_docsis_vsif_gex_imja_maximum_multicast_sessions = -1;
|
|
|
|
|
|
|
|
static int hf_docsis_vsif_gex_imja_ssr_rule_priority = -1;
|
|
|
|
static int hf_docsis_vsif_gex_imja_ssr_authorization_action = -1;
|
|
|
|
static int hf_docsis_vsif_gex_imja_ssr_source_prefix_addressv4 = -1;
|
|
|
|
static int hf_docsis_vsif_gex_imja_ssr_source_prefix_addressv6 = -1;
|
|
|
|
static int hf_docsis_vsif_gex_imja_ssr_source_prefix_length = -1;
|
|
|
|
static int hf_docsis_vsif_gex_imja_ssr_group_prefix_addressv4 = -1;
|
|
|
|
static int hf_docsis_vsif_gex_imja_ssr_group_prefix_addressv6 = -1;
|
|
|
|
static int hf_docsis_vsif_gex_imja_ssr_group_prefix_length = -1;
|
|
|
|
|
|
|
|
static int hf_docsis_vsif_tlv_unknown = -1;
|
|
|
|
|
|
|
|
|
2002-09-10 19:07:40 +00:00
|
|
|
/* Initialize the subtree pointers */
|
|
|
|
static gint ett_docsis_vsif = -1;
|
|
|
|
static gint ett_docsis_vsif_ipprec = -1;
|
2017-10-05 08:34:18 +00:00
|
|
|
static gint ett_docsis_vsif_gex_ecm = -1;
|
|
|
|
static gint ett_docsis_vsif_gex_sav = -1;
|
|
|
|
static gint ett_docsis_vsif_gex_sav_spr = -1;
|
|
|
|
static gint ett_docsis_vsif_gex_cmam = -1;
|
|
|
|
static gint ett_docsis_vsif_gex_imja = -1;
|
|
|
|
static gint ett_docsis_vsif_gex_imja_ssr = -1;
|
|
|
|
|
2002-09-10 19:07:40 +00:00
|
|
|
|
2017-05-03 13:38:29 +00:00
|
|
|
static expert_field ei_docsis_vsif_tlvlen_bad = EI_INIT;
|
|
|
|
static expert_field ei_docsis_vsif_tlvtype_unknown = EI_INIT;
|
|
|
|
|
2002-09-10 19:07:40 +00:00
|
|
|
static const value_string vendorid_vals[] = {
|
2011-02-08 00:24:10 +00:00
|
|
|
{VENDOR_CISCO, "Cisco Systems, Inc."},
|
2017-10-05 08:34:18 +00:00
|
|
|
{VENDOR_GENERAL, "General Extension Information"},
|
2011-02-08 00:24:10 +00:00
|
|
|
{0, NULL},
|
2002-09-10 19:07:40 +00:00
|
|
|
};
|
|
|
|
|
2017-10-05 08:34:18 +00:00
|
|
|
static const value_string hmac_vals[] = {
|
|
|
|
{1, "MD5 HMAC [RFC 2104]"},
|
|
|
|
{2, "MMH16-sigma-n HMAC [DOCSIS SECv3.0]"},
|
|
|
|
{43, "Vendor Specific"},
|
|
|
|
{0, NULL},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string authorization_action_vals[] = {
|
|
|
|
{0, "permit"},
|
|
|
|
{1, "deny"},
|
|
|
|
{0, NULL},
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2020-10-28 13:58:38 +00:00
|
|
|
/* Dissector for Cisco Vendor Specific TLVs */
|
2002-09-10 19:07:40 +00:00
|
|
|
|
2014-10-05 20:12:34 +00:00
|
|
|
#define NUM_PHONES 0x0a
|
2002-09-10 19:07:40 +00:00
|
|
|
#define IOS_CONFIG_FILE 0x80
|
2014-10-05 20:12:34 +00:00
|
|
|
#define IP_PREC 0x0b
|
|
|
|
#define IP_PREC_VAL 0x01
|
|
|
|
#define IP_PREC_BW 0x02
|
2002-09-10 19:07:40 +00:00
|
|
|
|
2017-10-05 08:34:18 +00:00
|
|
|
static void dissect_general_extension_information (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
|
|
|
gint vsif_len);
|
|
|
|
|
|
|
|
|
2002-09-10 19:07:40 +00:00
|
|
|
static void
|
2017-05-03 13:38:29 +00:00
|
|
|
dissect_cisco (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, gint vsif_len)
|
2002-09-10 19:07:40 +00:00
|
|
|
{
|
|
|
|
/* Start at pos = 5, since tvb includes the Vendor ID field */
|
2003-12-13 02:45:30 +00:00
|
|
|
int pos = 5;
|
2002-09-10 19:07:40 +00:00
|
|
|
guint8 type, length;
|
|
|
|
proto_tree *ipprec_tree;
|
2017-05-03 13:38:29 +00:00
|
|
|
proto_item *ipprec_item;
|
2003-12-13 02:45:30 +00:00
|
|
|
int templen;
|
2002-09-10 19:07:40 +00:00
|
|
|
|
|
|
|
while (pos < vsif_len)
|
|
|
|
{
|
|
|
|
/* Extract the type and length Fields from the TLV */
|
|
|
|
type = tvb_get_guint8 (tvb, pos++);
|
|
|
|
length = tvb_get_guint8 (tvb, pos++);
|
|
|
|
switch (type)
|
2011-02-08 00:24:10 +00:00
|
|
|
{
|
2014-10-05 20:12:34 +00:00
|
|
|
case NUM_PHONES:
|
|
|
|
proto_tree_add_item (tree, hf_docsis_vsif_cisco_numphones, tvb,
|
|
|
|
pos, length, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case IP_PREC:
|
|
|
|
ipprec_tree =
|
2017-05-03 13:38:29 +00:00
|
|
|
proto_tree_add_subtree(tree, tvb, pos, length, ett_docsis_vsif_ipprec, &ipprec_item, "IP Precedence");
|
2014-10-05 20:12:34 +00:00
|
|
|
/* Handle Sub-TLVs in IP Precedence */
|
|
|
|
templen = pos + length;
|
|
|
|
while (pos < templen)
|
|
|
|
{
|
|
|
|
type = tvb_get_guint8 (tvb, pos++);
|
|
|
|
length = tvb_get_guint8 (tvb, pos++);
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case IP_PREC_VAL:
|
2017-05-03 13:38:29 +00:00
|
|
|
if (length == 1)
|
|
|
|
{
|
|
|
|
proto_tree_add_item (ipprec_tree,
|
2014-10-05 20:12:34 +00:00
|
|
|
hf_docsis_vsif_cisco_ipprec_val, tvb,
|
|
|
|
pos, length, ENC_BIG_ENDIAN);
|
2017-05-03 13:38:29 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
expert_add_info_format(pinfo, ipprec_item, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
2014-10-05 20:12:34 +00:00
|
|
|
break;
|
|
|
|
case IP_PREC_BW:
|
|
|
|
if (length != 4)
|
2017-05-03 13:38:29 +00:00
|
|
|
{
|
|
|
|
proto_tree_add_item (ipprec_tree,
|
2014-10-05 20:12:34 +00:00
|
|
|
hf_docsis_vsif_cisco_ipprec_bw, tvb,
|
|
|
|
pos, length, ENC_BIG_ENDIAN);
|
2017-05-03 13:38:29 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
expert_add_info_format(pinfo, ipprec_item, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
2014-10-05 20:12:34 +00:00
|
|
|
break;
|
|
|
|
default:
|
2017-05-03 13:38:29 +00:00
|
|
|
expert_add_info_format(pinfo, ipprec_item, &ei_docsis_vsif_tlvtype_unknown, "Unknown TLV: %u", type);
|
2014-10-05 20:12:34 +00:00
|
|
|
}
|
|
|
|
pos += length;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case IOS_CONFIG_FILE:
|
|
|
|
proto_tree_add_item (tree, hf_docsis_vsif_cisco_config_file, tvb,
|
|
|
|
pos, length, ENC_ASCII|ENC_NA);
|
2011-02-08 00:24:10 +00:00
|
|
|
}
|
2002-09-10 19:07:40 +00:00
|
|
|
pos += length;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-03 13:38:29 +00:00
|
|
|
/* Dissection */
|
|
|
|
static int
|
|
|
|
dissect_vsif (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
|
|
|
|
{
|
|
|
|
proto_item *it;
|
|
|
|
proto_tree *vsif_tree;
|
|
|
|
guint8 type;
|
|
|
|
guint8 length;
|
|
|
|
guint32 value;
|
|
|
|
gint vsif_len;
|
|
|
|
|
|
|
|
/* get the reported length of the VSIF TLV */
|
|
|
|
vsif_len = tvb_reported_length_remaining (tvb, 0);
|
|
|
|
|
|
|
|
it = proto_tree_add_protocol_format (tree, proto_docsis_vsif, tvb, 0, -1,
|
|
|
|
"VSIF Encodings");
|
|
|
|
vsif_tree = proto_item_add_subtree (it, ett_docsis_vsif);
|
|
|
|
proto_tree_add_item_ret_uint(vsif_tree, hf_docsis_vsif_vendorid, tvb, 2, 3, ENC_BIG_ENDIAN, &value);
|
|
|
|
|
|
|
|
/* The first TLV in the VSIF encodings must be type 0x08 (Vendor ID) and
|
|
|
|
* length 3.
|
|
|
|
*/
|
|
|
|
type = tvb_get_guint8 (tvb, 0);
|
|
|
|
if (type != 0x08)
|
|
|
|
expert_add_info_format(pinfo, it, &ei_docsis_vsif_tlvtype_unknown, "Unknown TLV: %u", type);
|
|
|
|
|
|
|
|
length = tvb_get_guint8 (tvb, 1);
|
|
|
|
if (length != 3)
|
|
|
|
expert_add_info_format(pinfo, it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
|
|
|
|
/* switch on the Vendor ID */
|
|
|
|
switch (value)
|
|
|
|
{
|
|
|
|
case VENDOR_CISCO:
|
2017-10-05 08:34:18 +00:00
|
|
|
proto_item_append_text (it, " (Cisco)");
|
|
|
|
dissect_cisco (tvb, pinfo, vsif_tree, vsif_len);
|
|
|
|
break;
|
|
|
|
case VENDOR_GENERAL:
|
|
|
|
proto_item_append_text (it, " (General Extension Information)");
|
|
|
|
dissect_general_extension_information (tvb, pinfo, vsif_tree, vsif_len);
|
|
|
|
break;
|
2017-05-03 13:38:29 +00:00
|
|
|
default:
|
2017-10-05 08:34:18 +00:00
|
|
|
proto_item_append_text (it, " (Unknown)");
|
|
|
|
proto_tree_add_item (vsif_tree, hf_docsis_vsif_vendor_unknown, tvb,
|
2017-05-03 13:38:29 +00:00
|
|
|
0, -1, ENC_NA);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return tvb_captured_length(tvb);
|
|
|
|
}
|
|
|
|
|
2017-10-05 08:34:18 +00:00
|
|
|
|
|
|
|
#define GEX_ECM_EXTENDED_CMTS_MIC_HMAC_TYPE 1
|
|
|
|
#define GEX_ECM_EXTENDED_CMTS_MIC_BITMAP 2
|
|
|
|
#define GEX_ECM_EXPLICIT_EXTENDED_CMTS_MIC_DIGEST_SUBTYPE 3
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_extended_cmts_mic(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
|
|
|
|
{
|
|
|
|
proto_item *ecm_it;
|
|
|
|
proto_tree *ecm_tree;
|
|
|
|
guint8 type, length;
|
|
|
|
int pos = start;
|
|
|
|
|
|
|
|
ecm_it = proto_tree_add_item (tree, hf_docsis_vsif_gex_ecm, tvb, start, len, ENC_NA);
|
|
|
|
ecm_tree = proto_item_add_subtree(ecm_it, ett_docsis_vsif_gex_ecm);
|
|
|
|
|
|
|
|
while (pos < (start + len))
|
|
|
|
{
|
|
|
|
type = tvb_get_guint8 (tvb, pos++);
|
|
|
|
length = tvb_get_guint8 (tvb, pos++);
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case GEX_ECM_EXTENDED_CMTS_MIC_HMAC_TYPE:
|
|
|
|
proto_tree_add_item (ecm_tree, hf_docsis_vsif_gex_ecm_extended_cmts_mic_hmac_type, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case GEX_ECM_EXTENDED_CMTS_MIC_BITMAP:
|
|
|
|
proto_tree_add_item (ecm_tree, hf_docsis_vsif_gex_ecm_extended_cmts_mic_bitmap, tvb, pos, length, ENC_NA);
|
|
|
|
break;
|
|
|
|
case GEX_ECM_EXPLICIT_EXTENDED_CMTS_MIC_DIGEST_SUBTYPE:
|
|
|
|
proto_tree_add_item (ecm_tree, hf_docsis_vsif_gex_ecm_explicit_extended_cmts_mic_digest_subtype, tvb, pos, length, ENC_NA);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
proto_tree_add_item (ecm_tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
|
|
|
break;
|
|
|
|
} /* switch */
|
|
|
|
pos += length;
|
|
|
|
} /* while */
|
|
|
|
}
|
|
|
|
|
|
|
|
#define GEX_SAV_STATIC_PREFIX_ADDRESS 1
|
|
|
|
#define GEX_SAV_STATIC_PREFIX_LENGTH 2
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_sav_static_prefix_rule(tvbuff_t * tvb, packet_info * pinfo, proto_tree *tree, int start, guint16 len)
|
|
|
|
{
|
|
|
|
proto_item *sav_spr_it;
|
|
|
|
proto_tree *sav_spr_tree;
|
|
|
|
guint8 type, length;
|
|
|
|
int pos = start;
|
|
|
|
|
|
|
|
sav_spr_it = proto_tree_add_item (tree, hf_docsis_vsif_gex_sav_static_prefix_rule, tvb, start, len, ENC_NA);
|
|
|
|
sav_spr_tree = proto_item_add_subtree(sav_spr_it, ett_docsis_vsif_gex_sav_spr);
|
|
|
|
|
|
|
|
while (pos < (start + len))
|
|
|
|
{
|
|
|
|
type = tvb_get_guint8 (tvb, pos++);
|
|
|
|
length = tvb_get_guint8 (tvb, pos++);
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case GEX_SAV_STATIC_PREFIX_ADDRESS:
|
|
|
|
if (length == 4) {
|
|
|
|
proto_tree_add_item (sav_spr_tree, hf_docsis_vsif_gex_sav_static_prefix_addressv4, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
} else if (length == 6) {
|
|
|
|
proto_tree_add_item (sav_spr_tree, hf_docsis_vsif_gex_sav_static_prefix_addressv6, tvb, pos, length, ENC_NA);
|
|
|
|
} else {
|
|
|
|
expert_add_info_format(pinfo, sav_spr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case GEX_SAV_STATIC_PREFIX_LENGTH:
|
|
|
|
if (length == 1) {
|
|
|
|
proto_tree_add_item (sav_spr_tree, hf_docsis_vsif_gex_sav_static_prefix_length, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
} else {
|
|
|
|
expert_add_info_format(pinfo, sav_spr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
proto_tree_add_item (sav_spr_tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
|
|
|
break;
|
|
|
|
} /* switch */
|
|
|
|
pos += length;
|
|
|
|
} /* while */
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define GEX_SAV_GROUP_NAME 1
|
|
|
|
#define GEX_SAV_STATIC_PREFIX_RULE 2
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_sav(tvbuff_t * tvb, packet_info * pinfo, proto_tree *tree, int start, guint16 len)
|
|
|
|
{
|
|
|
|
proto_item *sav_it;
|
|
|
|
proto_tree *sav_tree;
|
|
|
|
guint8 type, length;
|
|
|
|
int pos = start;
|
|
|
|
|
|
|
|
sav_it = proto_tree_add_item (tree, hf_docsis_vsif_gex_sav, tvb, start, len, ENC_NA);
|
|
|
|
sav_tree = proto_item_add_subtree(sav_it, ett_docsis_vsif_gex_sav);
|
|
|
|
|
|
|
|
while (pos < (start + len))
|
|
|
|
{
|
|
|
|
type = tvb_get_guint8 (tvb, pos++);
|
|
|
|
length = tvb_get_guint8 (tvb, pos++);
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case GEX_SAV_GROUP_NAME:
|
|
|
|
proto_tree_add_item (sav_tree, hf_docsis_vsif_gex_sav_group_name, tvb, pos, length, ENC_ASCII|ENC_NA);
|
|
|
|
break;
|
|
|
|
case GEX_SAV_STATIC_PREFIX_RULE:
|
|
|
|
dissect_sav_static_prefix_rule(tvb, pinfo, sav_tree, pos, length);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
proto_tree_add_item (sav_tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
|
|
|
break;
|
|
|
|
} /* switch */
|
|
|
|
pos += length;
|
|
|
|
} /* while */
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#define GEX_CM_REQUIRED_DOWNSTREAM_ATTRIBUTE_MASK 1
|
|
|
|
#define GEX_CM_FORBIDDEN_DOWNSTREAM_ATTRIBUTE_MASK 2
|
|
|
|
#define GEX_CM_REQUIRED_UPSTREAM_ATTRIBUTE_MASK 3
|
|
|
|
#define GEX_CM_FORBIDDEN_UPSTREAM_ATTRIBUTE_MASK 4
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_cable_modem_attribute_masks(tvbuff_t * tvb, packet_info * pinfo, proto_tree *tree, int start, guint16 len)
|
|
|
|
{
|
|
|
|
proto_item *cmam_it;
|
|
|
|
proto_tree *cmam_tree;
|
|
|
|
guint8 type, length;
|
|
|
|
int pos = start;
|
|
|
|
|
|
|
|
cmam_it = proto_tree_add_item (tree, hf_docsis_vsif_gex_cmam, tvb, start, len, ENC_NA);
|
|
|
|
cmam_tree = proto_item_add_subtree(cmam_it, ett_docsis_vsif_gex_cmam);
|
|
|
|
|
|
|
|
while (pos < (start + len))
|
|
|
|
{
|
|
|
|
type = tvb_get_guint8 (tvb, pos++);
|
|
|
|
length = tvb_get_guint8 (tvb, pos++);
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case GEX_CM_REQUIRED_DOWNSTREAM_ATTRIBUTE_MASK:
|
|
|
|
if (length != 4) {
|
|
|
|
expert_add_info_format(pinfo, cmam_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
proto_tree_add_item (cmam_tree, hf_docsis_vsif_gex_cmam_cm_required_downstream_attribute_mask, tvb, pos, length, ENC_NA);
|
|
|
|
break;
|
|
|
|
case GEX_CM_FORBIDDEN_DOWNSTREAM_ATTRIBUTE_MASK:
|
|
|
|
if (length != 4) {
|
|
|
|
expert_add_info_format(pinfo, cmam_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
proto_tree_add_item (cmam_tree, hf_docsis_vsif_gex_cmam_cm_forbidden_downstream_attribute_mask, tvb, pos, length, ENC_NA);
|
|
|
|
break;
|
|
|
|
case GEX_CM_REQUIRED_UPSTREAM_ATTRIBUTE_MASK:
|
|
|
|
if (length != 4) {
|
|
|
|
expert_add_info_format(pinfo, cmam_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
proto_tree_add_item (cmam_tree, hf_docsis_vsif_gex_cmam_cm_required_upstream_attribute_mask, tvb, pos, length, ENC_NA);
|
|
|
|
break;
|
|
|
|
case GEX_CM_FORBIDDEN_UPSTREAM_ATTRIBUTE_MASK:
|
|
|
|
if (length != 4) {
|
|
|
|
expert_add_info_format(pinfo, cmam_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
proto_tree_add_item (cmam_tree, hf_docsis_vsif_gex_cmam_cm_forbidden_upstream_attribute_mask, tvb, pos, length, ENC_NA);
|
|
|
|
break;
|
|
|
|
default: proto_tree_add_item (cmam_tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
|
|
|
} /* switch */
|
|
|
|
pos += length;
|
|
|
|
} /* while */
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#define GEX_IMJA_SSR_RULE_PRIORITY 1
|
|
|
|
#define GEX_IMJA_SSR_AUTHORIZATION_ACTION 2
|
|
|
|
#define GEX_IMJA_SSR_AUTHORIZATION_SOURCE_PREFIX_ADDRESS 3
|
|
|
|
#define GEX_IMJA_SSR_AUTHORIZATION_SOURCE_PREFIX_LENGTH 4
|
|
|
|
#define GEX_IMJA_SSR_AUTHORIZATION_GROUP_PREFIX_ADDRESS 5
|
|
|
|
#define GEX_IMJA_SSR_AUTHORIZATION_GROUP_PREFIX_LENGTH 6
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_ip_multicast_join_authorization_static_session_rule(tvbuff_t * tvb, packet_info * pinfo, proto_tree *tree, int start, guint16 len)
|
|
|
|
{
|
|
|
|
proto_item *imja_ssr_it;
|
|
|
|
proto_tree *imja_ssr_tree;
|
|
|
|
guint8 type, length;
|
|
|
|
int pos = start;
|
|
|
|
|
|
|
|
imja_ssr_it = proto_tree_add_item (tree, hf_docsis_vsif_gex_imja_ssr, tvb, start, len, ENC_NA);
|
|
|
|
imja_ssr_tree = proto_item_add_subtree(imja_ssr_it, ett_docsis_vsif_gex_imja_ssr);
|
|
|
|
|
|
|
|
while (pos < (start + len))
|
|
|
|
{
|
|
|
|
type = tvb_get_guint8 (tvb, pos++);
|
|
|
|
length = tvb_get_guint8 (tvb, pos++);
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case GEX_IMJA_SSR_RULE_PRIORITY:
|
|
|
|
if (length != 1) {
|
|
|
|
expert_add_info_format(pinfo, imja_ssr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_rule_priority, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case GEX_IMJA_SSR_AUTHORIZATION_ACTION:
|
|
|
|
if (length != 1) {
|
|
|
|
expert_add_info_format(pinfo, imja_ssr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_authorization_action, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case GEX_IMJA_SSR_AUTHORIZATION_SOURCE_PREFIX_ADDRESS:
|
|
|
|
if (length == 4) {
|
|
|
|
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_source_prefix_addressv4, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
} else if (length == 6) {
|
|
|
|
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_source_prefix_addressv6, tvb, pos, length, ENC_NA);
|
|
|
|
} else {
|
|
|
|
expert_add_info_format(pinfo, imja_ssr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case GEX_IMJA_SSR_AUTHORIZATION_SOURCE_PREFIX_LENGTH:
|
|
|
|
if (length != 1) {
|
|
|
|
expert_add_info_format(pinfo, imja_ssr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_source_prefix_length, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case GEX_IMJA_SSR_AUTHORIZATION_GROUP_PREFIX_ADDRESS:
|
|
|
|
if (length == 4) {
|
|
|
|
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_group_prefix_addressv4, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
} else if (length == 6) {
|
|
|
|
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_group_prefix_addressv6, tvb, pos, length, ENC_NA);
|
|
|
|
} else {
|
|
|
|
expert_add_info_format(pinfo, imja_ssr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case GEX_IMJA_SSR_AUTHORIZATION_GROUP_PREFIX_LENGTH:
|
|
|
|
if (length != 1) {
|
|
|
|
expert_add_info_format(pinfo, imja_ssr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_group_prefix_length, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
default: proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
|
|
|
} /* switch */
|
|
|
|
pos += length;
|
|
|
|
} /* while */
|
|
|
|
}
|
|
|
|
|
|
|
|
#define GEX_IMJA_IP_MULTICAST_PROFILE_NAME 1
|
|
|
|
#define GEX_IMJA_IP_MULTICAST_PROFILE_JOIN_AUTHORIZATION_STATIC_SESSION_RULE 2
|
|
|
|
#define GEX_IMJA_MAXIMUM_MULTICAST_SESSIONS 3
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_ip_multicast_join_authorization(tvbuff_t * tvb, packet_info * pinfo, proto_tree *tree, int start, guint16 len)
|
|
|
|
{
|
|
|
|
proto_item *imja_it;
|
|
|
|
proto_tree *imja_tree;
|
|
|
|
guint8 type, length;
|
|
|
|
int pos = start;
|
|
|
|
|
|
|
|
imja_it = proto_tree_add_item (tree, hf_docsis_vsif_gex_imja, tvb, start, len, ENC_NA);
|
|
|
|
imja_tree = proto_item_add_subtree(imja_it, ett_docsis_vsif_gex_imja);
|
|
|
|
|
|
|
|
while (pos < (start + len))
|
|
|
|
{
|
|
|
|
type = tvb_get_guint8 (tvb, pos++);
|
|
|
|
length = tvb_get_guint8 (tvb, pos++);
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case GEX_IMJA_IP_MULTICAST_PROFILE_NAME:
|
|
|
|
if ((length < 1) || (length > 15)) {
|
|
|
|
expert_add_info_format(pinfo, imja_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
proto_tree_add_item (imja_tree, hf_docsis_vsif_gex_imja_ip_multicast_profile_name, tvb, pos, length, ENC_ASCII|ENC_NA);
|
|
|
|
break;
|
|
|
|
case GEX_IMJA_IP_MULTICAST_PROFILE_JOIN_AUTHORIZATION_STATIC_SESSION_RULE:
|
|
|
|
dissect_ip_multicast_join_authorization_static_session_rule(tvb, pinfo, imja_tree, pos, length);
|
|
|
|
break;
|
|
|
|
case GEX_IMJA_MAXIMUM_MULTICAST_SESSIONS:
|
|
|
|
if (length != 2) {
|
|
|
|
expert_add_info_format(pinfo, imja_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
|
|
|
}
|
|
|
|
proto_tree_add_item (imja_tree, hf_docsis_vsif_gex_imja_maximum_multicast_sessions, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
default: proto_tree_add_item (imja_tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
|
|
|
} /* switch */
|
|
|
|
pos += length;
|
|
|
|
} /* while */
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-28 13:58:38 +00:00
|
|
|
/* Dissector for General Extension TLVs */
|
2017-10-05 08:34:18 +00:00
|
|
|
|
|
|
|
#define GEX_CM_LOAD_BALANCING_POLICY_ID 1
|
|
|
|
#define GEX_CM_LOAD_BALANCING_PRIORITY 2
|
|
|
|
#define GEX_CM_LOAD_BALANCING_GROUP_ID 3
|
|
|
|
#define GEX_CM_RANGING_CLASS_ID_EXTENSION 4
|
|
|
|
#define GEX_L2VPN_ENCODING 5
|
|
|
|
#define GEX_EXTENDED_CMTS_MIC_CONFIGURATION_SETTING 6
|
|
|
|
#define GEX_EXTENDED_SAV 7
|
|
|
|
#define GEX_CABLE_MODEM_ATTRIBUTE_MASKS 9
|
|
|
|
#define GEX_IP_MULTICAST_JOIN_AUTHORIZATION 10
|
|
|
|
#define GEX_SERVICE_TYPE_IDENTIFIER 11
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_general_extension_information (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, gint vsif_len)
|
|
|
|
{
|
|
|
|
/* Start at pos = 5, since tvb includes the Vendor ID field */
|
|
|
|
int pos = 5;
|
|
|
|
guint8 type, length;
|
|
|
|
|
|
|
|
while (pos < vsif_len)
|
|
|
|
{
|
|
|
|
/* Extract the type and length Fields from the TLV */
|
|
|
|
type = tvb_get_guint8 (tvb, pos++);
|
|
|
|
length = tvb_get_guint8 (tvb, pos++);
|
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case GEX_CM_LOAD_BALANCING_POLICY_ID:
|
|
|
|
proto_tree_add_item (tree, hf_docsis_vsif_gex_loadbal_policy_id, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case GEX_CM_LOAD_BALANCING_PRIORITY:
|
|
|
|
proto_tree_add_item (tree, hf_docsis_vsif_gex_loadbal_priority, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case GEX_CM_LOAD_BALANCING_GROUP_ID:
|
|
|
|
proto_tree_add_item (tree, hf_docsis_vsif_gex_loadbal_group_id, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case GEX_CM_RANGING_CLASS_ID_EXTENSION:
|
|
|
|
proto_tree_add_item (tree, hf_docsis_vsif_gex_ranging_class_id_extension, tvb, pos, length, ENC_BIG_ENDIAN);
|
|
|
|
break;
|
|
|
|
case GEX_L2VPN_ENCODING:
|
|
|
|
proto_tree_add_item (tree, hf_docsis_vsif_gex_l2vpn_encoding, tvb, pos, length, ENC_NA);
|
|
|
|
break;
|
|
|
|
case GEX_EXTENDED_CMTS_MIC_CONFIGURATION_SETTING:
|
|
|
|
dissect_extended_cmts_mic(tvb, tree, pos, length);
|
|
|
|
break;
|
|
|
|
case GEX_EXTENDED_SAV:
|
|
|
|
dissect_sav(tvb, pinfo, tree, pos, length);
|
|
|
|
break;
|
|
|
|
case GEX_CABLE_MODEM_ATTRIBUTE_MASKS:
|
|
|
|
dissect_cable_modem_attribute_masks(tvb, pinfo, tree, pos, length);
|
|
|
|
break;
|
|
|
|
case GEX_IP_MULTICAST_JOIN_AUTHORIZATION:
|
|
|
|
dissect_ip_multicast_join_authorization(tvb, pinfo, tree, pos, length);
|
|
|
|
break;
|
|
|
|
case GEX_SERVICE_TYPE_IDENTIFIER:
|
|
|
|
proto_tree_add_item (tree, hf_docsis_vsif_gex_service_type_identifier, tvb, pos, length, ENC_ASCII|ENC_NA);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
proto_tree_add_item (tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
|
|
|
}
|
|
|
|
pos += length;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-05-28 16:32:49 +00:00
|
|
|
/* Register the protocol with Wireshark */
|
2002-09-10 19:07:40 +00:00
|
|
|
void
|
|
|
|
proto_register_docsis_vsif (void)
|
|
|
|
{
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{&hf_docsis_vsif_vendorid,
|
2020-10-28 13:58:38 +00:00
|
|
|
{"Vendor ID", "docsis_vsif.vendorid",
|
2002-09-10 19:07:40 +00:00
|
|
|
FT_UINT24, BASE_HEX, VALS(vendorid_vals), 0x0,
|
|
|
|
"Vendor Identifier", HFILL}
|
2014-10-05 20:12:34 +00:00
|
|
|
},
|
2002-09-10 19:07:40 +00:00
|
|
|
{&hf_docsis_vsif_vendor_unknown,
|
2007-10-07 23:46:44 +00:00
|
|
|
{"VSIF Encodings", "docsis_vsif.unknown",
|
2009-06-18 23:22:10 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
2002-09-10 19:07:40 +00:00
|
|
|
"Unknown Vendor", HFILL}
|
2014-10-05 20:12:34 +00:00
|
|
|
},
|
2002-09-10 19:07:40 +00:00
|
|
|
{&hf_docsis_vsif_cisco_numphones,
|
2007-10-07 23:46:44 +00:00
|
|
|
{"Number of phone lines", "docsis_vsif.cisco.numphones",
|
2002-09-10 19:07:40 +00:00
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
2009-06-18 23:22:10 +00:00
|
|
|
NULL, HFILL}
|
2014-10-05 20:12:34 +00:00
|
|
|
},
|
2013-02-10 16:31:52 +00:00
|
|
|
#if 0
|
2002-09-10 19:07:40 +00:00
|
|
|
{&hf_docsis_vsif_cisco_ipprec,
|
2007-10-07 23:46:44 +00:00
|
|
|
{"IP Precedence Encodings", "docsis_vsif.cisco.ipprec",
|
2009-06-18 23:22:10 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}
|
2014-10-05 20:12:34 +00:00
|
|
|
},
|
2013-02-10 16:31:52 +00:00
|
|
|
#endif
|
2002-09-10 19:07:40 +00:00
|
|
|
{&hf_docsis_vsif_cisco_ipprec_val,
|
2007-10-07 23:46:44 +00:00
|
|
|
{"IP Precedence Value", "docsis_vsif.cisco.ipprec.value",
|
2002-09-10 19:07:40 +00:00
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
2009-06-18 23:22:10 +00:00
|
|
|
NULL, HFILL}
|
2014-10-05 20:12:34 +00:00
|
|
|
},
|
2002-09-10 19:07:40 +00:00
|
|
|
{&hf_docsis_vsif_cisco_ipprec_bw,
|
2007-10-07 23:46:44 +00:00
|
|
|
{"IP Precedence Bandwidth", "docsis_vsif.cisco.ipprec.bw",
|
2002-09-10 19:07:40 +00:00
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
2009-06-18 23:22:10 +00:00
|
|
|
NULL, HFILL}
|
2014-10-05 20:12:34 +00:00
|
|
|
},
|
2002-09-10 19:07:40 +00:00
|
|
|
{&hf_docsis_vsif_cisco_config_file,
|
2007-10-07 23:46:44 +00:00
|
|
|
{"IOS Config File", "docsis_vsif.cisco.iosfile",
|
2009-06-18 23:22:10 +00:00
|
|
|
FT_STRING, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}
|
2014-10-05 20:12:34 +00:00
|
|
|
},
|
2017-10-05 08:34:18 +00:00
|
|
|
{&hf_docsis_vsif_gex_loadbal_policy_id,
|
|
|
|
{".1 CM Load Balancing Policy ID", "docsis_vsif.gex.loadbal_policyid",
|
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
"General Extension Information - CM Load Balancing Policy ID", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_loadbal_priority,
|
|
|
|
{".2 CM Load Balancing Priority", "docsis_vsif.gex.loadbal_priority",
|
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
"General Extension Information - CM Load Balancing Priority", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_loadbal_group_id,
|
|
|
|
{".3 CM Load Balancing Group ID", "docsis_vsif.gex.loadbal_group_id",
|
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
"General Extension Information - CM Load Balancing Group ID", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_ranging_class_id_extension,
|
|
|
|
{".4 CM Ranging Class ID Extension", "docsis_vsif.gex.ranging_class_id_extension",
|
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
"General Extension Information - CM Ranging Class ID Extension", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_l2vpn_encoding,
|
|
|
|
{".5 L2VPN Encoding", "docsis_vsif.gex.l2vpn_encoding",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - L2VPN Encoding", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_ecm,
|
|
|
|
{".6 Extended CMTS MIC Configuration Setting", "docsis_vsif.gex.extended_cmts_mic_configuration_setting",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - Extended CMTS MIC Configuration Setting", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_ecm_extended_cmts_mic_hmac_type,
|
|
|
|
{"..1 Extended CMTS MIC Hmac type", "docsis_vsif.gex.extended_cmts_mic_hmac_type",
|
|
|
|
FT_UINT8, BASE_DEC, VALS(hmac_vals), 0x0,
|
|
|
|
"General Extension Information - Extended CMTS MIC Hmac type", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_ecm_extended_cmts_mic_bitmap,
|
2017-10-13 12:00:38 +00:00
|
|
|
{"..2 Extended CMTS MIC Bitmap", "docsis_vsif.gex.extended_cmts_mic_bitmap",
|
2017-10-05 08:34:18 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - Extended CMTS MIC Bitmap", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_ecm_explicit_extended_cmts_mic_digest_subtype,
|
|
|
|
{"..3 Explicit Extended CMTS MIC Digest Subtype", "docsis_vsif.gex.extended_cmts_mic_digest_subtype",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - Explicit Extended CMTS MIC Digest Subtype", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_sav,
|
|
|
|
{".7 Source Address Verification (SAV) Authorization Encoding", "docsis_vsif.gex.sav",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - Source Address Verification (SAV) Authorization Encoding", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_sav_group_name,
|
|
|
|
{"..1 SAV Group Name", "docsis_vsif.gex.sav.sav_group_name",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - SAV - SAV Group Name", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_sav_static_prefix_rule,
|
|
|
|
{"..2 SAV Static Prefix Rule", "docsis_vsif.gex.sav.static_prefix_rule",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - SAV -Static Prefix Rule", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_sav_static_prefix_addressv4,
|
2017-10-13 12:01:56 +00:00
|
|
|
{"...1 SAV Static Prefix Address", "docsis_vsif.gex.sav.spr.static_prefix_address4",
|
2017-10-05 08:34:18 +00:00
|
|
|
FT_IPv4, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - SAV -Static Prefix Rule - Static Prefix Address", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_sav_static_prefix_addressv6,
|
2017-10-13 12:01:56 +00:00
|
|
|
{"...1 SAV Static Prefix Address", "docsis_vsif.gex.sav.spr.static_prefix_address6",
|
2017-10-05 08:34:18 +00:00
|
|
|
FT_IPv6, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - SAV -Static Prefix Rule - Static Prefix Address", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_sav_static_prefix_length,
|
|
|
|
{"...2 SAV Static Prefix Length", "docsis_vsif.gex.sav.spr.static_prefix_length",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
|
|
|
"General Extension Information - SAV -Static Prefix Rule - Static Prefix Length", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_cmam,
|
|
|
|
{".9 CM Attribute Mask", "docsis_vsif.gex.cmam",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - CM Attribute Mask", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_cmam_cm_required_downstream_attribute_mask,
|
|
|
|
{"..1 CM Required Downstream Attribute", "docsis_vsif.gex.cmam.cm_required_downstream_attribute",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - CM Attribute Mask - CM Required Downstream Attribute", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_cmam_cm_forbidden_downstream_attribute_mask,
|
|
|
|
{"..2 CM Forbidden Downstream Attribute", "docsis_vsif.gex.cmam.cm_forbidden_downstream_attribute",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - CM Attribute Mask - CM Forbidden Downstream Attribute", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_cmam_cm_required_upstream_attribute_mask,
|
|
|
|
{"..3 CM Required Upstream Attribute", "docsis_vsif.gex.cmam.cm_required_upstream_attribute",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - CM Attribute Mask - CM Required Upstream Attribute", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_cmam_cm_forbidden_upstream_attribute_mask,
|
|
|
|
{"..4 CM Forbidden Upstream Attribute", "docsis_vsif.gex.cmam.cm_forbidden_upstream_attribute",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - CM Attribute Mask - CM Forbidden Upstream Attribute", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_imja,
|
|
|
|
{".10 IP Multicast Join Authorization", "docsis_vsif.gex.imja",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - IP Multicast Join Authorization", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_imja_ip_multicast_profile_name,
|
|
|
|
{"..1 IP Multicast Profile Name", "docsis_vsif.gex.imja.ip_multicast_profile_name",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Name", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_imja_ssr,
|
|
|
|
{"..2 IP Multicast Profile Join Authorization Static Session Rule", "docsis_vsif.gex.imja.ip_multicast_join_authorization_static_session_rule",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_imja_ssr_rule_priority,
|
|
|
|
{"...1 Rule Priority", "docsis_vsif.gex.imja.imja_ssr_rule_priority",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
|
|
|
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Rule Priority", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_imja_ssr_authorization_action,
|
|
|
|
{"...2 Authorization Action", "docsis_vsif.gex.imja.imja_ssr_authorization_action",
|
|
|
|
FT_UINT8, BASE_DEC, VALS(authorization_action_vals), 0x0,
|
|
|
|
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Rule Priority", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_imja_ssr_source_prefix_addressv4,
|
2017-10-13 12:01:56 +00:00
|
|
|
{"...3 Source Prefix Address", "docsis_vsif.gex.imja.imja_ssr_source_prefix_address4",
|
2017-10-05 08:34:18 +00:00
|
|
|
FT_IPv4, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Source Prefix Address", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_imja_ssr_source_prefix_addressv6,
|
2017-10-13 12:01:56 +00:00
|
|
|
{"...3 Source Prefix Address", "docsis_vsif.gex.imja.imja_ssr_source_prefix_address6",
|
2017-10-05 08:34:18 +00:00
|
|
|
FT_IPv6, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Source Prefix Address", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_imja_ssr_source_prefix_length,
|
|
|
|
{"...4 Source Prefix Length", "docsis_vsif.gex.imja.imja_ssr_source_prefix_length",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
|
|
|
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Source Prefix Length", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_imja_ssr_group_prefix_addressv4,
|
2017-10-13 12:01:56 +00:00
|
|
|
{"...5 Group Prefix Address", "docsis_vsif.gex.imja.imja_ssr_group_prefix_address4",
|
2017-10-05 08:34:18 +00:00
|
|
|
FT_IPv4, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Group Prefix Address", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_imja_ssr_group_prefix_addressv6,
|
2017-10-13 12:01:56 +00:00
|
|
|
{"...5 Group Prefix Address", "docsis_vsif.gex.imja.imja_ssr_group_prefix_address6",
|
2017-10-05 08:34:18 +00:00
|
|
|
FT_IPv6, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Group Prefix Address", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_imja_ssr_group_prefix_length,
|
|
|
|
{"...6 Group Prefix Length", "docsis_vsif.gex.imja.imja_ssr_group_prefix_length",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
|
|
|
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Group Prefix Length", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_imja_maximum_multicast_sessions,
|
|
|
|
{"..3 Maximum Multicast Sessions", "docsis_vsif.gex.imja.imja_maximum_multicast_sessions",
|
|
|
|
FT_UINT16, BASE_DEC, NULL, 0x0,
|
|
|
|
"General Extension Information - IP Multicast Join Authorization - Maximum Multicast Sessions", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_gex_service_type_identifier,
|
|
|
|
{".11 Service Type Identifier", "docsis_vsif.gex.service_type_identifier",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0x0,
|
|
|
|
"General Extension Information - Service Type Identifier", HFILL}
|
|
|
|
},
|
|
|
|
{&hf_docsis_vsif_tlv_unknown,
|
|
|
|
{"Unknown VSIF TLV", "docsis_vsif.unknown",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}
|
|
|
|
},
|
2002-09-10 19:07:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_docsis_vsif,
|
|
|
|
&ett_docsis_vsif_ipprec,
|
2017-10-05 08:34:18 +00:00
|
|
|
&ett_docsis_vsif_gex_ecm,
|
|
|
|
&ett_docsis_vsif_gex_sav,
|
|
|
|
&ett_docsis_vsif_gex_sav_spr,
|
|
|
|
&ett_docsis_vsif_gex_cmam,
|
|
|
|
&ett_docsis_vsif_gex_imja,
|
|
|
|
&ett_docsis_vsif_gex_imja_ssr
|
2002-09-10 19:07:40 +00:00
|
|
|
};
|
|
|
|
|
2017-05-03 13:38:29 +00:00
|
|
|
expert_module_t* expert_docsis_vsif;
|
|
|
|
|
|
|
|
static ei_register_info ei[] = {
|
|
|
|
{&ei_docsis_vsif_tlvlen_bad, { "docsis_vsif.tlvlenbad", PI_MALFORMED, PI_ERROR, "Bad TLV length", EXPFILL}},
|
|
|
|
{&ei_docsis_vsif_tlvtype_unknown, { "docsis_vsif.tlvtypeunknown", PI_PROTOCOL, PI_WARN, "Unknown TLV type", EXPFILL}},
|
|
|
|
};
|
|
|
|
|
2002-09-10 19:07:40 +00:00
|
|
|
proto_docsis_vsif =
|
2006-04-19 21:43:48 +00:00
|
|
|
proto_register_protocol ("DOCSIS Vendor Specific Encodings",
|
2011-02-08 00:24:10 +00:00
|
|
|
"DOCSIS VSIF", "docsis_vsif");
|
2002-09-10 19:07:40 +00:00
|
|
|
|
|
|
|
proto_register_field_array (proto_docsis_vsif, hf, array_length (hf));
|
|
|
|
proto_register_subtree_array (ett, array_length (ett));
|
2017-05-03 13:38:29 +00:00
|
|
|
expert_docsis_vsif = expert_register_protocol(proto_docsis_vsif);
|
|
|
|
expert_register_field_array(expert_docsis_vsif, ei, array_length(ei));
|
2002-09-10 19:07:40 +00:00
|
|
|
|
2015-12-11 01:56:03 +00:00
|
|
|
register_dissector ("docsis_vsif", dissect_vsif, proto_docsis_vsif);
|
2002-09-10 19:07:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_docsis_vsif (void)
|
|
|
|
{
|
2011-02-08 00:24:10 +00:00
|
|
|
#if 0
|
2002-09-10 19:07:40 +00:00
|
|
|
dissector_handle_t docsis_vsif_handle;
|
|
|
|
|
|
|
|
docsis_vsif_handle = find_dissector ("docsis_vsif");
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_add_uint ("docsis", 0xFD, docsis_vsif_handle);
|
2011-02-08 00:24:10 +00:00
|
|
|
#endif
|
2002-09-10 19:07:40 +00:00
|
|
|
}
|
2014-10-05 20:12:34 +00:00
|
|
|
|
|
|
|
/*
|
2019-07-26 18:43:17 +00:00
|
|
|
* Editor modelines - https://www.wireshark.org/tools/modelines.html
|
2014-10-05 20:12:34 +00:00
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* c-basic-offset: 2
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* ex: set shiftwidth=2 tabstop=8 expandtab:
|
|
|
|
* :indentSize=2:tabSize=8:noTabs=true:
|
|
|
|
*/
|