diff options
author | Michael Mann <mmann78@netscape.net> | 2016-03-19 20:33:14 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-03-20 17:38:03 +0000 |
commit | 1e60d63c8c6882c8c0bdb00cf6df594e1bb6fccf (patch) | |
tree | 4147c4f2bee3b93c250a49fa8ec337072c80e713 /epan/dissectors/packet-lisp.c | |
parent | 2b2fc64447e5f778d969e6c850e9196d248cbbe1 (diff) | |
download | wireshark-1e60d63c8c6882c8c0bdb00cf6df594e1bb6fccf.tar.gz |
Create call_data_dissector() to call data dissector.
This saves many dissectors the need to find the data dissector and store a handle to it.
There were also some that were finding it, but not using it.
For others this was the only reason for their handoff function, so it could be eliminated.
Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b
Reviewed-on: https://code.wireshark.org/review/14530
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-lisp.c')
-rw-r--r-- | epan/dissectors/packet-lisp.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/epan/dissectors/packet-lisp.c b/epan/dissectors/packet-lisp.c index 2ecde37a2a..7ac5bf292c 100644 --- a/epan/dissectors/packet-lisp.c +++ b/epan/dissectors/packet-lisp.c @@ -421,7 +421,6 @@ static dissector_handle_t lisp_handle; static dissector_handle_t ipv4_handle; static dissector_handle_t ipv6_handle; -static dissector_handle_t data_handle; static gboolean encapsulated = FALSE; static gboolean ddt_originated = FALSE; @@ -2193,7 +2192,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field, "Unexpected Source EID AFI (%d), cannot decode", src_eid_afi); next_tvb = tvb_new_subset_remaining(tvb, offset); - call_dissector(data_handle, next_tvb, pinfo, lisp_tree); + call_data_dissector(next_tvb, pinfo, lisp_tree); return; } @@ -2226,7 +2225,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field, "Unexpected ITR-RLOC-AFI (%d), cannot decode", itr_afi); next_tvb = tvb_new_subset_remaining(tvb, offset); - call_dissector(data_handle, next_tvb, pinfo, lisp_tree); + call_data_dissector(next_tvb, pinfo, lisp_tree); return; } } @@ -2248,7 +2247,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field, "Unexpected EID prefix AFI (%d), cannot decode", prefix_afi); next_tvb = tvb_new_subset_remaining(tvb, offset); - call_dissector(data_handle, next_tvb, pinfo, lisp_tree); + call_data_dissector(next_tvb, pinfo, lisp_tree); return; } @@ -2308,7 +2307,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre } next_tvb = tvb_new_subset_remaining(tvb, offset); - call_dissector(data_handle, next_tvb, pinfo, lisp_tree); + call_data_dissector(next_tvb, pinfo, lisp_tree); } @@ -2387,7 +2386,7 @@ dissect_lisp_map_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree) } next_tvb = tvb_new_subset_remaining(tvb, offset); - call_dissector(data_handle, next_tvb, pinfo, lisp_tree); + call_data_dissector(next_tvb, pinfo, lisp_tree); } @@ -2500,7 +2499,7 @@ dissect_lisp_map_register(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tr } next_tvb = tvb_new_subset_remaining(tvb, offset); - call_dissector(data_handle, next_tvb, pinfo, lisp_tree); + call_data_dissector(next_tvb, pinfo, lisp_tree); } @@ -2621,7 +2620,7 @@ dissect_lisp_map_notify(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree } next_tvb = tvb_new_subset_remaining(tvb, offset); - call_dissector(data_handle, next_tvb, pinfo, lisp_tree); + call_data_dissector(next_tvb, pinfo, lisp_tree); } /* @@ -2685,7 +2684,7 @@ dissect_lisp_map_referral(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tr } next_tvb = tvb_new_subset_remaining(tvb, offset); - call_dissector(data_handle, next_tvb, pinfo, lisp_tree); + call_data_dissector(next_tvb, pinfo, lisp_tree); } @@ -2787,7 +2786,7 @@ dissect_lisp_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree) expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field, "Unexpected EID prefix AFI (%d), cannot decode", prefix_afi); next_tvb = tvb_new_subset_remaining(tvb, offset); - call_dissector(data_handle, next_tvb, pinfo, lisp_tree); + call_data_dissector(next_tvb, pinfo, lisp_tree); return; } @@ -2826,7 +2825,7 @@ dissect_lisp_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree) } next_tvb = tvb_new_subset_remaining(tvb, offset); - call_dissector(data_handle, next_tvb, pinfo, lisp_tree); + call_data_dissector(next_tvb, pinfo, lisp_tree); } @@ -2869,7 +2868,7 @@ dissect_lisp_ecm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree call_dissector(ipv6_handle, next_tvb, pinfo, tree); break; default: - call_dissector(data_handle, next_tvb, pinfo, tree); + call_data_dissector(next_tvb, pinfo, tree); break; } encapsulated = FALSE; @@ -2948,7 +2947,7 @@ dissect_lisp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_ dissect_lisp_ecm(tvb, pinfo, tree, lisp_tree); break; default: - call_dissector(data_handle, tvb, pinfo, tree); + call_data_dissector(tvb, pinfo, tree); break; } @@ -3627,7 +3626,6 @@ proto_reg_handoff_lisp(void) dissector_add_uint("udp.port", LISP_CONTROL_PORT, lisp_handle); ipv4_handle = find_dissector_add_dependency("ip", proto_lisp); ipv6_handle = find_dissector_add_dependency("ipv6", proto_lisp); - data_handle = find_dissector("data"); } /* |