diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-22 22:59:08 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-23 13:09:55 +0000 |
commit | 2bbbb4879c3e0885fd971bd75ca88a183feb92f0 (patch) | |
tree | 9bbd51756fa6230f3555612e27863b316371ad38 /epan/dissectors/packet-ip.c | |
parent | 073cfb33ec84f12d7904f0e6ed2b0a5d049f4ded (diff) |
register_dissector -> new_register_dissector
Change-Id: Ic368dd8e83cf39e0c934da0ae2744778e2d54ce6
Reviewed-on: https://code.wireshark.org/review/12050
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-ip.c')
-rw-r--r-- | epan/dissectors/packet-ip.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index 3cbec4fbe6..02e2d9384c 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -2495,8 +2495,8 @@ dissect_ip_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) pinfo->fragmented = save_fragmented; } -static void -dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_tree *ip_tree; proto_item *ti, *tf; @@ -2506,11 +2506,11 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(version == 4){ dissect_ip_v4(tvb, pinfo, tree); - return; + return tvb_captured_length(tvb); } if(version == 6){ call_dissector(ipv6_handle, tvb, pinfo, tree); - return; + return tvb_captured_length(tvb); } /* Bogus IP version */ @@ -2521,6 +2521,7 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ip_tree = proto_item_add_subtree(ti, ett_ip); tf = proto_tree_add_item(ip_tree, hf_ip_version, tvb, 0, 1, ENC_NA); expert_add_info(pinfo, tf, &ei_ip_bogus_ip_version); + return 1; } static gboolean @@ -3167,7 +3168,7 @@ proto_register_ip(void) "Try to decode a packet using an heuristic sub-dissector before using a sub-dissector registered to a specific port", &try_heuristic_first); - register_dissector("ip", dissect_ip, proto_ip); + new_register_dissector("ip", dissect_ip, proto_ip); register_init_routine(ip_defragment_init); register_cleanup_routine(ip_defragment_cleanup); ip_tap = register_tap("ip"); |