diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-14 09:23:33 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-14 21:54:27 +0000 |
commit | 28ea58251c04562cc0670e57bf073dc6966e73e6 (patch) | |
tree | abe57292f17b280056a73ee7cfdc94abdcaaaaf3 /epan/dissectors/packet-udp.c | |
parent | 13101020e12eb21e8464a3c4eb4fc2fe51409235 (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-udp.c')
-rw-r--r-- | epan/dissectors/packet-udp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c index cabd9051e8..f40b68b309 100644 --- a/epan/dissectors/packet-udp.c +++ b/epan/dissectors/packet-udp.c @@ -996,10 +996,11 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto) decode_udp_ports(tvb, offset, pinfo, tree, udph->uh_sport, udph->uh_dport, udph->uh_ulen); } -static void -dissect_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { dissect(tvb, pinfo, tree, IP_PROTO_UDP); + return tvb_captured_length(tvb); } static void @@ -1075,7 +1076,7 @@ proto_register_udp(void) proto_udp = proto_register_protocol("User Datagram Protocol", "UDP", "udp"); hfi_udp = proto_registrar_get_nth(proto_udp); - udp_handle = register_dissector("udp", dissect_udp, proto_udp); + udp_handle = new_register_dissector("udp", dissect_udp, proto_udp); expert_udp = expert_register_protocol(proto_udp); proto_register_fields(proto_udp, hfi, array_length(hfi)); |