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-mpls.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-mpls.c')
-rw-r--r-- | epan/dissectors/packet-mpls.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/dissectors/packet-mpls.c b/epan/dissectors/packet-mpls.c index f51b82a8f2..d5f9895c98 100644 --- a/epan/dissectors/packet-mpls.c +++ b/epan/dissectors/packet-mpls.c @@ -92,7 +92,6 @@ const value_string special_labels[] = { static dissector_table_t pw_ach_subdissector_table; -static dissector_handle_t dissector_data; static dissector_handle_t dissector_ipv6; static dissector_handle_t dissector_ip; static dissector_handle_t dissector_pw_ach; @@ -289,7 +288,7 @@ dissect_pw_ach(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _ if (!dissector_try_uint(pw_ach_subdissector_table, channel_type, next_tvb, pinfo, tree)) { - call_dissector(dissector_data, next_tvb, pinfo, tree); + call_data_dissector(next_tvb, pinfo, tree); } if (channel_type == ACH_TYPE_BFD_CV) @@ -356,7 +355,7 @@ dissect_pw_mcw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _ tvb, 2, 2, ENC_BIG_ENDIAN); } next_tvb = tvb_new_subset_remaining(tvb, 4); - call_dissector(dissector_data, next_tvb, pinfo, tree); + call_data_dissector(next_tvb, pinfo, tree); return tvb_captured_length(tvb); } @@ -479,7 +478,7 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ call_dissector(dissector_pw_eth_heuristic, next_tvb, pinfo, tree); break; default: - call_dissector(dissector_data, next_tvb, pinfo, tree); + call_data_dissector(next_tvb, pinfo, tree); break; } return tvb_captured_length(tvb); @@ -650,7 +649,6 @@ proto_reg_handoff_mpls(void) mpls_pwcw_handle = create_dissector_handle( dissect_pw_mcw, proto_pw_mcw ); dissector_add_uint( "mpls.label", MPLS_LABEL_INVALID, mpls_pwcw_handle ); - dissector_data = find_dissector("data"); dissector_ipv6 = find_dissector_add_dependency("ipv6", proto_pw_mcw ); dissector_ip = find_dissector_add_dependency("ip", proto_pw_mcw ); dissector_pw_eth_heuristic = find_dissector_add_dependency("pw_eth_heuristic", proto_pw_mcw); |