aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-aps.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-zbee-aps.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-zbee-aps.c')
-rw-r--r--epan/dissectors/packet-zbee-aps.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/epan/dissectors/packet-zbee-aps.c b/epan/dissectors/packet-zbee-aps.c
index 12365b5200..53f3fe8429 100644
--- a/epan/dissectors/packet-zbee-aps.c
+++ b/epan/dissectors/packet-zbee-aps.c
@@ -65,7 +65,6 @@ static guint zbee_apf_transaction_len (tvbuff_t *tvb, guint offset, guint8
static void proto_init_zbee_aps(void);
static void proto_cleanup_zbee_aps(void);
-void proto_reg_handoff_zbee_aps(void);
void proto_register_zbee_aps(void);
/********************
@@ -169,9 +168,6 @@ static expert_field ei_zbee_aps_missing_payload = EI_INIT;
static dissector_handle_t zbee_aps_handle;
static dissector_handle_t zbee_apf_handle;
-/* Subdissector Handles. */
-static dissector_handle_t data_handle;
-
/* Dissector List. */
static dissector_table_t zbee_aps_dissector_table;
@@ -1028,7 +1024,7 @@ dissect_zbee_aps_no_endpt:
else {
/* The reassembly handler could not defragment the message. */
col_append_fstr(pinfo->cinfo, COL_INFO, " (fragment %d)", block_num);
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
}
@@ -1087,7 +1083,7 @@ dissect_zbee_aps_no_endpt:
}
if (payload_tvb) {
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -1202,7 +1198,7 @@ static void dissect_zbee_aps_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
proto_item_set_len(cmd_root, offset);
/* Dump the leftover to the data dissector. */
- call_dissector(data_handle, leftover_tvb, pinfo, root);
+ call_data_dissector(leftover_tvb, pinfo, root);
}
} /* dissect_zbee_aps_cmd */
@@ -1716,7 +1712,7 @@ dissect_app_end:
if (offset < tvb_captured_length(tvb)) {
/* There are bytes remaining! */
app_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, app_tvb, pinfo, tree);
+ call_data_dissector(app_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -2148,16 +2144,6 @@ void proto_register_zbee_aps(void)
} /* proto_register_zbee_aps */
/**
- *Registers the zigbee APS dissector with Wireshark.
- *
-*/
-void proto_reg_handoff_zbee_aps(void)
-{
- /* Find the other dissectors we need. */
- data_handle = find_dissector("data");
-} /* proto_reg_handoff_zbee_aps */
-
-/**
*Initializes the APS dissectors prior to beginning protocol
*
*/