aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wtp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-14 09:23:33 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-14 21:54:27 +0000
commit28ea58251c04562cc0670e57bf073dc6966e73e6 (patch)
treeabe57292f17b280056a73ee7cfdc94abdcaaaaf3 /epan/dissectors/packet-wtp.c
parent13101020e12eb21e8464a3c4eb4fc2fe51409235 (diff)
register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most. This concludes a "first pass" over the dissector directory. Change-Id: If5ce5484214be50fe541cba478da1de62e354297 Reviewed-on: https://code.wireshark.org/review/11830 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-wtp.c')
-rw-r--r--epan/dissectors/packet-wtp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/dissectors/packet-wtp.c b/epan/dissectors/packet-wtp.c
index caab6e3315..70bf8ec26a 100644
--- a/epan/dissectors/packet-wtp.c
+++ b/epan/dissectors/packet-wtp.c
@@ -778,13 +778,14 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* Called directly from UDP.
* Put "WTP+WSP" into the "Protocol" column.
*/
-static void
-dissect_wtp_fromudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_wtp_fromudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
col_set_str(pinfo->cinfo, COL_PROTOCOL, "WTP+WSP");
col_clear(pinfo->cinfo, COL_INFO);
dissect_wtp_common(tvb, pinfo, tree);
+ return tvb_captured_length(tvb);
}
/*
@@ -796,13 +797,14 @@ dissect_wtp_fromudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*
* XXX - can this be called from any other dissector?
*/
-static void
-dissect_wtp_fromwtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_wtp_fromwtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
col_set_str(pinfo->cinfo, COL_PROTOCOL, "WTLS+WTP+WSP");
col_clear(pinfo->cinfo, COL_INFO);
dissect_wtp_common(tvb, pinfo, tree);
+ return tvb_captured_length(tvb);
}
/* Register the protocol with Wireshark */
@@ -1058,8 +1060,8 @@ proto_register_wtp(void)
proto_register_field_array(proto_wtp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("wtp-wtls", dissect_wtp_fromwtls, proto_wtp);
- register_dissector("wtp-udp", dissect_wtp_fromudp, proto_wtp);
+ new_register_dissector("wtp-wtls", dissect_wtp_fromwtls, proto_wtp);
+ new_register_dissector("wtp-udp", dissect_wtp_fromudp, proto_wtp);
register_init_routine(wtp_defragment_init);
register_cleanup_routine(wtp_defragment_cleanup);
}