register_dissector -> new_register_dissector for plugins.
authorMichael Mann <mmann78@netscape.net>
Sat, 14 Nov 2015 20:11:44 +0000 (15:11 -0500)
committerMichael Mann <mmann78@netscape.net>
Sat, 14 Nov 2015 21:54:39 +0000 (21:54 +0000)
Picking off "easy" dissectors that only have one or two exit points at most.

Change-Id: Ie98e071a7cb568c13c8958de56b1fc25a4ce2ce9
Reviewed-on: https://code.wireshark.org/review/11831
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
60 files changed:
plugins/docsis/packet-bintrngreq.c
plugins/docsis/packet-bpkmattr.c
plugins/docsis/packet-bpkmreq.c
plugins/docsis/packet-bpkmrsp.c
plugins/docsis/packet-cmctrlreq.c
plugins/docsis/packet-cmctrlrsp.c
plugins/docsis/packet-cmstatus.c
plugins/docsis/packet-dbcack.c
plugins/docsis/packet-dbcreq.c
plugins/docsis/packet-dbcrsp.c
plugins/docsis/packet-dccack.c
plugins/docsis/packet-dccreq.c
plugins/docsis/packet-dccrsp.c
plugins/docsis/packet-dcd.c
plugins/docsis/packet-docsis.c
plugins/docsis/packet-dpvreq.c
plugins/docsis/packet-dpvrsp.c
plugins/docsis/packet-dsaack.c
plugins/docsis/packet-dsareq.c
plugins/docsis/packet-dsarsp.c
plugins/docsis/packet-dscack.c
plugins/docsis/packet-dscreq.c
plugins/docsis/packet-dscrsp.c
plugins/docsis/packet-dsdreq.c
plugins/docsis/packet-dsdrsp.c
plugins/docsis/packet-intrngreq.c
plugins/docsis/packet-macmgmt.c
plugins/docsis/packet-map.c
plugins/docsis/packet-mdd.c
plugins/docsis/packet-regack.c
plugins/docsis/packet-regreq.c
plugins/docsis/packet-regreqmp.c
plugins/docsis/packet-regrsp.c
plugins/docsis/packet-regrspmp.c
plugins/docsis/packet-rngreq.c
plugins/docsis/packet-rngrsp.c
plugins/docsis/packet-sync.c
plugins/docsis/packet-tlv-cmctrl.c
plugins/docsis/packet-tlv.c
plugins/docsis/packet-type29ucd.c
plugins/docsis/packet-uccreq.c
plugins/docsis/packet-uccrsp.c
plugins/docsis/packet-ucd.c
plugins/docsis/packet-vendor.c
plugins/ethercat/packet-ecatmb.c
plugins/ethercat/packet-esl.c
plugins/ethercat/packet-ethercat-frame.c
plugins/irda/packet-irda.c
plugins/irda/packet-sir.c
plugins/wimax/msg_aas_beam.c
plugins/wimax/msg_dsc.c
plugins/wimax/msg_reg_rsp.c
plugins/wimax/msg_sbc.c
plugins/wimax/packet-wmx.c
plugins/wimax/wimax_cdma_code_decoder.c
plugins/wimax/wimax_fch_decoder.c
plugins/wimax/wimax_ffb_decoder.c
plugins/wimax/wimax_hack_decoder.c
plugins/wimax/wimax_pdu_decoder.c
plugins/wimax/wimax_phy_attributes_decoder.c

index dcb21e2335a4e9e1ac9d7d21fa920e17208114f7..ad69e3a7d33b61a9ba239e8e1793b873337476ae 100644 (file)
@@ -41,8 +41,8 @@ static int hf_docsis_bintrngreq_capflags_encrypt = -1;
 static gint ett_docsis_bintrngreq = -1;
 
 /* Dissection */
-static void
-dissect_bintrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_bintrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *bintrngreq_item;
   proto_tree *bintrngreq_tree;
@@ -76,6 +76,7 @@ dissect_bintrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     proto_tree_add_item (bintrngreq_tree, hf_docsis_bintrngreq_up_chid,
                          tvb, offset, 1, ENC_BIG_ENDIAN);
   }
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -126,7 +127,7 @@ proto_register_docsis_bintrngreq (void)
   proto_register_field_array (proto_docsis_bintrngreq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_bintrngreq", dissect_bintrngreq, proto_docsis_bintrngreq);
+  new_register_dissector ("docsis_bintrngreq", dissect_bintrngreq, proto_docsis_bintrngreq);
 }
 
 void
index 7fc5e43318dec13e61439000750ead719e81cb08..769c59ecab0ae42bd63ea43792cad1da765a99ee 100644 (file)
@@ -339,8 +339,8 @@ dissect_attrs (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     }                           /* while */
 }
 
-static void
-dissect_bpkmattr (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_bpkmattr (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
 
   proto_item *it;
@@ -354,6 +354,7 @@ dissect_bpkmattr (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
       bpkmattr_tree = proto_item_add_subtree (it, ett_docsis_bpkmattr);
       dissect_attrs (tvb, pinfo, bpkmattr_tree);
     }
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -533,7 +534,7 @@ proto_register_docsis_bpkmattr (void)
   proto_register_field_array (proto_docsis_bpkmattr, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_bpkmattr", dissect_bpkmattr,
+  new_register_dissector ("docsis_bpkmattr", dissect_bpkmattr,
                       proto_docsis_bpkmattr);
 }
 
index 6f9ba561a6d012ec142321d3734ee68f1e976cee..3a5697933d6db7ded0b739790cdc735732751c15 100644 (file)
@@ -60,8 +60,8 @@ static gint ett_docsis_bpkmreq = -1;
 static dissector_handle_t attrs_handle;
 
 /* Dissection */
-static void
-dissect_bpkmreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_bpkmreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *bpkmreq_tree;
@@ -89,6 +89,7 @@ dissect_bpkmreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 
   attrs_tvb = tvb_new_subset_remaining (tvb, 4);
   call_dissector (attrs_handle, attrs_tvb, pinfo, tree);
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -124,7 +125,7 @@ proto_register_docsis_bpkmreq (void)
   proto_register_field_array (proto_docsis_bpkmreq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_bpkmreq", dissect_bpkmreq,
+  new_register_dissector ("docsis_bpkmreq", dissect_bpkmreq,
                       proto_docsis_bpkmreq);
 }
 
index 6cd5f20f2d40f5612ef113063f8b73469df06897..48a1785f93edcf3498928956af510df27006cb44 100644 (file)
@@ -60,8 +60,8 @@ static gint ett_docsis_bpkmrsp = -1;
 static dissector_handle_t attrs_handle;
 
 /* Dissection */
-static void
-dissect_bpkmrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_bpkmrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *bpkmrsp_tree;
@@ -90,6 +90,7 @@ dissect_bpkmrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
   /* Code to Call subdissector */
   attrs_tvb = tvb_new_subset_remaining (tvb, 4);
   call_dissector (attrs_handle, attrs_tvb, pinfo, tree);
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -126,7 +127,7 @@ proto_register_docsis_bpkmrsp (void)
   proto_register_field_array (proto_docsis_bpkmrsp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_bpkmrsp", dissect_bpkmrsp,
+  new_register_dissector ("docsis_bpkmrsp", dissect_bpkmrsp,
                       proto_docsis_bpkmrsp);
 }
 
index b909da1c36f059d28b2c6a31c114f18cedbf1500..1c9e569865e6df4fc07a3ec2692b652c88ad94e1 100644 (file)
@@ -37,8 +37,8 @@ static dissector_handle_t cmctrl_tlv_handle;
 static gint ett_docsis_cmctrlreq = -1;
 
 /* Dissection */
-static void
-dissect_cmctrlreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_cmctrlreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *cmctrlreq_tree = NULL;
@@ -63,6 +63,7 @@ dissect_cmctrlreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
   /* Call Dissector for Appendix C TLV's */
   next_tvb = tvb_new_subset_remaining (tvb, 2);
   call_dissector (cmctrl_tlv_handle, next_tvb, pinfo, cmctrlreq_tree);
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -88,7 +89,7 @@ proto_register_docsis_cmctrlreq (void)
   proto_register_field_array (proto_docsis_cmctrlreq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_cmctrlreq", dissect_cmctrlreq, proto_docsis_cmctrlreq);
+  new_register_dissector ("docsis_cmctrlreq", dissect_cmctrlreq, proto_docsis_cmctrlreq);
 }
 
 void
index bd415e35e0e0c258d305db3810c1bc353a2d2817..8d8f396238b85e7a4283075eaf54a4901818c30f 100644 (file)
@@ -45,8 +45,8 @@ static dissector_handle_t cmctrl_tlv_handle;
 static gint ett_docsis_cmctrlrsp = -1;
 
 /* Dissection */
-static void
-dissect_cmctrlrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_cmctrlrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *cmctrlrsp_tree = NULL;
@@ -71,6 +71,7 @@ dissect_cmctrlrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     /* Call Dissector for Appendix C TLV's */
     next_tvb = tvb_new_subset_remaining (tvb, 2);
     call_dissector (cmctrl_tlv_handle, next_tvb, pinfo, cmctrlrsp_tree);
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -96,7 +97,7 @@ proto_register_docsis_cmctrlrsp (void)
   proto_register_field_array (proto_docsis_cmctrlrsp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_cmctrlrsp", dissect_cmctrlrsp, proto_docsis_cmctrlrsp);
+  new_register_dissector ("docsis_cmctrlrsp", dissect_cmctrlrsp, proto_docsis_cmctrlrsp);
 }
 
 void
index 58ec6086766bb6aec3d72258d321b6c5b87332ae..bd9f8a4d5a058f53b156725d330bad4cf042cbe6 100644 (file)
@@ -134,8 +134,8 @@ dissect_cmstatus_tlv (tvbuff_t * tvb, proto_tree * tree, guint8 start, guint16 l
     } /* while */
 }
 
-static void
-dissect_cmstatus (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_cmstatus (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *cmstatus_tree = NULL;
@@ -199,6 +199,7 @@ dissect_cmstatus (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     }
   /* Call Dissector TLV's */
   dissect_cmstatus_tlv(tvb, cmstatus_tree, 3, len);
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -264,7 +265,7 @@ static gint *ett[] = {
 
   proto_register_field_array (proto_docsis_cmstatus, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
-  register_dissector ("docsis_cmstatus", dissect_cmstatus, proto_docsis_cmstatus);
+  new_register_dissector ("docsis_cmstatus", dissect_cmstatus, proto_docsis_cmstatus);
 }
 
 void
index 28b4a5fd3668362fe837c5c4db347dcafb5530f9..0acd7c14167106462728a8f07c8a9b843779de0d 100644 (file)
@@ -37,8 +37,8 @@ static dissector_handle_t docsis_tlv_handle;
 static gint ett_docsis_dbcack = -1;
 
 /* Dissection */
-static void
-dissect_dbcack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dbcack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *dbcack_item;
   proto_tree *dbcack_tree = NULL;
@@ -62,6 +62,7 @@ dissect_dbcack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
   /* Call Dissector for Appendix C TLV's */
   next_tvb = tvb_new_subset_remaining (tvb, 2);
   call_dissector (docsis_tlv_handle, next_tvb, pinfo, dbcack_tree);
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -87,7 +88,7 @@ proto_register_docsis_dbcack (void)
   proto_register_field_array (proto_docsis_dbcack, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dbcack", dissect_dbcack, proto_docsis_dbcack);
+  new_register_dissector ("docsis_dbcack", dissect_dbcack, proto_docsis_dbcack);
 }
 
 void
index 599323155452c3149c619706edf54e33644357cf..059b0a9b4f221b132de409c27bce192a6bbe8e47 100644 (file)
@@ -39,8 +39,8 @@ static dissector_handle_t docsis_tlv_handle;
 static gint ett_docsis_dbcreq = -1;
 
 /* Dissection */
-static void
-dissect_dbcreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dbcreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *dbcreq_item;
   proto_tree *dbcreq_tree = NULL;
@@ -68,6 +68,7 @@ dissect_dbcreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
   /* Call Dissector for Appendix C TLV's */
   next_tvb = tvb_new_subset_remaining (tvb, 4);
   call_dissector (docsis_tlv_handle, next_tvb, pinfo, dbcreq_tree);
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -103,7 +104,7 @@ proto_register_docsis_dbcreq (void)
   proto_register_field_array (proto_docsis_dbcreq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dbcreq", dissect_dbcreq, proto_docsis_dbcreq);
+  new_register_dissector ("docsis_dbcreq", dissect_dbcreq, proto_docsis_dbcreq);
 }
 
 void
index e4f926859049ac866ccf9b0fe95061ddefaeab7b..8702d0190e115ccac1c7ffefc22af953455fb4e8 100644 (file)
@@ -40,8 +40,8 @@ static dissector_handle_t docsis_tlv_handle;
 static gint ett_docsis_dbcrsp = -1;
 
 /* Dissection */
-static void
-dissect_dbcrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dbcrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *dbcrsp_item;
   proto_tree *dbcrsp_tree = NULL;
@@ -70,6 +70,7 @@ dissect_dbcrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
   /* 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);
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -100,7 +101,7 @@ proto_register_docsis_dbcrsp (void)
   proto_register_field_array (proto_docsis_dbcrsp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dbcrsp", dissect_dbcrsp, proto_docsis_dbcrsp);
+  new_register_dissector ("docsis_dbcrsp", dissect_dbcrsp, proto_docsis_dbcrsp);
 }
 
 
index 01fb48b0b5e15419a38c1465bedb2888c3bd5b98..922df79649c94ed1bf9cfcd9e4ee0c7ddce4171a 100644 (file)
@@ -43,8 +43,8 @@ static int hf_docsis_dccack_hmac_digest = -1;
 static gint ett_docsis_dccack = -1;
 
 /* Dissection */
-static void
-dissect_dccack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dccack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   guint16 pos;
   guint8 type, length;
@@ -97,6 +97,7 @@ dissect_dccack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
           pos = pos + length;
         }                       /* while (pos < len) */
     }                           /* if (tree) */
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -145,7 +146,7 @@ proto_register_docsis_dccack (void)
   proto_register_field_array (proto_docsis_dccack, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dccack", dissect_dccack, proto_docsis_dccack);
+  new_register_dissector ("docsis_dccack", dissect_dccack, proto_docsis_dccack);
 }
 
 void
index 0067cd60e3e09a73bb64adf90e869f309a01e66a..7adfafa31cbfb6549fda9870eff8c60eff5530ca 100644 (file)
@@ -253,8 +253,8 @@ dissect_dccreq_sf_sub (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len
     }
 }
 
-static void
-dissect_dccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   guint16 pos;
   guint8 type, length;
@@ -364,6 +364,7 @@ dissect_dccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
           pos = pos + length;
         }                       /* while (pos < len) */
     }                           /* if (tree) */
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -576,7 +577,7 @@ proto_register_docsis_dccreq (void)
   proto_register_field_array (proto_docsis_dccreq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dccreq", dissect_dccreq, proto_docsis_dccreq);
+  new_register_dissector ("docsis_dccreq", dissect_dccreq, proto_docsis_dccreq);
 }
 
 void
index 7526b8895ba5c74a95621a00fd1559a656b80a04..bb3b8088ff6a9792b8db1d543847afd7acf1f58f 100644 (file)
@@ -99,8 +99,8 @@ dissect_dccrsp_cm_jump_time (tvbuff_t * tvb, proto_tree * tree, int start, guint
     }
 }
 
-static void
-dissect_dccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   guint16 pos;
   guint8 type, length;
@@ -158,6 +158,7 @@ dissect_dccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
         }                       /* while (pos < len) */
     }                           /* if (tree) */
 
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -234,7 +235,7 @@ proto_register_docsis_dccrsp (void)
   proto_register_field_array (proto_docsis_dccrsp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dccrsp", dissect_dccrsp, proto_docsis_dccrsp);
+  new_register_dissector ("docsis_dccrsp", dissect_dccrsp, proto_docsis_dccrsp);
 }
 
 void
index 277a4d15511f3a245ca2cf0aebf12b9e42c80607..c9077fe8edd8e5178da571482f470009954fa2b4 100644 (file)
@@ -509,8 +509,8 @@ dissect_dcd_down_classifier (tvbuff_t * tvb, proto_tree * tree, int start, guint
     }
 }
 
-static void
-dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   guint16 pos;
   guint8 type, length;
@@ -554,6 +554,7 @@ dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
         }                       /* while (pos < len) */
     }                           /* if (tree) */
 
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -842,7 +843,7 @@ proto_register_docsis_dcd (void)
   proto_register_field_array (proto_docsis_dcd, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dcd", dissect_dcd, proto_docsis_dcd);
+  new_register_dissector ("docsis_dcd", dissect_dcd, proto_docsis_dcd);
 }
 
 void
index add1b36b1ca67551b461ffa466b31ef5e4b56d5c..c922883eb38a0a547806c5a47c2806fb3f3202b2 100644 (file)
@@ -336,8 +336,8 @@ dissect_ehdr (tvbuff_t * tvb, proto_tree * tree, gboolean isfrag)
 }
 
 
-static void
-dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   guint8 fc;
   guint8 fctype;
@@ -616,6 +616,7 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
           }
         break;
     }
+    return tvb_captured_length(tvb);
 }
 
 
@@ -828,7 +829,7 @@ proto_register_docsis (void)
   proto_register_field_array (proto_docsis, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis", dissect_docsis, proto_docsis);
+  new_register_dissector ("docsis", dissect_docsis, proto_docsis);
 }
 
 void
index 6b7f5a6b15b3a499b7b7801a7de8dd3e948027bd..d39f189053c56175b0766244a89812eeba2a04ed 100644 (file)
@@ -44,8 +44,8 @@ static int hf_docsis_dpvreq_ts_end = -1;
 static gint ett_docsis_dpvreq = -1;
 
 /* Dissection */
-static void
-dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *dpvreq_tree = NULL;
@@ -84,6 +84,7 @@ dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
       proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_ts_end, tvb,
                            16, 4, ENC_BIG_ENDIAN);
     }
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -149,7 +150,7 @@ proto_register_docsis_dpvreq (void)
   proto_register_field_array (proto_docsis_dpvreq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dpvreq", dissect_dpvreq, proto_docsis_dpvreq);
+  new_register_dissector ("docsis_dpvreq", dissect_dpvreq, proto_docsis_dpvreq);
 }
 
 void
index 08f6ac1eb16a40d0c4c0953c0b13605d424825f9..bdc9dcc3ebdfd001d99a74baee66ed4bc5ab5c71 100644 (file)
@@ -44,8 +44,8 @@ static int hf_docsis_dpvrsp_ts_end = -1;
 static gint ett_docsis_dpvrsp = -1;
 
 /* Dissection */
-static void
-dissect_dpvrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dpvrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *dpvrsp_tree = NULL;
@@ -84,6 +84,7 @@ dissect_dpvrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
       proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_ts_end, tvb,
                            16, 4, ENC_BIG_ENDIAN);
     }
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -149,7 +150,7 @@ proto_register_docsis_dpvrsp (void)
   proto_register_field_array (proto_docsis_dpvrsp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dpvrsp", dissect_dpvrsp, proto_docsis_dpvrsp);
+  new_register_dissector ("docsis_dpvrsp", dissect_dpvrsp, proto_docsis_dpvrsp);
 }
 
 void
index 85cc0ddf41b0387f3263ba6aabb8c37ead9ab6f2..d7bca465dfedaef07e5b9827899753626c0d9331 100644 (file)
@@ -40,8 +40,8 @@ static gint ett_docsis_dsaack = -1;
 extern value_string docsis_conf_code[];
 
 /* Dissection */
-static void
-dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *dsaack_tree = NULL;
@@ -71,6 +71,7 @@ dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
   /* Call Dissector for Appendix C TLV's */
   next_tvb = tvb_new_subset_remaining (tvb, 3);
   call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsaack_tree);
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -101,7 +102,7 @@ proto_register_docsis_dsaack (void)
   proto_register_field_array (proto_docsis_dsaack, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dsaack", dissect_dsaack, proto_docsis_dsaack);
+  new_register_dissector ("docsis_dsaack", dissect_dsaack, proto_docsis_dsaack);
 }
 
 void
index ecea28c28cc654d839fbdccfd6653348266d0ad3..5f4cb3eb501bff96ee1cb3636bbb4bca890186a9 100644 (file)
@@ -37,8 +37,8 @@ static dissector_handle_t docsis_tlv_handle;
 static gint ett_docsis_dsareq = -1;
 
 /* Dissection */
-static void
-dissect_dsareq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dsareq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *dsareq_tree = NULL;
@@ -63,6 +63,7 @@ dissect_dsareq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     /* Call Dissector for Appendix C TLV's */
     next_tvb = tvb_new_subset_remaining (tvb, 2);
     call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsareq_tree);
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -88,7 +89,7 @@ proto_register_docsis_dsareq (void)
   proto_register_field_array (proto_docsis_dsareq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dsareq", dissect_dsareq, proto_docsis_dsareq);
+  new_register_dissector ("docsis_dsareq", dissect_dsareq, proto_docsis_dsareq);
 }
 
 void
index 1a7c36f992d299516f06a00e45e7d398d1548c9f..7fc705ef23da40f321e0463bce323eae29245658 100644 (file)
@@ -40,8 +40,8 @@ static gint ett_docsis_dsarsp = -1;
 extern value_string docsis_conf_code[];
 
 /* Dissection */
-static void
-dissect_dsarsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dsarsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *dsarsp_tree = NULL;
@@ -71,6 +71,7 @@ dissect_dsarsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     /* Call dissector for Appendix C TLV's */
     next_tvb = tvb_new_subset_remaining (tvb, 3);
     call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsarsp_tree);
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -101,7 +102,7 @@ proto_register_docsis_dsarsp (void)
   proto_register_field_array (proto_docsis_dsarsp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dsarsp", dissect_dsarsp, proto_docsis_dsarsp);
+  new_register_dissector ("docsis_dsarsp", dissect_dsarsp, proto_docsis_dsarsp);
 }
 
 void
index 3ab6ac8e92655478d7f71e6ab44e20b5bc0e4a08..cdcec0c8a82da04af1b9a55ee76d30a4861c88fd 100644 (file)
@@ -40,8 +40,8 @@ static gint ett_docsis_dscack = -1;
 extern value_string docsis_conf_code[];
 
 /* Dissection */
-static void
-dissect_dscack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dscack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *dscack_tree = NULL;
@@ -70,6 +70,7 @@ dissect_dscack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     /* Call Dissector for Appendix C TLV's */
     next_tvb = tvb_new_subset_remaining (tvb, 3);
     call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscack_tree);
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -100,7 +101,7 @@ proto_register_docsis_dscack (void)
   proto_register_field_array (proto_docsis_dscack, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dscack", dissect_dscack, proto_docsis_dscack);
+  new_register_dissector ("docsis_dscack", dissect_dscack, proto_docsis_dscack);
 }
 
 void
index 357df0b2b035fd4c6b3dbcb6d77b3df8f29cdb42..6a1d3020676d83a0f842da30d6ef69939e12636c 100644 (file)
@@ -37,8 +37,8 @@ static dissector_handle_t docsis_tlv_handle;
 static gint ett_docsis_dscreq = -1;
 
 /* Dissection */
-static void
-dissect_dscreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dscreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *dscreq_tree = NULL;
@@ -63,6 +63,7 @@ dissect_dscreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     /* Call dissector for Appendix C TLV's */
     next_tvb = tvb_new_subset_remaining (tvb, 2);
     call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscreq_tree);
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -88,7 +89,7 @@ proto_register_docsis_dscreq (void)
   proto_register_field_array (proto_docsis_dscreq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dscreq", dissect_dscreq, proto_docsis_dscreq);
+  new_register_dissector ("docsis_dscreq", dissect_dscreq, proto_docsis_dscreq);
 }
 
 void
index 2f239b311e280a024ff4fd8a572d379937a334bf..c34fbe5e764d13cc50c1d881a10c4484bc17bb3b 100644 (file)
@@ -40,8 +40,8 @@ static gint ett_docsis_dscrsp = -1;
 extern value_string docsis_conf_code[];
 
 /* Dissection */
-static void
-dissect_dscrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dscrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *dscrsp_tree = NULL;
@@ -71,6 +71,7 @@ dissect_dscrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     /* Call Dissector for Appendix C TLV's */
     next_tvb = tvb_new_subset_remaining (tvb, 3);
     call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscrsp_tree);
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -101,7 +102,7 @@ proto_register_docsis_dscrsp (void)
   proto_register_field_array (proto_docsis_dscrsp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dscrsp", dissect_dscrsp, proto_docsis_dscrsp);
+  new_register_dissector ("docsis_dscrsp", dissect_dscrsp, proto_docsis_dscrsp);
 }
 
 void
index e84d773ac423cef4eb94c6878b6e0b68a8736c54..6dac22aa4c2e1c42322d063c37c9a7bb97f7f0ec 100644 (file)
@@ -40,8 +40,8 @@ static dissector_handle_t docsis_tlv_handle;
 static gint ett_docsis_dsdreq = -1;
 
 /* Dissection */
-static void
-dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *dsdreq_tree = NULL;
@@ -69,6 +69,7 @@ dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * 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);
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -104,7 +105,7 @@ proto_register_docsis_dsdreq (void)
   proto_register_field_array (proto_docsis_dsdreq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dsdreq", dissect_dsdreq, proto_docsis_dsdreq);
+  new_register_dissector ("docsis_dsdreq", dissect_dsdreq, proto_docsis_dsdreq);
 }
 
 void
index 14e747116977c5d0a28a3827368415ada3fea3a7..dbcf7a18c5af49e6bbb5bc7af5ff9bd069e4e109 100644 (file)
@@ -40,8 +40,8 @@ extern value_string docsis_conf_code[];
 static gint ett_docsis_dsdrsp = -1;
 
 /* Dissection */
-static void
-dissect_dsdrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_dsdrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *dsdrsp_tree;
@@ -69,6 +69,7 @@ dissect_dsdrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
                            ENC_BIG_ENDIAN);
     }
 
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -104,7 +105,7 @@ proto_register_docsis_dsdrsp (void)
   proto_register_field_array (proto_docsis_dsdrsp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_dsdrsp", dissect_dsdrsp, proto_docsis_dsdrsp);
+  new_register_dissector ("docsis_dsdrsp", dissect_dsdrsp, proto_docsis_dsdrsp);
 }
 
 void
index 94fd39bfe7b124080ad5aca7db53f82ca5550f39..b76fc2d7152269f10cf51269691fde14395ac83a 100644 (file)
@@ -38,8 +38,8 @@ void proto_reg_handoff_docsis_intrngreq(void);
 static gint ett_docsis_intrngreq = -1;
 
 /* Dissection */
-static void
-dissect_intrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_intrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *intrngreq_item;
   proto_tree *intrngreq_tree;
@@ -63,6 +63,7 @@ dissect_intrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
       proto_tree_add_item (intrngreq_tree, hf_docsis_intrngreq_up_chid, tvb, 3,
                            1, ENC_BIG_ENDIAN);
     }
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -99,7 +100,7 @@ proto_register_docsis_intrngreq (void)
   proto_register_field_array (proto_docsis_intrngreq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_intrngreq", dissect_intrngreq, proto_docsis_intrngreq);
+  new_register_dissector ("docsis_intrngreq", dissect_intrngreq, proto_docsis_intrngreq);
 }
 
 void
index 6680dfce23c4d59b44306871cbbb434850207c3e..0285b6848c724b308bf48ee9f63cbaa9a8bfebc7 100644 (file)
@@ -143,8 +143,8 @@ static const value_string mgmt_type_vals[] = {
 };
 
 /* Dissection */
-static void
-dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   guint16 msg_len;
   proto_item *mgt_hdr_it;
@@ -192,11 +192,10 @@ dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
   msg_len = tvb_get_ntohs (tvb, 12);
   payload_tvb = tvb_new_subset_length (tvb, 20, msg_len - 6);
 
-  if (dissector_try_uint
-      (docsis_mgmt_dissector_table, type, payload_tvb, pinfo, tree))
-    return;
-  else
+  if (!dissector_try_uint(docsis_mgmt_dissector_table, type, payload_tvb, pinfo, tree))
     call_dissector (data_handle, payload_tvb, pinfo, tree);
+
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -268,7 +267,7 @@ proto_register_docsis_mgmt (void)
   proto_register_field_array (proto_docsis_mgmt, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_mgmt", dissect_macmgmt, proto_docsis_mgmt);
+  new_register_dissector ("docsis_mgmt", dissect_macmgmt, proto_docsis_mgmt);
 }
 
 void
index 6e9343368a1c13022220fc33abb88cb0ae432195..f315cbd76254d92acc95859925354e6d83e92e21 100644 (file)
@@ -67,8 +67,8 @@ static gint ett_docsis_map = -1;
 extern value_string iuc_vals[];
 
 /* Code to actually dissect the packets */
-static void
-dissect_map (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_map (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   guint8 i, numie;
   int pos;
@@ -153,6 +153,7 @@ dissect_map (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
           pos = pos + 4;
         }                       /* for... */
     }                           /* if(tree) */
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -244,7 +245,7 @@ proto_register_docsis_map (void)
   proto_register_field_array (proto_docsis_map, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_map", dissect_map, proto_docsis_map);
+  new_register_dissector ("docsis_map", dissect_map, proto_docsis_map);
 }
 
 void
index a7f6e1a9a4405255eea729e942b845cf49aee5b1..4c17e4d083ba0d2a24235547eebfb7e7947e12d3 100644 (file)
@@ -298,8 +298,8 @@ static gint ett_tlv = -1;
 static gint ett_sub_tlv = -1;
 
 /* Dissection */
-static void
-dissect_mdd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_mdd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *mdd_tree;
@@ -522,6 +522,7 @@ dissect_mdd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
           pos += length + 2;
         }
     }                               /* if(tree) */
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -734,7 +735,7 @@ void proto_register_docsis_mdd (void)
   proto_register_field_array (proto_docsis_mdd, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_mdd", dissect_mdd, proto_docsis_mdd);
+  new_register_dissector ("docsis_mdd", dissect_mdd, proto_docsis_mdd);
 }
 
 void
index c3aa0a733b67ac261668dc9c0353cba82f7b7d2f..05d8210fbe1c2673a02c3c322c99e45678462be6 100644 (file)
@@ -41,8 +41,8 @@ extern value_string docsis_conf_code[];
 static gint ett_docsis_regack = -1;
 
 /* Dissection */
-static void
-dissect_regack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_regack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *regack_tree = NULL;
@@ -71,6 +71,7 @@ dissect_regack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
   /* Call Dissector for Appendix C TLV's */
   next_tvb = tvb_new_subset_remaining (tvb, 3);
   call_dissector (docsis_tlv_handle, next_tvb, pinfo, regack_tree);
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -101,7 +102,7 @@ proto_register_docsis_regack (void)
   proto_register_field_array (proto_docsis_regack, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_regack", dissect_regack, proto_docsis_regack);
+  new_register_dissector ("docsis_regack", dissect_regack, proto_docsis_regack);
 }
 
 void
index 93008a3c8ef5abdd8a95dda80675748e2b402f53..1608ff178f436e0507088a833aa747278db4b0e8 100644 (file)
@@ -39,8 +39,8 @@ static gint ett_docsis_regreq = -1;
 static dissector_handle_t docsis_tlv_handle;
 
 /* Code to actually dissect the packets */
-static void
-dissect_regreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_regreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *regreq_tree = NULL;
@@ -64,6 +64,7 @@ dissect_regreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     /* Call Dissector for Appendix C TlV's */
     next_tvb = tvb_new_subset_remaining (tvb, 2);
     call_dissector (docsis_tlv_handle, next_tvb, pinfo, regreq_tree);
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -89,7 +90,7 @@ proto_register_docsis_regreq (void)
   proto_register_field_array (proto_docsis_regreq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_regreq", dissect_regreq, proto_docsis_regreq);
+  new_register_dissector ("docsis_regreq", dissect_regreq, proto_docsis_regreq);
 }
 
 void
index 849f8302aeae6409f63a8151bf2b0389c59dae1d..ebf20fd7ae2729fd1ff2a2564d69504fd8f85b83 100644 (file)
@@ -44,8 +44,8 @@ static dissector_handle_t docsis_tlv_handle;
 static gint ett_docsis_regreqmp = -1;
 
 /* Dissection */
-static void
-dissect_regreqmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_regreqmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *regreqmp_tree = NULL;
@@ -66,6 +66,7 @@ dissect_regreqmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
   /* Call Dissector for Appendix C TLV's */
   next_tvb = tvb_new_subset_remaining (tvb, 4);
   call_dissector (docsis_tlv_handle, next_tvb, pinfo, regreqmp_tree);
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -101,7 +102,7 @@ proto_register_docsis_regreqmp (void)
   proto_register_field_array (proto_docsis_regreqmp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_regreqmp", dissect_regreqmp, proto_docsis_regreqmp);
+  new_register_dissector ("docsis_regreqmp", dissect_regreqmp, proto_docsis_regreqmp);
 }
 
 void
index fa86f98955d1ce4a8247909289aeecf5c42866da..fdc7d6c18622e7a783fec799c7812b1131d4c004 100644 (file)
@@ -41,8 +41,8 @@ extern value_string docsis_conf_code[];
 static gint ett_docsis_regrsp = -1;
 
 /* Dissection */
-static void
-dissect_regrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_regrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *regrsp_tree = NULL;
@@ -71,6 +71,7 @@ dissect_regrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     /* Call Dissector for Appendix C TLV's */
     next_tvb = tvb_new_subset_remaining (tvb, 3);
     call_dissector (docsis_tlv_handle, next_tvb, pinfo, regrsp_tree);
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -101,7 +102,7 @@ proto_register_docsis_regrsp (void)
   proto_register_field_array (proto_docsis_regrsp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_regrsp", dissect_regrsp, proto_docsis_regrsp);
+  new_register_dissector ("docsis_regrsp", dissect_regrsp, proto_docsis_regrsp);
 }
 
 void
index c304ccac5a9cae3a886d248b625e1f0fce93a352..816c7006cbb26931dace91304e54931a63e8ced8 100644 (file)
@@ -46,8 +46,8 @@ static dissector_handle_t docsis_tlv_handle;
 static gint ett_docsis_regrspmp = -1;
 
 /* Dissection */
-static void
-dissect_regrspmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_regrspmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *regrspmp_tree = NULL;
@@ -69,6 +69,7 @@ dissect_regrspmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
   /* Call Dissector for Appendix C TLV's */
   next_tvb = tvb_new_subset_remaining (tvb, 5);
   call_dissector (docsis_tlv_handle, next_tvb, pinfo, regrspmp_tree);
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -109,7 +110,7 @@ proto_register_docsis_regrspmp (void)
   proto_register_field_array (proto_docsis_regrspmp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_regrspmp", dissect_regrspmp, proto_docsis_regrspmp);
+  new_register_dissector ("docsis_regrspmp", dissect_regrspmp, proto_docsis_regrspmp);
 }
 
 void
index feddd7249294a6d81f2713d19cb34e5ea1642a46..9ee6d8e5f1c217c007dd4161764961f546d7473c 100644 (file)
@@ -38,8 +38,8 @@ static int hf_docsis_rngreq_pend_compl = -1;
 static gint ett_docsis_rngreq = -1;
 
 /* Dissection */
-static void
-dissect_rngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_rngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *rngreq_tree;
@@ -66,6 +66,7 @@ dissect_rngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
       proto_tree_add_item (rngreq_tree, hf_docsis_rngreq_pend_compl, tvb, 3,
                            1, ENC_BIG_ENDIAN);
     }
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -102,7 +103,7 @@ proto_register_docsis_rngreq (void)
   proto_register_field_array (proto_docsis_rngreq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_rngreq", dissect_rngreq, proto_docsis_rngreq);
+  new_register_dissector ("docsis_rngreq", dissect_rngreq, proto_docsis_rngreq);
 }
 
 void
index 13dfb8291f24699946f2865bdadd07037c3ca3b8..e0578d93db72cb5385654352bec14cc26e4cbcbd 100644 (file)
@@ -60,8 +60,8 @@ static const value_string rng_stat_vals[] = {
 static gint ett_docsis_rngrsp = -1;
 
 /* Code to actually dissect the packets */
-static void
-dissect_rngrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_rngrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *rngrsp_tree;
@@ -179,6 +179,7 @@ dissect_rngrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
           pos = pos + tlvlen;
         }                       /* while (pos < length) */
     }                           /* if (tree) */
+    return tvb_captured_length(tvb);
 }
 
 
@@ -259,7 +260,7 @@ proto_register_docsis_rngrsp (void)
   proto_register_field_array (proto_docsis_rngrsp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_rngrsp", dissect_rngrsp, proto_docsis_rngrsp);
+  new_register_dissector ("docsis_rngrsp", dissect_rngrsp, proto_docsis_rngrsp);
 }
 
 
index f1c2e6058d5ca6a44b88b54c18cfdc0c7a7c046d..c5d83113f89c9fcb9196c9ad99ef8841abeb7e45 100644 (file)
@@ -37,8 +37,8 @@ static int hf_docsis_sync_cmts_timestamp = -1;
 static gint ett_docsis_sync = -1;
 
 /* Dissection */
-static void
-dissect_sync (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_sync (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *sync_tree;
@@ -53,6 +53,7 @@ dissect_sync (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
       proto_tree_add_item (sync_tree, hf_docsis_sync_cmts_timestamp, tvb, 0, 4,
                            ENC_BIG_ENDIAN);
     } /* if(tree) */
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -79,7 +80,7 @@ proto_register_docsis_sync (void)
   proto_register_field_array (proto_docsis_sync, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_sync", dissect_sync, proto_docsis_sync);
+  new_register_dissector ("docsis_sync", dissect_sync, proto_docsis_sync);
 }
 
 void
index 86a01948a0cf0b8ea03ffdbebf2194778c15aeaf..fe5e932eb5271b63593922d3511205bd2e5c0f60 100644 (file)
@@ -153,8 +153,8 @@ dissect_us_event(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
     }                           /* while */
 }
 
-static void
-dissect_cmctrl_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
+static int
+dissect_cmctrl_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *tlv_tree;
@@ -248,6 +248,7 @@ dissect_cmctrl_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
         } /* switch */
       pos = pos + length;
     } /* while */
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -326,7 +327,7 @@ proto_register_cmctrl_tlv (void)
   proto_register_field_array (proto_cmctrl_tlv, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("cmctrl_tlv", dissect_cmctrl_tlv, proto_cmctrl_tlv);
+  new_register_dissector ("cmctrl_tlv", dissect_cmctrl_tlv, proto_cmctrl_tlv);
 }
 
 void
index 13bba721de3c536de654832740327501c6df3a2a..912ed587e19aa0f2fd494ec73e9bfbc304ab6173 100644 (file)
@@ -3822,8 +3822,8 @@ dissect_cmts_mc_sess_enc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 le
 }
 
 
-static void
-dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
+static int
+dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, void* data _U_)
 {
 
   proto_item *it;
@@ -4262,6 +4262,7 @@ dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
       }                         /* while (pos < total_len) */
   }                             /*if (tree) */
 
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -5945,7 +5946,7 @@ proto_register_docsis_tlv (void)
   proto_register_field_array (proto_docsis_tlv, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_tlv", dissect_tlv, proto_docsis_tlv);
+  new_register_dissector ("docsis_tlv", dissect_tlv, proto_docsis_tlv);
 }
 
 void
index 94cdff4814040a18bb11ce83095fde43cca3639c..e617ec3fa6cc03ac9df68aa18cfa0d80a6a04df0 100644 (file)
@@ -190,8 +190,8 @@ static const value_string last_cw_len_vals[] = {
 };
 
 /* Dissection */
-static void
-dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   guint16 pos, endtlvpos;
   guint8 type, length;
@@ -805,6 +805,8 @@ dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
             }                   /* switch(type) */
         }                       /* while (pos < len) */
     }                           /* if (tree) */
+
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -1032,7 +1034,7 @@ proto_register_docsis_type29ucd (void)
   proto_register_field_array (proto_docsis_type29ucd, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_type29ucd", dissect_type29ucd, proto_docsis_type29ucd);
+  new_register_dissector ("docsis_type29ucd", dissect_type29ucd, proto_docsis_type29ucd);
 }
 
 void
index 68ffe997a9ae3da87dc86834657372874b9e5793..5a3dfe96595b632a6c40c8e61f77bd70b7bb33aa 100644 (file)
@@ -37,8 +37,8 @@ static dissector_handle_t docsis_tlv_handle;
 static gint ett_docsis_uccreq = -1;
 
 /* Dissection */
-static void
-dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *uccreq_tree = NULL;
@@ -64,6 +64,7 @@ dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * 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);
+  return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -89,7 +90,7 @@ proto_register_docsis_uccreq (void)
   proto_register_field_array (proto_docsis_uccreq, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_uccreq", dissect_uccreq, proto_docsis_uccreq);
+  new_register_dissector ("docsis_uccreq", dissect_uccreq, proto_docsis_uccreq);
 }
 
 void
index 835b0c36d3190e696ba8bed5bcc81f094a922c18..3252788587dc6821aee17f312716b5e361fb352b 100644 (file)
@@ -36,8 +36,8 @@ static int hf_docsis_uccrsp_upchid = -1;
 static gint ett_docsis_uccrsp = -1;
 
 /* Dissection */
-static void
-dissect_uccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_uccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *uccrsp_tree;
@@ -58,6 +58,8 @@ dissect_uccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
       proto_tree_add_item (uccrsp_tree, hf_docsis_uccrsp_upchid, tvb, 0, 1,
                            ENC_BIG_ENDIAN);
     }
+
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -83,7 +85,7 @@ proto_register_docsis_uccrsp (void)
   proto_register_field_array (proto_docsis_uccrsp, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_uccrsp", dissect_uccrsp, proto_docsis_uccrsp);
+  new_register_dissector ("docsis_uccrsp", dissect_uccrsp, proto_docsis_uccrsp);
 }
 
 void
index 8944c67935dcaeaeb4529436cd3f4d78e84ea2c0..a7a2a265a91f79e8a173edfea46176f79ab6708c 100644 (file)
@@ -155,8 +155,8 @@ static const value_string last_cw_len_vals[] = {
 };
 
 /* Dissection */
-static void
-dissect_ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+static int
+dissect_ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   int pos, endtlvpos;
   guint8 type, length;
@@ -633,6 +633,8 @@ dissect_ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
             }                   /* switch(type) */
         }                       /* while (pos < len) */
     }                           /* if (tree) */
+
+    return tvb_captured_length(tvb);
 }
 
 /* Register the protocol with Wireshark */
@@ -794,7 +796,7 @@ proto_register_docsis_ucd (void)
   proto_register_field_array (proto_docsis_ucd, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_ucd", dissect_ucd, proto_docsis_ucd);
+  new_register_dissector ("docsis_ucd", dissect_ucd, proto_docsis_ucd);
 }
 
 void
index 815fc98ae59412ce1467714e4ed6e071329f9803..89769649a09f197d2036c3acd81ea78a2ddbd181 100644 (file)
@@ -74,8 +74,8 @@ static void dissect_cisco (tvbuff_t * tvb, proto_tree * tree,
                            gint vsif_len);
 
 /* Dissection */
-static void
-dissect_vsif (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
+static int
+dissect_vsif (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *vsif_tree;
@@ -128,7 +128,7 @@ dissect_vsif (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
 
     }                           /* if(tree) */
 
-
+    return tvb_captured_length(tvb);
 }
 
 /* Dissector for Cisco Vendor Specific TLV's */
@@ -254,7 +254,7 @@ proto_register_docsis_vsif (void)
   proto_register_field_array (proto_docsis_vsif, hf, array_length (hf));
   proto_register_subtree_array (ett, array_length (ett));
 
-  register_dissector ("docsis_vsif", dissect_vsif, proto_docsis_vsif);
+  new_register_dissector ("docsis_vsif", dissect_vsif, proto_docsis_vsif);
 }
 
 void
index 6def091ff9bf29098b47f2f343fb65d37de5c1c4..ba8c525c291ff656db99f6c74b3ed63df99db909 100644 (file)
@@ -1168,7 +1168,7 @@ static void dissect_ecat_foe(tvbuff_t *tvb, gint offset, packet_info *pinfo, pro
    }
 }
 
-static void dissect_ecat_mailbox(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_ecat_mailbox(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
 {
    proto_tree *ecat_mailbox_tree = NULL;
    proto_tree *ecat_mailbox_header_tree = NULL;
@@ -1249,6 +1249,7 @@ static void dissect_ecat_mailbox(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
          col_append_str(pinfo->cinfo, COL_INFO, ")");
       }
    }
+    return tvb_captured_length(tvb);
 }
 
 void proto_register_ecat_mailbox(void)
@@ -1941,7 +1942,7 @@ void proto_register_ecat_mailbox(void)
    proto_register_field_array(proto_ecat_mailbox, hf,array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
 
-   register_dissector("ecat_mailbox", dissect_ecat_mailbox, proto_ecat_mailbox);
+   new_register_dissector("ecat_mailbox", dissect_ecat_mailbox, proto_ecat_mailbox);
 }
 
 void proto_reg_handoff_ecat_mailbox(void)
index 70f0d416bf2ab795234160375bbaf79d4c040e9e..dc67ee747d167dc2cc80fec2f28b8b0e31180030 100644 (file)
@@ -171,8 +171,8 @@ static guint16 flags_to_port(guint16 flagsValue) {
 }
 
 /*esl*/
-static void
-dissect_esl_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) {
+static int
+dissect_esl_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_) {
 
     proto_item *ti = NULL;
     proto_tree *esl_header_tree;
@@ -199,6 +199,7 @@ dissect_esl_header(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) {
             proto_tree_add_item(esl_header_tree, hf_esl_timestamp, tvb, offset, 8, ENC_LITTLE_ENDIAN);
         }
     }
+    return tvb_captured_length(tvb);
 }
 
 typedef struct _ref_time_frame_info
@@ -277,7 +278,7 @@ dissect_esl_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
            First 6 bytes must be: 01 01 05 10 00 00 */
         if ( is_esl_header(tvb, 0) )
         {
-            dissect_esl_header(tvb, pinfo, tree);
+            dissect_esl_header(tvb, pinfo, tree, data);
             if ( eth_withoutfcs_handle != NULL )
             {
                 next_tvb = tvb_new_subset_remaining(tvb, SIZEOF_ESLHEADER);
@@ -294,7 +295,7 @@ dissect_esl_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
                 call_dissector(eth_withoutfcs_handle, next_tvb, pinfo, tree);
             }
             next_tvb = tvb_new_subset_length(tvb, esl_length-SIZEOF_ESLHEADER, SIZEOF_ESLHEADER);
-            dissect_esl_header(next_tvb, pinfo, tree);
+            dissect_esl_header(next_tvb, pinfo, tree, data);
             modify_times(tvb, esl_length-SIZEOF_ESLHEADER, pinfo);
 
             result = TRUE;
@@ -353,7 +354,7 @@ proto_register_esl(void) {
     proto_register_field_array(proto_esl,hf,array_length(hf));
     proto_register_subtree_array(ett,array_length(ett));
 
-    register_dissector("esl", dissect_esl_header, proto_esl);
+    new_register_dissector("esl", dissect_esl_header, proto_esl);
 }
 
 void
index 7ecd0a27bfc027c32f83b62d26bafcab21ed2928..8fb5d3c83e16ba8a5be653aa70aef3a5b688904d 100644 (file)
@@ -63,7 +63,7 @@ static const value_string ethercat_frame_reserved_vals[] =
 };
 
 /* Ethercat Frame */
-static void dissect_ethercat_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_ethercat_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
 {
    tvbuff_t *next_tvb;
    proto_item *ti;
@@ -99,6 +99,7 @@ static void dissect_ethercat_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree
       data instead. */
       call_dissector (ethercat_frame_data_handle, next_tvb, pinfo, tree);
    }
+   return tvb_captured_length(tvb);
 }
 
 void proto_register_ethercat_frame(void)
@@ -134,7 +135,7 @@ void proto_register_ethercat_frame(void)
    proto_register_field_array(proto_ethercat_frame,hf,array_length(hf));
    proto_register_subtree_array(ett, array_length(ett));
 
-   register_dissector("ecatf", dissect_ethercat_frame, proto_ethercat_frame);
+   new_register_dissector("ecatf", dissect_ethercat_frame, proto_ethercat_frame);
 
    /* Define a handle (ecatf.type) for sub dissectors that want to dissect
       the Ethercat frame ether type (E88A4) payload. */
index f01af6271fc43a81cdb4e232d890fa3918996e88..04f7f26116b187f2fc7911445c926d13dd40e44a 100644 (file)
@@ -1853,7 +1853,7 @@ static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
 /*
  * Dissect IrDA protocol
  */
-static void dissect_irda(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
+static int dissect_irda(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, void* data _U_)
 {
     /* load the display labels */
     pinfo->current_proto = "IrDA";
@@ -1862,11 +1862,12 @@ static void dissect_irda(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
     if ((pinfo->pseudo_header->irda.pkttype & IRDA_CLASS_MASK) == IRDA_CLASS_LOG)
     {
         dissect_log(tvb, pinfo, root);
-        return;
+        return tvb_captured_length(tvb);
     }
 
 
     dissect_irlap(tvb, pinfo, root);
+    return tvb_captured_length(tvb);
 }
 
 
@@ -2203,7 +2204,7 @@ void proto_register_irda(void)
     proto_ttp   = proto_register_protocol("Tiny Transport Protocol", "TTP", "ttp");
 
     /* Register the dissector */
-    register_dissector("irda", dissect_irda, proto_irlap);
+    new_register_dissector("irda", dissect_irda, proto_irlap);
 
     /* Required function calls to register the header fields */
     proto_register_field_array(proto_irlap, hf_lap, array_length(hf_lap));
index 2c445da8f703bd4a8867b4dba5df17b03900a374..d1da1e5713cac144e15c7eb3559bf4e796d45674 100644 (file)
@@ -123,8 +123,8 @@ checksum_data(tvbuff_t *tvb, proto_tree *tree)
 
 
 /** Dissects an SIR packet. */
-static void
-dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root)
+static int
+dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root, void* data _U_)
 {
        gint offset = 0;
        gint bof_offset;
@@ -140,7 +140,7 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root)
                                pinfo->desegment_offset = offset;
                                pinfo->desegment_len = 1;
                        }
-                       return;
+                       return tvb_captured_length(tvb);
                } else {
                        guint preamble_len = bof_offset - offset;
                        gint data_offset = bof_offset + 1;
@@ -171,6 +171,7 @@ dissect_sir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root)
                }
                offset = eof_offset + 1;
        }
+    return tvb_captured_length(tvb);
 }
 
 
@@ -228,7 +229,7 @@ proto_register_irsir(void)
 
        proto_sir = proto_register_protocol(
                        "Serial Infrared", "SIR", "sir");
-       register_dissector("sir", dissect_sir, proto_sir);
+       new_register_dissector("sir", dissect_sir, proto_sir);
        proto_register_subtree_array(ett, array_length(ett));
        proto_register_field_array(
                        proto_sir, hf_sir, array_length(hf_sir));
index d296e115423d5b8971004d11911ea0cf97d957c8..1d3e60675a822e26aef4ddff27ef99964c7207b4 100644 (file)
@@ -87,7 +87,7 @@ static int hf_aas_beam_cinr_value = -1;
 #endif
 
 
-static void dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
 {
        guint offset = 0;
        proto_item *aas_beam_item;
@@ -106,10 +106,11 @@ static void dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_i
                /* display the reserved fields */
                proto_tree_add_item(aas_beam_tree, hf_aas_beam_select_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
        }
+       return tvb_captured_length(tvb);
 }
 
 #ifdef OFDM
-static void dissect_mac_mgmt_msg_aas_beam_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_aas_beam_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
 {
        guint offset = 0;
        proto_item *aas_beam_item;
@@ -140,9 +141,10 @@ static void dissect_mac_mgmt_msg_aas_beam_req_decoder(tvbuff_t *tvb, packet_info
                /* display the reserved fields */
                proto_tree_add_item(aas_beam_tree, hf_aas_beam_select_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
        }
+       return tvb_captured_length(tvb);
 }
 
-static void dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
 {
        guint offset = 0;
        guint tvb_len, report_type;
@@ -204,6 +206,7 @@ static void dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info
                /* display the CINR Mean Value */
                proto_tree_add_item(aas_beam_tree, hf_aas_beam_cinr_value, tvb, offset, 1, ENC_BIG_ENDIAN);
        }
+       return tvb_captured_length(tvb);
 }
 #endif
 
@@ -320,10 +323,10 @@ void proto_register_mac_mgmt_msg_aas_beam(void)
        proto_register_field_array(proto_mac_mgmt_msg_aas_beam_decoder, hf_aas_beam, array_length(hf_aas_beam));
        proto_register_subtree_array(ett, array_length(ett));
 
-       register_dissector("mac_mgmt_msg_aas_beam_select_handler", dissect_mac_mgmt_msg_aas_beam_select_decoder, -1);
+       new_register_dissector("mac_mgmt_msg_aas_beam_select_handler", dissect_mac_mgmt_msg_aas_beam_select_decoder, -1);
 #ifdef OFDM
-       register_dissector("mac_mgmt_msg_aas_beam_req_handler", dissect_mac_mgmt_msg_aas_beam_req_decoder, -1);
-       register_dissector("mac_mgmt_msg_aas_beam_rsp_handler", dissect_mac_mgmt_msg_aas_beam_rsp_decoder, -1);
+       new_register_dissector("mac_mgmt_msg_aas_beam_req_handler", dissect_mac_mgmt_msg_aas_beam_req_decoder, -1);
+       new_register_dissector("mac_mgmt_msg_aas_beam_rsp_handler", dissect_mac_mgmt_msg_aas_beam_rsp_decoder, -1);
 #endif
 }
 
@@ -332,7 +335,7 @@ proto_reg_handoff_mac_mgmt_msg_aas_beam(void)
 {
        dissector_handle_t aas_handle;
 
-       aas_handle = create_dissector_handle(dissect_mac_mgmt_msg_aas_beam_select_decoder, proto_mac_mgmt_msg_aas_beam_decoder);
+       aas_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_aas_beam_select_decoder, proto_mac_mgmt_msg_aas_beam_decoder);
        dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_AAS_BEAM_SELECT, aas_handle);
 }
 
index bd13dc56fbea0de2d2d2049bd58e65655d1ad3dc..27a84fad846db308de93243e99cfde1e3a8fe4b9 100644 (file)
@@ -72,7 +72,7 @@ static void dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pin
        }
 }
 
-static void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
 {
        guint offset = 0;
        proto_item *dsc_item;
@@ -96,6 +96,7 @@ static void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pin
                /* process DSC RSP message TLV Encode Information */
                wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsc_tree);
        }
+       return tvb_captured_length(tvb);
 }
 
 static void dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -163,7 +164,7 @@ void proto_register_mac_mgmt_msg_dsc(void)
        proto_register_field_array(proto_mac_mgmt_msg_dsc_decoder, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
 
-       register_dissector("mac_mgmt_msg_dsc_rsp_handler", dissect_mac_mgmt_msg_dsc_rsp_decoder, -1);
+       new_register_dissector("mac_mgmt_msg_dsc_rsp_handler", dissect_mac_mgmt_msg_dsc_rsp_decoder, -1);
 }
 
 void
@@ -174,7 +175,7 @@ proto_reg_handoff_mac_mgmt_msg_dsc(void)
        dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_req_decoder, proto_mac_mgmt_msg_dsc_decoder);
        dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_REQ, dsc_handle);
 
-       dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_rsp_decoder, proto_mac_mgmt_msg_dsc_decoder);
+       dsc_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dsc_rsp_decoder, proto_mac_mgmt_msg_dsc_decoder);
        dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_RSP, dsc_handle);
 
        dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_ack_decoder, proto_mac_mgmt_msg_dsc_decoder);
index 9e9499f032ac0458aeab3e82a98f6c6d3a6119bb..bdb44301138a2b652f5e6835aa7ce6267ae64229 100644 (file)
@@ -72,7 +72,7 @@ static const value_string vals_reg_rsp_status [] = {
 
 
 /* Decode REG-RSP messages. */
-static void dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
 {
        guint offset = 0;
        guint tlv_offset;
@@ -260,6 +260,7 @@ static void dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pin
                if (!hmac_found)
                        proto_item_append_text(reg_rsp_tree, " (HMAC Tuple is missing !)");
        }
+       return tvb_captured_length(tvb);
 }
 
 /* Register Wimax Mac Payload Protocol and Dissector */
@@ -351,7 +352,7 @@ void proto_register_mac_mgmt_msg_reg_rsp(void)
        proto_register_field_array(proto_mac_mgmt_msg_reg_rsp_decoder, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
 
-    register_dissector("mac_mgmt_msg_reg_rsp_handler", dissect_mac_mgmt_msg_reg_rsp_decoder, -1);
+    new_register_dissector("mac_mgmt_msg_reg_rsp_handler", dissect_mac_mgmt_msg_reg_rsp_decoder, -1);
 }
 
 void proto_reg_handoff_mac_mgmt_msg_reg_rsp(void)
@@ -360,7 +361,7 @@ void proto_reg_handoff_mac_mgmt_msg_reg_rsp(void)
 
        dsc_rsp_handle = find_dissector("mac_mgmt_msg_dsc_rsp_handler");
 
-       reg_rsp_handle = create_dissector_handle(dissect_mac_mgmt_msg_reg_rsp_decoder, proto_mac_mgmt_msg_reg_rsp_decoder);
+       reg_rsp_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_reg_rsp_decoder, proto_mac_mgmt_msg_reg_rsp_decoder);
        dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REG_RSP, reg_rsp_handle);
 }
 
index 218224e4ccb88c8a2f7c288efc2326ee2b97e46d..7a1d5ba816f5aa3c998fc6fdb52c65f0e68b963f 100644 (file)
@@ -1083,7 +1083,7 @@ static void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pin
 }
 
 /* Wimax Mac SBC-RSP Message Dissector */
-static void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
 {
        guint offset = 0;
        guint tvb_len;
@@ -1134,6 +1134,7 @@ static void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pin
                        offset += (tlv_len+tlv_value_offset);
                }       /* end of TLV process while loop */
        }
+       return tvb_captured_length(tvb);
 }
 
 /* Register Wimax Mac SBC-REQ/RSP Messages Dissectors */
@@ -2817,7 +2818,7 @@ void proto_register_mac_mgmt_msg_sbc(void)
        proto_register_field_array(proto_mac_mgmt_msg_sbc_decoder, hf_sbc, array_length(hf_sbc));
        proto_register_subtree_array(ett_sbc, array_length(ett_sbc));
 
-       register_dissector("mac_mgmt_msg_sbc_rsp_handler", dissect_mac_mgmt_msg_sbc_rsp_decoder, -1);
+       new_register_dissector("mac_mgmt_msg_sbc_rsp_handler", dissect_mac_mgmt_msg_sbc_rsp_decoder, -1);
 }
 
 void
@@ -2828,7 +2829,7 @@ proto_reg_handoff_mac_mgmt_msg_sbc(void)
        sbc_handle = create_dissector_handle(dissect_mac_mgmt_msg_sbc_req_decoder, proto_mac_mgmt_msg_sbc_decoder);
        dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_SBC_REQ, sbc_handle);
 
-       sbc_handle = create_dissector_handle(dissect_mac_mgmt_msg_sbc_rsp_decoder, proto_mac_mgmt_msg_sbc_decoder);
+       sbc_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_sbc_rsp_decoder, proto_mac_mgmt_msg_sbc_decoder);
        dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_SBC_RSP, sbc_handle);
 }
 
index 621ef4422072a680745890f8030b588711ca0c4f..82dec1b993ab47503bd4da82f4ff68b938bcde70 100644 (file)
@@ -254,12 +254,14 @@ proto_tree *add_protocol_subtree(tlv_info_t *self, gint idx, proto_tree *tree, i
 
 
 /* WiMax protocol dissector */
-static void dissect_wimax(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree _U_)
+static int dissect_wimax(tvbuff_t *tvb _U_, packet_info *pinfo, proto_tree *tree _U_, void* data _U_)
 {
        /* display the WiMax protocol name */
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "WiMax");
        /* Clear out stuff in the info column */
        col_clear(pinfo->cinfo, COL_INFO);
+
+       return tvb_captured_length(tvb);
 }
 
 gboolean is_down_link(packet_info *pinfo)
@@ -306,7 +308,7 @@ void proto_register_wimax(void)
        proto_register_subtree_array(ett_reg, array_length(ett_reg));
 
        /* Register the WiMax dissector */
-       register_dissector("wmx", dissect_wimax, proto_wimax);
+       new_register_dissector("wmx", dissect_wimax, proto_wimax);
 
        wimax_module = prefs_register_protocol(proto_wimax, NULL);
 
index 76b2b8e9adcde28dda3fd3ce706faf076c2c9f56..157e7ba8cdd29196aebe775f89341312d3ce554c 100644 (file)
@@ -39,7 +39,7 @@ static int hf_wimax_ranging_code = -1;
 static int hf_wimax_ranging_symbol_offset = -1;
 static int hf_wimax_ranging_subchannel_offset = -1;
 
-static void dissect_wimax_cdma_code_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_wimax_cdma_code_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
 {
        gint offset = 0;
        proto_item *cdma_item;
@@ -60,6 +60,7 @@ static void dissect_wimax_cdma_code_decoder(tvbuff_t *tvb, packet_info *pinfo, p
                /* display the 3rd CDMA Code */
                proto_tree_add_item(cdma_tree, hf_wimax_ranging_subchannel_offset, tvb, offset+2, 1, ENC_BIG_ENDIAN);
        }
+       return tvb_captured_length(tvb);
 }
 
 /* Register Wimax CDMA Protocol */
@@ -110,7 +111,7 @@ void proto_register_wimax_cdma(void)
        proto_register_field_array(proto_wimax_cdma_code_decoder, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
 
-       register_dissector("wimax_cdma_code_burst_handler", dissect_wimax_cdma_code_decoder, -1);
+       new_register_dissector("wimax_cdma_code_burst_handler", dissect_wimax_cdma_code_decoder, -1);
 }
 
 
index 2e9d6d213ee1cdb87b14fd4cc4b463974fe029c4..3a59499c2732c967de43d1367e4f9e9a41ffe26c 100644 (file)
@@ -98,7 +98,7 @@ static const value_string coding_indications[] =
        { 0,  NULL }
 };
 
-static void dissect_wimax_fch_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_wimax_fch_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
 {
        gint offset = 0;
        proto_item *fch_item = NULL;
@@ -131,6 +131,7 @@ static void dissect_wimax_fch_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
                proto_tree_add_item(fch_tree, hf_fch_dlmap_length, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
                proto_tree_add_item(fch_tree, hf_fch_reserved_2, tvb, offset, FCH_BURST_LENGTH, ENC_BIG_ENDIAN);
        }
+       return tvb_captured_length(tvb);
 }
 
 /* Register Wimax FCH Protocol */
@@ -241,7 +242,7 @@ void proto_register_wimax_fch(void)
        proto_register_field_array(proto_wimax_fch_decoder, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
 
-       register_dissector("wimax_fch_burst_handler", dissect_wimax_fch_decoder, -1);
+       new_register_dissector("wimax_fch_burst_handler", dissect_wimax_fch_decoder, -1);
 }
 
 /*
index d6ecc363b6eb14e885032fba889e3ef721adf08f..e682dc5d6ee1df51a07b13f45b9e2a323d503dd5 100644 (file)
@@ -45,7 +45,7 @@ static gint hf_ffb_symboloffset = -1;
 static gint hf_ffb_value = -1;
 
 
-static void dissect_wimax_ffb_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_wimax_ffb_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
 {
        gint offset = 0;
        guint length, num_of_ffbs, i;
@@ -76,6 +76,7 @@ static void dissect_wimax_ffb_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
                        proto_tree_add_item(ffb_tree, hf_ffb_value, tvb, offset++, 1, ENC_BIG_ENDIAN);
                }
        }
+       return tvb_captured_length(tvb);
 }
 
 /* Register Wimax FFB Protocol */
@@ -124,7 +125,7 @@ void proto_register_wimax_ffb(void)
        proto_register_field_array(proto_wimax_ffb_decoder, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
 
-       register_dissector("wimax_ffb_burst_handler", dissect_wimax_ffb_decoder, -1);
+       new_register_dissector("wimax_ffb_burst_handler", dissect_wimax_ffb_decoder, -1);
 }
 
 /*
index c90dde3f2c8509100fd2d3b6a99f026c225bac22..4a0bd0ba44d690ff2a16d39ac1a94920947a6135 100644 (file)
@@ -59,7 +59,7 @@ static gint hf_hack_symboloffset = -1;
 static gint hf_hack_value = -1;
 
 
-static void dissect_wimax_hack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_wimax_hack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
 {
        gint offset = 0;
        guint length, num_of_hacks, i;
@@ -89,6 +89,7 @@ static void dissect_wimax_hack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_
                        proto_tree_add_item(hack_tree, hf_hack_value, tvb, offset++, 1, ENC_BIG_ENDIAN);
                }
        }
+       return tvb_captured_length(tvb);
 }
 
 /* Register Wimax HARQ ACK Protocol */
@@ -133,7 +134,7 @@ void proto_register_wimax_hack(void)
 
        proto_wimax_hack_decoder = proto_wimax;
 
-       register_dissector("wimax_hack_burst_handler", dissect_wimax_hack_decoder, -1);
+       new_register_dissector("wimax_hack_burst_handler", dissect_wimax_hack_decoder, -1);
        proto_register_field_array(proto_wimax_hack_decoder, hf, array_length(hf));
 
        proto_register_subtree_array(ett, array_length(ett));
index 77ba292b248e22590713f187dcbea57ad77bf9c9..672a99218e6c2d6ae78f0e6841f70343a1554c40 100644 (file)
@@ -64,7 +64,7 @@ static gint ett_wimax_pdu_decoder = -1;
 
 static int hf_wimax_value_bytes = -1;
 
-static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
 {
        guint offset;
        guint mac_ht, mac_ec;
@@ -212,6 +212,7 @@ static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
                }
                offset += length;
        }
+       return tvb_captured_length(tvb);
 }
 
 /* Register Wimax PDU Burst Protocol */
@@ -238,7 +239,7 @@ void proto_register_wimax_pdu(void)
 
        proto_wimax_pdu_decoder = proto_wimax;
 
-       register_dissector("wimax_pdu_burst_handler", dissect_wimax_pdu_decoder, -1);
+       new_register_dissector("wimax_pdu_burst_handler", dissect_wimax_pdu_decoder, -1);
        proto_register_field_array(proto_wimax_pdu_decoder, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
 }
index d46aee9e28731ef748c507b132eea322b194eed3..da168a828564cd6493f279d842d6f92eacd339df 100644 (file)
@@ -77,7 +77,7 @@ static gint hf_phy_attributes_subchannel = -1;
 
 
 
-static void dissect_wimax_phy_attributes_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_wimax_phy_attributes_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
 {
        guint offset = 0;
        guint tvb_len;
@@ -120,6 +120,7 @@ static void dissect_wimax_phy_attributes_decoder(tvbuff_t *tvb, packet_info *pin
                        proto_tree_add_item(phy_tree, hf_phy_attributes_subchannel, tvb, offset++, 1, ENC_BIG_ENDIAN);
                }
        }
+       return tvb_captured_length(tvb);
 }
 
 /* Register Wimax PDU Burst Physical Attributes Protocol */
@@ -170,7 +171,7 @@ void proto_register_wimax_phy_attributes(void)
 
        proto_wimax_phy_attributes_decoder = proto_wimax;
 
-       register_dissector("wimax_phy_attributes_burst_handler", dissect_wimax_phy_attributes_decoder, -1);
+       new_register_dissector("wimax_phy_attributes_burst_handler", dissect_wimax_phy_attributes_decoder, -1);
 
        proto_register_field_array(proto_wimax_phy_attributes_decoder, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));