aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-14 15:11:44 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-14 21:54:39 +0000
commit159227a14b25b15b535ac95c85d8bc699317d45e (patch)
tree7d02f802790d5701a0cc5c40537538944b60bb63
parent28ea58251c04562cc0670e57bf073dc6966e73e6 (diff)
register_dissector -> new_register_dissector for plugins.
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>
-rw-r--r--plugins/docsis/packet-bintrngreq.c7
-rw-r--r--plugins/docsis/packet-bpkmattr.c7
-rw-r--r--plugins/docsis/packet-bpkmreq.c7
-rw-r--r--plugins/docsis/packet-bpkmrsp.c7
-rw-r--r--plugins/docsis/packet-cmctrlreq.c7
-rw-r--r--plugins/docsis/packet-cmctrlrsp.c7
-rw-r--r--plugins/docsis/packet-cmstatus.c7
-rw-r--r--plugins/docsis/packet-dbcack.c7
-rw-r--r--plugins/docsis/packet-dbcreq.c7
-rw-r--r--plugins/docsis/packet-dbcrsp.c7
-rw-r--r--plugins/docsis/packet-dccack.c7
-rw-r--r--plugins/docsis/packet-dccreq.c7
-rw-r--r--plugins/docsis/packet-dccrsp.c7
-rw-r--r--plugins/docsis/packet-dcd.c7
-rw-r--r--plugins/docsis/packet-docsis.c7
-rw-r--r--plugins/docsis/packet-dpvreq.c7
-rw-r--r--plugins/docsis/packet-dpvrsp.c7
-rw-r--r--plugins/docsis/packet-dsaack.c7
-rw-r--r--plugins/docsis/packet-dsareq.c7
-rw-r--r--plugins/docsis/packet-dsarsp.c7
-rw-r--r--plugins/docsis/packet-dscack.c7
-rw-r--r--plugins/docsis/packet-dscreq.c7
-rw-r--r--plugins/docsis/packet-dscrsp.c7
-rw-r--r--plugins/docsis/packet-dsdreq.c7
-rw-r--r--plugins/docsis/packet-dsdrsp.c7
-rw-r--r--plugins/docsis/packet-intrngreq.c7
-rw-r--r--plugins/docsis/packet-macmgmt.c13
-rw-r--r--plugins/docsis/packet-map.c7
-rw-r--r--plugins/docsis/packet-mdd.c7
-rw-r--r--plugins/docsis/packet-regack.c7
-rw-r--r--plugins/docsis/packet-regreq.c7
-rw-r--r--plugins/docsis/packet-regreqmp.c7
-rw-r--r--plugins/docsis/packet-regrsp.c7
-rw-r--r--plugins/docsis/packet-regrspmp.c7
-rw-r--r--plugins/docsis/packet-rngreq.c7
-rw-r--r--plugins/docsis/packet-rngrsp.c7
-rw-r--r--plugins/docsis/packet-sync.c7
-rw-r--r--plugins/docsis/packet-tlv-cmctrl.c7
-rw-r--r--plugins/docsis/packet-tlv.c7
-rw-r--r--plugins/docsis/packet-type29ucd.c8
-rw-r--r--plugins/docsis/packet-uccreq.c7
-rw-r--r--plugins/docsis/packet-uccrsp.c8
-rw-r--r--plugins/docsis/packet-ucd.c8
-rw-r--r--plugins/docsis/packet-vendor.c8
-rw-r--r--plugins/ethercat/packet-ecatmb.c5
-rw-r--r--plugins/ethercat/packet-esl.c11
-rw-r--r--plugins/ethercat/packet-ethercat-frame.c5
-rw-r--r--plugins/irda/packet-irda.c7
-rw-r--r--plugins/irda/packet-sir.c9
-rw-r--r--plugins/wimax/msg_aas_beam.c17
-rw-r--r--plugins/wimax/msg_dsc.c7
-rw-r--r--plugins/wimax/msg_reg_rsp.c7
-rw-r--r--plugins/wimax/msg_sbc.c7
-rw-r--r--plugins/wimax/packet-wmx.c6
-rw-r--r--plugins/wimax/wimax_cdma_code_decoder.c5
-rw-r--r--plugins/wimax/wimax_fch_decoder.c5
-rw-r--r--plugins/wimax/wimax_ffb_decoder.c5
-rw-r--r--plugins/wimax/wimax_hack_decoder.c5
-rw-r--r--plugins/wimax/wimax_pdu_decoder.c5
-rw-r--r--plugins/wimax/wimax_phy_attributes_decoder.c5
60 files changed, 246 insertions, 183 deletions
diff --git a/plugins/docsis/packet-bintrngreq.c b/plugins/docsis/packet-bintrngreq.c
index dcb21e2335..ad69e3a7d3 100644
--- a/plugins/docsis/packet-bintrngreq.c
+++ b/plugins/docsis/packet-bintrngreq.c
@@ -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
diff --git a/plugins/docsis/packet-bpkmattr.c b/plugins/docsis/packet-bpkmattr.c
index 7fc5e43318..769c59ecab 100644
--- a/plugins/docsis/packet-bpkmattr.c
+++ b/plugins/docsis/packet-bpkmattr.c
@@ -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);
}
diff --git a/plugins/docsis/packet-bpkmreq.c b/plugins/docsis/packet-bpkmreq.c
index 6f9ba561a6..3a5697933d 100644
--- a/plugins/docsis/packet-bpkmreq.c
+++ b/plugins/docsis/packet-bpkmreq.c
@@ -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);
}
diff --git a/plugins/docsis/packet-bpkmrsp.c b/plugins/docsis/packet-bpkmrsp.c
index 6cd5f20f2d..48a1785f93 100644
--- a/plugins/docsis/packet-bpkmrsp.c
+++ b/plugins/docsis/packet-bpkmrsp.c
@@ -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);
}
diff --git a/plugins/docsis/packet-cmctrlreq.c b/plugins/docsis/packet-cmctrlreq.c
index b909da1c36..1c9e569865 100644
--- a/plugins/docsis/packet-cmctrlreq.c
+++ b/plugins/docsis/packet-cmctrlreq.c
@@ -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
diff --git a/plugins/docsis/packet-cmctrlrsp.c b/plugins/docsis/packet-cmctrlrsp.c
index bd415e35e0..8d8f396238 100644
--- a/plugins/docsis/packet-cmctrlrsp.c
+++ b/plugins/docsis/packet-cmctrlrsp.c
@@ -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
diff --git a/plugins/docsis/packet-cmstatus.c b/plugins/docsis/packet-cmstatus.c
index 58ec608676..bd9f8a4d5a 100644
--- a/plugins/docsis/packet-cmstatus.c
+++ b/plugins/docsis/packet-cmstatus.c
@@ -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
diff --git a/plugins/docsis/packet-dbcack.c b/plugins/docsis/packet-dbcack.c
index 28b4a5fd36..0acd7c1416 100644
--- a/plugins/docsis/packet-dbcack.c
+++ b/plugins/docsis/packet-dbcack.c
@@ -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
diff --git a/plugins/docsis/packet-dbcreq.c b/plugins/docsis/packet-dbcreq.c
index 5993231554..059b0a9b4f 100644
--- a/plugins/docsis/packet-dbcreq.c
+++ b/plugins/docsis/packet-dbcreq.c
@@ -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
diff --git a/plugins/docsis/packet-dbcrsp.c b/plugins/docsis/packet-dbcrsp.c
index e4f9268590..8702d0190e 100644
--- a/plugins/docsis/packet-dbcrsp.c
+++ b/plugins/docsis/packet-dbcrsp.c
@@ -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);
}
diff --git a/plugins/docsis/packet-dccack.c b/plugins/docsis/packet-dccack.c
index 01fb48b0b5..922df79649 100644
--- a/plugins/docsis/packet-dccack.c
+++ b/plugins/docsis/packet-dccack.c
@@ -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
diff --git a/plugins/docsis/packet-dccreq.c b/plugins/docsis/packet-dccreq.c
index 0067cd60e3..7adfafa31c 100644
--- a/plugins/docsis/packet-dccreq.c
+++ b/plugins/docsis/packet-dccreq.c
@@ -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
diff --git a/plugins/docsis/packet-dccrsp.c b/plugins/docsis/packet-dccrsp.c
index 7526b8895b..bb3b8088ff 100644
--- a/plugins/docsis/packet-dccrsp.c
+++ b/plugins/docsis/packet-dccrsp.c
@@ -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
diff --git a/plugins/docsis/packet-dcd.c b/plugins/docsis/packet-dcd.c
index 277a4d1551..c9077fe8ed 100644
--- a/plugins/docsis/packet-dcd.c
+++ b/plugins/docsis/packet-dcd.c
@@ -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
diff --git a/plugins/docsis/packet-docsis.c b/plugins/docsis/packet-docsis.c
index add1b36b1c..c922883eb3 100644
--- a/plugins/docsis/packet-docsis.c
+++ b/plugins/docsis/packet-docsis.c
@@ -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
diff --git a/plugins/docsis/packet-dpvreq.c b/plugins/docsis/packet-dpvreq.c
index 6b7f5a6b15..d39f189053 100644
--- a/plugins/docsis/packet-dpvreq.c
+++ b/plugins/docsis/packet-dpvreq.c
@@ -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
diff --git a/plugins/docsis/packet-dpvrsp.c b/plugins/docsis/packet-dpvrsp.c
index 08f6ac1eb1..bdc9dcc3eb 100644
--- a/plugins/docsis/packet-dpvrsp.c
+++ b/plugins/docsis/packet-dpvrsp.c
@@ -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
diff --git a/plugins/docsis/packet-dsaack.c b/plugins/docsis/packet-dsaack.c
index 85cc0ddf41..d7bca465df 100644
--- a/plugins/docsis/packet-dsaack.c
+++ b/plugins/docsis/packet-dsaack.c
@@ -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
diff --git a/plugins/docsis/packet-dsareq.c b/plugins/docsis/packet-dsareq.c
index ecea28c28c..5f4cb3eb50 100644
--- a/plugins/docsis/packet-dsareq.c
+++ b/plugins/docsis/packet-dsareq.c
@@ -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
diff --git a/plugins/docsis/packet-dsarsp.c b/plugins/docsis/packet-dsarsp.c
index 1a7c36f992..7fc705ef23 100644
--- a/plugins/docsis/packet-dsarsp.c
+++ b/plugins/docsis/packet-dsarsp.c
@@ -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
diff --git a/plugins/docsis/packet-dscack.c b/plugins/docsis/packet-dscack.c
index 3ab6ac8e92..cdcec0c8a8 100644
--- a/plugins/docsis/packet-dscack.c
+++ b/plugins/docsis/packet-dscack.c
@@ -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
diff --git a/plugins/docsis/packet-dscreq.c b/plugins/docsis/packet-dscreq.c
index 357df0b2b0..6a1d302067 100644
--- a/plugins/docsis/packet-dscreq.c
+++ b/plugins/docsis/packet-dscreq.c
@@ -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
diff --git a/plugins/docsis/packet-dscrsp.c b/plugins/docsis/packet-dscrsp.c
index 2f239b311e..c34fbe5e76 100644
--- a/plugins/docsis/packet-dscrsp.c
+++ b/plugins/docsis/packet-dscrsp.c
@@ -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
diff --git a/plugins/docsis/packet-dsdreq.c b/plugins/docsis/packet-dsdreq.c
index e84d773ac4..6dac22aa4c 100644
--- a/plugins/docsis/packet-dsdreq.c
+++ b/plugins/docsis/packet-dsdreq.c
@@ -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
diff --git a/plugins/docsis/packet-dsdrsp.c b/plugins/docsis/packet-dsdrsp.c
index 14e7471169..dbcf7a18c5 100644
--- a/plugins/docsis/packet-dsdrsp.c
+++ b/plugins/docsis/packet-dsdrsp.c
@@ -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
diff --git a/plugins/docsis/packet-intrngreq.c b/plugins/docsis/packet-intrngreq.c
index 94fd39bfe7..b76fc2d715 100644
--- a/plugins/docsis/packet-intrngreq.c
+++ b/plugins/docsis/packet-intrngreq.c
@@ -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
diff --git a/plugins/docsis/packet-macmgmt.c b/plugins/docsis/packet-macmgmt.c
index 6680dfce23..0285b6848c 100644
--- a/plugins/docsis/packet-macmgmt.c
+++ b/plugins/docsis/packet-macmgmt.c
@@ -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
diff --git a/plugins/docsis/packet-map.c b/plugins/docsis/packet-map.c
index 6e9343368a..f315cbd762 100644
--- a/plugins/docsis/packet-map.c
+++ b/plugins/docsis/packet-map.c
@@ -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
diff --git a/plugins/docsis/packet-mdd.c b/plugins/docsis/packet-mdd.c
index a7f6e1a9a4..4c17e4d083 100644
--- a/plugins/docsis/packet-mdd.c
+++ b/plugins/docsis/packet-mdd.c
@@ -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
diff --git a/plugins/docsis/packet-regack.c b/plugins/docsis/packet-regack.c
index c3aa0a733b..05d8210fbe 100644
--- a/plugins/docsis/packet-regack.c
+++ b/plugins/docsis/packet-regack.c
@@ -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
diff --git a/plugins/docsis/packet-regreq.c b/plugins/docsis/packet-regreq.c
index 93008a3c8e..1608ff178f 100644
--- a/plugins/docsis/packet-regreq.c
+++ b/plugins/docsis/packet-regreq.c
@@ -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
diff --git a/plugins/docsis/packet-regreqmp.c b/plugins/docsis/packet-regreqmp.c
index 849f8302ae..ebf20fd7ae 100644
--- a/plugins/docsis/packet-regreqmp.c
+++ b/plugins/docsis/packet-regreqmp.c
@@ -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
diff --git a/plugins/docsis/packet-regrsp.c b/plugins/docsis/packet-regrsp.c
index fa86f98955..fdc7d6c186 100644
--- a/plugins/docsis/packet-regrsp.c
+++ b/plugins/docsis/packet-regrsp.c
@@ -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
diff --git a/plugins/docsis/packet-regrspmp.c b/plugins/docsis/packet-regrspmp.c
index c304ccac5a..816c7006cb 100644
--- a/plugins/docsis/packet-regrspmp.c
+++ b/plugins/docsis/packet-regrspmp.c
@@ -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
diff --git a/plugins/docsis/packet-rngreq.c b/plugins/docsis/packet-rngreq.c
index feddd72492..9ee6d8e5f1 100644
--- a/plugins/docsis/packet-rngreq.c
+++ b/plugins/docsis/packet-rngreq.c
@@ -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
diff --git a/plugins/docsis/packet-rngrsp.c b/plugins/docsis/packet-rngrsp.c
index 13dfb8291f..e0578d93db 100644
--- a/plugins/docsis/packet-rngrsp.c
+++ b/plugins/docsis/packet-rngrsp.c
@@ -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);
}
diff --git a/plugins/docsis/packet-sync.c b/plugins/docsis/packet-sync.c
index f1c2e6058d..c5d83113f8 100644
--- a/plugins/docsis/packet-sync.c
+++ b/plugins/docsis/packet-sync.c
@@ -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
diff --git a/plugins/docsis/packet-tlv-cmctrl.c b/plugins/docsis/packet-tlv-cmctrl.c
index 86a01948a0..fe5e932eb5 100644
--- a/plugins/docsis/packet-tlv-cmctrl.c
+++ b/plugins/docsis/packet-tlv-cmctrl.c
@@ -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
diff --git a/plugins/docsis/packet-tlv.c b/plugins/docsis/packet-tlv.c
index 13bba721de..912ed587e1 100644
--- a/plugins/docsis/packet-tlv.c
+++ b/plugins/docsis/packet-tlv.c
@@ -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
diff --git a/plugins/docsis/packet-type29ucd.c b/plugins/docsis/packet-type29ucd.c
index 94cdff4814..e617ec3fa6 100644
--- a/plugins/docsis/packet-type29ucd.c
+++ b/plugins/docsis/packet-type29ucd.c
@@ -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
diff --git a/plugins/docsis/packet-uccreq.c b/plugins/docsis/packet-uccreq.c
index 68ffe997a9..5a3dfe9659 100644
--- a/plugins/docsis/packet-uccreq.c
+++ b/plugins/docsis/packet-uccreq.c
@@ -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
diff --git a/plugins/docsis/packet-uccrsp.c b/plugins/docsis/packet-uccrsp.c
index 835b0c36d3..3252788587 100644
--- a/plugins/docsis/packet-uccrsp.c
+++ b/plugins/docsis/packet-uccrsp.c
@@ -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
diff --git a/plugins/docsis/packet-ucd.c b/plugins/docsis/packet-ucd.c
index 8944c67935..a7a2a265a9 100644
--- a/plugins/docsis/packet-ucd.c
+++ b/plugins/docsis/packet-ucd.c
@@ -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
diff --git a/plugins/docsis/packet-vendor.c b/plugins/docsis/packet-vendor.c
index 815fc98ae5..89769649a0 100644
--- a/plugins/docsis/packet-vendor.c
+++ b/plugins/docsis/packet-vendor.c
@@ -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
diff --git a/plugins/ethercat/packet-ecatmb.c b/plugins/ethercat/packet-ecatmb.c
index 6def091ff9..ba8c525c29 100644
--- a/plugins/ethercat/packet-ecatmb.c
+++ b/plugins/ethercat/packet-ecatmb.c
@@ -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)
diff --git a/plugins/ethercat/packet-esl.c b/plugins/ethercat/packet-esl.c
index 70f0d416bf..dc67ee747d 100644
--- a/plugins/ethercat/packet-esl.c
+++ b/plugins/ethercat/packet-esl.c
@@ -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
diff --git a/plugins/ethercat/packet-ethercat-frame.c b/plugins/ethercat/packet-ethercat-frame.c
index 7ecd0a27bf..8fb5d3c83e 100644
--- a/plugins/ethercat/packet-ethercat-frame.c
+++ b/plugins/ethercat/packet-ethercat-frame.c
@@ -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. */
diff --git a/plugins/irda/packet-irda.c b/plugins/irda/packet-irda.c
index f01af6271f..04f7f26116 100644
--- a/plugins/irda/packet-irda.c
+++ b/plugins/irda/packet-irda.c
@@ -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));
diff --git a/plugins/irda/packet-sir.c b/plugins/irda/packet-sir.c
index 2c445da8f7..d1da1e5713 100644
--- a/plugins/irda/packet-sir.c
+++ b/plugins/irda/packet-sir.c
@@ -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));
diff --git a/plugins/wimax/msg_aas_beam.c b/plugins/wimax/msg_aas_beam.c
index d296e11542..1d3e60675a 100644
--- a/plugins/wimax/msg_aas_beam.c
+++ b/plugins/wimax/msg_aas_beam.c
@@ -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);
}
diff --git a/plugins/wimax/msg_dsc.c b/plugins/wimax/msg_dsc.c
index bd13dc56fb..27a84fad84 100644
--- a/plugins/wimax/msg_dsc.c
+++ b/plugins/wimax/msg_dsc.c
@@ -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);
diff --git a/plugins/wimax/msg_reg_rsp.c b/plugins/wimax/msg_reg_rsp.c
index 9e9499f032..bdb4430113 100644
--- a/plugins/wimax/msg_reg_rsp.c
+++ b/plugins/wimax/msg_reg_rsp.c
@@ -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);
}
diff --git a/plugins/wimax/msg_sbc.c b/plugins/wimax/msg_sbc.c
index 218224e4cc..7a1d5ba816 100644
--- a/plugins/wimax/msg_sbc.c
+++ b/plugins/wimax/msg_sbc.c
@@ -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);
}
diff --git a/plugins/wimax/packet-wmx.c b/plugins/wimax/packet-wmx.c
index 621ef44220..82dec1b993 100644
--- a/plugins/wimax/packet-wmx.c
+++ b/plugins/wimax/packet-wmx.c
@@ -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);
diff --git a/plugins/wimax/wimax_cdma_code_decoder.c b/plugins/wimax/wimax_cdma_code_decoder.c
index 76b2b8e9ad..157e7ba8cd 100644
--- a/plugins/wimax/wimax_cdma_code_decoder.c
+++ b/plugins/wimax/wimax_cdma_code_decoder.c
@@ -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);
}
diff --git a/plugins/wimax/wimax_fch_decoder.c b/plugins/wimax/wimax_fch_decoder.c
index 2e9d6d213e..3a59499c27 100644
--- a/plugins/wimax/wimax_fch_decoder.c
+++ b/plugins/wimax/wimax_fch_decoder.c
@@ -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);
}
/*
diff --git a/plugins/wimax/wimax_ffb_decoder.c b/plugins/wimax/wimax_ffb_decoder.c
index d6ecc363b6..e682dc5d6e 100644
--- a/plugins/wimax/wimax_ffb_decoder.c
+++ b/plugins/wimax/wimax_ffb_decoder.c
@@ -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);
}
/*
diff --git a/plugins/wimax/wimax_hack_decoder.c b/plugins/wimax/wimax_hack_decoder.c
index c90dde3f2c..4a0bd0ba44 100644
--- a/plugins/wimax/wimax_hack_decoder.c
+++ b/plugins/wimax/wimax_hack_decoder.c
@@ -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));
diff --git a/plugins/wimax/wimax_pdu_decoder.c b/plugins/wimax/wimax_pdu_decoder.c
index 77ba292b24..672a99218e 100644
--- a/plugins/wimax/wimax_pdu_decoder.c
+++ b/plugins/wimax/wimax_pdu_decoder.c
@@ -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));
}
diff --git a/plugins/wimax/wimax_phy_attributes_decoder.c b/plugins/wimax/wimax_phy_attributes_decoder.c
index d46aee9e28..da168a8285 100644
--- a/plugins/wimax/wimax_phy_attributes_decoder.c
+++ b/plugins/wimax/wimax_phy_attributes_decoder.c
@@ -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));