From 0972db2f9d5a82d0545f3b22f03d4c8388fda354 Mon Sep 17 00:00:00 2001 From: Adrian Simionov Date: Tue, 9 May 2017 23:16:16 +1000 Subject: docsis: DCC-REQ TLV 2.7 support Change-Id: I40724306d5facd0f4a5a9ca2354330577857d27f Reviewed-on: https://code.wireshark.org/review/21563 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- plugins/docsis/packet-dccreq.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'plugins') diff --git a/plugins/docsis/packet-dccreq.c b/plugins/docsis/packet-dccreq.c index 0c7e306cf6..6ace50030f 100644 --- a/plugins/docsis/packet-dccreq.c +++ b/plugins/docsis/packet-dccreq.c @@ -49,6 +49,7 @@ void proto_reg_handoff_docsis_dccreq(void); #define DCCREQ_DS_INTLV_DEPTH 4 #define DCCREQ_DS_CHAN_ID 5 #define DCCREQ_DS_SYNC_SUB 6 +#define DCCREQ_DS_OFDM_BLOCK_FREQ 7 /* Define Service Flow Substitution subtypes * These are subtypes of DCCREQ_SF_SUB (7) @@ -73,6 +74,7 @@ static int hf_docsis_dccreq_ds_intlv_depth_i = -1; static int hf_docsis_dccreq_ds_intlv_depth_j = -1; static int hf_docsis_dccreq_ds_chan_id = -1; static int hf_docsis_dccreq_ds_sync_sub = -1; +static int hf_docsis_dccreq_ds_ofdm_block_freq = -1; static int hf_docsis_dccreq_init_tech = -1; static int hf_docsis_dccreq_ucd_sub = -1; static int hf_docsis_dccreq_said_sub_cur = -1; @@ -139,6 +141,7 @@ static const value_string ds_param_subtlv_vals[] = { {DCCREQ_DS_INTLV_DEPTH, "Interleaver Depth"}, {DCCREQ_DS_CHAN_ID, "Downstream Channel ID"}, {DCCREQ_DS_SYNC_SUB, "SYNC Substitution"}, + {DCCREQ_DS_OFDM_BLOCK_FREQ, "OFDM Block Frequency"}, {0, NULL} }; @@ -149,6 +152,7 @@ static const value_string sf_sub_subtlv_vals[] = { {0, NULL} }; +static const unit_name_string local_units_hz = { "Hz", NULL }; /* Dissection */ static void @@ -237,6 +241,16 @@ dissect_dccreq_ds_params (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree, expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_dccreq_tlvlen_bad, "Wrong TLV length: %u", length); } break; + case DCCREQ_DS_OFDM_BLOCK_FREQ: + if (length == 4) + { + proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_ofdm_block_freq, tvb, pos, length, ENC_BIG_ENDIAN); + } + else + { + expert_add_info_format(pinfo, tlv_len_item, &ei_docsis_dccreq_tlvlen_bad, "Wrong TLV length: %u", length); + } + break; } pos += length; @@ -536,6 +550,15 @@ proto_register_docsis_dccreq (void) HFILL } }, + {&hf_docsis_dccreq_ds_ofdm_block_freq , + { + "OFDM Block Frequency", + "docsis_dccreq.ds_ofdm_block_freq", + FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &local_units_hz, 0x0, + NULL, + HFILL + } + }, {&hf_docsis_dccreq_init_tech , { "Initialization Technique", -- cgit v1.2.1