diff options
Diffstat (limited to 'plugins/docsis/packet-dbcrsp.c')
-rw-r--r-- | plugins/docsis/packet-dbcrsp.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/plugins/docsis/packet-dbcrsp.c b/plugins/docsis/packet-dbcrsp.c index 9b9e6d5088..e4f9268590 100644 --- a/plugins/docsis/packet-dbcrsp.c +++ b/plugins/docsis/packet-dbcrsp.c @@ -39,7 +39,7 @@ static dissector_handle_t docsis_tlv_handle; /* Initialize the subtree pointers */ static gint ett_docsis_dbcrsp = -1; -/* Code to actually dissect the packets */ +/* Dissection */ static void dissect_dbcrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { @@ -53,41 +53,35 @@ dissect_dbcrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) confcode = tvb_get_guint8 (tvb, 2); col_add_fstr (pinfo->cinfo, COL_INFO, - "Dynamic Bonding Change Response: Tran-Id = %u (%s)", transid, - val_to_str (confcode, docsis_conf_code, "%d")); + "Dynamic Bonding Change Response: Tran-Id = %u (%s)", transid, + val_to_str (confcode, docsis_conf_code, "%d")); if (tree) - { - dbcrsp_item = proto_tree_add_protocol_format (tree, proto_docsis_dbcrsp, - tvb, 0, -1, - "Dynamic Bonding Change Response"); - dbcrsp_tree = proto_item_add_subtree (dbcrsp_item, ett_docsis_dbcrsp); - proto_tree_add_item (dbcrsp_tree, hf_docsis_dbcrsp_tranid, - tvb, 0, 2, ENC_BIG_ENDIAN); - proto_tree_add_item( dbcrsp_tree, hf_docsis_dbcrsp_conf_code, - tvb, 2, 1, ENC_BIG_ENDIAN ); - } + { + dbcrsp_item = proto_tree_add_protocol_format (tree, proto_docsis_dbcrsp, + tvb, 0, -1, + "Dynamic Bonding Change Response"); + dbcrsp_tree = proto_item_add_subtree (dbcrsp_item, ett_docsis_dbcrsp); + proto_tree_add_item (dbcrsp_tree, hf_docsis_dbcrsp_tranid, + tvb, 0, 2, ENC_BIG_ENDIAN); + proto_tree_add_item( dbcrsp_tree, hf_docsis_dbcrsp_conf_code, + tvb, 2, 1, ENC_BIG_ENDIAN ); + } /* Call Dissector for Appendix C TLV's */ next_tvb = tvb_new_subset_remaining (tvb, 3); call_dissector (docsis_tlv_handle, next_tvb, pinfo, dbcrsp_tree); } /* Register the protocol with Wireshark */ - -/* - * this format is required because a script is used to build the C function - * that calls all the protocol registration. - */ void proto_register_docsis_dbcrsp (void) { - /* Setup list of header fields See Section 1.6.1 for details*/ static hf_register_info hf[] = { {&hf_docsis_dbcrsp_tranid, {"Transaction Id", "docsis_dbcrsp.tranid", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} - }, + }, {&hf_docsis_dbcrsp_conf_code, {"Confirmation Code", "docsis_dbcrsp.conf_code", FT_UINT8, BASE_DEC, VALS (docsis_conf_code), 0x0, @@ -95,17 +89,14 @@ proto_register_docsis_dbcrsp (void) }, }; -/* Setup protocol subtree array */ static gint *ett[] = { &ett_docsis_dbcrsp, }; -/* Register the protocol name and description */ proto_docsis_dbcrsp = proto_register_protocol ("DOCSIS Dynamic Bonding Change Response", - "DOCSIS DBC-RSP", - "docsis_dbcrsp"); + "DOCSIS DBC-RSP", + "docsis_dbcrsp"); -/* Required function calls to register the header fields and subtrees used */ proto_register_field_array (proto_docsis_dbcrsp, hf, array_length (hf)); proto_register_subtree_array (ett, array_length (ett)); @@ -113,10 +104,6 @@ proto_register_docsis_dbcrsp (void) } -/* If this dissector uses sub-dissector registration add a registration routine. - This format is required because a script is used to find these routines and - create the code that calls these routines. -*/ void proto_reg_handoff_docsis_dbcrsp (void) { @@ -126,3 +113,16 @@ proto_reg_handoff_docsis_dbcrsp (void) docsis_tlv_handle = find_dissector ("docsis_tlv"); dissector_add_uint ("docsis_mgmt", 0x25, docsis_dbcrsp_handle); } + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * 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: + */ |