aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-erf.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-03-19 20:33:14 -0400
committerMichael Mann <mmann78@netscape.net>2016-03-20 17:38:03 +0000
commit1e60d63c8c6882c8c0bdb00cf6df594e1bb6fccf (patch)
tree4147c4f2bee3b93c250a49fa8ec337072c80e713 /epan/dissectors/packet-erf.c
parent2b2fc64447e5f778d969e6c850e9196d248cbbe1 (diff)
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-erf.c')
-rw-r--r--epan/dissectors/packet-erf.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/epan/dissectors/packet-erf.c b/epan/dissectors/packet-erf.c
index 1379cd0881..33807cbac1 100644
--- a/epan/dissectors/packet-erf.c
+++ b/epan/dissectors/packet-erf.c
@@ -229,9 +229,6 @@ static expert_field ei_erf_extension_headers_not_shown = EI_INIT;
static expert_field ei_erf_packet_loss = EI_INIT;
static expert_field ei_erf_checksum_error = EI_INIT;
-/* Default subdissector, display raw hex data */
-static dissector_handle_t data_handle;
-
typedef enum {
ERF_HDLC_CHDLC = 0,
ERF_HDLC_PPP = 1,
@@ -1183,7 +1180,7 @@ dissect_erf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
call_dissector(sdh_handle, tvb, pinfo, tree);
}
else{
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
break;
@@ -1197,7 +1194,7 @@ dissect_erf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
case ERF_TYPE_INFINIBAND:
case ERF_TYPE_INFINIBAND_LINK:
if (!dissector_try_uint(erf_dissector_table, erf_type, tvb, pinfo, tree)) {
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
break;
@@ -1213,14 +1210,12 @@ dissect_erf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
case ERF_TYPE_MC_RAW:
dissect_mc_raw_header(tvb, pinfo, erf_tree);
- if (data_handle)
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
case ERF_TYPE_MC_RAW_CHANNEL:
dissect_mc_rawlink_header(tvb, pinfo, erf_tree);
- if (data_handle)
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
case ERF_TYPE_MC_ATM:
@@ -1420,7 +1415,7 @@ dissect_erf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
case ERF_TYPE_META:
/* use data dissector for now */
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
default:
@@ -1890,9 +1885,6 @@ proto_reg_handoff_erf(void)
{
dissector_add_uint("wtap_encap", WTAP_ENCAP_ERF, erf_handle);
- /* Dissector called to dump raw data, or unknown protocol */
- data_handle = find_dissector("data");
-
/* Get handles for serial line protocols */
chdlc_handle = find_dissector_add_dependency("chdlc", proto_erf);
ppp_handle = find_dissector_add_dependency("ppp_hdlc", proto_erf);