aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorBruno Verstuyft <bruno.verstuyft@excentis.com>2018-11-14 15:14:03 +0100
committerAnders Broman <a.broman58@gmail.com>2018-11-14 17:01:04 +0000
commit64755470895a93ffe24f342f72405d0e69e97b0a (patch)
tree2eed7a2b552a7d9b3c495b8dcfad9f851c263549 /epan
parentdb7653fd2ce8542a8648dad0c8360c3eb82e6ec0 (diff)
DOCSIS: both TLV 43 and 44 need VSIF encodings
Change-Id: Ide8fe96de05423fed135797988dd620b92e9cddc Reviewed-on: https://code.wireshark.org/review/30628 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-docsis-tlv.c41
-rw-r--r--epan/dissectors/packet-docsis-tlv.h1
2 files changed, 39 insertions, 3 deletions
diff --git a/epan/dissectors/packet-docsis-tlv.c b/epan/dissectors/packet-docsis-tlv.c
index 90257e206e..c88dcb69ed 100644
--- a/epan/dissectors/packet-docsis-tlv.c
+++ b/epan/dissectors/packet-docsis-tlv.c
@@ -441,6 +441,8 @@ static gint ett_docsis_tlv_snmpv3_kick = -1;
static gint ett_docsis_tlv_ds_ch_list = -1;
static gint ett_docsis_tlv_ds_ch_list_single = -1;
static gint ett_docsis_tlv_ds_ch_list_range = -1;
+static gint ett_docsis_tlv_ext_field = -1;
+static gint ett_docsis_tlv_vendor_specific_cap = -1;
static gint ett_docsis_tlv_dut_filter = -1;
static gint ett_docsis_tlv_tcc = -1;
static gint ett_docsis_tlv_tcc_ucd = -1;
@@ -2956,6 +2958,36 @@ dissect_ds_ch_list(tvbuff_t * tvb, packet_info* pinfo, proto_tree *tree, int sta
}
static void
+dissect_docsis_extension_field(tvbuff_t * tvb, packet_info* pinfo, proto_tree *tree, int start, guint16 len)
+{
+ proto_tree *ext_field_tree;
+ proto_item *ext_field_item;
+ tvbuff_t *vsif_tvb;
+
+ ext_field_tree =
+ proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_ext_field, &ext_field_item,
+ "43 DOCSIS Extension Field (Length = %u)", len);
+
+ vsif_tvb = tvb_new_subset_length (tvb, start, len);
+ call_dissector (docsis_vsif_handle, vsif_tvb, pinfo, ext_field_tree);
+}
+
+static void
+dissect_vendor_specific_capabilities(tvbuff_t * tvb, packet_info* pinfo, proto_tree *tree, int start, guint16 len)
+{
+ proto_tree *vend_spec_cap_tree;
+ proto_item *vend_spec_cap_item;
+ tvbuff_t *vsif_tvb;
+
+ vend_spec_cap_tree =
+ proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_vendor_specific_cap, &vend_spec_cap_item,
+ "44 Vendor Specific Capabilities (Length = %u)", len);
+
+ vsif_tvb = tvb_new_subset_length (tvb, start, len);
+ call_dissector (docsis_vsif_handle, vsif_tvb, pinfo, vend_spec_cap_tree);
+}
+
+static void
dissect_tcc_err(tvbuff_t * tvb, packet_info* pinfo, proto_tree *tree, int start, guint16 len)
{
guint8 type, length;
@@ -4502,7 +4534,6 @@ dissect_docsis_tlv (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void
gint total_len;
guint8 type, length;
guint16 x;
- tvbuff_t *vsif_tvb;
gint previous_channel_id = -1;
total_len = tvb_reported_length_remaining (tvb, 0);
@@ -4827,9 +4858,11 @@ dissect_docsis_tlv (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void
expert_add_info_format(pinfo, it, &ei_docsis_tlv_tlvlen_bad, "Wrong TLV length: %u", length);
}
break;
+ case TLV_DOCSIS_EXTENSION_FIELD:
+ dissect_docsis_extension_field(tvb, pinfo, tlv_tree, pos, length);
+ break;
case TLV_VENDOR_SPEC:
- vsif_tvb = tvb_new_subset_length (tvb, pos, length);
- call_dissector (docsis_vsif_handle, vsif_tvb, pinfo, tlv_tree);
+ dissect_vendor_specific_capabilities(tvb, pinfo, tlv_tree, pos, length);
break;
case TLV_DUT_FILTER:
dissect_dut_filter(tvb, pinfo, tlv_tree, pos, length);
@@ -6764,6 +6797,8 @@ proto_register_docsis_tlv (void)
&ett_docsis_tlv_ds_ch_list,
&ett_docsis_tlv_ds_ch_list_single,
&ett_docsis_tlv_ds_ch_list_range,
+ &ett_docsis_tlv_ext_field,
+ &ett_docsis_tlv_vendor_specific_cap,
&ett_docsis_tlv_dut_filter,
&ett_docsis_tlv_tcc,
&ett_docsis_tlv_tcc_ucd,
diff --git a/epan/dissectors/packet-docsis-tlv.h b/epan/dissectors/packet-docsis-tlv.h
index f16b361ec2..308c35422c 100644
--- a/epan/dissectors/packet-docsis-tlv.h
+++ b/epan/dissectors/packet-docsis-tlv.h
@@ -57,6 +57,7 @@
#define TLV_ENABLE_TEST_MODES 40
#define TLV_DS_CH_LIST 41
#define TLV_MC_MAC_ADDRESS 42
+#define TLV_DOCSIS_EXTENSION_FIELD 43
#define TLV_VENDOR_SPEC 44
#define TLV_DUT_FILTER 45
#define TLV_TCC 46