From c2f3e0a4472b8528387eadb3ec7ed40f5d0e08e9 Mon Sep 17 00:00:00 2001 From: Adrian Simionov Date: Sun, 8 Jun 2014 14:47:06 +0200 Subject: Added TLV 16 for MDD message Change-Id: Ia48056b5680d86d343dc106cd511cd5ed5e889e8 Reviewed-on: https://code.wireshark.org/review/2034 Reviewed-by: Evan Huus --- plugins/docsis/packet-mdd.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'plugins') diff --git a/plugins/docsis/packet-mdd.c b/plugins/docsis/packet-mdd.c index 3a2801ef38..8dc9295ee3 100644 --- a/plugins/docsis/packet-mdd.c +++ b/plugins/docsis/packet-mdd.c @@ -1,7 +1,8 @@ /* packet-mdd.c - * Routines for MDD Message dissection - * Copyright 2007, Bruno Verstuyft * + * Routines for MDD Message dissection + * Copyright 2014, Adrian Simionov + * Copyright 2007, Bruno Verstuyft * * Wireshark - Network traffic analyzer * By Gerald Combs @@ -25,7 +26,7 @@ #include "config.h" #include - +#include #define DOWNSTREAM_ACTIVE_CHANNEL_LIST 1 #define MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP 2 @@ -41,6 +42,7 @@ #define UPSTREAM_TRANSMIT_POWER_REPORTING 12 #define DSG_DA_TO_DSID_ASSOCIATION_ENTRY 13 #define CM_STATUS_EVENT_ENABLE_NON_CHANNEL_SPECIFIC_EVENTS 15 +#define EXTENDED_UPSTREAM_TRANSMIT_POWER_SUPPORT 16 /*Downstream Active Channel List*/ #define DOWNSTREAM_ACTIVE_CHANNEL_LIST_CHANNEL_ID 1 @@ -125,7 +127,6 @@ #define CM_DOESNT_REPORT_TRANSMIT_POWER 0 #define CM_REPORTS_TRANSMIT_POWER 1 - /*Dsg DA to DSID association entry*/ #define DSG_DA_TO_DSID_ASSOCIATION_DA 1 #define DSG_DA_TO_DSID_ASSOCIATION_DSID 2 @@ -168,9 +169,9 @@ static const value_string mdd_tlv_vals[] = { {CM_STATUS_EVENT_CONTROL , "CM-STATUS Event Control"}, {UPSTREAM_TRANSMIT_POWER_REPORTING , "Upstream Transmit Power Reporting"}, {DSG_DA_TO_DSID_ASSOCIATION_ENTRY , "DSG DA-to-DSID Association Entry"}, - {CM_STATUS_EVENT_ENABLE_NON_CHANNEL_SPECIFIC_EVENTS , - "CM-STATUS Event Enable for Non-Channel-Specific-Events"}, - {0, NULL} + {CM_STATUS_EVENT_ENABLE_NON_CHANNEL_SPECIFIC_EVENTS , "CM-STATUS Event Enable for Non-Channel-Specific-Events"}, + {EXTENDED_UPSTREAM_TRANSMIT_POWER_SUPPORT , "Extended Upstream Transmit Power Support"}, + {0, NULL} }; @@ -232,8 +233,6 @@ static const value_string upstream_transmit_power_reporting_vals[] = { {0, NULL} }; - - /* Initialize the protocol and registered fields */ static int proto_docsis_mdd = -1; static int hf_docsis_mdd_ccc = -1; @@ -291,6 +290,8 @@ static int hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_sequ static int hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_operating_on_battery_backup = -1; static int hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_returned_to_ac_power = -1; +static int hf_docsis_mdd_extended_upstream_transmit_power_support = -1; + /* Initialize the subtree pointers */ static gint ett_docsis_mdd = -1; @@ -521,6 +522,10 @@ dissect_mdd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_operating_on_battery_backup, tvb, subpos , 2,ENC_BIG_ENDIAN); proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_returned_to_ac_power, tvb, subpos , 2,ENC_BIG_ENDIAN); break; + case EXTENDED_UPSTREAM_TRANSMIT_POWER_SUPPORT: + subpos = pos + 2; + proto_tree_add_item (tlv_tree, hf_docsis_mdd_extended_upstream_transmit_power_support, tvb, subpos, 1, ENC_BIG_ENDIAN); + break; } pos += length + 2; } @@ -726,6 +731,11 @@ void proto_register_docsis_mdd (void) FT_UINT16, BASE_DEC, NULL, 0x0400, "CM-STATUS event non-channel-event Cm returned to AC power", HFILL} }, + {&hf_docsis_mdd_extended_upstream_transmit_power_support, + { "Extended Upstream Transmit Power Support", "docsis_mdd.extended_upstream_transmit_power_support", + FT_BOOLEAN, BASE_NONE, TFS(&tfs_on_off), 0x0, + "Mdd Extended Upstream Transmit Power Support", HFILL} + }, }; -- cgit v1.2.3