summaryrefslogtreecommitdiff
path: root/epan/dissectors/asn1
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/asn1
parent2b2fc64447e5f778d969e6c850e9196d248cbbe1 (diff)
downloadwireshark-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/asn1')
-rw-r--r--epan/dissectors/asn1/cdt/cdt.cnf4
-rw-r--r--epan/dissectors/asn1/cdt/packet-cdt-template.c4
-rw-r--r--epan/dissectors/asn1/gsm_map/gsm_map.cnf2
-rw-r--r--epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c2
-rw-r--r--epan/dissectors/asn1/inap/inap.cnf2
-rw-r--r--epan/dissectors/asn1/inap/packet-inap-template.c2
-rw-r--r--epan/dissectors/asn1/tetra/packet-tetra-template.c4
7 files changed, 4 insertions, 16 deletions
diff --git a/epan/dissectors/asn1/cdt/cdt.cnf b/epan/dissectors/asn1/cdt/cdt.cnf
index a3b8e0a7e2..299ee1e7b2 100644
--- a/epan/dissectors/asn1/cdt/cdt.cnf
+++ b/epan/dissectors/asn1/cdt/cdt.cnf
@@ -90,7 +90,7 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
switch (content_type) {
case CDT_UNDEFINED:
- call_dissector (data_handle, next_tvb, actx->pinfo, top_tree);
+ call_data_dissector(next_tvb, actx->pinfo, top_tree);
break;
case CDT_EXTERNAL:
dissect_unknown_ber (actx->pinfo, next_tvb, 0, top_tree);
@@ -99,7 +99,7 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
dissect_p1_mts_apdu (next_tvb, actx->pinfo, top_tree, NULL);
break;
default:
- call_dissector (data_handle, next_tvb, actx->pinfo, top_tree);
+ call_data_dissector(next_tvb, actx->pinfo, top_tree);
break;
}
diff --git a/epan/dissectors/asn1/cdt/packet-cdt-template.c b/epan/dissectors/asn1/cdt/packet-cdt-template.c
index 355737d926..ef2857ddcd 100644
--- a/epan/dissectors/asn1/cdt/packet-cdt-template.c
+++ b/epan/dissectors/asn1/cdt/packet-cdt-template.c
@@ -59,8 +59,6 @@ static guint32 content_type = 0;
static int proto_cdt = -1;
#include "packet-cdt-hf.c"
-static dissector_handle_t data_handle = NULL;
-
/* Initialize the subtree pointers */
#include "packet-cdt-ett.c"
@@ -128,6 +126,4 @@ void proto_register_cdt (void) {
/*--- proto_reg_handoff_cdt ---------------------------------------*/
void proto_reg_handoff_cdt (void) {
#include "packet-cdt-dis-tab.c"
-
- data_handle = find_dissector ("data");
}
diff --git a/epan/dissectors/asn1/gsm_map/gsm_map.cnf b/epan/dissectors/asn1/gsm_map/gsm_map.cnf
index e8b1cbb1bb..5429d72903 100644
--- a/epan/dissectors/asn1/gsm_map/gsm_map.cnf
+++ b/epan/dissectors/asn1/gsm_map/gsm_map.cnf
@@ -233,7 +233,7 @@ MAP-DialoguePDU B "0.4.0.0.1.1.1.1" "map-DialogueAS"
if (actx->external.direct_ref_present){
offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, ext_tree, NULL);
}else{
- call_dissector(data_handle, tvb, actx->pinfo, ext_tree);
+ call_data_dissector(tvb, actx->pinfo, ext_tree);
offset = tvb_reported_length_remaining(tvb,offset);
}
diff --git a/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c b/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c
index 01dc00b359..1151f9876f 100644
--- a/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c
+++ b/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c
@@ -189,7 +189,6 @@ static expert_field ei_gsm_map_unknown_invokeData = EI_INIT;
static expert_field ei_gsm_map_undecoded = EI_INIT;
static dissector_handle_t gsm_sms_handle; /* SMS TPDU */
-static dissector_handle_t data_handle;
static dissector_handle_t ranap_handle;
static dissector_handle_t dtap_handle;
static dissector_handle_t map_handle;
@@ -2631,7 +2630,6 @@ void proto_reg_handoff_gsm_map(void) {
if (!map_prefs_initialized) {
map_prefs_initialized = TRUE;
- data_handle = find_dissector("data");
ranap_handle = find_dissector_add_dependency("ranap", proto_gsm_map);
dtap_handle = find_dissector_add_dependency("gsm_a_dtap", proto_gsm_map);
gsm_sms_handle = find_dissector_add_dependency("gsm_sms", proto_gsm_map);
diff --git a/epan/dissectors/asn1/inap/inap.cnf b/epan/dissectors/asn1/inap/inap.cnf
index 589796c152..60ea294711 100644
--- a/epan/dissectors/asn1/inap/inap.cnf
+++ b/epan/dissectors/asn1/inap/inap.cnf
@@ -220,7 +220,7 @@ static const inap_err_t inap_err_tab[] = {
if (obj_id){
offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, ext_tree, NULL);
}else{
- call_dissector(data_handle, tvb, actx->pinfo, ext_tree);
+ call_data_dissector(tvb, actx->pinfo, ext_tree);
offset = tvb_reported_length_remaining(tvb,offset);
}
diff --git a/epan/dissectors/asn1/inap/packet-inap-template.c b/epan/dissectors/asn1/inap/packet-inap-template.c
index d1fc40d8c3..e0c8bf3cf5 100644
--- a/epan/dissectors/asn1/inap/packet-inap-template.c
+++ b/epan/dissectors/asn1/inap/packet-inap-template.c
@@ -61,7 +61,6 @@ static int proto_inap = -1;
static range_t *global_ssn_range;
static dissector_handle_t inap_handle;
-static dissector_handle_t data_handle;
/* Global variables */
static guint32 opcode=0;
@@ -179,7 +178,6 @@ void proto_reg_handoff_inap(void) {
if (!inap_prefs_initialized) {
inap_prefs_initialized = TRUE;
inap_handle = find_dissector("inap");
- data_handle = find_dissector("data");
oid_add_from_string("Core-INAP-CS1-Codes","0.4.0.1.1.0.3.0");
oid_add_from_string("iso(1) identified-organization(3) icd-ecma(12) member-company(2) 1107 oen(3) inap(3) extensions(2)","1.3.12.2.1107.3.3.2");
oid_add_from_string("alcatel(1006)","1.3.12.2.1006.64");
diff --git a/epan/dissectors/asn1/tetra/packet-tetra-template.c b/epan/dissectors/asn1/tetra/packet-tetra-template.c
index 2b8dea2183..fbff495526 100644
--- a/epan/dissectors/asn1/tetra/packet-tetra-template.c
+++ b/epan/dissectors/asn1/tetra/packet-tetra-template.c
@@ -46,9 +46,6 @@ void proto_reg_handoff_tetra(void);
/* Wireshark ID of the tetra protocol */
static int proto_tetra = -1;
-/* These are the handles of our subdissectors */
-static dissector_handle_t data_handle = NULL;
-
static dissector_handle_t tetra_handle;
static int global_tetra_port = 7074;
@@ -552,7 +549,6 @@ void proto_reg_handoff_tetra(void)
static gboolean initialized=FALSE;
if (!initialized) {
- data_handle = find_dissector("data");
tetra_handle = create_dissector_handle(dissect_tetra, proto_tetra);
dissector_add_uint("udp.port", global_tetra_port, tetra_handle);
}