diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-13 20:18:34 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-14 18:00:00 +0000 |
commit | 8faf5c80b3302247c32e1f5c492cb31a082ee0ad (patch) | |
tree | e9bac5673fc9a480fe1fa06fcc6d5d7d45b37389 /epan/dissectors/packet-ipsec.c | |
parent | 76dec3ba681da2c315efba4433d3b1f995defd91 (diff) |
register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most.
Change-Id: I25fe6a0aac93980333217d007702799d16946563
Reviewed-on: https://code.wireshark.org/review/11816
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-ipsec.c')
-rw-r--r-- | epan/dissectors/packet-ipsec.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ipsec.c b/epan/dissectors/packet-ipsec.c index 61ff6366a2..ff0063f355 100644 --- a/epan/dissectors/packet-ipsec.c +++ b/epan/dissectors/packet-ipsec.c @@ -1183,8 +1183,8 @@ dissect_ah_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat return advance; } -static void -dissect_ah(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_ah(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { struct ah_header_data header_data = {NULL, 0}; tvbuff_t *next_tvb; @@ -1217,6 +1217,7 @@ dissect_ah(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) export_ipsec_pdu(dissector_handle, pinfo, next_tvb); call_dissector(dissector_handle, next_tvb, pinfo, header_data.next_tree); pinfo->match_uint = saved_match_uint; + return tvb_captured_length(tvb); } /* @@ -1291,8 +1292,8 @@ dissect_esp_authentication(proto_tree *tree, tvbuff_t *tvb, gint len, gint esp_a } #endif -static void -dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_tree *esp_tree = NULL; proto_item *ti; @@ -2228,6 +2229,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) #ifdef HAVE_LIBGCRYPT } #endif + return tvb_captured_length(tvb); } @@ -2538,8 +2540,8 @@ proto_register_ipsec(void) register_init_routine(&ipsec_init_protocol); register_cleanup_routine(&ipsec_cleanup_protocol); - register_dissector("esp", dissect_esp, proto_esp); - register_dissector("ah", dissect_ah, proto_ah); + new_register_dissector("esp", dissect_esp, proto_esp); + new_register_dissector("ah", dissect_ah, proto_ah); } void |