From Didier Gautheron:
[obnox/wireshark/wip.git] / plugins / docsis / packet-dsdreq.c
index 4ceabf86740980d5dfdafe626663d0086f4150b1..50cb7258a7e75042d874ed6b77719c583e486087 100644 (file)
@@ -4,8 +4,8 @@
  *
  * $Id$
  *
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
  * This program is free software; you can redistribute it and/or
 # include "config.h"
 #endif
 
-#include "moduleinfo.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <gmodule.h>
-
 #include <epan/packet.h>
 
 /* Initialize the protocol and registered fields */
@@ -56,7 +48,7 @@ dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 {
 
   proto_item *it;
-  proto_tree *dsdreq_tree;
+  proto_tree *dsdreq_tree = NULL;
   guint16 transid;
   tvbuff_t *next_tvb;
 
@@ -81,16 +73,16 @@ dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
       proto_tree_add_item (dsdreq_tree, hf_docsis_dsdreq_sfid, tvb, 4, 4,
                           FALSE);
 
-      /* Call Dissector for Appendix C TLV's */
-      next_tvb = tvb_new_subset (tvb, 8, -1, -1);
-      call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsdreq_tree);
     }
+    /* Call Dissector for Appendix C TLV's */
+    next_tvb = tvb_new_subset_remaining (tvb, 8);
+    call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsdreq_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.
@@ -104,22 +96,22 @@ proto_register_docsis_dsdreq (void)
 /* Setup list of header fields  See Section 1.6.1 for details*/
   static hf_register_info hf[] = {
     {&hf_docsis_dsdreq,
-     {"Dynamic Service Delete Request", "docsis.dsdreq",
-      FT_BYTES, BASE_HEX, NULL, 0x0,
-      "Dynamic Service Delete Request", HFILL}
+     {"Dynamic Service Delete Request", "docsis_dsdreq",
+      FT_BYTES, BASE_NONE, NULL, 0x0,
+      NULL, HFILL}
      },
     {&hf_docsis_dsdreq_tranid,
-     {"Transaction Id", "docsis.dsdreq.tranid",
+     {"Transaction Id", "docsis_dsdreq.tranid",
       FT_UINT16, BASE_DEC, NULL, 0x0,
-      "Transaction Id", HFILL}
+      NULL, HFILL}
      },
     {&hf_docsis_dsdreq_rsvd,
-     {"Reserved", "docsis.dsdreq.rsvd",
+     {"Reserved", "docsis_dsdreq.rsvd",
       FT_UINT16, BASE_HEX, NULL, 0x0,
-      "Reserved", HFILL}
+      NULL, HFILL}
      },
     {&hf_docsis_dsdreq_sfid,
-     {"Service Flow ID", "docsis.dsdreq.sfid",
+     {"Service Flow ID", "docsis_dsdreq.sfid",
       FT_UINT32, BASE_DEC, NULL, 0x0,
       "Service Flow Id", HFILL}
      },