X-Git-Url: http://git.samba.org/samba.git/?p=obnox%2Fwireshark%2Fwip.git;a=blobdiff_plain;f=plugins%2Fdocsis%2Fpacket-uccreq.c;h=ba5aa253841a00caef586900a825bb242cfc327b;hp=353da0a9af01733f44678405efbb535f73bdecb6;hb=f53596396116d9cfb0f062c7c7704b36674483f0;hpb=1f2fdef23054979d2b5b0912a510d413df16b152;ds=sidebyside diff --git a/plugins/docsis/packet-uccreq.c b/plugins/docsis/packet-uccreq.c index 353da0a9af..ba5aa25384 100644 --- a/plugins/docsis/packet-uccreq.c +++ b/plugins/docsis/packet-uccreq.c @@ -2,10 +2,10 @@ * Routines for Upstream Channel Change Request dissection * Copyright 2002, Anand V. Narwani * - * $Id: packet-uccreq.c,v 1.5 2003/05/28 14:52:52 gerald Exp $ + * $Id$ * - * Ethereal - Network traffic analyzer - * By Gerald Combs + * Wireshark - Network traffic analyzer + * By Gerald Combs * Copyright 1998 Gerald Combs * * This program is free software; you can redistribute it and/or @@ -27,16 +27,6 @@ # include "config.h" #endif -#include -#include -#include - -#include "plugins/plugin_api.h" -#include "plugins/plugin_api_defs.h" -#include "moduleinfo.h" - -#include - #include /* Initialize the protocol and registered fields */ @@ -55,13 +45,11 @@ dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { proto_item *it; - proto_tree *uccreq_tree; - guint16 tlv_data_len; + proto_tree *uccreq_tree = NULL; guint8 chid; tvbuff_t *next_tvb; chid = tvb_get_guint8 (tvb, 0); - tlv_data_len = tvb_length_remaining (tvb, 1); if (check_col (pinfo->cinfo, COL_INFO)) { @@ -74,17 +62,16 @@ dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) if (tree) { it = - proto_tree_add_protocol_format (tree, proto_docsis_uccreq, tvb, 0, - tvb_length_remaining (tvb, 0), + proto_tree_add_protocol_format (tree, proto_docsis_uccreq, tvb, 0, -1, "UCC Request"); uccreq_tree = proto_item_add_subtree (it, ett_docsis_uccreq); proto_tree_add_item (uccreq_tree, hf_docsis_uccreq_upchid, tvb, 0, 1, FALSE); - /* call dissector for Appendix C TLV's */ - next_tvb = tvb_new_subset (tvb, 1, tlv_data_len, tlv_data_len); - call_dissector (docsis_tlv_handle, next_tvb, pinfo, uccreq_tree); } + /* call dissector for Appendix C TLV's */ + next_tvb = tvb_new_subset_remaining (tvb, 1); + call_dissector (docsis_tlv_handle, next_tvb, pinfo, uccreq_tree); } @@ -92,7 +79,7 @@ dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) -/* Register the protocol with Ethereal */ +/* Register the protocol with Wireshark */ /* this format is require because a script is used to build the C function that calls all the protocol registration. @@ -106,14 +93,14 @@ proto_register_docsis_uccreq (void) /* Setup list of header fields See Section 1.6.1 for details*/ static hf_register_info hf[] = { {&hf_docsis_uccreq, - {"Upstream Channel Change Request", "docsis.uccreq", - FT_BYTES, BASE_HEX, NULL, 0x0, - "Upstream Channel Change Request", HFILL} + {"Upstream Channel Change Request", "docsis_uccreq", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL} }, {&hf_docsis_uccreq_upchid, - {"Upstream Channel Id", "docsis.uccreq.upchid", + {"Upstream Channel Id", "docsis_uccreq.upchid", FT_UINT8, BASE_DEC, NULL, 0x0, - "Upstream Channel Id", HFILL} + NULL, HFILL} }, };