aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/asn1/dop/packet-dop-template.c6
-rw-r--r--epan/dissectors/asn1/h225/packet-h225-template.c2
-rw-r--r--epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c6
-rw-r--r--epan/dissectors/asn1/rtse/packet-rtse-template.c6
-rw-r--r--epan/dissectors/packet-3g-a11.c7
-rw-r--r--epan/dissectors/packet-alcap.c6
-rw-r--r--epan/dissectors/packet-amqp.c7
-rw-r--r--epan/dissectors/packet-armagetronad.c13
-rw-r--r--epan/dissectors/packet-assa_r3.c6
-rw-r--r--epan/dissectors/packet-ayiya.c7
-rw-r--r--epan/dissectors/packet-bacnet.c7
-rw-r--r--epan/dissectors/packet-bfd.c7
-rw-r--r--epan/dissectors/packet-bittorrent.c3
-rw-r--r--epan/dissectors/packet-bpdu.c14
-rw-r--r--epan/dissectors/packet-bvlc.c6
-rw-r--r--epan/dissectors/packet-bzr.c6
-rw-r--r--epan/dissectors/packet-catapult-dct2000.c5
-rw-r--r--epan/dissectors/packet-ccsds.c7
-rw-r--r--epan/dissectors/packet-chdlc.c6
-rw-r--r--epan/dissectors/packet-cimetrics.c9
-rw-r--r--epan/dissectors/packet-coap.c7
-rw-r--r--epan/dissectors/packet-cops.c7
-rw-r--r--epan/dissectors/packet-db-lsp.c13
-rw-r--r--epan/dissectors/packet-diameter.c3
-rw-r--r--epan/dissectors/packet-dof.c9
-rw-r--r--epan/dissectors/packet-dop.c14
-rw-r--r--epan/dissectors/packet-dpnss-link.c7
-rw-r--r--epan/dissectors/packet-dtls.c5
-rw-r--r--epan/dissectors/packet-dua.c6
-rw-r--r--epan/dissectors/packet-dvb-nit.c7
-rw-r--r--epan/dissectors/packet-ecp-oui.c7
-rw-r--r--epan/dissectors/packet-ehs.c7
-rw-r--r--epan/dissectors/packet-enip.c11
-rw-r--r--epan/dissectors/packet-epmd.c7
-rw-r--r--epan/dissectors/packet-esis.c7
-rw-r--r--epan/dissectors/packet-eth.c11
-rw-r--r--epan/dissectors/packet-etherip.c7
-rw-r--r--epan/dissectors/packet-exported_pdu.c6
-rw-r--r--epan/dissectors/packet-fr.c6
-rw-r--r--epan/dissectors/packet-ftp.c9
-rw-r--r--epan/dissectors/packet-gmr1_dtap.c6
-rw-r--r--epan/dissectors/packet-gprs-llc.c6
-rw-r--r--epan/dissectors/packet-gsm_a_bssmap.c6
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c6
-rw-r--r--epan/dissectors/packet-gsm_bssmap_le.c7
-rw-r--r--epan/dissectors/packet-gsm_sim.c5
-rw-r--r--epan/dissectors/packet-gssapi.c7
-rw-r--r--epan/dissectors/packet-gtp.c8
-rw-r--r--epan/dissectors/packet-gvcp.c12
-rw-r--r--epan/dissectors/packet-h223.c4
-rw-r--r--epan/dissectors/packet-h225.c2
-rw-r--r--epan/dissectors/packet-h263p.c7
-rw-r--r--epan/dissectors/packet-h264.c6
-rw-r--r--epan/dissectors/packet-hpsw.c8
-rw-r--r--epan/dissectors/packet-hpteam.c7
-rw-r--r--epan/dissectors/packet-hyperscsi.c7
-rw-r--r--epan/dissectors/packet-iax2.c6
-rw-r--r--epan/dissectors/packet-icmp.c6
-rw-r--r--epan/dissectors/packet-ieee80211.c9
-rw-r--r--epan/dissectors/packet-ieee802154.c15
-rw-r--r--epan/dissectors/packet-interlink.c6
-rw-r--r--epan/dissectors/packet-ip.c5
-rw-r--r--epan/dissectors/packet-ipos.c3
-rw-r--r--epan/dissectors/packet-ipv6.c5
-rw-r--r--epan/dissectors/packet-ipx.c12
-rw-r--r--epan/dissectors/packet-isakmp.c7
-rw-r--r--epan/dissectors/packet-iso7816.c8
-rw-r--r--epan/dissectors/packet-iua.c6
-rw-r--r--epan/dissectors/packet-iuup.c6
-rw-r--r--epan/dissectors/packet-jmirror.c6
-rw-r--r--epan/dissectors/packet-jxta.c11
-rw-r--r--epan/dissectors/packet-k12.c3
-rw-r--r--epan/dissectors/packet-kerberos4.c7
-rw-r--r--epan/dissectors/packet-lapb.c6
-rw-r--r--epan/dissectors/packet-llc.c6
-rw-r--r--epan/dissectors/packet-lte-rrc.c20
-rw-r--r--epan/dissectors/packet-lwm.c6
-rw-r--r--epan/dissectors/packet-m2pa.c5
-rw-r--r--epan/dissectors/packet-m3ua.c5
-rw-r--r--epan/dissectors/packet-mbim.c4
-rw-r--r--epan/dissectors/packet-megaco.c3
-rw-r--r--epan/dissectors/packet-mime-encap.c7
-rw-r--r--epan/dissectors/packet-miop.c7
-rw-r--r--epan/dissectors/packet-mip.c7
-rw-r--r--epan/dissectors/packet-mp4ves.c8
-rw-r--r--epan/dissectors/packet-mpeg-pmt.c8
-rw-r--r--epan/dissectors/packet-mpls-y1711.c3
-rw-r--r--epan/dissectors/packet-mpls.c7
-rw-r--r--epan/dissectors/packet-ms-mms.c3
-rw-r--r--epan/dissectors/packet-msrp.c3
-rw-r--r--epan/dissectors/packet-mstp.c6
-rw-r--r--epan/dissectors/packet-mtp3mg.c8
-rw-r--r--epan/dissectors/packet-ndp.c7
-rw-r--r--epan/dissectors/packet-negoex.c7
-rw-r--r--epan/dissectors/packet-newmail.c7
-rw-r--r--epan/dissectors/packet-nflog.c6
-rw-r--r--epan/dissectors/packet-ntlmssp.c10
-rw-r--r--epan/dissectors/packet-opensafety.c22
-rw-r--r--epan/dissectors/packet-ositp.c7
-rw-r--r--epan/dissectors/packet-pflog.c3
-rw-r--r--epan/dissectors/packet-pop.c3
-rw-r--r--epan/dissectors/packet-ppp.c10
-rw-r--r--epan/dissectors/packet-pw-atm.c9
-rw-r--r--epan/dissectors/packet-pw-cesopsn.c7
-rw-r--r--epan/dissectors/packet-pw-eth.c6
-rw-r--r--epan/dissectors/packet-pw-satop.c7
-rw-r--r--epan/dissectors/packet-q933.c7
-rw-r--r--epan/dissectors/packet-radius.c7
-rw-r--r--epan/dissectors/packet-rdt.c3
-rw-r--r--epan/dissectors/packet-redbackli.c7
-rw-r--r--epan/dissectors/packet-rfc2190.c6
-rw-r--r--epan/dissectors/packet-rmp.c7
-rw-r--r--epan/dissectors/packet-rpc.c6
-rw-r--r--epan/dissectors/packet-rpki-rtr.c6
-rw-r--r--epan/dissectors/packet-rpl.c7
-rw-r--r--epan/dissectors/packet-rtcp.c3
-rw-r--r--epan/dissectors/packet-rtp-events.c6
-rw-r--r--epan/dissectors/packet-rtp-midi.c5
-rw-r--r--epan/dissectors/packet-rtp.c22
-rw-r--r--epan/dissectors/packet-rtse.c12
-rw-r--r--epan/dissectors/packet-rtsp.c6
-rw-r--r--epan/dissectors/packet-s1ap.c192
-rw-r--r--epan/dissectors/packet-sccp.c7
-rw-r--r--epan/dissectors/packet-scop.c12
-rw-r--r--epan/dissectors/packet-sctp.c6
-rw-r--r--epan/dissectors/packet-sdh.c7
-rw-r--r--epan/dissectors/packet-sdp.c6
-rw-r--r--epan/dissectors/packet-sgsap.c6
-rw-r--r--epan/dissectors/packet-sigcomp.c5
-rw-r--r--epan/dissectors/packet-sip.c11
-rw-r--r--epan/dissectors/packet-sipfrag.c4
-rw-r--r--epan/dissectors/packet-sita.c6
-rw-r--r--epan/dissectors/packet-smb.c6
-rw-r--r--epan/dissectors/packet-smpp.c7
-rw-r--r--epan/dissectors/packet-smtp.c3
-rw-r--r--epan/dissectors/packet-sna.c12
-rw-r--r--epan/dissectors/packet-sndcp.c8
-rw-r--r--epan/dissectors/packet-sprt.c3
-rw-r--r--epan/dissectors/packet-ssl.c3
-rw-r--r--epan/dissectors/packet-sua.c6
-rw-r--r--epan/dissectors/packet-synergy.c7
-rw-r--r--epan/dissectors/packet-tapa.c7
-rw-r--r--epan/dissectors/packet-tcp.c5
-rw-r--r--epan/dissectors/packet-tpkt.c5
-rw-r--r--epan/dissectors/packet-tr.c5
-rw-r--r--epan/dissectors/packet-tte-pcf.c10
-rw-r--r--epan/dissectors/packet-turnchannel.c7
-rw-r--r--epan/dissectors/packet-u3v.c6
-rw-r--r--epan/dissectors/packet-uma.c7
-rw-r--r--epan/dissectors/packet-usb-audio.c6
-rw-r--r--epan/dissectors/packet-usb-masstorage.c5
-rw-r--r--epan/dissectors/packet-user_encap.c7
-rw-r--r--epan/dissectors/packet-v5ef.c9
-rw-r--r--epan/dissectors/packet-vp8.c3
-rw-r--r--epan/dissectors/packet-wbxml.c4
-rw-r--r--epan/dissectors/packet-wfleet-hdlc.c6
-rw-r--r--epan/dissectors/packet-wtp.c6
-rw-r--r--epan/dissectors/packet-x25.c7
-rw-r--r--epan/dissectors/packet-xml.c4
-rw-r--r--epan/dissectors/packet-zrtp.c7
160 files changed, 548 insertions, 745 deletions
diff --git a/epan/dissectors/asn1/dop/packet-dop-template.c b/epan/dissectors/asn1/dop/packet-dop-template.c
index f642a2e935..c8548fae16 100644
--- a/epan/dissectors/asn1/dop/packet-dop-template.c
+++ b/epan/dissectors/asn1/dop/packet-dop-template.c
@@ -70,6 +70,8 @@ static expert_field ei_dop_unsupported_errcode = EI_INIT;
static expert_field ei_dop_unsupported_pdu = EI_INIT;
static expert_field ei_dop_zero_pdu = EI_INIT;
+static dissector_handle_t dop_handle = NULL;
+
/* Dissector table */
static dissector_table_t dop_dissector_table;
@@ -257,7 +259,7 @@ void proto_register_dop(void) {
/* Register protocol */
proto_dop = proto_register_protocol(PNAME, PSNAME, PFNAME);
- register_dissector("dop", dissect_dop, proto_dop);
+ dop_handle = register_dissector("dop", dissect_dop, proto_dop);
dop_dissector_table = register_dissector_table("dop.oid", "DOP OID Dissectors", proto_dop, FT_STRING, BASE_NONE);
@@ -282,7 +284,6 @@ void proto_register_dop(void) {
/*--- proto_reg_handoff_dop --- */
void proto_reg_handoff_dop(void) {
- dissector_handle_t dop_handle;
#include "packet-dop-dis-tab.c"
/* APPLICATION CONTEXT */
@@ -292,7 +293,6 @@ void proto_reg_handoff_dop(void) {
/* ABSTRACT SYNTAXES */
/* Register DOP with ROS (with no use of RTSE) */
- dop_handle = find_dissector("dop");
register_ros_oid_dissector_handle("2.5.9.4", dop_handle, 0, "id-as-directory-operational-binding-management", FALSE);
/* BINDING TYPES */
diff --git a/epan/dissectors/asn1/h225/packet-h225-template.c b/epan/dissectors/asn1/h225/packet-h225-template.c
index 6ff87cfb41..c037ed3d5c 100644
--- a/epan/dissectors/asn1/h225/packet-h225-template.c
+++ b/epan/dissectors/asn1/h225/packet-h225-template.c
@@ -939,7 +939,7 @@ proto_reg_handoff_h225(void)
h245_handle = find_dissector("h245");
h245dg_handle = find_dissector("h245dg");
- h4501_handle = find_dissector("h4501");
+ h4501_handle = find_dissector_add_dependency("h4501", proto_h225);
data_handle = find_dissector("data");
h225_prefs_initialized = TRUE;
q931_tpkt_handle = find_dissector("q931.tpkt");
diff --git a/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c b/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c
index f6de779348..1667df7659 100644
--- a/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c
+++ b/epan/dissectors/asn1/lte-rrc/packet-lte-rrc-template.c
@@ -63,6 +63,7 @@ static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle = NULL;
static dissector_handle_t rrc_sys_info_cont_handle = NULL;
static dissector_handle_t gsm_a_dtap_handle = NULL;
static dissector_handle_t gsm_rlcmac_dl_handle = NULL;
+static dissector_handle_t lte_rrc_dl_ccch_handle;
static GHashTable *lte_rrc_etws_cmas_dcs_hash = NULL;
@@ -3985,7 +3986,7 @@ void proto_register_lte_rrc(void) {
proto_lte_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME);
/* These entry points will first create an lte_rrc root node */
- register_dissector("lte_rrc.dl_ccch", dissect_lte_rrc_DL_CCCH, proto_lte_rrc);
+ lte_rrc_dl_ccch_handle = register_dissector("lte_rrc.dl_ccch", dissect_lte_rrc_DL_CCCH, proto_lte_rrc);
register_dissector("lte_rrc.dl_dcch", dissect_lte_rrc_DL_DCCH, proto_lte_rrc);
register_dissector("lte_rrc.ul_ccch", dissect_lte_rrc_UL_CCCH, proto_lte_rrc);
register_dissector("lte_rrc.ul_dcch", dissect_lte_rrc_UL_DCCH, proto_lte_rrc);
@@ -4023,9 +4024,6 @@ void proto_register_lte_rrc(void) {
void
proto_reg_handoff_lte_rrc(void)
{
- static dissector_handle_t lte_rrc_dl_ccch_handle;
-
- lte_rrc_dl_ccch_handle = find_dissector("lte_rrc.dl_ccch");
dissector_add_for_decode_as_with_preference("udp.port", lte_rrc_dl_ccch_handle);
nas_eps_handle = find_dissector("nas-eps");
rrc_irat_ho_to_utran_cmd_handle = find_dissector("rrc.irat.ho_to_utran_cmd");
diff --git a/epan/dissectors/asn1/rtse/packet-rtse-template.c b/epan/dissectors/asn1/rtse/packet-rtse-template.c
index b929c9b5fa..c792fad377 100644
--- a/epan/dissectors/asn1/rtse/packet-rtse-template.c
+++ b/epan/dissectors/asn1/rtse/packet-rtse-template.c
@@ -67,6 +67,7 @@ static expert_field ei_rtse_unknown_rtse_pdu = EI_INIT;
static expert_field ei_rtse_abstract_syntax = EI_INIT;
static dissector_table_t rtse_oid_dissector_table=NULL;
+static dissector_handle_t rtse_handle = NULL;
static GHashTable *oid_table=NULL;
static gint ett_rtse_unknown = -1;
@@ -115,11 +116,8 @@ register_rtse_oid_dissector_handle(const char *oid, dissector_handle_t dissector
{
/* XXX: Note that this fcn is called from proto_reg_handoff in *other* dissectors ... */
- static dissector_handle_t rtse_handle = NULL;
static dissector_handle_t ros_handle = NULL;
- if (rtse_handle == NULL)
- rtse_handle = find_dissector("rtse");
if (ros_handle == NULL)
ros_handle = find_dissector("ros");
@@ -385,7 +383,7 @@ void proto_register_rtse(void) {
/* Register protocol */
proto_rtse = proto_register_protocol(PNAME, PSNAME, PFNAME);
- register_dissector("rtse", dissect_rtse, proto_rtse);
+ rtse_handle = register_dissector("rtse", dissect_rtse, proto_rtse);
/* Register fields and subtrees */
proto_register_field_array(proto_rtse, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
diff --git a/epan/dissectors/packet-3g-a11.c b/epan/dissectors/packet-3g-a11.c
index a1e9205890..25460e0eb3 100644
--- a/epan/dissectors/packet-3g-a11.c
+++ b/epan/dissectors/packet-3g-a11.c
@@ -223,6 +223,8 @@ static expert_field ei_a11_bcmcs_too_short = EI_INIT;
static expert_field ei_a11_entry_data_not_dissected = EI_INIT;
static expert_field ei_a11_session_data_not_dissected = EI_INIT;
+static dissector_handle_t a11_handle = NULL;
+
/* Port used for Mobile IP based Tunneling Protocol (A11) */
#define UDP_PORT_3GA11 699 /* Not IANA registered */
@@ -2723,7 +2725,7 @@ proto_register_a11(void)
proto_a11 = proto_register_protocol("3GPP2 A11", "3GPP2 A11", "a11");
/* Register the dissector by name */
- register_dissector("a11", dissect_a11, proto_a11);
+ a11_handle = register_dissector("a11", dissect_a11, proto_a11);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_a11, hf, array_length(hf));
@@ -2736,9 +2738,6 @@ proto_register_a11(void)
void
proto_reg_handoff_a11(void)
{
- dissector_handle_t a11_handle;
-
- a11_handle = find_dissector("a11");
dissector_add_uint_with_preference("udp.port", UDP_PORT_3GA11, a11_handle);
/* 3GPP2-Service-Option-Profile(74) */
diff --git a/epan/dissectors/packet-alcap.c b/epan/dissectors/packet-alcap.c
index f549f49b86..a0661f25a3 100644
--- a/epan/dissectors/packet-alcap.c
+++ b/epan/dissectors/packet-alcap.c
@@ -405,6 +405,8 @@ static expert_field ei_alcap_release_cause_not31 = EI_INIT;
static expert_field ei_alcap_abnormal_release = EI_INIT;
static expert_field ei_alcap_response = EI_INIT;
+static dissector_handle_t alcap_handle = NULL;
+
static gboolean keep_persistent_info = TRUE;
static wmem_tree_t* legs_by_dsaid = NULL;
@@ -2392,7 +2394,7 @@ proto_register_alcap(void)
proto_alcap = proto_register_protocol(alcap_proto_name, alcap_proto_name_short, "alcap");
- register_dissector("alcap", dissect_alcap, proto_alcap);
+ alcap_handle = register_dissector("alcap", dissect_alcap, proto_alcap);
proto_register_field_array(proto_alcap, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -2415,8 +2417,6 @@ proto_register_alcap(void)
void
proto_reg_handoff_alcap(void)
{
- dissector_handle_t alcap_handle = find_dissector("alcap");
-
dissector_add_uint("mtp3.service_indicator", MTP_SI_AAL2, alcap_handle);
}
diff --git a/epan/dissectors/packet-amqp.c b/epan/dissectors/packet-amqp.c
index 016a1cd124..cf53454e79 100644
--- a/epan/dissectors/packet-amqp.c
+++ b/epan/dissectors/packet-amqp.c
@@ -1535,6 +1535,8 @@ static expert_field ei_amqp_invalid_number_of_params = EI_INIT;
static expert_field ei_amqp_size_exceeds_65K = EI_INIT;
static expert_field ei_amqp_array_type_unknown = EI_INIT;
+static dissector_handle_t amqp_tcp_handle = NULL;
+
/* Various enumerations */
static const value_string amqp_1_0_SASL_code_value [] = {
@@ -13336,7 +13338,7 @@ proto_register_amqp(void)
proto_amqp = proto_register_protocol(
"Advanced Message Queueing Protocol", "AMQP", "amqp");
- register_dissector("amqp", dissect_amqp, proto_amqp);
+ amqp_tcp_handle = register_dissector("amqp", dissect_amqp, proto_amqp);
proto_register_field_array(proto_amqp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -13355,12 +13357,9 @@ proto_register_amqp(void)
void
proto_reg_handoff_amqp(void)
{
- static dissector_handle_t amqp_tcp_handle;
static guint old_amqps_port = 0;
static gboolean initialize = FALSE;
- amqp_tcp_handle = find_dissector("amqp");
-
if (!initialize) {
/* Register TCP port for dissection */
dissector_add_uint_with_preference("tcp.port", AMQP_PORT, amqp_tcp_handle);
diff --git a/epan/dissectors/packet-armagetronad.c b/epan/dissectors/packet-armagetronad.c
index 733152e1c1..6f88faa656 100644
--- a/epan/dissectors/packet-armagetronad.c
+++ b/epan/dissectors/packet-armagetronad.c
@@ -40,6 +40,8 @@ static int hf_armagetronad_msg_subtree = -1;
static gint ett_armagetronad = -1;
static gint ett_message = -1;
+static dissector_handle_t armagetronad_handle = NULL;
+
#define ARMAGETRONAD_UDP_PORT_RANGE "4533-4534" /* 4533 is not IANA registered, 4534 is */
/*
@@ -305,22 +307,15 @@ void proto_register_armagetronad(void)
&ett_message
};
- proto_armagetronad =
- proto_register_protocol("The Armagetron Advanced OpenGL Tron clone",
- "Armagetronad", "armagetronad");
+ proto_armagetronad = proto_register_protocol("The Armagetron Advanced OpenGL Tron clone", "Armagetronad", "armagetronad");
proto_register_field_array(proto_armagetronad, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("armagetronad", dissect_armagetronad,
- proto_armagetronad);
+ armagetronad_handle = register_dissector("armagetronad", dissect_armagetronad, proto_armagetronad);
}
void proto_reg_handoff_armagetronad(void)
{
- dissector_handle_t armagetronad_handle;
-
- armagetronad_handle = find_dissector("armagetronad");
-
dissector_add_uint_range_with_preference("udp.port", ARMAGETRONAD_UDP_PORT_RANGE, armagetronad_handle);
}
diff --git a/epan/dissectors/packet-assa_r3.c b/epan/dissectors/packet-assa_r3.c
index 70bcdb73a0..66272c2d9e 100644
--- a/epan/dissectors/packet-assa_r3.c
+++ b/epan/dissectors/packet-assa_r3.c
@@ -1757,6 +1757,8 @@ static expert_field ei_r3_unknown_command_value = EI_INIT;
static expert_field ei_r3_response_hasdata_octet_3 = EI_INIT;
static expert_field ei_r3_cmd_downloadfirmwaretimeout = EI_INIT;
+static dissector_handle_t r3_handle = NULL;
+
/*
* Indicates next command to be processed as a manufacturing command
*/
@@ -10096,7 +10098,7 @@ void proto_register_r3 (void)
expert_module_t* expert_r3;
proto_r3 = proto_register_protocol ("Assa Abloy R3", "R3", "r3");
- register_dissector ("r3", dissect_r3, proto_r3);
+ r3_handle = register_dissector ("r3", dissect_r3, proto_r3);
proto_register_field_array (proto_r3, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
expert_r3 = expert_register_protocol(proto_r3);
@@ -10105,8 +10107,6 @@ void proto_register_r3 (void)
void proto_reg_handoff_r3 (void)
{
- dissector_handle_t r3_handle = find_dissector ("r3");
-
dissector_add_uint_range_with_preference("tcp.port", ASSA_R3_PORT_RANGE, r3_handle);
}
diff --git a/epan/dissectors/packet-ayiya.c b/epan/dissectors/packet-ayiya.c
index 6f237e2752..0e3c8dc0f4 100644
--- a/epan/dissectors/packet-ayiya.c
+++ b/epan/dissectors/packet-ayiya.c
@@ -47,6 +47,8 @@ static int hf_signature = -1;
static gint ett_ayiya = -1;
+static dissector_handle_t ayiya_handle = NULL;
+
static const value_string identity_types[] = {
{ 0x0, "None" },
{ 0x1, "Integer" },
@@ -197,7 +199,7 @@ proto_register_ayiya(void)
proto_ayiya = proto_register_protocol("Anything in Anything Protocol",
"AYIYA", "ayiya");
- register_dissector("ayiya", dissect_ayiya, proto_ayiya);
+ ayiya_handle = register_dissector("ayiya", dissect_ayiya, proto_ayiya);
proto_register_field_array(proto_ayiya, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
@@ -205,9 +207,6 @@ proto_register_ayiya(void)
void
proto_reg_handoff_ayiya(void)
{
- dissector_handle_t ayiya_handle;
-
- ayiya_handle = find_dissector("ayiya");
dissector_add_uint_with_preference("udp.port", UDP_PORT_AYIYA, ayiya_handle);
ip_dissector_table = find_dissector_table("ip.proto");
diff --git a/epan/dissectors/packet-bacnet.c b/epan/dissectors/packet-bacnet.c
index d496d15bb7..869cef0288 100644
--- a/epan/dissectors/packet-bacnet.c
+++ b/epan/dissectors/packet-bacnet.c
@@ -164,6 +164,8 @@ static int hf_bacnet_term_time_value = -1;
static gint ett_bacnet = -1;
static gint ett_bacnet_control = -1;
+static dissector_handle_t bacnet_handle = NULL;
+
static int
dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
@@ -617,7 +619,7 @@ proto_register_bacnet(void)
proto_register_field_array(proto_bacnet, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("bacnet", dissect_bacnet, proto_bacnet);
+ bacnet_handle = register_dissector("bacnet", dissect_bacnet, proto_bacnet);
bacnet_dissector_table = register_dissector_table("bacnet.vendor",
"BACnet Vendor Identifier", proto_bacnet,
@@ -627,9 +629,6 @@ proto_register_bacnet(void)
void
proto_reg_handoff_bacnet(void)
{
- dissector_handle_t bacnet_handle;
-
- bacnet_handle = find_dissector("bacnet");
dissector_add_uint("bvlc.function", 0x04, bacnet_handle);
dissector_add_uint("bvlc.function", 0x09, bacnet_handle);
dissector_add_uint("bvlc.function", 0x0a, bacnet_handle);
diff --git a/epan/dissectors/packet-bfd.c b/epan/dissectors/packet-bfd.c
index 234d506f2b..4eacc3ef76 100644
--- a/epan/dissectors/packet-bfd.c
+++ b/epan/dissectors/packet-bfd.c
@@ -153,6 +153,8 @@ static gint ett_bfd_auth = -1;
static expert_field ei_bfd_auth_len_invalid = EI_INIT;
static expert_field ei_bfd_auth_no_data = EI_INIT;
+static dissector_handle_t bfd_control_handle = NULL;
+
static gint hf_mep_type = -1;
static gint hf_mep_len = -1;
static gint hf_mep_global_id = -1;
@@ -852,7 +854,7 @@ proto_register_bfd(void)
proto_bfd = proto_register_protocol("Bidirectional Forwarding Detection Control Message",
"BFD Control",
"bfd");
- register_dissector("bfd", dissect_bfd_control, proto_bfd);
+ bfd_control_handle = register_dissector("bfd", dissect_bfd_control, proto_bfd);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_bfd, hf, array_length(hf));
@@ -864,9 +866,6 @@ proto_register_bfd(void)
void
proto_reg_handoff_bfd(void)
{
- dissector_handle_t bfd_control_handle;
-
- bfd_control_handle = find_dissector("bfd");
dissector_add_uint_range_with_preference("udp.port", UDP_PORT_RANGE_BFD, bfd_control_handle);
dissector_add_uint("pwach.channel_type", PW_ACH_TYPE_BFD_CC, bfd_control_handle);
diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c
index 461067d3fa..b5a6fb4b08 100644
--- a/epan/dissectors/packet-bittorrent.c
+++ b/epan/dissectors/packet-bittorrent.c
@@ -678,7 +678,7 @@ proto_register_bittorrent(void)
proto_register_field_array(proto_bittorrent, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("bittorrent.tcp", dissect_bittorrent, proto_bittorrent);
+ dissector_handle = register_dissector("bittorrent.tcp", dissect_bittorrent, proto_bittorrent);
bittorrent_module = prefs_register_protocol(proto_bittorrent, NULL);
prefs_register_bool_preference(bittorrent_module, "desegment",
@@ -698,7 +698,6 @@ proto_reg_handoff_bittorrent(void)
{
bencode_handle = find_dissector_add_dependency("bencode", proto_bittorrent);
- dissector_handle = find_dissector("bittorrent.tcp");
dissector_add_uint_range_with_preference("tcp.port", DEFAULT_TCP_PORT_RANGE, dissector_handle);
heur_dissector_add("tcp", test_bittorrent_packet, "BitTorrent over TCP", "bittorrent_tcp", proto_bittorrent, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-bpdu.c b/epan/dissectors/packet-bpdu.c
index 613e92c4cc..b6df47650c 100644
--- a/epan/dissectors/packet-bpdu.c
+++ b/epan/dissectors/packet-bpdu.c
@@ -197,6 +197,9 @@ static gboolean bpdu_use_system_id_extensions = TRUE;
static dissector_handle_t gvrp_handle;
static dissector_handle_t gmrp_handle;
+static dissector_handle_t bpdu_handle = NULL;
+static dissector_handle_t bpdu_cisco_handle = NULL;
+
static const value_string protocol_id_vals[] = {
{ 0, "Spanning Tree Protocol" },
{ 0, NULL }
@@ -1343,8 +1346,8 @@ proto_register_bpdu(void)
proto_register_field_array(proto_bpdu, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("bpdu", dissect_bpdu_generic, proto_bpdu);
- register_dissector("bpdu_cisco", dissect_bpdu_cisco, proto_bpdu);
+ bpdu_handle = register_dissector("bpdu", dissect_bpdu_generic, proto_bpdu);
+ bpdu_cisco_handle = register_dissector("bpdu_cisco", dissect_bpdu_cisco, proto_bpdu);
expert_bpdu = expert_register_protocol(proto_bpdu);
expert_register_field_array(expert_bpdu, ei, array_length(ei));
@@ -1359,8 +1362,6 @@ proto_register_bpdu(void)
void
proto_reg_handoff_bpdu(void)
{
- dissector_handle_t bpdu_handle;
-
/*
* Get handle for the GVRP dissector.
*/
@@ -1371,7 +1372,6 @@ proto_reg_handoff_bpdu(void)
*/
gmrp_handle = find_dissector_add_dependency("gmrp", proto_bpdu);
- bpdu_handle = find_dissector_add_dependency("bpdu", proto_bpdu);
dissector_add_uint("llc.dsap", SAP_BPDU, bpdu_handle);
dissector_add_uint("chdlc.protocol", CHDLCTYPE_BPDU, bpdu_handle);
dissector_add_uint("ethertype", ETHERTYPE_STP, bpdu_handle);
@@ -1379,9 +1379,7 @@ proto_reg_handoff_bpdu(void)
dissector_add_uint("llc.cisco_pid", 0x0109, bpdu_handle); /* Cisco's RLQ is just plain STP */
dissector_add_uint("llc.cisco_pid", 0x010c, bpdu_handle); /* Cisco's VLAN-bridge STP is just plain STP */
-
- bpdu_handle = find_dissector("bpdu_cisco");
- dissector_add_uint("llc.cisco_pid", 0x010b, bpdu_handle); /* Handle Cisco's (R)PVST+ TLV extensions */
+ dissector_add_uint("llc.cisco_pid", 0x010b, bpdu_cisco_handle); /* Handle Cisco's (R)PVST+ TLV extensions */
}
/*
diff --git a/epan/dissectors/packet-bvlc.c b/epan/dissectors/packet-bvlc.c
index 68fe08248e..38dbe85c42 100644
--- a/epan/dissectors/packet-bvlc.c
+++ b/epan/dissectors/packet-bvlc.c
@@ -49,6 +49,7 @@ static int hf_bvlc_fwd_ip = -1;
static int hf_bvlc_fwd_port = -1;
static dissector_table_t bvlc_dissector_table;
+static dissector_handle_t bvlc_handle = NULL;
static const value_string bvlc_function_names[] = {
{ 0x00, "BVLC-Result", },
@@ -385,7 +386,7 @@ proto_register_bvlc(void)
proto_register_field_array(proto_bvlc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("bvlc", dissect_bvlc, proto_bvlc);
+ bvlc_handle = register_dissector("bvlc", dissect_bvlc, proto_bvlc);
bvlc_dissector_table = register_dissector_table("bvlc.function",
"BVLC Function", proto_bvlc, FT_UINT8, BASE_HEX);
@@ -394,9 +395,6 @@ proto_register_bvlc(void)
void
proto_reg_handoff_bvlc(void)
{
- dissector_handle_t bvlc_handle;
-
- bvlc_handle = find_dissector("bvlc");
dissector_add_uint_with_preference("udp.port", BVLC_UDP_PORT, bvlc_handle);
}
diff --git a/epan/dissectors/packet-bzr.c b/epan/dissectors/packet-bzr.c
index d426927351..b89d7d160b 100644
--- a/epan/dissectors/packet-bzr.c
+++ b/epan/dissectors/packet-bzr.c
@@ -49,6 +49,7 @@ static gint hf_bzr_packet_protocol_version = -1;
static gint hf_bzr_packet_kind = -1;
static dissector_handle_t bencode_handle;
+static dissector_handle_t bzr_handle = NULL;
#define REQUEST_VERSION_TWO "bzr request 2\n"
#define RESPONSE_VERSION_TWO "bzr response 2\n"
@@ -302,7 +303,7 @@ proto_register_bzr(void)
module_t *bzr_module;
proto_bzr = proto_register_protocol("Bazaar Smart Protocol", "Bazaar", "bzr");
- register_dissector("bzr", dissect_bzr, proto_bzr);
+ bzr_handle = register_dissector("bzr", dissect_bzr, proto_bzr);
proto_register_field_array(proto_bzr, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -319,11 +320,8 @@ proto_register_bzr(void)
void
proto_reg_handoff_bzr(void)
{
- dissector_handle_t bzr_handle;
-
bencode_handle = find_dissector_add_dependency("bencode", proto_bzr);
- bzr_handle = find_dissector("bzr");
dissector_add_uint_with_preference("tcp.port", TCP_PORT_BZR, bzr_handle);
}
diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c
index 13605f8900..e3c47895ed 100644
--- a/epan/dissectors/packet-catapult-dct2000.c
+++ b/epan/dissectors/packet-catapult-dct2000.c
@@ -294,6 +294,7 @@ extern int proto_pdcp_lte;
static dissector_handle_t mac_lte_handle;
static dissector_handle_t rlc_lte_handle;
static dissector_handle_t pdcp_lte_handle;
+static dissector_handle_t catapult_dct2000_handle;
static dissector_handle_t look_for_dissector(const char *protocol_name);
static void parse_outhdr_string(const guchar *outhdr_string, gint outhdr_length);
@@ -2865,8 +2866,6 @@ dissect_catapult_dct2000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
/******************************************************************************/
void proto_reg_handoff_catapult_dct2000(void)
{
- dissector_handle_t catapult_dct2000_handle = find_dissector("dct2000");
-
dissector_add_uint("wtap_encap", WTAP_ENCAP_CATAPULT_DCT2000, catapult_dct2000_handle);
mac_lte_handle = find_dissector("mac-lte");
@@ -3315,7 +3314,7 @@ void proto_register_catapult_dct2000(void)
expert_register_field_array(expert_catapult_dct2000, ei, array_length(ei));
/* Allow dissector to find be found by name. */
- register_dissector("dct2000", dissect_catapult_dct2000, proto_catapult_dct2000);
+ catapult_dct2000_handle = register_dissector("dct2000", dissect_catapult_dct2000, proto_catapult_dct2000);
/* Preferences */
catapult_dct2000_module = prefs_register_protocol(proto_catapult_dct2000, NULL);
diff --git a/epan/dissectors/packet-ccsds.c b/epan/dissectors/packet-ccsds.c
index 1180ea06ea..9befa7c294 100644
--- a/epan/dissectors/packet-ccsds.c
+++ b/epan/dissectors/packet-ccsds.c
@@ -95,7 +95,8 @@ static gint ett_ccsds_checkword = -1;
static expert_field ei_ccsds_length_error = EI_INIT;
static expert_field ei_ccsds_checkword = EI_INIT;
-/* Dissectot table */
+static dissector_handle_t ccsds_handle;
+/* Dissector table */
static dissector_table_t ccsds_dissector_table;
static const enum_val_t dissect_checkword[] = {
@@ -704,7 +705,7 @@ proto_register_ccsds(void)
expert_ccsds = expert_register_protocol(proto_ccsds);
expert_register_field_array(expert_ccsds, ei, array_length(ei));
- register_dissector ( "ccsds", dissect_ccsds, proto_ccsds );
+ ccsds_handle = register_dissector ( "ccsds", dissect_ccsds, proto_ccsds );
/* Register preferences module */
ccsds_module = prefs_register_protocol(proto_ccsds, NULL);
@@ -722,7 +723,7 @@ proto_register_ccsds(void)
void
proto_reg_handoff_ccsds(void)
{
- dissector_add_for_decode_as_with_preference( "udp.port", find_dissector("ccsds") );
+ dissector_add_for_decode_as_with_preference( "udp.port", ccsds_handle);
}
/*
diff --git a/epan/dissectors/packet-chdlc.c b/epan/dissectors/packet-chdlc.c
index 02a38e9701..a4f311bdeb 100644
--- a/epan/dissectors/packet-chdlc.c
+++ b/epan/dissectors/packet-chdlc.c
@@ -88,6 +88,8 @@ static gint ett_slarp = -1;
static dissector_table_t subdissector_table;
+static dissector_handle_t chdlc_handle;
+
static capture_dissector_handle_t ip_cap_handle;
static const value_string chdlc_address_vals[] = {
@@ -235,7 +237,7 @@ proto_register_chdlc(void)
"Cisco HDLC protocol", proto_chdlc,
FT_UINT16, BASE_HEX);
- register_dissector("chdlc", dissect_chdlc, proto_chdlc);
+ chdlc_handle = register_dissector("chdlc", dissect_chdlc, proto_chdlc);
/* Register the preferences for the chdlc protocol */
chdlc_module = prefs_register_protocol(proto_chdlc, NULL);
@@ -254,10 +256,8 @@ proto_register_chdlc(void)
void
proto_reg_handoff_chdlc(void)
{
- dissector_handle_t chdlc_handle;
capture_dissector_handle_t chdlc_cap_handle;
- chdlc_handle = find_dissector("chdlc");
dissector_add_uint("wtap_encap", WTAP_ENCAP_CHDLC, chdlc_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_CHDLC_WITH_PHDR, chdlc_handle);
dissector_add_uint("juniper.proto", JUNIPER_PROTO_CHDLC, chdlc_handle);
diff --git a/epan/dissectors/packet-cimetrics.c b/epan/dissectors/packet-cimetrics.c
index fe19276e8e..1a74d70e65 100644
--- a/epan/dissectors/packet-cimetrics.c
+++ b/epan/dissectors/packet-cimetrics.c
@@ -47,6 +47,7 @@ static gint ett_cimetrics_mstp = -1;
static int hf_cimetrics_mstp_timer = -1;
static int hf_cimetrics_mstp_value = -1;
+static dissector_handle_t cimetric_handle;
static int
dissect_cimetrics_mstp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -114,8 +115,7 @@ proto_register_cimetrics(void)
proto_register_field_array(proto_cimetrics_mstp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("cimetrics", dissect_cimetrics_mstp,
- proto_cimetrics_mstp);
+ cimetric_handle = register_dissector("cimetrics", dissect_cimetrics_mstp, proto_cimetrics_mstp);
llc_add_oui(OUI_CIMETRICS, "llc.cimetrics_pid",
"LLC Cimetrics OUI PID", hf2, proto_cimetrics_mstp);
@@ -124,10 +124,7 @@ proto_register_cimetrics(void)
void
proto_reg_handoff_cimetrics(void)
{
- dissector_handle_t mstp_handle;
-
- mstp_handle = find_dissector("cimetrics");
- dissector_add_uint("llc.cimetrics_pid", 1, mstp_handle);
+ dissector_add_uint("llc.cimetrics_pid", 1, cimetric_handle);
}
/*
diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c
index 0246de8214..8bc0346f44 100644
--- a/epan/dissectors/packet-coap.c
+++ b/epan/dissectors/packet-coap.c
@@ -89,6 +89,8 @@ static expert_field ei_coap_invalid_option_number = EI_INIT;
static expert_field ei_coap_invalid_option_range = EI_INIT;
static expert_field ei_coap_option_length_bad = EI_INIT;
+static dissector_handle_t coap_handle;
+
/* CoAP's IANA-assigned port (UDP only) number */
#define DEFAULT_COAP_PORT 5683
@@ -1249,15 +1251,12 @@ proto_register_coap(void)
expert_coap = expert_register_protocol(proto_coap);
expert_register_field_array(expert_coap, ei, array_length(ei));
- register_dissector("coap", dissect_coap, proto_coap);
+ coap_handle = register_dissector("coap", dissect_coap, proto_coap);
}
void
proto_reg_handoff_coap(void)
{
- dissector_handle_t coap_handle;
-
- coap_handle = find_dissector("coap");
media_type_dissector_table = find_dissector_table("media_type");
dissector_add_uint_with_preference("tcp.port", DEFAULT_COAP_PORT, coap_handle);
dissector_add_uint_with_preference("udp.port", DEFAULT_COAP_PORT, coap_handle);
diff --git a/epan/dissectors/packet-cops.c b/epan/dissectors/packet-cops.c
index a23d61e91f..fd91cf0419 100644
--- a/epan/dissectors/packet-cops.c
+++ b/epan/dissectors/packet-cops.c
@@ -798,6 +798,8 @@ static gint ett_cops_subtree = -1;
static gint ett_docsis_request_transmission_policy = -1;
+static dissector_handle_t cops_handle;
+
/* For request/response matching */
typedef struct _cops_conv_info_t {
wmem_map_t *pdus_tree;
@@ -2842,7 +2844,7 @@ void proto_register_cops(void)
expert_register_field_array(expert_cops, ei, array_length(ei));
/* Make dissector findable by name */
- register_dissector("cops", dissect_cops, proto_cops);
+ cops_handle = register_dissector("cops", dissect_cops, proto_cops);
/* Register our configuration options for cops */
cops_module = prefs_register_protocol(proto_cops, NULL);
@@ -2867,9 +2869,6 @@ void proto_register_cops(void)
void proto_reg_handoff_cops(void)
{
- dissector_handle_t cops_handle;
-
- cops_handle = find_dissector("cops");
/* These could use a separate "preference name" (to avoid collision),
but they are IANA registered and users could still use Decode As */
dissector_add_uint("tcp.port", TCP_PORT_PKTCABLE_COPS, cops_handle);
diff --git a/epan/dissectors/packet-db-lsp.c b/epan/dissectors/packet-db-lsp.c
index 14ec08f8fa..88f9c3012c 100644
--- a/epan/dissectors/packet-db-lsp.c
+++ b/epan/dissectors/packet-db-lsp.c
@@ -59,6 +59,9 @@ static gint ett_db_lsp = -1;
static heur_dissector_list_t heur_subdissector_list;
+static dissector_handle_t db_lsp_tcp_handle;
+static dissector_handle_t db_lsp_udp_handle;
+
/* Use heuristic */
static gboolean try_heuristic = TRUE;
/* desegmentation of tcp payload */
@@ -237,8 +240,8 @@ proto_register_db_lsp (void)
proto_db_lsp = proto_register_protocol (PNAME, PSNAME, PFNAME);
proto_db_lsp_disc = proto_register_protocol (PNAME_DISC, PSNAME_DISC, PFNAME_DISC);
- register_dissector ("db-lsp.tcp", dissect_db_lsp_tcp, proto_db_lsp);
- register_dissector ("db-lsp.udp", dissect_db_lsp_disc, proto_db_lsp_disc);
+ db_lsp_tcp_handle = register_dissector ("db-lsp.tcp", dissect_db_lsp_tcp, proto_db_lsp);
+ db_lsp_udp_handle = register_dissector ("db-lsp.udp", dissect_db_lsp_disc, proto_db_lsp_disc);
heur_subdissector_list = register_heur_dissector_list("db-lsp", proto_db_lsp);
@@ -265,12 +268,6 @@ proto_register_db_lsp (void)
void
proto_reg_handoff_db_lsp (void)
{
- dissector_handle_t db_lsp_tcp_handle;
- dissector_handle_t db_lsp_udp_handle;
-
- db_lsp_tcp_handle = find_dissector ("db-lsp.tcp");
- db_lsp_udp_handle = find_dissector ("db-lsp.udp");
-
dissector_add_uint_with_preference("tcp.port", DB_LSP_PORT, db_lsp_tcp_handle);
dissector_add_uint_with_preference("udp.port", DB_LSP_PORT, db_lsp_udp_handle);
}
diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c
index 55011ac201..6e8e909b43 100644
--- a/epan/dissectors/packet-diameter.c
+++ b/epan/dissectors/packet-diameter.c
@@ -2319,7 +2319,7 @@ proto_register_diameter(void)
proto_diameter = proto_register_protocol ("Diameter Protocol", "DIAMETER", "diameter");
/* Allow dissector to find be found by name. */
- register_dissector("diameter", dissect_diameter, proto_diameter);
+ diameter_sctp_handle = register_dissector("diameter", dissect_diameter, proto_diameter);
/* Delay registration of Diameter fields */
proto_register_prefix("diameter", register_diameter_fields);
@@ -2375,7 +2375,6 @@ proto_reg_handoff_diameter(void)
static range_t *diameter_sctp_port_range;
if (!Initialized) {
- diameter_sctp_handle = find_dissector("diameter");
diameter_tcp_handle = create_dissector_handle(dissect_diameter_tcp,
proto_diameter);
diameter_udp_handle = create_dissector_handle(dissect_diameter, proto_diameter);
diff --git a/epan/dissectors/packet-dof.c b/epan/dissectors/packet-dof.c
index 9d910053c9..551984ff45 100644
--- a/epan/dissectors/packet-dof.c
+++ b/epan/dissectors/packet-dof.c
@@ -2058,7 +2058,6 @@ static const value_string ccm_opcode_strings[] = {
#define DOF_OBJECT_IDENTIFIER "DOF Object Identifier"
static dissector_handle_t dof_oid_handle;
-static dissector_handle_t undissected_data_handle;
static int oid_proto = -1;
@@ -7306,7 +7305,7 @@ static int dissect_dpp_2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
expert_add_info(pinfo, security_tree, &ei_dpp_no_security_context);
{
tvbuff_t *data_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(undissected_data_handle, data_tvb, pinfo, tree);
+ call_data_dissector(data_tvb, pinfo, tree);
}
proto_item_set_len(security_tree, offset - sec_offset);
return offset;
@@ -10539,14 +10538,14 @@ static int dissect_trp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
offset = dof_dissect_pdu_as_field(dissect_2008_16_security_3_1, tvb, pinfo, trp_tree,
offset, hf_identity_resolution, ett_identity_resolution, NULL);
data_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(undissected_data_handle, data_tvb, pinfo, trp_tree);
+ call_data_dissector(data_tvb, pinfo, trp_tree);
}
break;
case TRP_RSP_VALIDATE_CREDENTIAL:
{
tvbuff_t *data_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(undissected_data_handle, data_tvb, pinfo, trp_tree);
+ call_data_dissector(data_tvb, pinfo, trp_tree);
}
break;
}
@@ -11050,8 +11049,6 @@ static void dof_handoff(void)
tcp_handle = create_dissector_handle(dissect_dof_tcp, proto_2008_1_dof);
dof_udp_handle = create_dissector_handle(dissect_dof_udp, proto_2008_1_dof);
- undissected_data_handle = find_dissector("data");
-
dissector_add_uint_with_preference("tcp.port", DOF_P2P_NEG_SEC_TCP_PORT, tcp_handle);
dissector_add_uint_range_with_preference("udp.port", DOF_NEG_SEC_UDP_PORT_RANGE, dof_udp_handle);
}
diff --git a/epan/dissectors/packet-dop.c b/epan/dissectors/packet-dop.c
index 6c1695930d..5fb2e98598 100644
--- a/epan/dissectors/packet-dop.c
+++ b/epan/dissectors/packet-dop.c
@@ -346,6 +346,8 @@ static expert_field ei_dop_unsupported_errcode = EI_INIT;
static expert_field ei_dop_unsupported_pdu = EI_INIT;
static expert_field ei_dop_zero_pdu = EI_INIT;
+static dissector_handle_t dop_handle = NULL;
+
/* Dissector table */
static dissector_table_t dop_dissector_table;
@@ -2037,7 +2039,7 @@ static int dissect_ACIItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_
/*--- End of included file: packet-dop-fn.c ---*/
-#line 85 "./asn1/dop/packet-dop-template.c"
+#line 87 "./asn1/dop/packet-dop-template.c"
static int
call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, const char *col_info, void* data)
@@ -2954,7 +2956,7 @@ void proto_register_dop(void) {
NULL, HFILL }},
/*--- End of included file: packet-dop-hfarr.c ---*/
-#line 237 "./asn1/dop/packet-dop-template.c"
+#line 239 "./asn1/dop/packet-dop-template.c"
};
/* List of subtrees */
@@ -3033,7 +3035,7 @@ void proto_register_dop(void) {
&ett_dop_GrantsAndDenials,
/*--- End of included file: packet-dop-ettarr.c ---*/
-#line 244 "./asn1/dop/packet-dop-template.c"
+#line 246 "./asn1/dop/packet-dop-template.c"
};
static ei_register_info ei[] = {
@@ -3050,7 +3052,7 @@ void proto_register_dop(void) {
/* Register protocol */
proto_dop = proto_register_protocol(PNAME, PSNAME, PFNAME);
- register_dissector("dop", dissect_dop, proto_dop);
+ dop_handle = register_dissector("dop", dissect_dop, proto_dop);
dop_dissector_table = register_dissector_table("dop.oid", "DOP OID Dissectors", proto_dop, FT_STRING, BASE_NONE);
@@ -3075,7 +3077,6 @@ void proto_register_dop(void) {
/*--- proto_reg_handoff_dop --- */
void proto_reg_handoff_dop(void) {
- dissector_handle_t dop_handle;
/*--- Included file: packet-dop-dis-tab.c ---*/
@@ -3100,7 +3101,7 @@ void proto_reg_handoff_dop(void) {
/*--- End of included file: packet-dop-dis-tab.c ---*/
-#line 288 "./asn1/dop/packet-dop-template.c"
+#line 289 "./asn1/dop/packet-dop-template.c"
/* APPLICATION CONTEXT */
oid_add_from_string("id-ac-directory-operational-binding-management","2.5.3.3");
@@ -3108,7 +3109,6 @@ void proto_reg_handoff_dop(void) {
/* ABSTRACT SYNTAXES */
/* Register DOP with ROS (with no use of RTSE) */
- dop_handle = find_dissector("dop");
register_ros_oid_dissector_handle("2.5.9.4", dop_handle, 0, "id-as-directory-operational-binding-management", FALSE);
/* BINDING TYPES */
diff --git a/epan/dissectors/packet-dpnss-link.c b/epan/dissectors/packet-dpnss-link.c
index 3d811bedc5..31bb20e356 100644
--- a/epan/dissectors/packet-dpnss-link.c
+++ b/epan/dissectors/packet-dpnss-link.c
@@ -92,6 +92,8 @@ static const value_string dpnss_link_frameType_vals[] = {
static int ett_dpnss_link = -1;
+static dissector_handle_t dpnss_link_handle;
+
/* Code to actually dissect the packets */
static int
dissect_dpnss_link(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -206,7 +208,7 @@ proto_register_dpnss_link(void)
/* Register the protocol name and description */
proto_dpnss_link = proto_register_protocol("Digital Private Signalling System No 1 Link Layer",
"DPNSS Link", "dpnss_link");
- register_dissector("dpnss_link", dissect_dpnss_link, proto_dpnss_link);
+ dpnss_link_handle = register_dissector("dpnss_link", dissect_dpnss_link, proto_dpnss_link);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_dpnss_link, hf, array_length(hf));
@@ -216,9 +218,6 @@ proto_register_dpnss_link(void)
void
proto_reg_handoff_dpnss_link(void)
{
- dissector_handle_t dpnss_link_handle;
-
- dpnss_link_handle = find_dissector("dpnss_link");
dissector_add_uint("wtap_encap", WTAP_ENCAP_DPNSS, dpnss_link_handle);
dpnss_handle = find_dissector_add_dependency("dpnss", proto_dpnss_link);
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c
index ef4fe3736f..ee625903f7 100644
--- a/epan/dissectors/packet-dtls.c
+++ b/epan/dissectors/packet-dtls.c
@@ -1927,8 +1927,7 @@ proto_register_dtls(void)
}
#endif
- register_dissector("dtls", dissect_dtls, proto_dtls);
- dtls_handle = find_dissector("dtls");
+ dtls_handle = register_dissector("dtls", dissect_dtls, proto_dtls);
register_init_routine(dtls_init);
register_cleanup_routine(dtls_cleanup);
@@ -1956,7 +1955,7 @@ proto_reg_handoff_dtls(void)
if (initialized == FALSE) {
heur_dissector_add("udp", dissect_dtls_heur, "DTLS over UDP", "dtls_udp", proto_dtls, HEURISTIC_ENABLE);
- dissector_add_uint("sctp.ppi", DIAMETER_DTLS_PROTOCOL_ID, find_dissector("dtls"));
+ dissector_add_uint("sctp.ppi", DIAMETER_DTLS_PROTOCOL_ID, dtls_handle);
}
initialized = TRUE;
diff --git a/epan/dissectors/packet-dua.c b/epan/dissectors/packet-dua.c
index d5620a2e0f..9228550546 100644
--- a/epan/dissectors/packet-dua.c
+++ b/epan/dissectors/packet-dua.c
@@ -77,6 +77,7 @@ static gint ett_dua = -1;
static gint ett_dua_parameter = -1;
static dissector_handle_t dpnss_handle;
+static dissector_handle_t dua_handle;
#define ADD_PADDING(x) ((((x) + 3) >> 2) << 2)
@@ -903,15 +904,12 @@ proto_register_dua(void)
proto_register_subtree_array(ett, array_length(ett));
/* Allow other dissectors to find this one by name. */
- register_dissector("dua", dissect_dua, proto_dua);
+ dua_handle = register_dissector("dua", dissect_dua, proto_dua);
}
void
proto_reg_handoff_dua(void)
{
- dissector_handle_t dua_handle;
-
- dua_handle = find_dissector("dua");
dpnss_handle = find_dissector_add_dependency("dpnss", proto_dua);
dissector_add_uint("sctp.ppi", DUA_PAYLOAD_PROTOCOL_ID, dua_handle);
}
diff --git a/epan/dissectors/packet-dvb-nit.c b/epan/dissectors/packet-dvb-nit.c
index 9ef3d999d4..39e2a30915 100644
--- a/epan/dissectors/packet-dvb-nit.c
+++ b/epan/dissectors/packet-dvb-nit.c
@@ -51,6 +51,7 @@ static int hf_dvb_nit_transport_descriptors_length = -1;
static gint ett_dvb_nit = -1;
static gint ett_dvb_nit_ts = -1;
+static dissector_handle_t dvb_nit_handle;
#define DVB_NIT_RESERVED1_MASK 0xC0
#define DVB_NIT_VERSION_NUMBER_MASK 0x3E
@@ -232,16 +233,12 @@ proto_register_dvb_nit(void)
proto_register_field_array(proto_dvb_nit, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("dvb_nit", dissect_dvb_nit, proto_dvb_nit);
+ dvb_nit_handle = register_dissector("dvb_nit", dissect_dvb_nit, proto_dvb_nit);
}
void proto_reg_handoff_dvb_nit(void)
{
- dissector_handle_t dvb_nit_handle;
-
- dvb_nit_handle = find_dissector("dvb_nit");
-
dissector_add_uint("mpeg_sect.tid", DVB_NIT_TID, dvb_nit_handle);
dissector_add_uint("mpeg_sect.tid", DVB_NIT_TID_OTHER, dvb_nit_handle);
}
diff --git a/epan/dissectors/packet-ecp-oui.c b/epan/dissectors/packet-ecp-oui.c
index 6fcaf9418d..43566edef8 100644
--- a/epan/dissectors/packet-ecp-oui.c
+++ b/epan/dissectors/packet-ecp-oui.c
@@ -76,6 +76,8 @@ static gint ett_ecp = -1;
static gint ett_end_of_vdpdu = -1;
static gint ett_802_1qbg_capabilities_flags = -1;
+static dissector_handle_t ecp_handle;
+
static const value_string ecp_pid_vals[] = {
{ 0x0000, "ECP draft 0" },
{ 0, NULL }
@@ -438,14 +440,11 @@ void proto_register_ecp_oui(void)
ieee802a_add_oui(OUI_IEEE_802_1QBG, "ieee802a.ecp_pid",
"IEEE802a ECP PID", &hf_reg, proto_ecp);
- register_dissector("ecp", dissect_ecp, proto_ecp);
+ ecp_handle = register_dissector("ecp", dissect_ecp, proto_ecp);
}
void proto_reg_handoff_ecp(void)
{
- static dissector_handle_t ecp_handle;
-
- ecp_handle = find_dissector("ecp");
dissector_add_uint("ieee802a.ecp_pid", 0x0000, ecp_handle);
}
diff --git a/epan/dissectors/packet-ehs.c b/epan/dissectors/packet-ehs.c
index 893ca7b72f..49a91d0182 100644
--- a/epan/dissectors/packet-ehs.c
+++ b/epan/dissectors/packet-ehs.c
@@ -200,6 +200,8 @@ static int hf_ehs_dz_udsm_event = -1;
static int hf_ehs_dz_udsm_num_pkts_xmtd_rollover = -1;
+static dissector_handle_t ehs_handle;
+
/* handle to ccsds packet dissector */
static dissector_handle_t ccsds_handle;
@@ -1952,14 +1954,13 @@ proto_register_ehs(void)
proto_register_subtree_array(ett, array_length(ett));
/* XX: Does this dissector need to be publicly registered ?? */
- register_dissector ( "ehs", dissect_ehs, proto_ehs );
-
+ ehs_handle = register_dissector ( "ehs", dissect_ehs, proto_ehs );
}
void
proto_reg_handoff_ehs(void)
{
- dissector_add_for_decode_as_with_preference( "udp.port", find_dissector("ehs") );
+ dissector_add_for_decode_as_with_preference( "udp.port", ehs_handle );
ccsds_handle = find_dissector_add_dependency ( "ccsds", proto_ehs );
}
diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c
index 584518fe32..47f03d2ecf 100644
--- a/epan/dissectors/packet-enip.c
+++ b/epan/dissectors/packet-enip.c
@@ -377,6 +377,8 @@ static dissector_handle_t arp_handle;
static dissector_handle_t cipsafety_handle;
static dissector_handle_t cipmotion_handle;
static dissector_handle_t cip_implicit_handle;
+static dissector_handle_t enip_tcp_handle;
+static dissector_handle_t enipio_handle;
static gboolean enip_desegment = TRUE;
static gboolean enip_OTrun_idle = TRUE;
@@ -4379,8 +4381,8 @@ proto_register_enip(void)
proto_enip = proto_register_protocol("EtherNet/IP (Industrial Protocol)", "ENIP", "enip");
proto_enipio = proto_register_protocol("EtherNet/IP I/O", "ENIP I/O", "enip_io");
- register_dissector("enip", dissect_enip_tcp, proto_enip);
- register_dissector("enip_io", dissect_enipio, proto_enipio);
+ enip_tcp_handle = register_dissector("enip", dissect_enip_tcp, proto_enip);
+ enipio_handle = register_dissector("enip_io", dissect_enipio, proto_enipio);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_enip, hf, array_length(hf));
@@ -4436,12 +4438,10 @@ proto_register_enip(void)
void
proto_reg_handoff_enip(void)
{
- dissector_handle_t enip_udp_handle, enip_tcp_handle;
- dissector_handle_t enipio_handle;
+ dissector_handle_t enip_udp_handle;
dissector_handle_t dlr_handle;
/* Register for EtherNet/IP, using TCP */
- enip_tcp_handle = find_dissector("enip");
dissector_add_uint_with_preference("tcp.port", ENIP_ENCAP_PORT, enip_tcp_handle);
/* Register for EtherNet/IP, using UDP */
@@ -4449,7 +4449,6 @@ proto_reg_handoff_enip(void)
dissector_add_uint_with_preference("udp.port", ENIP_ENCAP_PORT, enip_udp_handle);
/* Register for EtherNet/IP IO data (UDP) */
- enipio_handle = find_dissector("enip_io");
dissector_add_uint_with_preference("udp.port", ENIP_IO_PORT, enipio_handle);
/* Register for EtherNet/IP TLS */
diff --git a/epan/dissectors/packet-epmd.c b/epan/dissectors/packet-epmd.c
index d72067a8a7..3eea1d2ab1 100644
--- a/epan/dissectors/packet-epmd.c
+++ b/epan/dissectors/packet-epmd.c
@@ -59,6 +59,8 @@ static int hf_epmd_creation = -1;
static gint ett_epmd = -1;
+static dissector_handle_t epmd_handle = NULL;
+
/* Other dissectors */
static dissector_handle_t edp_handle = NULL;
@@ -408,14 +410,11 @@ proto_register_epmd(void)
proto_epmd = proto_register_protocol(PNAME, PSNAME, PFNAME);
proto_register_field_array(proto_epmd, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector(PFNAME, dissect_epmd, proto_epmd);
+ epmd_handle = register_dissector(PFNAME, dissect_epmd, proto_epmd);
}
void
proto_reg_handoff_epmd(void) {
- dissector_handle_t epmd_handle;
-
- epmd_handle = find_dissector("epmd");
edp_handle = find_dissector("erldp");
dissector_add_uint_with_preference("tcp.port", EPMD_PORT, epmd_handle);
diff --git a/epan/dissectors/packet-esis.c b/epan/dissectors/packet-esis.c
index ea8d6ad692..3230b60d11 100644
--- a/epan/dissectors/packet-esis.c
+++ b/epan/dissectors/packet-esis.c
@@ -79,6 +79,8 @@ static expert_field ei_esis_length = EI_INIT;
static expert_field ei_esis_type = EI_INIT;
static expert_field ei_esis_checksum = EI_INIT;
+static dissector_handle_t esis_handle;
+
static const value_string esis_vals[] = {
{ ESIS_ESH_PDU, "ES HELLO"},
{ ESIS_ISH_PDU, "IS HELLO"},
@@ -400,15 +402,12 @@ proto_register_esis(void) {
proto_register_subtree_array(ett, array_length(ett));
expert_esis = expert_register_protocol(proto_esis);
expert_register_field_array(expert_esis, ei, array_length(ei));
- register_dissector("esis", dissect_esis, proto_esis);
+ esis_handle = register_dissector("esis", dissect_esis, proto_esis);
}
void
proto_reg_handoff_esis(void)
{
- dissector_handle_t esis_handle;
-
- esis_handle = find_dissector("esis");
dissector_add_uint("osinl.incl", NLPID_ISO9542_ESIS, esis_handle);
}
diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c
index fc834c5759..a0b8b1a15d 100644
--- a/epan/dissectors/packet-eth.c
+++ b/epan/dissectors/packet-eth.c
@@ -97,6 +97,9 @@ static capture_dissector_handle_t ipx_cap_handle;
static capture_dissector_handle_t llc_cap_handle;
static heur_dissector_list_t heur_subdissector_list;
static heur_dissector_list_t eth_trailer_subdissector_list;
+static dissector_handle_t eth_withoutfcs_handle;
+static dissector_handle_t eth_maybefcs_handle;
+
static int eth_tap = -1;
@@ -991,9 +994,9 @@ proto_register_eth(void)
"Set the condition that must be true for the CCSDS dissector to be called",
&ccsds_heuristic_bit);
- register_dissector("eth_withoutfcs", dissect_eth_withoutfcs, proto_eth);
+ eth_withoutfcs_handle = register_dissector("eth_withoutfcs", dissect_eth_withoutfcs, proto_eth);
register_dissector("eth_withfcs", dissect_eth_withfcs, proto_eth);
- register_dissector("eth_maybefcs", dissect_eth_maybefcs, proto_eth);
+ eth_maybefcs_handle = register_dissector("eth_maybefcs", dissect_eth_maybefcs, proto_eth);
eth_tap = register_tap("eth");
register_conversation_table(proto_eth, TRUE, eth_conversation_packet, eth_hostlist_packet);
@@ -1005,7 +1008,7 @@ proto_register_eth(void)
void
proto_reg_handoff_eth(void)
{
- dissector_handle_t eth_handle, eth_withoutfcs_handle, eth_maybefcs_handle;
+ dissector_handle_t eth_handle;
capture_dissector_handle_t eth_cap_handle;
/* Get a handle for the Firewall-1 dissector. */
@@ -1017,8 +1020,6 @@ proto_reg_handoff_eth(void)
eth_handle = create_dissector_handle(dissect_eth, proto_eth);
dissector_add_uint("wtap_encap", WTAP_ENCAP_ETHERNET, eth_handle);
- eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
- eth_maybefcs_handle = find_dissector("eth_maybefcs");
dissector_add_uint("ethertype", ETHERTYPE_ETHBRIDGE, eth_withoutfcs_handle);
dissector_add_uint("erf.types.type", ERF_TYPE_ETH, eth_maybefcs_handle);
diff --git a/epan/dissectors/packet-etherip.c b/epan/dissectors/packet-etherip.c
index bc8435c8f2..a74a9adaad 100644
--- a/epan/dissectors/packet-etherip.c
+++ b/epan/dissectors/packet-etherip.c
@@ -41,7 +41,7 @@ static expert_field ei_etherip_ver_3 = EI_INIT;
static expert_field ei_etherip_reserved_0 = EI_INIT;
static dissector_handle_t eth_withoutfcs_handle;
-
+static dissector_handle_t etherip_handle;
/*
* RFC 3378: EtherIP: Tunneling Ethernet Frames in IP Datagrams
@@ -125,16 +125,13 @@ proto_register_etherip(void)
expert_etherip = expert_register_protocol(proto_etherip);
expert_register_field_array(expert_etherip, ei, array_length(ei));
- register_dissector("etherip", dissect_etherip, proto_etherip);
+ etherip_handle = register_dissector("etherip", dissect_etherip, proto_etherip);
}
void
proto_reg_handoff_etherip(void)
{
- dissector_handle_t etherip_handle;
-
eth_withoutfcs_handle = find_dissector_add_dependency("eth_withoutfcs", proto_etherip);
- etherip_handle = find_dissector("etherip");
dissector_add_uint("ip.proto", IP_PROTO_ETHERIP, etherip_handle);
}
diff --git a/epan/dissectors/packet-exported_pdu.c b/epan/dissectors/packet-exported_pdu.c
index 7f287f496a..319cfdd967 100644
--- a/epan/dissectors/packet-exported_pdu.c
+++ b/epan/dissectors/packet-exported_pdu.c
@@ -72,6 +72,8 @@ static gint ett_exported_pdu_tag = -1;
static int ss7pc_address_type = -1;
+static dissector_handle_t exported_pdu_handle;
+
#define EXPORTED_PDU_NEXT_PROTO_STR 0
#define EXPORTED_PDU_NEXT_HEUR_PROTO_STR 1
#define EXPORTED_PDU_NEXT_DIS_TABLE_STR 2
@@ -438,7 +440,7 @@ proto_register_exported_pdu(void)
proto_exported_pdu = proto_register_protocol("EXPORTED_PDU",
"exported_pdu", "exported_pdu");
- register_dissector("exported_pdu", dissect_exported_pdu, proto_exported_pdu);
+ exported_pdu_handle = register_dissector("exported_pdu", dissect_exported_pdu, proto_exported_pdu);
/* Required function calls to register the header fields and subtrees */
proto_register_field_array(proto_exported_pdu, hf, array_length(hf));
@@ -457,10 +459,8 @@ void
proto_reg_handoff_exported_pdu(void)
{
static gboolean initialized = FALSE;
- static dissector_handle_t exported_pdu_handle;
if (!initialized) {
- exported_pdu_handle = find_dissector("exported_pdu");
dissector_add_uint("wtap_encap", WTAP_ENCAP_WIRESHARK_UPPER_PDU, exported_pdu_handle);
initialized = TRUE;
}
diff --git a/epan/dissectors/packet-fr.c b/epan/dissectors/packet-fr.c
index 779da67994..21c42e975a 100644
--- a/epan/dissectors/packet-fr.c
+++ b/epan/dissectors/packet-fr.c
@@ -122,6 +122,7 @@ static expert_field ei_fr_frame_relay_xid = EI_INIT;
static dissector_handle_t eth_withfcs_handle;
static dissector_handle_t gprs_ns_handle;
static dissector_handle_t data_handle;
+static dissector_handle_t fr_handle;
static capture_dissector_handle_t chdlc_cap_handle;
static capture_dissector_handle_t eth_cap_handle;
@@ -961,7 +962,7 @@ proto_register_fr(void)
"Frame Relay OSI NLPID", proto_fr, FT_UINT8, BASE_HEX);
register_dissector("fr_uncompressed", dissect_fr_uncompressed, proto_fr);
- register_dissector("fr", dissect_fr, proto_fr);
+ fr_handle = register_dissector("fr", dissect_fr, proto_fr);
register_dissector("fr_stripped_address", dissect_fr_stripped_address, proto_fr);
frencap_module = prefs_register_protocol(proto_fr, NULL);
@@ -983,10 +984,9 @@ proto_register_fr(void)
void
proto_reg_handoff_fr(void)
{
- dissector_handle_t fr_handle, fr_phdr_handle;
+ dissector_handle_t fr_phdr_handle;
capture_dissector_handle_t fr_cap_handle;
- fr_handle = find_dissector("fr");
dissector_add_uint("gre.proto", ETHERTYPE_RAW_FR, fr_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_FRELAY, fr_handle);
dissector_add_uint("juniper.proto", JUNIPER_PROTO_FRELAY, fr_handle);
diff --git a/epan/dissectors/packet-ftp.c b/epan/dissectors/packet-ftp.c
index 8f971a534e..62892e0e3b 100644
--- a/epan/dissectors/packet-ftp.c
+++ b/epan/dissectors/packet-ftp.c
@@ -68,6 +68,7 @@ static expert_field ei_ftp_epsv_args_invalid = EI_INIT;
static expert_field ei_ftp_response_code_invalid = EI_INIT;
static dissector_handle_t ftpdata_handle;
+static dissector_handle_t ftp_handle;
#define TCP_PORT_FTPDATA 20
#define TCP_PORT_FTP 21
@@ -1049,9 +1050,9 @@ proto_register_ftp(void)
proto_ftp = proto_register_protocol("File Transfer Protocol (FTP)", "FTP", "ftp");
- register_dissector("ftp", dissect_ftp, proto_ftp);
+ ftp_handle = register_dissector("ftp", dissect_ftp, proto_ftp);
proto_ftp_data = proto_register_protocol("FTP Data", "FTP-DATA", "ftp-data");
- register_dissector("ftp-data", dissect_ftpdata, proto_ftp_data);
+ ftpdata_handle = register_dissector("ftp-data", dissect_ftpdata, proto_ftp_data);
proto_register_field_array(proto_ftp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_ftp = expert_register_protocol(proto_ftp);
@@ -1061,11 +1062,7 @@ proto_register_ftp(void)
void
proto_reg_handoff_ftp(void)
{
- dissector_handle_t ftp_handle;
-
- ftpdata_handle = find_dissector("ftp-data");
dissector_add_uint_with_preference("tcp.port", TCP_PORT_FTPDATA, ftpdata_handle);
- ftp_handle = find_dissector("ftp");
dissector_add_uint_with_preference("tcp.port", TCP_PORT_FTP, ftp_handle);
}
diff --git a/epan/dissectors/packet-gmr1_dtap.c b/epan/dissectors/packet-gmr1_dtap.c
index 59b7180a4d..1e9649e62b 100644
--- a/epan/dissectors/packet-gmr1_dtap.c
+++ b/epan/dissectors/packet-gmr1_dtap.c
@@ -48,6 +48,7 @@ static gint ett_gmr1_pd = -1;
/* Handoffs */
static dissector_handle_t gsm_dtap_handle;
+static dissector_handle_t dtap_handle;
static int
@@ -173,15 +174,12 @@ proto_register_gmr1_dtap(void)
proto_register_field_array(proto_gmr1_dtap, hf, array_length(hf));
/* Register dissector */
- register_dissector("gmr1_dtap", dissect_gmr1_dtap, proto_gmr1_dtap);
+ dtap_handle = register_dissector("gmr1_dtap", dissect_gmr1_dtap, proto_gmr1_dtap);
}
void
proto_reg_handoff_gmr1_dtap(void)
{
- dissector_handle_t dtap_handle;
-
- dtap_handle = find_dissector("gmr1_dtap");
dissector_add_uint("lapsat.sapi", 0 , dtap_handle); /* LAPSat: CC/RR/MM */
dissector_add_uint("lapsat.sapi", 3 , dtap_handle); /* LAPSat: SMS/SS */
diff --git a/epan/dissectors/packet-gprs-llc.c b/epan/dissectors/packet-gprs-llc.c
index 660ca9241e..fd159021a3 100644
--- a/epan/dissectors/packet-gprs-llc.c
+++ b/epan/dissectors/packet-gprs-llc.c
@@ -125,6 +125,7 @@ static gint ett_llcgprs_sframe = -1;
static expert_field ei_llcgprs_no_info_field = EI_INIT;
static dissector_handle_t sndcp_xid_handle;
+static dissector_handle_t gprs_llc_handle;
static gboolean ignore_cipher_bit = FALSE;
@@ -1332,7 +1333,7 @@ proto_register_llcgprs(void)
proto_register_subtree_array(ett, array_length(ett));
expert_llcgprs = expert_register_protocol(proto_llcgprs);
expert_register_field_array(expert_llcgprs, ei, array_length(ei));
- register_dissector("llcgprs", dissect_llcgprs, proto_llcgprs);
+ gprs_llc_handle = register_dissector("llcgprs", dissect_llcgprs, proto_llcgprs);
llcgprs_module = prefs_register_protocol ( proto_llcgprs, NULL );
prefs_register_bool_preference ( llcgprs_module, "autodetect_cipher_bit",
@@ -1345,10 +1346,7 @@ proto_register_llcgprs(void)
void
proto_reg_handoff_llcgprs(void)
{
- dissector_handle_t gprs_llc_handle;
-
/* make sure that the top level can call this dissector */
- gprs_llc_handle = find_dissector("llcgprs");
dissector_add_uint("wtap_encap", WTAP_ENCAP_GPRS_LLC, gprs_llc_handle);
sndcp_xid_handle = find_dissector_add_dependency("sndcpxid", proto_llcgprs);
diff --git a/epan/dissectors/packet-gsm_a_bssmap.c b/epan/dissectors/packet-gsm_a_bssmap.c
index 065eb7e520..623dfae84a 100644
--- a/epan/dissectors/packet-gsm_a_bssmap.c
+++ b/epan/dissectors/packet-gsm_a_bssmap.c
@@ -713,6 +713,7 @@ static dissector_handle_t gsm_bsslap_handle = NULL;
static dissector_handle_t dtap_handle;
static dissector_handle_t bssgp_handle;
static dissector_handle_t rrc_handle;
+static dissector_handle_t bssmap_handle;
static proto_tree *g_tree;
static guint8 cell_discriminator = 0x0f; /* tracks whether handover is to UMTS */
@@ -8000,16 +8001,13 @@ proto_register_gsm_a_bssmap(void)
expert_gsm_a_bssmap = expert_register_protocol(proto_a_bssmap);
expert_register_field_array(expert_gsm_a_bssmap, ei, array_length(ei));
- register_dissector("gsm_a_bssmap", dissect_bssmap, proto_a_bssmap);
+ bssmap_handle = register_dissector("gsm_a_bssmap", dissect_bssmap, proto_a_bssmap);
}
void
proto_reg_handoff_gsm_a_bssmap(void)
{
- dissector_handle_t bssmap_handle;
-
- bssmap_handle = find_dissector("gsm_a_bssmap");
dissector_add_uint("bssap.pdu_type", GSM_A_PDU_TYPE_BSSMAP, bssmap_handle);
dtap_handle = find_dissector_add_dependency("gsm_a_dtap", proto_a_bssmap);
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index 4f53081239..e8a72566be 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -759,6 +759,7 @@ static dissector_table_t u2u_dissector_table;
static dissector_handle_t gsm_map_handle;
static dissector_handle_t rp_handle;
+static dissector_handle_t dtap_handle;
static proto_tree *g_tree;
@@ -8311,7 +8312,7 @@ proto_register_gsm_a_dtap(void)
/* subdissector code */
- register_dissector("gsm_a_dtap", dissect_dtap, proto_a_dtap);
+ dtap_handle = register_dissector("gsm_a_dtap", dissect_dtap, proto_a_dtap);
u2u_dissector_table = register_dissector_table("gsm_a.dtap.u2u_prot_discr", "GSM User to User Signalling",
proto_a_dtap, FT_UINT8, BASE_DEC);
}
@@ -8319,9 +8320,6 @@ proto_register_gsm_a_dtap(void)
void
proto_reg_handoff_gsm_a_dtap(void)
{
- dissector_handle_t dtap_handle;
-
- dtap_handle = find_dissector("gsm_a_dtap");
dissector_add_uint("bssap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
dissector_add_uint("ranap.nas_pdu", BSSAP_PDU_TYPE_DTAP, dtap_handle);
dissector_add_uint("llcgprs.sapi", 1 , dtap_handle); /* GPRS Mobility Management */
diff --git a/epan/dissectors/packet-gsm_bssmap_le.c b/epan/dissectors/packet-gsm_bssmap_le.c
index 84e533ff6f..3c68904d77 100644
--- a/epan/dissectors/packet-gsm_bssmap_le.c
+++ b/epan/dissectors/packet-gsm_bssmap_le.c
@@ -224,6 +224,7 @@ static expert_field ei_gsm_a_bssmap_le_extraneous_data = EI_INIT;
static expert_field ei_gsm_a_bssmap_le_missing_mandatory_element = EI_INIT;
static dissector_handle_t gsm_bsslap_handle = NULL;
+static dissector_handle_t bssmap_le_handle;
static proto_tree *g_tree;
@@ -1212,16 +1213,12 @@ proto_register_gsm_bssmap_le(void)
expert_gsm_a_bssmap_le = expert_register_protocol(proto_bssmap_le);
expert_register_field_array(expert_gsm_a_bssmap_le, ei, array_length(ei));
- register_dissector("gsm_bssmap_le", dissect_bssmap_le, proto_bssmap_le);
+ bssmap_le_handle = register_dissector("gsm_bssmap_le", dissect_bssmap_le, proto_bssmap_le);
}
void
proto_reg_handoff_gsm_bssmap_le(void)
{
- dissector_handle_t bssmap_le_handle;
-
- bssmap_le_handle = find_dissector("gsm_bssmap_le");
-
dissector_add_uint("bssap.pdu_type", BSSAP_PDU_TYPE_BSSMAP, bssmap_le_handle);
gsm_bsslap_handle = find_dissector_add_dependency("gsm_bsslap", proto_bssmap_le);
diff --git a/epan/dissectors/packet-gsm_sim.c b/epan/dissectors/packet-gsm_sim.c
index 47f2f436bb..286921a267 100644
--- a/epan/dissectors/packet-gsm_sim.c
+++ b/epan/dissectors/packet-gsm_sim.c
@@ -368,6 +368,7 @@ static int ett_tprof_b32 = -1;
static int ett_tprof_b33 = -1;
static dissector_handle_t sub_handle_cap;
+static dissector_handle_t sim_handle;
static const int *tprof_b1_fields[] = {
@@ -2926,7 +2927,7 @@ proto_register_gsm_sim(void)
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("gsm_sim", dissect_gsm_sim, proto_gsm_sim);
+ sim_handle = register_dissector("gsm_sim", dissect_gsm_sim, proto_gsm_sim);
register_dissector("gsm_sim.command", dissect_gsm_sim_command, proto_gsm_sim);
register_dissector("gsm_sim.response", dissect_gsm_sim_response, proto_gsm_sim);
register_dissector("gsm_sim.bertlv", dissect_bertlv, proto_gsm_sim);
@@ -2935,8 +2936,6 @@ proto_register_gsm_sim(void)
void
proto_reg_handoff_gsm_sim(void)
{
- dissector_handle_t sim_handle;
- sim_handle = find_dissector("gsm_sim");
dissector_add_uint("gsmtap.type", GSMTAP_TYPE_SIM, sim_handle);
sub_handle_cap = find_dissector_add_dependency("etsi_cat", proto_gsm_sim);
diff --git a/epan/dissectors/packet-gssapi.c b/epan/dissectors/packet-gssapi.c
index bcf8991637..3fa249431c 100644
--- a/epan/dissectors/packet-gssapi.c
+++ b/epan/dissectors/packet-gssapi.c
@@ -66,6 +66,8 @@ static expert_field ei_gssapi_unknown_header = EI_INIT;
static gboolean gssapi_reassembly = TRUE;
+static dissector_handle_t gssapi_handle;
+
typedef struct _gssapi_conv_info_t {
gssapi_oid_value *oid;
@@ -636,7 +638,7 @@ proto_register_gssapi(void)
expert_gssapi = expert_register_protocol(proto_gssapi);
expert_register_field_array(expert_gssapi, ei, array_length(ei));
- register_dissector("gssapi", dissect_gssapi, proto_gssapi);
+ gssapi_handle = register_dissector("gssapi", dissect_gssapi, proto_gssapi);
register_dissector("gssapi_verf", dissect_gssapi_verf, proto_gssapi);
gssapi_oids = g_hash_table_new(gssapi_oid_hash, gssapi_oid_equal);
@@ -707,8 +709,6 @@ static dcerpc_auth_subdissector_fns gssapi_auth_fns = {
void
proto_reg_handoff_gssapi(void)
{
- dissector_handle_t gssapi_handle;
-
ntlmssp_handle = find_dissector_add_dependency("ntlmssp", proto_gssapi);
ntlmssp_payload_handle = find_dissector_add_dependency("ntlmssp_payload", proto_gssapi);
ntlmssp_verf_handle = find_dissector_add_dependency("ntlmssp_verf", proto_gssapi);
@@ -725,7 +725,6 @@ proto_reg_handoff_gssapi(void)
DCE_C_RPC_AUTHN_PROTOCOL_SPNEGO,
&gssapi_auth_fns);
- gssapi_handle = find_dissector("gssapi");
dissector_add_string("dns.tsig.mac", "gss.microsoft.com", gssapi_handle);
}
diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c
index 5c72f6d114..01d7d435c7 100644
--- a/epan/dissectors/packet-gtp.c
+++ b/epan/dissectors/packet-gtp.c
@@ -77,6 +77,7 @@ void proto_reg_handoff_gtp(void);
static dissector_table_t ppp_subdissector_table;
static dissector_table_t gtp_priv_ext_dissector_table;
static dissector_table_t gtp_cdr_fmt_dissector_table;
+static dissector_handle_t gtp_handle, gtp_prime_handle;
#define GTPv0_PORT 3386
#define GTPv1C_PORT 2123 /* 3G Control PDU */
@@ -10134,8 +10135,8 @@ proto_register_gtp(void)
prefs_register_bool_preference(gtp_module, "dissect_gtp_over_tcp", "Dissect GTP over TCP", "Dissect GTP over TCP", &g_gtp_over_tcp);
prefs_register_bool_preference(gtp_module, "track_gtp_session", "Track GTP session", "Track GTP session", &g_gtp_session);
- register_dissector("gtp", dissect_gtp, proto_gtp);
- register_dissector("gtpprime", dissect_gtpprime, proto_gtpprime);
+ gtp_handle = register_dissector("gtp", dissect_gtp, proto_gtp);
+ gtp_prime_handle = register_dissector("gtpprime", dissect_gtpprime, proto_gtpprime);
gtp_priv_ext_dissector_table = register_dissector_table("gtp.priv_ext", "GTP PRIVATE EXT", proto_gtp, FT_UINT16, BASE_DEC);
gtp_cdr_fmt_dissector_table = register_dissector_table("gtp.cdr_fmt", "GTP DATA RECORD TYPE", proto_gtp, FT_UINT16, BASE_DEC);
@@ -10162,15 +10163,12 @@ void
proto_reg_handoff_gtp(void)
{
static gboolean Initialized = FALSE;
- static dissector_handle_t gtp_handle, gtp_prime_handle;
static gboolean gtp_over_tcp;
static guint gtpv0_port;
static guint gtpv1c_port;
static guint gtpv1u_port;
if (!Initialized) {
- gtp_handle = find_dissector("gtp");
- gtp_prime_handle = find_dissector("gtpprime");
ppp_subdissector_table = find_dissector_table("ppp.protocol");
radius_register_avp_dissector(VENDOR_THE3GPP, 5, dissect_radius_qos_umts);
diff --git a/epan/dissectors/packet-gvcp.c b/epan/dissectors/packet-gvcp.c
index 376614e502..15b00a118d 100644
--- a/epan/dissectors/packet-gvcp.c
+++ b/epan/dissectors/packet-gvcp.c
@@ -488,7 +488,7 @@ static int ett_gvcp_payload_ack_subtree = -1;
static int ett_gvcp_bootstrap_fields = -1;
static dissector_handle_t gvcp_handle;
-
+static dissector_handle_t gvsp_handle;
/*Device Mode*/
static const value_string devicemodenames_class[] = {
@@ -1502,13 +1502,8 @@ static void dissect_writereg_cmd(proto_tree *gvcp_telegram_tree, tvbuff_t *tvb,
(addr == GVCP_SC_DESTINATION_PORT(2)) ||
(addr == GVCP_SC_DESTINATION_PORT(3)))
{
- dissector_handle_t gvsp_handle;
- gvsp_handle = find_dissector("gvsp");
- if (gvsp_handle != NULL)
- {
- /* For now we simply (always) add ports. Maybe we should remove when the dissector gets unloaded? */
- dissector_add_uint("udp.port", value, gvsp_handle);
- }
+ /* For now we simply (always) add ports. Maybe we should remove when the dissector gets unloaded? */
+ dissector_add_uint("udp.port", value, gvsp_handle);
}
/* Automatically learn messaging channel port. Dissect as GVCP. */
@@ -3820,6 +3815,7 @@ void proto_register_gvcp(void)
void proto_reg_handoff_gvcp(void)
{
dissector_add_uint("udp.port", global_gvcp_port, gvcp_handle);
+ gvsp_handle = find_dissector("gvsp");
}
/*
diff --git a/epan/dissectors/packet-h223.c b/epan/dissectors/packet-h223.c
index d62a46b0d8..ac22377901 100644
--- a/epan/dissectors/packet-h223.c
+++ b/epan/dissectors/packet-h223.c
@@ -122,6 +122,7 @@ static expert_field ei_h223_al2_crc = EI_INIT;
/* These are the handles of our subdissectors */
static dissector_handle_t data_handle;
static dissector_handle_t srp_handle;
+static dissector_handle_t h223_bitswapped;
static const fragment_items h223_mux_frag_items _U_ = {
&ett_h223_mux_fragment,
@@ -1653,7 +1654,7 @@ void proto_register_h223 (void)
expert_register_field_array(expert_h223, ei, array_length(ei));
register_dissector("h223", dissect_h223_circuit_data, proto_h223);
- register_dissector("h223_bitswapped", dissect_h223_bitswapped, proto_h223_bitswapped);
+ h223_bitswapped = register_dissector("h223_bitswapped", dissect_h223_bitswapped, proto_h223_bitswapped);
/* register our init routine to be called at the start of a capture,
to clear out our hash tables etc */
@@ -1666,7 +1667,6 @@ void proto_register_h223 (void)
void proto_reg_handoff_h223(void)
{
- dissector_handle_t h223_bitswapped = find_dissector("h223_bitswapped");
data_handle = find_dissector("data");
srp_handle = find_dissector("srp");
diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c
index a36bc43255..7ca29fb2b1 100644
--- a/epan/dissectors/packet-h225.c
+++ b/epan/dissectors/packet-h225.c
@@ -11851,7 +11851,7 @@ proto_reg_handoff_h225(void)
h245_handle = find_dissector("h245");
h245dg_handle = find_dissector("h245dg");
- h4501_handle = find_dissector("h4501");
+ h4501_handle = find_dissector_add_dependency("h4501", proto_h225);
data_handle = find_dissector("data");
h225_prefs_initialized = TRUE;
q931_tpkt_handle = find_dissector("q931.tpkt");
diff --git a/epan/dissectors/packet-h263p.c b/epan/dissectors/packet-h263p.c
index 7b65b0172f..ba0b8dec60 100644
--- a/epan/dissectors/packet-h263p.c
+++ b/epan/dissectors/packet-h263p.c
@@ -65,6 +65,8 @@ static gint ett_h263P_data = -1;
static guint temp_dynamic_payload_type = 0;
+static dissector_handle_t h263P_handle;
+
/* RFC 4629 */
static int
dissect_h263P( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ )
@@ -202,12 +204,10 @@ dissect_h263P( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
void
proto_reg_handoff_h263P(void)
{
- static dissector_handle_t h263P_handle;
static guint dynamic_payload_type;
static gboolean h263P_prefs_initialized = FALSE;
if (!h263P_prefs_initialized) {
- h263P_handle = find_dissector("h263P");
dissector_add_string("rtp_dyn_payload_type","H263-1998", h263P_handle);
dissector_add_string("rtp_dyn_payload_type","H263-2000", h263P_handle);
h263P_prefs_initialized = TRUE;
@@ -409,8 +409,7 @@ proto_register_h263P(void)
10,
&temp_dynamic_payload_type);
- register_dissector("h263P", dissect_h263P, proto_h263P);
-
+ h263P_handle = register_dissector("h263P", dissect_h263P, proto_h263P);
}
/*
diff --git a/epan/dissectors/packet-h264.c b/epan/dissectors/packet-h264.c
index 4a846da314..1eb3de874f 100644
--- a/epan/dissectors/packet-h264.c
+++ b/epan/dissectors/packet-h264.c
@@ -260,6 +260,8 @@ static expert_field ei_h264_bad_nal_length = EI_INIT;
static expert_field ei_h264_nal_unit_type_reserved = EI_INIT;
static expert_field ei_h264_nal_unit_type_unspecified = EI_INIT;
+static dissector_handle_t h264_name_handle;
+
/* The dynamic payload type range which will be dissected as H.264 */
#define RTP_PT_DEFAULT_RANGE "0"
@@ -3700,7 +3702,7 @@ proto_register_h264(void)
"; Values must be in the range 96 - 127",
&temp_dynamic_payload_type_range, 127);
- register_dissector("h264", dissect_h264, proto_h264);
+ h264_handle = register_dissector("h264", dissect_h264, proto_h264);
}
@@ -3712,10 +3714,8 @@ proto_reg_handoff_h264(void)
static gboolean h264_prefs_initialized = FALSE;
if (!h264_prefs_initialized) {
- dissector_handle_t h264_name_handle;
h264_capability_t *ftr;
- h264_handle = find_dissector("h264");
dissector_add_string("rtp_dyn_payload_type","H264", h264_handle);
dissector_add_string("rtp_dyn_payload_type","H264-SVC", h264_handle);
dissector_add_string("rtp_dyn_payload_type","X-H264UC", h264_handle);
diff --git a/epan/dissectors/packet-hpsw.c b/epan/dissectors/packet-hpsw.c
index b91cdac274..ffc32f9b9a 100644
--- a/epan/dissectors/packet-hpsw.c
+++ b/epan/dissectors/packet-hpsw.c
@@ -60,6 +60,8 @@ static gint ett_hpsw_tlv = -1;
static expert_field ei_hpsw_tlvlength_bad = EI_INIT;
+static dissector_handle_t hpsw_handle;
+
#define HPFOO_DEVICE_NAME 0x1
#define HPFOO_DEVICE_VERSION 0x2
#define HPFOO_CONFIG_NAME 0x3
@@ -359,16 +361,12 @@ proto_register_hpsw(void)
expert_hpsw = expert_register_protocol(proto_hpsw);
expert_register_field_array(expert_hpsw, ei, array_length(ei));
- register_dissector("hpsw", dissect_hpsw, proto_hpsw);
+ hpsw_handle = register_dissector("hpsw", dissect_hpsw, proto_hpsw);
}
void
proto_reg_handoff_hpsw(void)
{
- dissector_handle_t hpsw_handle;
-
- hpsw_handle = find_dissector("hpsw");
-
dissector_add_uint("hpext.dxsap", HPEXT_HPSW, hpsw_handle);
}
diff --git a/epan/dissectors/packet-hpteam.c b/epan/dissectors/packet-hpteam.c
index 124950314b..7026f0ba6d 100644
--- a/epan/dissectors/packet-hpteam.c
+++ b/epan/dissectors/packet-hpteam.c
@@ -46,6 +46,8 @@ static gint hf_llc_hpteam_pid = -1;
/* These are the ids of the subtrees that we may be creating */
static gint ett_hpteam = -1;
+static dissector_handle_t hpteam_handle;
+
/*
* According to the HP document at
*
@@ -128,14 +130,11 @@ void proto_register_hpteam(void)
llc_add_oui(OUI_HP_2, "llc.hpteam_pid", "LLC Hewlett Packard OUI PID", &hf_pid, proto_hpteam);
proto_register_field_array(proto_hpteam, hf_data, array_length(hf_data));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("hpteam", dissect_hpteam, proto_hpteam);
+ hpteam_handle = register_dissector("hpteam", dissect_hpteam, proto_hpteam);
}
void proto_reg_handoff_hpteam(void)
{
- dissector_handle_t hpteam_handle;
-
- hpteam_handle = find_dissector("hpteam");
/* Register dissector to key off of known PID / OUI combination */
dissector_add_uint("llc.hpteam_pid", 0x0002, hpteam_handle);
}
diff --git a/epan/dissectors/packet-hyperscsi.c b/epan/dissectors/packet-hyperscsi.c
index 80c1e0ea36..9571e11d18 100644
--- a/epan/dissectors/packet-hyperscsi.c
+++ b/epan/dissectors/packet-hyperscsi.c
@@ -41,6 +41,8 @@ static gint ett_hyperscsi = -1;
static gint ett_hs_hdr = -1;
static gint ett_hs_pdu = -1;
+static dissector_handle_t hs_handle;
+
static const true_false_string tfs_lastfrag = {
"Last Fragment",
"Not Last Fragment"
@@ -186,7 +188,7 @@ proto_register_hyperscsi(void)
proto_register_field_array(proto_hyperscsi, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("hyperscsi", dissect_hyperscsi, proto_hyperscsi);
+ hs_handle = register_dissector("hyperscsi", dissect_hyperscsi, proto_hyperscsi);
}
/* XXX <epan/etypes.h> */
@@ -195,9 +197,6 @@ proto_register_hyperscsi(void)
void
proto_reg_handoff_hyperscsi(void)
{
- dissector_handle_t hs_handle;
-
- hs_handle = find_dissector("hyperscsi");
dissector_add_uint("ethertype", ETHERTYPE_HYPERSCSI, hs_handle);
}
diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c
index da9d402dd2..b563689325 100644
--- a/epan/dissectors/packet-iax2.c
+++ b/epan/dissectors/packet-iax2.c
@@ -190,6 +190,8 @@ static expert_field ei_iax_circuit_id_conflict = EI_INIT;
static expert_field ei_iax_peer_address_unsupported = EI_INIT;
static expert_field ei_iax_invalid_len = EI_INIT;
+static dissector_handle_t iax2_handle;
+
static const fragment_items iax2_fragment_items = {
&ett_iax2_fragment,
&ett_iax2_fragments,
@@ -3197,7 +3199,7 @@ proto_register_iax2(void)
expert_iax = expert_register_protocol(proto_iax2);
expert_register_field_array(expert_iax, ei, array_length(ei));
- register_dissector("iax2", dissect_iax2, proto_iax2);
+ iax2_handle = register_dissector("iax2", dissect_iax2, proto_iax2);
iax2_codec_dissector_table = register_dissector_table(
"iax2.codec", "IAX codec number", proto_iax2, FT_UINT32, BASE_HEX);
@@ -3216,7 +3218,7 @@ proto_reg_handoff_iax2(void)
{
dissector_handle_t v110_handle;
- dissector_add_uint_with_preference("udp.port", IAX2_PORT, find_dissector("iax2"));
+ dissector_add_uint_with_preference("udp.port", IAX2_PORT, iax2_handle);
v110_handle = find_dissector("v110");
if (v110_handle)
dissector_add_uint("iax2.dataformat", AST_DATAFORMAT_V110, v110_handle);
diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c
index 6238d2ae9a..8bcdf9c6f8 100644
--- a/epan/dissectors/packet-icmp.c
+++ b/epan/dissectors/packet-icmp.c
@@ -175,6 +175,8 @@ static expert_field ei_icmp_resp_not_found = EI_INIT;
static expert_field ei_icmp_checksum = EI_INIT;
static expert_field ei_icmp_ext_checksum = EI_INIT;
+static dissector_handle_t icmp_handle;
+
/* ICMP definitions */
#define ICMP_ECHOREPLY 0
@@ -2020,20 +2022,18 @@ void proto_register_icmp(void)
"Whether the 128th and following bytes of the ICMP payload should be decoded as MPLS extensions or as a portion of the original packet",
&favor_icmp_mpls_ext);
- register_dissector("icmp", dissect_icmp, proto_icmp);
+ icmp_handle = register_dissector("icmp", dissect_icmp, proto_icmp);
icmp_tap = register_tap("icmp");
}
void proto_reg_handoff_icmp(void)
{
- dissector_handle_t icmp_handle;
capture_dissector_handle_t icmp_cap_handle;
/*
* Get handle for the IP dissector.
*/
ip_handle = find_dissector_add_dependency("ip", proto_icmp);
- icmp_handle = find_dissector("icmp");
dissector_add_uint("ip.proto", IP_PROTO_ICMP, icmp_handle);
icmp_cap_handle = create_capture_dissector_handle(capture_icmp, proto_icmp);
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 206f117119..ca27c2a5c6 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -5071,6 +5071,7 @@ is_broadcast_bssid(const address *bssid) {
}
static dissector_handle_t ieee80211_handle;
+static dissector_handle_t wlan_withoutfcs_handle;
static dissector_handle_t llc_handle;
static dissector_handle_t ipx_handle;
static dissector_handle_t eth_withoutfcs_handle;
@@ -27413,9 +27414,9 @@ proto_register_ieee80211(void)
expert_ieee80211 = expert_register_protocol(proto_wlan);
expert_register_field_array(expert_ieee80211, ei, array_length(ei));
- register_dissector("wlan", dissect_ieee80211, proto_wlan);
+ ieee80211_handle = register_dissector("wlan", dissect_ieee80211, proto_wlan);
register_dissector("wlan_withfcs", dissect_ieee80211_withfcs, proto_wlan);
- register_dissector("wlan_withoutfcs", dissect_ieee80211_withoutfcs, proto_wlan);
+ wlan_withoutfcs_handle = register_dissector("wlan_withoutfcs", dissect_ieee80211_withoutfcs, proto_wlan);
register_dissector("wlan_bsfc", dissect_ieee80211_bsfc, proto_wlan);
register_dissector("wlan_noqos", dissect_ieee80211_noqos, proto_wlan);
@@ -27628,7 +27629,7 @@ void
proto_reg_handoff_ieee80211(void)
{
dissector_handle_t data_encap_handle, centrino_handle;
- dissector_handle_t wlan_rsna_eapol_wpa_key_handle, wlan_rsna_eapol_rsn_key_handle, wlan_withoutfcs_handle;
+ dissector_handle_t wlan_rsna_eapol_wpa_key_handle, wlan_rsna_eapol_rsn_key_handle;
capture_dissector_handle_t ieee80211_cap_handle;
/*
@@ -27641,7 +27642,6 @@ proto_reg_handoff_ieee80211(void)
llc_cap_handle = find_capture_dissector("llc");
ipx_cap_handle = find_capture_dissector("ipx");
- ieee80211_handle = find_dissector("wlan");
dissector_add_uint("wtap_encap", WTAP_ENCAP_IEEE_802_11, ieee80211_handle);
centrino_handle = create_dissector_handle( dissect_ieee80211_centrino, proto_centrino );
@@ -27692,7 +27692,6 @@ proto_reg_handoff_ieee80211(void)
proto_wlan_rsna_eapol);
dissector_add_uint("eapol.keydes.type", EAPOL_RSN_KEY, wlan_rsna_eapol_rsn_key_handle);
- wlan_withoutfcs_handle = find_dissector("wlan_withoutfcs");
dissector_add_uint("sflow_245.header_protocol", SFLOW_5_HEADER_80211_MAC, wlan_withoutfcs_handle);
}
diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c
index 4a1f31111c..05a42ff284 100644
--- a/epan/dissectors/packet-ieee802154.c
+++ b/epan/dissectors/packet-ieee802154.c
@@ -421,6 +421,9 @@ static heur_dissector_list_t ieee802154_heur_subdissector_list;
static dissector_handle_t zigbee_beacon_handle;
static dissector_handle_t zigbee_ie_handle;
static dissector_handle_t zigbee_nwk_handle;
+static dissector_handle_t ieee802154_handle;
+static dissector_handle_t ieee802154_nonask_phy_handle;
+static dissector_handle_t ieee802154_nofcs_handle;
/* Versions */
static const value_string ieee802154_frame_versions[] = {
@@ -4252,10 +4255,10 @@ void proto_register_ieee802154(void)
ieee802154_beacon_subdissector_list = register_heur_dissector_list(IEEE802154_PROTOABBREV_WPAN_BEACON, proto_ieee802154);
/* Register dissectors with Wireshark. */
- register_dissector(IEEE802154_PROTOABBREV_WPAN, dissect_ieee802154, proto_ieee802154);
- register_dissector("wpan_nofcs", dissect_ieee802154_nofcs, proto_ieee802154);
+ ieee802154_handle = register_dissector(IEEE802154_PROTOABBREV_WPAN, dissect_ieee802154, proto_ieee802154);
+ ieee802154_nofcs_handle = register_dissector("wpan_nofcs", dissect_ieee802154_nofcs, proto_ieee802154);
register_dissector("wpan_cc24xx", dissect_ieee802154_cc24xx, proto_ieee802154);
- register_dissector("wpan-nonask-phy", dissect_ieee802154_nonask_phy, proto_ieee802154_nonask_phy);
+ ieee802154_nonask_phy_handle = register_dissector("wpan-nonask-phy", dissect_ieee802154_nonask_phy, proto_ieee802154_nonask_phy);
/* Register a Decode-As handler. */
register_decode_as(&ieee802154_da);
@@ -4270,18 +4273,12 @@ void proto_register_ieee802154(void)
void proto_reg_handoff_ieee802154(void)
{
static gboolean prefs_initialized = FALSE;
- static dissector_handle_t ieee802154_handle;
- static dissector_handle_t ieee802154_nonask_phy_handle;
- static dissector_handle_t ieee802154_nofcs_handle;
static unsigned int old_ieee802154_ethertype;
GByteArray *bytes;
gboolean res;
if (!prefs_initialized){
/* Get the dissector handles. */
- ieee802154_handle = find_dissector(IEEE802154_PROTOABBREV_WPAN);
- ieee802154_nonask_phy_handle = find_dissector("wpan-nonask-phy");
- ieee802154_nofcs_handle = find_dissector("wpan_nofcs");
zigbee_beacon_handle = find_dissector_add_dependency("zbee_beacon", proto_ieee802154);
zigbee_ie_handle = find_dissector_add_dependency("zbee_ie", proto_ieee802154);
zigbee_nwk_handle = find_dissector("zbee_nwk");
diff --git a/epan/dissectors/packet-interlink.c b/epan/dissectors/packet-interlink.c
index 48e507c724..44f84d7037 100644
--- a/epan/dissectors/packet-interlink.c
+++ b/epan/dissectors/packet-interlink.c
@@ -53,6 +53,7 @@ static gint ett_interlink_block = -1;
static dissector_handle_t data_handle;
static dissector_table_t subdissector_table;
+static dissector_handle_t interlink_handle;
static const true_false_string flags_set_notset = {
"Set", "Not set"
@@ -215,7 +216,7 @@ proto_register_interlink(void)
"interlink");
proto_register_field_array(proto_interlink, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("interlink", dissect_interlink, proto_interlink);
+ interlink_handle = register_dissector("interlink", dissect_interlink, proto_interlink);
/* Probably someone will write sub-dissectors. You can never know. */
subdissector_table = register_dissector_table("interlink.type_version",
@@ -226,9 +227,6 @@ proto_register_interlink(void)
void
proto_reg_handoff_interlink(void)
{
- dissector_handle_t interlink_handle;
- interlink_handle = find_dissector("interlink");
-
/* Allow "Decode As" with any UDP packet. */
dissector_add_for_decode_as_with_preference("udp.port", interlink_handle);
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c
index 8961c96e89..444c2dac86 100644
--- a/epan/dissectors/packet-ip.c
+++ b/epan/dissectors/packet-ip.c
@@ -262,6 +262,7 @@ static expert_field ei_ip_ttl_too_small = EI_INIT;
static expert_field ei_ip_cipso_tag = EI_INIT;
static expert_field ei_ip_bogus_ip_version = EI_INIT;
+static dissector_handle_t ip_handle;
#ifdef HAVE_GEOIP
static gint ett_geoip_info = -1;
@@ -3120,7 +3121,7 @@ proto_register_ip(void)
"Try to decode a packet using an heuristic sub-dissector before using a sub-dissector registered to a specific port",
&try_heuristic_first);
- register_dissector("ip", dissect_ip, proto_ip);
+ ip_handle = register_dissector("ip", dissect_ip, proto_ip);
register_init_routine(ip_defragment_init);
register_cleanup_routine(ip_defragment_cleanup);
ip_tap = register_tap("ip");
@@ -3135,12 +3136,10 @@ proto_register_ip(void)
void
proto_reg_handoff_ip(void)
{
- dissector_handle_t ip_handle;
dissector_handle_t ipv4_handle;
capture_dissector_handle_t clip_cap_handle;
int proto_clip;
- ip_handle = find_dissector("ip");
ipv6_handle = find_dissector("ipv6");
ipv4_handle = create_dissector_handle(dissect_ip_v4, proto_ip);
diff --git a/epan/dissectors/packet-ipos.c b/epan/dissectors/packet-ipos.c
index fd13416cff..f33cb539d1 100644
--- a/epan/dissectors/packet-ipos.c
+++ b/epan/dissectors/packet-ipos.c
@@ -157,13 +157,12 @@ proto_register_ipos(void)
expert_ipos = expert_register_protocol(proto_ipos);
expert_register_field_array(expert_ipos, ei, array_length(ei));
#endif
- register_dissector("ipos", dissect_ipos, proto_ipos);
+ ipos_handle = register_dissector("ipos", dissect_ipos, proto_ipos);
}
void
proto_reg_handoff_ipos(void)
{
- ipos_handle = find_dissector("ipos");
redback_handle = find_dissector_add_dependency("redback", proto_ipos);
/*dissector_add_uint("wtap_encap", WTAP_ENCAP_IPOS, ipos_handle); */
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index a2a4b301e2..d8cb5210a2 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -338,6 +338,7 @@ static expert_field ei_ipv6_bogus_ipv6_version = EI_INIT;
static expert_field ei_ipv6_invalid_header = EI_INIT;
static expert_field ei_ipv6_opt_header_mismatch = EI_INIT;
+static dissector_handle_t ipv6_handle;
#define set_address_ipv6(dst, src_ip6) \
set_address((dst), AT_IPv6, IPv6_ADDR_SIZE, (src_ip6))
@@ -3518,7 +3519,7 @@ proto_register_ipv6(void)
"If enabled the Length field in octets will be hidden",
&ipv6_exthdr_hide_len_oct_field);
- register_dissector("ipv6", dissect_ipv6, proto_ipv6);
+ ipv6_handle = register_dissector("ipv6", dissect_ipv6, proto_ipv6);
register_init_routine(ipv6_reassemble_init);
register_cleanup_routine(ipv6_reassemble_cleanup);
ip6_hdr_tap = register_tap("ipv6");
@@ -3539,7 +3540,6 @@ proto_register_ipv6(void)
void
proto_reg_handoff_ipv6(void)
{
- dissector_handle_t ipv6_handle;
dissector_handle_t ipv6_hopopts_handle;
dissector_handle_t ipv6_routing_handle;
dissector_handle_t ipv6_fraghdr_handle;
@@ -3547,7 +3547,6 @@ proto_reg_handoff_ipv6(void)
capture_dissector_handle_t ipv6_cap_handle;
capture_dissector_handle_t ipv6_ext_cap_handle;
- ipv6_handle = find_dissector("ipv6");
dissector_add_uint("ethertype", ETHERTYPE_IPv6, ipv6_handle);
dissector_add_uint("erf.types.type", ERF_TYPE_IPV6, ipv6_handle);
dissector_add_uint("ppp.protocol", PPP_IPV6, ipv6_handle);
diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c
index 2d4e1df616..93f6083a0d 100644
--- a/epan/dissectors/packet-ipx.c
+++ b/epan/dissectors/packet-ipx.c
@@ -80,6 +80,8 @@ static gint ett_ipx = -1;
static dissector_table_t ipx_type_dissector_table;
static dissector_table_t ipx_socket_dissector_table;
static dissector_table_t spx_socket_dissector_table;
+static dissector_handle_t ipx_handle;
+static dissector_handle_t ipxsap_handle;
static int proto_spx = -1;
static int hf_spx_connection_control = -1;
@@ -1545,7 +1547,7 @@ proto_register_ipx(void)
"IPX", "ipx");
proto_register_field_array(proto_ipx, hf_ipx, array_length(hf_ipx));
- register_dissector("ipx", dissect_ipx, proto_ipx);
+ ipx_handle = register_dissector("ipx", dissect_ipx, proto_ipx);
proto_spx = proto_register_protocol("Sequenced Packet eXchange",
"SPX", "spx");
@@ -1565,7 +1567,7 @@ proto_register_ipx(void)
proto_sap = proto_register_protocol("Service Advertisement Protocol",
"IPX SAP", "ipxsap");
- register_dissector("ipxsap", dissect_ipxsap, proto_sap);
+ ipxsap_handle = register_dissector("ipxsap", dissect_ipxsap, proto_sap);
proto_register_field_array(proto_sap, hf_sap, array_length(hf_sap));
@@ -1590,12 +1592,11 @@ proto_register_ipx(void)
void
proto_reg_handoff_ipx(void)
{
- dissector_handle_t ipx_handle, spx_handle;
- dissector_handle_t ipxsap_handle, ipxrip_handle;
+ dissector_handle_t spx_handle;
+ dissector_handle_t ipxrip_handle;
dissector_handle_t serialization_handle, ipxmsg_handle;
capture_dissector_handle_t ipx_cap_handle;
- ipx_handle = find_dissector("ipx");
dissector_add_uint_with_preference("udp.port", UDP_PORT_IPX, ipx_handle);
dissector_add_uint("ethertype", ETHERTYPE_IPX, ipx_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_IPX, ipx_handle);
@@ -1611,7 +1612,6 @@ proto_reg_handoff_ipx(void)
spx_handle = create_dissector_handle(dissect_spx, proto_spx);
dissector_add_uint("ipx.packet_type", IPX_PACKET_TYPE_SPX, spx_handle);
- ipxsap_handle = find_dissector("ipxsap");
dissector_add_uint("ipx.socket", IPX_SOCKET_SAP, ipxsap_handle);
ipxrip_handle = create_dissector_handle(dissect_ipxrip, proto_ipxrip);
diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c
index 3bae160e88..432cd89b6f 100644
--- a/epan/dissectors/packet-isakmp.c
+++ b/epan/dissectors/packet-isakmp.c
@@ -399,6 +399,8 @@ static expert_field ei_isakmp_payload_bad_length = EI_INIT;
static expert_field ei_isakmp_bad_fragment_number = EI_INIT;
static dissector_handle_t eap_handle = NULL;
+static dissector_handle_t isakmp_handle;
+
static reassembly_table isakmp_cisco_reassembly_table;
static reassembly_table isakmp_ike2_reassembly_table;
@@ -7106,7 +7108,7 @@ proto_register_isakmp(void)
register_init_routine(&isakmp_init_protocol);
register_cleanup_routine(&isakmp_cleanup_protocol);
- register_dissector("isakmp", dissect_isakmp, proto_isakmp);
+ isakmp_handle = register_dissector("isakmp", dissect_isakmp, proto_isakmp);
#ifdef HAVE_LIBGCRYPT
isakmp_module = prefs_register_protocol(proto_isakmp, NULL);
@@ -7156,9 +7158,6 @@ proto_register_isakmp(void)
void
proto_reg_handoff_isakmp(void)
{
- dissector_handle_t isakmp_handle;
-
- isakmp_handle = find_dissector("isakmp");
eap_handle = find_dissector_add_dependency("eap", proto_isakmp);
dissector_add_uint_with_preference("udp.port", UDP_PORT_ISAKMP, isakmp_handle);
dissector_add_uint_with_preference("tcp.port", TCP_PORT_ISAKMP, isakmp_handle);
diff --git a/epan/dissectors/packet-iso7816.c b/epan/dissectors/packet-iso7816.c
index b1ddeb8240..61a0f6ef77 100644
--- a/epan/dissectors/packet-iso7816.c
+++ b/epan/dissectors/packet-iso7816.c
@@ -935,13 +935,7 @@ proto_register_iso7816(void)
proto_iso7816_atr = proto_register_protocol(
"ISO/IEC 7816-3", "ISO 7816-3", "iso7816.atr");
- register_dissector("iso7816.atr", dissect_iso7816_atr, proto_iso7816_atr);
-}
-
-void
-proto_reg_handoff_iso7816(void)
-{
- iso7816_atr_handle = find_dissector("iso7816.atr");
+ iso7816_atr_handle = register_dissector("iso7816.atr", dissect_iso7816_atr, proto_iso7816_atr);
}
/*
diff --git a/epan/dissectors/packet-iua.c b/epan/dissectors/packet-iua.c
index 8e3a6320f0..85590e7919 100644
--- a/epan/dissectors/packet-iua.c
+++ b/epan/dissectors/packet-iua.c
@@ -96,6 +96,7 @@ static gboolean support_IG = FALSE;
static dissector_handle_t q931_handle;
static dissector_handle_t x25_handle;
+static dissector_handle_t iua_handle;
#define ADD_PADDING(x) ((((x) + 3) >> 2) << 2)
@@ -975,7 +976,7 @@ proto_register_iua(void)
&global_iua_gsm_sapis);
/* Allow other dissectors to find this one by name. */
- register_dissector("iua", dissect_iua, proto_iua);
+ iua_handle = register_dissector("iua", dissect_iua, proto_iua);
}
#define SCTP_PORT_IUA 9900
@@ -983,9 +984,6 @@ proto_register_iua(void)
void
proto_reg_handoff_iua(void)
{
- dissector_handle_t iua_handle;
-
- iua_handle = find_dissector("iua");
q931_handle = find_dissector_add_dependency("q931", proto_iua);
x25_handle = find_dissector_add_dependency("x.25", proto_iua);
diff --git a/epan/dissectors/packet-iuup.c b/epan/dissectors/packet-iuup.c
index d771094b5d..370be8afbc 100644
--- a/epan/dissectors/packet-iuup.c
+++ b/epan/dissectors/packet-iuup.c
@@ -157,6 +157,8 @@ static expert_field ei_iuup_pdu_type = EI_INIT;
static GHashTable* circuits = NULL;
+static dissector_handle_t iuup_handle;
+
static gboolean dissect_fields = FALSE;
static gboolean two_byte_pseudoheader = FALSE;
static guint global_dynamic_payload_type = 0;
@@ -843,11 +845,9 @@ static void cleanup_iuup(void) {
void proto_reg_handoff_iuup(void) {
static gboolean iuup_prefs_initialized = FALSE;
- static dissector_handle_t iuup_handle;
static guint saved_dynamic_payload_type = 0;
if (!iuup_prefs_initialized) {
- iuup_handle = find_dissector("iuup");
dissector_add_string("rtp_dyn_payload_type","VND.3GPP.IUFP", iuup_handle);
iuup_prefs_initialized = TRUE;
} else {
@@ -994,7 +994,7 @@ void proto_register_iuup(void) {
proto_register_subtree_array(ett, array_length(ett));
expert_iuup = expert_register_protocol(proto_iuup);
expert_register_field_array(expert_iuup, ei, array_length(ei));
- register_dissector("iuup", dissect_iuup, proto_iuup);
+ iuup_handle = register_dissector("iuup", dissect_iuup, proto_iuup);
register_dissector("find_iuup", find_iuup, proto_iuup);
register_init_routine(&init_iuup);
diff --git a/epan/dissectors/packet-jmirror.c b/epan/dissectors/packet-jmirror.c
index cc2ffbb809..1bae39fd5a 100644
--- a/epan/dissectors/packet-jmirror.c
+++ b/epan/dissectors/packet-jmirror.c
@@ -191,9 +191,9 @@ proto_reg_handoff_jmirror(void)
jmirror_handle = create_dissector_handle(dissect_jmirror, proto_jmirror);
/* Create pointer to ipv4, ipv6, ppp and data dissectors */
- ipv4_handle = find_dissector("ip");
- ipv6_handle = find_dissector("ipv6");
- hdlc_handle = find_dissector("pw_hdlc_nocw_hdlc_ppp");
+ ipv4_handle = find_dissector_add_dependency("ip", proto_jmirror);
+ ipv6_handle = find_dissector_add_dependency("ipv6", proto_jmirror);
+ hdlc_handle = find_dissector_add_dependency("pw_hdlc_nocw_hdlc_ppp", proto_jmirror);
/* Register as a normal IP dissector with default UDP port 30030 */
dissector_add_uint_with_preference("udp.port", DEF_JMIRROR_UDP_PORT, jmirror_handle);
diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c
index cf3681fad0..19b1d4bea4 100644
--- a/epan/dissectors/packet-jxta.c
+++ b/epan/dissectors/packet-jxta.c
@@ -171,6 +171,8 @@ static int uri_address_type = -1;
static gboolean gDESEGMENT = TRUE;
static gboolean gMSG_MEDIA = TRUE;
+static dissector_handle_t jxta_udp_handle;
+
/**
* Stream Conversation data
**/
@@ -470,9 +472,7 @@ static int dissect_jxta_udp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tr
conversation_t *conversation = find_or_create_conversation(pinfo);
- DISSECTOR_ASSERT(find_dissector("jxta.udp"));
-
- conversation_set_dissector(conversation, find_dissector("jxta.udp"));
+ conversation_set_dissector(conversation, jxta_udp_handle);
while (TRUE) {
tvbuff_t *jxta_message_framing_tvb;
@@ -2344,8 +2344,8 @@ void proto_register_jxta(void)
proto_message_jxta = proto_register_protocol("JXTA Message", "JXTA Message", "jxta.message");
- register_dissector("jxta.udp", dissect_jxta_udp, proto_jxta);
- register_dissector("jxta.stream", dissect_jxta_stream, proto_jxta);
+ jxta_udp_handle = register_dissector("jxta.udp", dissect_jxta_udp, proto_jxta);
+ stream_jxta_handle = register_dissector("jxta.stream", dissect_jxta_stream, proto_jxta);
/* Register header fields */
proto_register_field_array(proto_jxta, hf, array_length(hf));
@@ -2389,7 +2389,6 @@ void proto_reg_handoff_jxta(void)
if(!init_done) {
message_jxta_handle = create_dissector_handle(dissect_jxta_message, proto_message_jxta);
- stream_jxta_handle = find_dissector("jxta.stream");
media_type_dissector_table = find_dissector_table("media_type");
ssl_handle = find_dissector_add_dependency("ssl", proto_jxta);
diff --git a/epan/dissectors/packet-k12.c b/epan/dissectors/packet-k12.c
index 154cef36bd..050b369e04 100644
--- a/epan/dissectors/packet-k12.c
+++ b/epan/dissectors/packet-k12.c
@@ -478,7 +478,7 @@ proto_register_k12(void)
proto_register_subtree_array(ett, array_length(ett));
expert_k12 = expert_register_protocol(proto_k12);
expert_register_field_array(expert_k12, ei, array_length(ei));
- register_dissector("k12", dissect_k12, proto_k12);
+ k12_handle = register_dissector("k12", dissect_k12, proto_k12);
k12_uat = uat_new("K12 Protocols",
sizeof(k12_handles_t),
@@ -509,7 +509,6 @@ proto_register_k12(void)
void proto_reg_handoff_k12(void)
{
- k12_handle = find_dissector("k12");
data_handle = find_dissector("data");
sscop_handle = find_dissector("sscop");
fp_handle = find_dissector("fp");
diff --git a/epan/dissectors/packet-kerberos4.c b/epan/dissectors/packet-kerberos4.c
index 47b5cfe295..9c8f60b1e6 100644
--- a/epan/dissectors/packet-kerberos4.c
+++ b/epan/dissectors/packet-kerberos4.c
@@ -64,6 +64,8 @@ static int hf_krb4_unknown_transarc_blob = -1;
static gint ett_krb4 = -1;
static gint ett_krb4_auth_msg_type = -1;
+static dissector_handle_t krb4_handle;
+
#define UDP_PORT_KRB4 750
#define TRANSARC_SPECIAL_VERSION 0x63
@@ -439,7 +441,7 @@ proto_register_krb4(void)
proto_krb4 = proto_register_protocol("Kerberos v4",
"KRB4", "krb4");
- register_dissector("krb4", dissect_krb4, proto_krb4);
+ krb4_handle = register_dissector("krb4", dissect_krb4, proto_krb4);
proto_register_field_array(proto_krb4, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
@@ -447,9 +449,6 @@ proto_register_krb4(void)
void
proto_reg_handoff_krb4(void)
{
- dissector_handle_t krb4_handle;
-
- krb4_handle = find_dissector("krb4");
dissector_add_uint_with_preference("udp.port", UDP_PORT_KRB4, krb4_handle);
}
diff --git a/epan/dissectors/packet-lapb.c b/epan/dissectors/packet-lapb.c
index 65bcdbca40..9ca30c2dc7 100644
--- a/epan/dissectors/packet-lapb.c
+++ b/epan/dissectors/packet-lapb.c
@@ -48,6 +48,7 @@ static gint ett_lapb_control = -1;
static dissector_handle_t x25_dir_handle;
static dissector_handle_t x25_handle;
+static dissector_handle_t lapb_handle;
static const xdlc_cf_items lapb_cf_items = {
&hf_lapb_n_r,
@@ -214,14 +215,12 @@ proto_register_lapb(void)
proto_register_field_array (proto_lapb, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("lapb", dissect_lapb, proto_lapb);
+ lapb_handle = register_dissector("lapb", dissect_lapb, proto_lapb);
}
void
proto_reg_handoff_lapb(void)
{
- dissector_handle_t lapb_handle;
-
/*
* Get handles for the X.25 dissectors; we don't get an X.25
* pseudo-header for LAPB-over-Ethernet, but we do get it
@@ -230,7 +229,6 @@ proto_reg_handoff_lapb(void)
x25_dir_handle = find_dissector_add_dependency("x.25_dir", proto_lapb);
x25_handle = find_dissector_add_dependency("x.25", proto_lapb);
- lapb_handle = find_dissector("lapb");
dissector_add_uint("wtap_encap", WTAP_ENCAP_LAPB, lapb_handle);
}
diff --git a/epan/dissectors/packet-llc.c b/epan/dissectors/packet-llc.c
index 252da4fa81..e366b29a34 100644
--- a/epan/dissectors/packet-llc.c
+++ b/epan/dissectors/packet-llc.c
@@ -98,6 +98,8 @@ static dissector_handle_t fddi_handle;
static dissector_handle_t tr_handle;
static dissector_handle_t turbo_handle;
static dissector_handle_t mesh_handle;
+static dissector_handle_t llc_handle;
+
/*
* Group/Individual bit, in the DSAP.
@@ -815,7 +817,7 @@ proto_register_llc(void)
"LLC XID SAP", proto_llc, FT_UINT8, BASE_HEX);
register_capture_dissector_table("llc.dsap", "LLC");
- register_dissector("llc", dissect_llc, proto_llc);
+ llc_handle = register_dissector("llc", dissect_llc, proto_llc);
register_capture_dissector("llc", capture_llc, proto_llc);
}
@@ -858,7 +860,6 @@ register_hf(gpointer key _U_, gpointer value, gpointer user_data _U_)
void
proto_reg_handoff_llc(void)
{
- dissector_handle_t llc_handle;
capture_dissector_handle_t llc_cap_handle;
capture_dissector_handle_t llc_snap_handle;
@@ -880,7 +881,6 @@ proto_reg_handoff_llc(void)
ethertype_subdissector_table = find_dissector_table("ethertype");
hpteam_subdissector_table = find_dissector_table("llc.hpteam_pid");
- llc_handle = find_dissector("llc");
dissector_add_uint("wtap_encap", WTAP_ENCAP_ATM_RFC1483, llc_handle);
dissector_add_uint("sll.ltype", LINUX_SLL_P_802_2, llc_handle);
/* RFC 2043 */
diff --git a/epan/dissectors/packet-lte-rrc.c b/epan/dissectors/packet-lte-rrc.c
index fb1d8b5bfc..5eb38a6e56 100644
--- a/epan/dissectors/packet-lte-rrc.c
+++ b/epan/dissectors/packet-lte-rrc.c
@@ -71,6 +71,7 @@ static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle = NULL;
static dissector_handle_t rrc_sys_info_cont_handle = NULL;
static dissector_handle_t gsm_a_dtap_handle = NULL;
static dissector_handle_t gsm_rlcmac_dl_handle = NULL;
+static dissector_handle_t lte_rrc_dl_ccch_handle;
static GHashTable *lte_rrc_etws_cmas_dcs_hash = NULL;
@@ -242,7 +243,7 @@ typedef enum _SI_OrPSI_GERAN_enum {
} SI_OrPSI_GERAN_enum;
/*--- End of included file: packet-lte-rrc-val.h ---*/
-#line 82 "./asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 83 "./asn1/lte-rrc/packet-lte-rrc-template.c"
/* Initialize the protocol and registered fields */
static int proto_lte_rrc = -1;
@@ -4740,7 +4741,7 @@ static int hf_lte_rrc_n311_r13_01 = -1; /* T_n311_r13_01 */
static int dummy_hf_lte_rrc_eag_field = -1; /* never registered */
/*--- End of included file: packet-lte-rrc-hf.c ---*/
-#line 87 "./asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 88 "./asn1/lte-rrc/packet-lte-rrc-template.c"
static int hf_lte_rrc_eutra_cap_feat_group_ind_1 = -1;
static int hf_lte_rrc_eutra_cap_feat_group_ind_2 = -1;
@@ -7089,7 +7090,7 @@ static gint ett_lte_rrc_UE_RadioPagingInfo_NB_r13 = -1;
static gint ett_lte_rrc_UE_TimersAndConstants_NB_r13 = -1;
/*--- End of included file: packet-lte-rrc-ett.c ---*/
-#line 273 "./asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 274 "./asn1/lte-rrc/packet-lte-rrc-template.c"
static gint ett_lte_rrc_featureGroupIndicators = -1;
static gint ett_lte_rrc_featureGroupIndRel9Add = -1;
@@ -69513,7 +69514,7 @@ static int dissect_UE_RadioPagingInfo_NB_r13_PDU(tvbuff_t *tvb _U_, packet_info
/*--- End of included file: packet-lte-rrc-fn.c ---*/
-#line 2895 "./asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 2896 "./asn1/lte-rrc/packet-lte-rrc-template.c"
static int
dissect_lte_rrc_DL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -87786,7 +87787,7 @@ void proto_register_lte_rrc(void) {
"T_n311_r13_01", HFILL }},
/*--- End of included file: packet-lte-rrc-hfarr.c ---*/
-#line 3215 "./asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 3216 "./asn1/lte-rrc/packet-lte-rrc-template.c"
{ &hf_lte_rrc_eutra_cap_feat_group_ind_1,
{ "Indicator 1", "lte-rrc.eutra_cap_feat_group_ind_1",
@@ -90676,7 +90677,7 @@ void proto_register_lte_rrc(void) {
&ett_lte_rrc_UE_TimersAndConstants_NB_r13,
/*--- End of included file: packet-lte-rrc-ettarr.c ---*/
-#line 3942 "./asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 3943 "./asn1/lte-rrc/packet-lte-rrc-template.c"
&ett_lte_rrc_featureGroupIndicators,
&ett_lte_rrc_featureGroupIndRel9Add,
@@ -90723,7 +90724,7 @@ void proto_register_lte_rrc(void) {
proto_lte_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME);
/* These entry points will first create an lte_rrc root node */
- register_dissector("lte_rrc.dl_ccch", dissect_lte_rrc_DL_CCCH, proto_lte_rrc);
+ lte_rrc_dl_ccch_handle = register_dissector("lte_rrc.dl_ccch", dissect_lte_rrc_DL_CCCH, proto_lte_rrc);
register_dissector("lte_rrc.dl_dcch", dissect_lte_rrc_DL_DCCH, proto_lte_rrc);
register_dissector("lte_rrc.ul_ccch", dissect_lte_rrc_UL_CCCH, proto_lte_rrc);
register_dissector("lte_rrc.ul_dcch", dissect_lte_rrc_UL_DCCH, proto_lte_rrc);
@@ -90776,7 +90777,7 @@ void proto_register_lte_rrc(void) {
/*--- End of included file: packet-lte-rrc-dis-reg.c ---*/
-#line 4016 "./asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 4017 "./asn1/lte-rrc/packet-lte-rrc-template.c"
register_init_routine(&lte_rrc_init_protocol);
register_cleanup_routine(&lte_rrc_cleanup_protocol);
@@ -90787,9 +90788,6 @@ void proto_register_lte_rrc(void) {
void
proto_reg_handoff_lte_rrc(void)
{
- static dissector_handle_t lte_rrc_dl_ccch_handle;
-
- lte_rrc_dl_ccch_handle = find_dissector("lte_rrc.dl_ccch");
dissector_add_for_decode_as_with_preference("udp.port", lte_rrc_dl_ccch_handle);
nas_eps_handle = find_dissector("nas-eps");
rrc_irat_ho_to_utran_cmd_handle = find_dissector("rrc.irat.ho_to_utran_cmd");
diff --git a/epan/dissectors/packet-lwm.c b/epan/dissectors/packet-lwm.c
index 1bbc38c3de..453416d4cd 100644
--- a/epan/dissectors/packet-lwm.c
+++ b/epan/dissectors/packet-lwm.c
@@ -149,6 +149,8 @@ static expert_field ei_lwm_empty_payload = EI_INIT;
static expert_field ei_lwm_no_decryption_key = EI_INIT;
static expert_field ei_lwm_decryption_failed = EI_INIT;
+static dissector_handle_t lwm_handle;
+
static const value_string lwm_cmd_names[] = {
{ LWM_CMD_ACK, "LwMesh ACK" },
{ LWM_CMD_ROUTE_ERR, "Route Error" },
@@ -905,7 +907,7 @@ void proto_register_lwm(void)
"128-bit decryption key in hexadecimal format", (const char **)&lwmes_key_str);
/* Register dissector with Wireshark. */
- register_dissector("lwm", dissect_lwm, proto_lwm);
+ lwm_handle = register_dissector("lwm", dissect_lwm, proto_lwm);
} /* proto_register_lwm */
@@ -937,7 +939,7 @@ void proto_reg_handoff_lwm(void)
/* Register our dissector with IEEE 802.15.4 */
- dissector_add_for_decode_as(IEEE802154_PROTOABBREV_WPAN_PANID, find_dissector("lwm"));
+ dissector_add_for_decode_as(IEEE802154_PROTOABBREV_WPAN_PANID, lwm_handle);
heur_dissector_add(IEEE802154_PROTOABBREV_WPAN, dissect_lwm_heur, "Lightweight Mesh over IEEE 802.15.4", "lwm_wlan", proto_lwm, HEURISTIC_ENABLE);
} /* proto_reg_handoff_lwm */
diff --git a/epan/dissectors/packet-m2pa.c b/epan/dissectors/packet-m2pa.c
index 6edfc8564c..36d3bd767c 100644
--- a/epan/dissectors/packet-m2pa.c
+++ b/epan/dissectors/packet-m2pa.c
@@ -77,6 +77,7 @@ static gint ett_m2pa_li = -1;
static expert_field ei_undecode_data = EI_INIT;
static expert_field ei_length = EI_INIT;
+static dissector_handle_t m2pa_handle;
static dissector_handle_t mtp3_handle;
typedef enum {
@@ -576,7 +577,7 @@ proto_register_m2pa(void)
expert_register_field_array(expert_m2pa, ei, array_length(ei));
/* Allow other dissectors to find this one by name. */
- register_dissector("m2pa", dissect_m2pa, proto_m2pa);
+ m2pa_handle = register_dissector("m2pa", dissect_m2pa, proto_m2pa);
m2pa_module = prefs_register_protocol(proto_m2pa, proto_reg_handoff_m2pa);
@@ -588,12 +589,10 @@ void
proto_reg_handoff_m2pa(void)
{
static gboolean prefs_initialized = FALSE;
- static dissector_handle_t m2pa_handle;
static guint sctp_port;
/* Port preferences code shamelessly copied from packet-beep.c */
if (!prefs_initialized) {
- m2pa_handle = find_dissector("m2pa");
mtp3_handle = find_dissector_add_dependency("mtp3", proto_m2pa);
dissector_add_uint("sctp.ppi", M2PA_PAYLOAD_PROTOCOL_ID, m2pa_handle);
diff --git a/epan/dissectors/packet-m3ua.c b/epan/dissectors/packet-m3ua.c
index e9d2cb1463..cfe7eaa04f 100644
--- a/epan/dissectors/packet-m3ua.c
+++ b/epan/dissectors/packet-m3ua.c
@@ -312,6 +312,7 @@ static gint ett_q708_dpc = -1;
static module_t *m3ua_module;
static dissector_handle_t mtp3_handle;
+static dissector_handle_t m3ua_handle;
static dissector_table_t si_dissector_table;
static int ss7pc_address_type = -1;
@@ -2135,7 +2136,7 @@ proto_register_m3ua(void)
/* Register the protocol name and description */
proto_m3ua = proto_register_protocol("MTP 3 User Adaptation Layer", "M3UA", "m3ua");
- register_dissector("m3ua", dissect_m3ua, proto_m3ua);
+ m3ua_handle = register_dissector("m3ua", dissect_m3ua, proto_m3ua);
m3ua_module = prefs_register_protocol(proto_m3ua, NULL);
prefs_register_enum_preference(m3ua_module, "version", "M3UA Version", "Version used by Wireshark", &version, options, FALSE);
@@ -2151,13 +2152,11 @@ proto_register_m3ua(void)
void
proto_reg_handoff_m3ua(void)
{
- dissector_handle_t m3ua_handle;
/*
* Get a handle for the MTP3 dissector.
*/
mtp3_handle = find_dissector_add_dependency("mtp3", proto_m3ua);
- m3ua_handle = find_dissector("m3ua");
dissector_add_uint("sctp.ppi", M3UA_PAYLOAD_PROTOCOL_ID, m3ua_handle);
dissector_add_uint("sctp.port", SCTP_PORT_M3UA, m3ua_handle);
diff --git a/epan/dissectors/packet-mbim.c b/epan/dissectors/packet-mbim.c
index b481c1ff2c..e7bae38a5c 100644
--- a/epan/dissectors/packet-mbim.c
+++ b/epan/dissectors/packet-mbim.c
@@ -747,6 +747,7 @@ static dissector_handle_t eth_handle;
static dissector_handle_t eth_fcs_handle;
static dissector_handle_t ip_handle;
static dissector_handle_t data_handle;
+static dissector_handle_t mbim_control_handle;
static gboolean mbim_control_decode_unknown_itf = FALSE;
@@ -9567,7 +9568,7 @@ proto_register_mbim(void)
register_init_routine(mbim_reassembly_init);
register_cleanup_routine(mbim_reassembly_cleanup);
- register_dissector("mbim.control", dissect_mbim_control, proto_mbim);
+ mbim_control_handle = register_dissector("mbim.control", dissect_mbim_control, proto_mbim);
register_dissector("mbim.descriptor", dissect_mbim_descriptor, proto_mbim);
register_dissector("mbim.bulk", dissect_mbim_bulk, proto_mbim);
dss_dissector_table = register_dissector_table("mbim.dss_session_id",
@@ -9608,7 +9609,6 @@ proto_reg_handoff_mbim(void)
initialized = TRUE;
}
if (mbim_control_decode_unknown_itf != mbim_control_decode_unknown_itf_prev) {
- dissector_handle_t mbim_control_handle = find_dissector("mbim.control");
if (mbim_control_decode_unknown_itf) {
dissector_add_uint("usb.control", IF_CLASS_UNKNOWN, mbim_control_handle);
} else {
diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c
index 2ac8570baf..ae55aafb24 100644
--- a/epan/dissectors/packet-megaco.c
+++ b/epan/dissectors/packet-megaco.c
@@ -3787,7 +3787,7 @@ proto_register_megaco(void)
proto_megaco = proto_register_protocol("MEGACO", "MEGACO", "megaco");
- register_dissector("megaco", dissect_megaco_text, proto_megaco);
+ megaco_text_handle = register_dissector("megaco", dissect_megaco_text, proto_megaco);
proto_register_field_array(proto_megaco, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -3875,7 +3875,6 @@ proto_reg_handoff_megaco(void)
h248_otp_handle = find_dissector_add_dependency("h248_otp", proto_megaco);
data_handle = find_dissector("data");
- megaco_text_handle = find_dissector("megaco");
megaco_text_tcp_handle = create_dissector_handle(dissect_megaco_text_tcp, proto_megaco);
dissector_add_uint_with_preference("tcp.port", PORT_MEGACO_TXT, megaco_text_tcp_handle);
diff --git a/epan/dissectors/packet-mime-encap.c b/epan/dissectors/packet-mime-encap.c
index ea6b009a1f..9d056c4d12 100644
--- a/epan/dissectors/packet-mime-encap.c
+++ b/epan/dissectors/packet-mime-encap.c
@@ -30,6 +30,8 @@ void proto_reg_handoff_mime_encap(void);
static int proto_mime_encap = -1;
+static dissector_handle_t mime_encap_handle;
+
static heur_dissector_list_t heur_subdissector_list;
static int
@@ -55,16 +57,13 @@ proto_register_mime_encap(void)
{
proto_mime_encap = proto_register_protocol("MIME file", "MIME_FILE", "mime_dlt");
- register_dissector("mime_dlt", dissect_mime_encap, proto_mime_encap);
+ mime_encap_handle = register_dissector("mime_dlt", dissect_mime_encap, proto_mime_encap);
heur_subdissector_list = register_heur_dissector_list("wtap_file", proto_mime_encap);
}
void
proto_reg_handoff_mime_encap(void)
{
- dissector_handle_t mime_encap_handle;
-
- mime_encap_handle = find_dissector("mime_dlt");
dissector_add_uint("wtap_encap", WTAP_ENCAP_MIME, mime_encap_handle);
}
diff --git a/epan/dissectors/packet-miop.c b/epan/dissectors/packet-miop.c
index 7d3985c4f4..5158bba066 100644
--- a/epan/dissectors/packet-miop.c
+++ b/epan/dissectors/packet-miop.c
@@ -81,6 +81,8 @@ static gint ett_miop = -1;
static expert_field ei_miop_version_not_supported = EI_INIT;
static expert_field ei_miop_unique_id_len_exceed_max_value = EI_INIT;
+static dissector_handle_t miop_handle;
+
#define MIOP_MAGIC 0x4d494f50 /* "MIOP" */
static gboolean
@@ -306,16 +308,13 @@ void proto_register_miop (void) {
expert_miop = expert_register_protocol(proto_miop);
expert_register_field_array(expert_miop, ei, array_length(ei));
- register_dissector("miop", dissect_miop, proto_miop);
+ miop_handle = register_dissector("miop", dissect_miop, proto_miop);
}
void proto_reg_handoff_miop (void) {
- dissector_handle_t miop_handle;
-
- miop_handle = find_dissector("miop");
dissector_add_for_decode_as_with_preference("udp.port", miop_handle);
heur_dissector_add("udp", dissect_miop_heur, "MIOP over UDP", "miop_udp", proto_miop, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-mip.c b/epan/dissectors/packet-mip.c
index 810b81b6f0..a7da39040a 100644
--- a/epan/dissectors/packet-mip.c
+++ b/epan/dissectors/packet-mip.c
@@ -134,6 +134,8 @@ static gint ett_mip_pmipv4_ext = -1;
static expert_field ei_mip_data_not_dissected = EI_INIT;
+static dissector_handle_t mip_handle;
+
/* Port used for Mobile IP */
#define UDP_PORT_MIP 434
@@ -1462,7 +1464,7 @@ void proto_register_mip(void)
proto_mip = proto_register_protocol("Mobile IP", "Mobile IP", "mip");
/* Register the dissector by name */
- register_dissector("mip", dissect_mip, proto_mip);
+ mip_handle = register_dissector("mip", dissect_mip, proto_mip);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_mip, hf, array_length(hf));
@@ -1477,9 +1479,6 @@ void proto_register_mip(void)
void
proto_reg_handoff_mip(void)
{
- dissector_handle_t mip_handle;
-
- mip_handle = find_dissector("mip");
ip_handle = find_dissector_add_dependency("ip", proto_mip);
dissector_add_uint_with_preference("udp.port", UDP_PORT_MIP, mip_handle);
diff --git a/epan/dissectors/packet-mp4ves.c b/epan/dissectors/packet-mp4ves.c
index d86db9ad8a..5d555fbc30 100644
--- a/epan/dissectors/packet-mp4ves.c
+++ b/epan/dissectors/packet-mp4ves.c
@@ -67,10 +67,13 @@ static int ett_mp4ves_config = -1;
static expert_field ei_mp4ves_config_too_short = EI_INIT;
static expert_field ei_mp4ves_not_dissected_bits = EI_INIT;
+static dissector_handle_t mp4ves_name_handle;
+
/* The dynamic payload type which will be dissected as MP4V-ES */
static guint global_dynamic_payload_type = 0;
+static dissector_handle_t mp4ves_handle;
/*
14496-2, Annex G, Table G-1.
@@ -1017,7 +1020,7 @@ proto_register_mp4ves(void)
expert_register_field_array(expert_mp4ves, ei, array_length(ei));
/* Register a configuration option for port */
- register_dissector("mp4ves", dissect_mp4ves, proto_mp4ves);
+ mp4ves_handle = register_dissector("mp4ves", dissect_mp4ves, proto_mp4ves);
register_dissector("mp4ves_config", dissect_mp4ves_config, proto_mp4ves);
/* Register a configuration option for port */
@@ -1035,15 +1038,12 @@ proto_register_mp4ves(void)
void
proto_reg_handoff_mp4ves(void)
{
- static dissector_handle_t mp4ves_handle;
static guint dynamic_payload_type;
static gboolean mp4ves_prefs_initialized = FALSE;
if (!mp4ves_prefs_initialized) {
- dissector_handle_t mp4ves_name_handle;
mp4ves_capability_t *ftr;
- mp4ves_handle = find_dissector("mp4ves");
dissector_add_string("rtp_dyn_payload_type","MP4V-ES", mp4ves_handle);
mp4ves_prefs_initialized = TRUE;
diff --git a/epan/dissectors/packet-mpeg-pmt.c b/epan/dissectors/packet-mpeg-pmt.c
index 73d329c898..793a4dacbe 100644
--- a/epan/dissectors/packet-mpeg-pmt.c
+++ b/epan/dissectors/packet-mpeg-pmt.c
@@ -52,6 +52,8 @@ static int hf_mpeg_pmt_stream_es_info_length = -1;
static gint ett_mpeg_pmt = -1;
static gint ett_mpeg_pmt_stream = -1;
+static dissector_handle_t mpeg_pmt_handle;
+
#define MPEG_PMT_RESERVED1_MASK 0xC0
#define MPEG_PMT_VERSION_NUMBER_MASK 0x3E
#define MPEG_PMT_CURRENT_NEXT_INDICATOR_MASK 0x01
@@ -286,17 +288,13 @@ proto_register_mpeg_pmt(void)
proto_register_field_array(proto_mpeg_pmt, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("mpeg_pmt", dissect_mpeg_pmt, proto_mpeg_pmt);
+ mpeg_pmt_handle = register_dissector("mpeg_pmt", dissect_mpeg_pmt, proto_mpeg_pmt);
}
void
proto_reg_handoff_mpeg_pmt(void)
{
- dissector_handle_t mpeg_pmt_handle;
-
- mpeg_pmt_handle = find_dissector("mpeg_pmt");
-
dissector_add_uint("mpeg_sect.tid", MPEG_PMT_TID, mpeg_pmt_handle);
}
diff --git a/epan/dissectors/packet-mpls-y1711.c b/epan/dissectors/packet-mpls-y1711.c
index 0937890f4d..ee350e3b2c 100644
--- a/epan/dissectors/packet-mpls-y1711.c
+++ b/epan/dissectors/packet-mpls-y1711.c
@@ -397,13 +397,12 @@ proto_register_mpls_y1711(void)
proto_register_subtree_array(ett, array_length(ett));
expert_mpls_y1711 = expert_register_protocol(proto_mpls_y1711);
expert_register_field_array(expert_mpls_y1711, ei, array_length(ei));
- register_dissector("mpls_y1711", dissect_mpls_y1711, proto_mpls_y1711);
+ mpls_y1711_handle = register_dissector("mpls_y1711", dissect_mpls_y1711, proto_mpls_y1711);
}
void
proto_reg_handoff_mpls_y1711(void)
{
- mpls_y1711_handle = find_dissector("mpls_y1711");
dissector_add_uint("mpls.label",
MPLS_LABEL_OAM_ALERT /* 14 */,
mpls_y1711_handle);
diff --git a/epan/dissectors/packet-mpls.c b/epan/dissectors/packet-mpls.c
index 3ae0761d9d..54dc835de5 100644
--- a/epan/dissectors/packet-mpls.c
+++ b/epan/dissectors/packet-mpls.c
@@ -120,6 +120,8 @@ static expert_field ei_mpls_pw_ach_res = EI_INIT;
static expert_field ei_mpls_pw_mcw_error_processing_message = EI_INIT;
static expert_field ei_mpls_invalid_label = EI_INIT;
+static dissector_handle_t mpls_handle;
+
#if 0 /*not used yet*/
/*
* MPLS PW types
@@ -599,7 +601,7 @@ proto_register_mpls(void)
expert_mpls = expert_register_protocol(proto_mpls);
expert_register_field_array(expert_mpls, ei, array_length(ei));
- register_dissector("mpls", dissect_mpls, proto_mpls);
+ mpls_handle = register_dissector("mpls", dissect_mpls, proto_mpls);
/* FF: mpls subdissector table is indexed by label */
mpls_subdissector_table = register_dissector_table("mpls.label",
@@ -626,9 +628,8 @@ proto_register_mpls(void)
void
proto_reg_handoff_mpls(void)
{
- dissector_handle_t mpls_handle, mpls_pwcw_handle;
+ dissector_handle_t mpls_pwcw_handle;
- mpls_handle = find_dissector("mpls");
dissector_add_uint("ethertype", ETHERTYPE_MPLS, mpls_handle);
dissector_add_uint("ethertype", ETHERTYPE_MPLS_MULTI, mpls_handle);
dissector_add_uint("ppp.protocol", PPP_MPLS_UNI, mpls_handle);
diff --git a/epan/dissectors/packet-ms-mms.c b/epan/dissectors/packet-ms-mms.c
index c21361ba01..447ced8888 100644
--- a/epan/dissectors/packet-ms-mms.c
+++ b/epan/dissectors/packet-ms-mms.c
@@ -1873,12 +1873,11 @@ void proto_register_msmms(void)
proto_msmms = proto_register_protocol("Microsoft Media Server", "MSMMS", "msmms");
proto_register_field_array(proto_msmms, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("msmms", dissect_msmms_pdu, proto_msmms);
+ msmms_handle = register_dissector("msmms", dissect_msmms_pdu, proto_msmms);
}
void proto_reg_handoff_msmms_command(void)
{
- msmms_handle = find_dissector("msmms");
/* Control commands using TCP port */
dissector_add_uint_with_preference("tcp.port", MSMMS_PORT, msmms_handle);
/* Data command(s) using UDP port */
diff --git a/epan/dissectors/packet-msrp.c b/epan/dissectors/packet-msrp.c
index a0ae6ef54e..5f252ef03c 100644
--- a/epan/dissectors/packet-msrp.c
+++ b/epan/dissectors/packet-msrp.c
@@ -931,7 +931,7 @@ proto_register_msrp(void)
* Register the dissector by name, so other dissectors can
* grab it by name rather than just referring to it directly.
*/
- register_dissector("msrp", dissect_msrp, proto_msrp);
+ msrp_handle = register_dissector("msrp", dissect_msrp, proto_msrp);
expert_msrp = expert_register_protocol(proto_msrp);
expert_register_field_array(expert_msrp, ei, array_length(ei));
@@ -942,7 +942,6 @@ proto_register_msrp(void)
void
proto_reg_handoff_msrp(void)
{
- msrp_handle = find_dissector("msrp");
heur_dissector_add("tcp", dissect_msrp_heur, "MSRP over TCP", "msrp_tcp", proto_msrp, HEURISTIC_ENABLE);
dissector_add_uint_with_preference("tcp.port", TCP_PORT_MSRP, msrp_handle);
media_type_dissector_table = find_dissector_table("media_type");
diff --git a/epan/dissectors/packet-mstp.c b/epan/dissectors/packet-mstp.c
index b64831da22..eafe3d097d 100644
--- a/epan/dissectors/packet-mstp.c
+++ b/epan/dissectors/packet-mstp.c
@@ -93,6 +93,8 @@ static expert_field ei_mstp_frame_checksum_bad = EI_INIT;
static int mstp_address_type = -1;
+static dissector_handle_t mstp_handle;
+
#if defined(BACNET_MSTP_CHECKSUM_VALIDATE)
/* Accumulate "dataValue" into the CRC in crcValue. */
/* Return value is updated CRC */
@@ -394,7 +396,7 @@ proto_register_mstp(void)
expert_mstp = expert_register_protocol(proto_mstp);
expert_register_field_array(expert_mstp, ei, array_length(ei));
- register_dissector("mstp", dissect_mstp_wtap, proto_mstp);
+ mstp_handle = register_dissector("mstp", dissect_mstp_wtap, proto_mstp);
subdissector_table = register_dissector_table("mstp.vendor_frame_type",
"MSTP Vendor specific Frametypes", proto_mstp, FT_UINT24, BASE_DEC);
@@ -406,10 +408,8 @@ proto_register_mstp(void)
void
proto_reg_handoff_mstp(void)
{
- dissector_handle_t mstp_handle;
dissector_handle_t bacnet_handle;
- mstp_handle = find_dissector("mstp");
dissector_add_uint("wtap_encap", WTAP_ENCAP_BACNET_MS_TP, mstp_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_BACNET_MS_TP_WITH_PHDR, mstp_handle);
diff --git a/epan/dissectors/packet-mtp3mg.c b/epan/dissectors/packet-mtp3mg.c
index bcdec14976..9c115ccf11 100644
--- a/epan/dissectors/packet-mtp3mg.c
+++ b/epan/dissectors/packet-mtp3mg.c
@@ -428,6 +428,8 @@ static gint ett_mtp3mg_upu_apc = -1;
static expert_field ei_mtp3mg_unknown_message = EI_INIT;
+static dissector_handle_t mtp3mg_handle;
+
static void
dissect_mtp3mg_unknown_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
@@ -1399,7 +1401,7 @@ proto_register_mtp3mg(void)
/* Register the protocol name and description */
proto_mtp3mg = proto_register_protocol("Message Transfer Part Level 3 Management",
"MTP3MG", "mtp3mg");
- register_dissector("mtp3mg", dissect_mtp3mg, proto_mtp3mg);
+ mtp3mg_handle = register_dissector("mtp3mg", dissect_mtp3mg, proto_mtp3mg);
/* Required calls to register the header fields and subtrees used */
proto_register_field_array(proto_mtp3mg, hf, array_length(hf));
@@ -1412,10 +1414,6 @@ proto_register_mtp3mg(void)
void
proto_reg_handoff_mtp3mg(void)
{
- dissector_handle_t mtp3mg_handle;
-
- mtp3mg_handle = find_dissector("mtp3mg");
-
dissector_add_uint("mtp3.service_indicator", MTP_SI_SNM, mtp3mg_handle);
/* SI 1 is unused in ANSI and SI 2 is unused in ITU, so it's okay for us
diff --git a/epan/dissectors/packet-ndp.c b/epan/dissectors/packet-ndp.c
index d910f57863..d2b4eaf7c3 100644
--- a/epan/dissectors/packet-ndp.c
+++ b/epan/dissectors/packet-ndp.c
@@ -264,6 +264,7 @@ static int hf_ndp_number_of_links = -1;
static gint ett_ndp = -1;
+static dissector_handle_t ndp_handle;
static int
dissect_ndp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -363,16 +364,12 @@ proto_register_ndp(void)
proto_register_field_array(proto_ndp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("ndp", dissect_ndp, proto_ndp);
+ ndp_handle = register_dissector("ndp", dissect_ndp, proto_ndp);
}
void
proto_reg_handoff_ndp(void)
{
- dissector_handle_t ndp_handle;
-
- ndp_handle = find_dissector("ndp");
-
dissector_add_uint("llc.nortel_pid", 0x01a1, ndp_handle); /* flatnet hello */
dissector_add_uint("llc.nortel_pid", 0x01a2, ndp_handle); /* Segment hello */
/* not got round to adding this but it's really old, so I'm not sure people will see it */
diff --git a/epan/dissectors/packet-negoex.c b/epan/dissectors/packet-negoex.c
index 0052c509a0..8632846f8e 100644
--- a/epan/dissectors/packet-negoex.c
+++ b/epan/dissectors/packet-negoex.c
@@ -75,6 +75,8 @@ static gint ett_negoex_checksum = -1;
static gint ett_negoex_checksum_vector = -1;
static gint ett_negoex_byte_vector = -1;
+static dissector_handle_t negoex_handle;
+
/* If you add more message types, add them in sequence and update MAX_MSG */
#define MESSAGE_TYPE_INITIATOR_NEGO 0
#define MESSAGE_TYPE_ACCEPTOR_NEGO 1
@@ -618,17 +620,14 @@ proto_register_negoex(void)
/* negoex_module = prefs_register_protocol(proto_negoex, NULL);*/
- register_dissector("negoex", dissect_negoex, proto_negoex);
+ negoex_handle = register_dissector("negoex", dissect_negoex, proto_negoex);
}
void
proto_reg_handoff_negoex(void)
{
- dissector_handle_t negoex_handle;
/* Register protocol with the GSS-API module */
-
- negoex_handle = find_dissector("negoex");
gssapi_init_oid("1.3.6.1.4.1.311.2.2.30", proto_negoex, ett_negoex,
negoex_handle, NULL,
"NEGOEX - SPNEGO Extended Negotiation Security Mechanism");
diff --git a/epan/dissectors/packet-newmail.c b/epan/dissectors/packet-newmail.c
index 0cf16a599a..6fd65bf4dd 100644
--- a/epan/dissectors/packet-newmail.c
+++ b/epan/dissectors/packet-newmail.c
@@ -35,6 +35,8 @@ static int hf_newmail_payload = -1;
/* Initialize the subtree pointers */
static gint ett_newmail = -1;
+static dissector_handle_t newmail_handle;
+
/* Code to actually dissect the packets */
static int
dissect_newmail(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -84,15 +86,12 @@ proto_register_newmail(void)
proto_register_field_array(proto_newmail, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("newmail", dissect_newmail, proto_newmail);
+ newmail_handle = register_dissector("newmail", dissect_newmail, proto_newmail);
}
void
proto_reg_handoff_newmail(void)
{
- dissector_handle_t newmail_handle;
-
- newmail_handle = find_dissector("newmail");
dissector_add_for_decode_as_with_preference("udp.port", newmail_handle);
}
diff --git a/epan/dissectors/packet-nflog.c b/epan/dissectors/packet-nflog.c
index 6de5efc6ad..1d19b840f1 100644
--- a/epan/dissectors/packet-nflog.c
+++ b/epan/dissectors/packet-nflog.c
@@ -141,6 +141,7 @@ static header_field_info hfi_nflog_tlv_unknown NFLOG_HFI_INIT =
static dissector_handle_t ip_handle;
static dissector_handle_t ip6_handle;
static dissector_table_t ethertype_table;
+static dissector_handle_t nflog_handle;
static int
dissect_nflog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -357,7 +358,7 @@ proto_register_nflog(void)
proto_nflog = proto_register_protocol("Linux Netfilter NFLOG", "NFLOG", "nflog");
hfi_nflog = proto_registrar_get_nth(proto_nflog);
- register_dissector("nflog", dissect_nflog, proto_nflog);
+ nflog_handle = register_dissector("nflog", dissect_nflog, proto_nflog);
proto_register_fields(proto_nflog, hfi, array_length(hfi));
proto_register_subtree_array(ett, array_length(ett));
@@ -367,12 +368,9 @@ proto_register_nflog(void)
void
proto_reg_handoff_nflog(void)
{
- dissector_handle_t nflog_handle;
-
ip_handle = find_dissector_add_dependency("ip", hfi_nflog->id);
ip6_handle = find_dissector_add_dependency("ipv6", hfi_nflog->id);
- nflog_handle = find_dissector("nflog");
dissector_add_uint("wtap_encap", WTAP_ENCAP_NFLOG, nflog_handle);
ethertype_table = find_dissector_table("ethertype");
}
diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c
index 8ca4c2820c..dcf9a3daab 100644
--- a/epan/dissectors/packet-ntlmssp.c
+++ b/epan/dissectors/packet-ntlmssp.c
@@ -273,6 +273,8 @@ static expert_field ei_ntlmssp_blob_len_too_long = EI_INIT;
static expert_field ei_ntlmssp_target_info_attr = EI_INIT;
static expert_field ei_ntlmssp_message_type = EI_INIT;
+static dissector_handle_t ntlmssp_handle, ntlmssp_wrap_handle;
+
/* Configuration variables */
const char *gbl_nt_password = NULL;
@@ -3277,8 +3279,8 @@ proto_register_ntlmssp(void)
"NT Password (used to decrypt payloads)",
&gbl_nt_password);
- register_dissector("ntlmssp", dissect_ntlmssp, proto_ntlmssp);
- register_dissector("ntlmssp_payload", dissect_ntlmssp_payload, proto_ntlmssp);
+ ntlmssp_handle = register_dissector("ntlmssp", dissect_ntlmssp, proto_ntlmssp);
+ ntlmssp_wrap_handle = register_dissector("ntlmssp_payload", dissect_ntlmssp_payload, proto_ntlmssp);
register_dissector("ntlmssp_data_only", dissect_ntlmssp_payload_only, proto_ntlmssp);
register_dissector("ntlmssp_verf", dissect_ntlmssp_verf, proto_ntlmssp);
}
@@ -3286,12 +3288,8 @@ proto_register_ntlmssp(void)
void
proto_reg_handoff_ntlmssp(void)
{
- dissector_handle_t ntlmssp_handle, ntlmssp_wrap_handle;
-
/* Register protocol with the GSS-API module */
- ntlmssp_handle = find_dissector("ntlmssp");
- ntlmssp_wrap_handle = find_dissector("ntlmssp_verf");
gssapi_init_oid("1.3.6.1.4.1.311.2.2.10", proto_ntlmssp, ett_ntlmssp,
ntlmssp_handle, ntlmssp_wrap_handle,
"NTLMSSP - Microsoft NTLM Security Support Provider");
diff --git a/epan/dissectors/packet-opensafety.c b/epan/dissectors/packet-opensafety.c
index 36a293ae5e..d3162cdc8b 100644
--- a/epan/dissectors/packet-opensafety.c
+++ b/epan/dissectors/packet-opensafety.c
@@ -256,6 +256,9 @@ static const fragment_items oss_frag_items = {
static const char *global_scm_udid = "00:00:00:00:00:00";
static dissector_handle_t data_dissector = NULL;
+static dissector_handle_t opensafety_udpdata_handle = NULL;
+static dissector_handle_t opensafety_mbtcp_handle = NULL;
+static dissector_handle_t opensafety_pnio_handle = NULL;
static gboolean global_display_intergap_data = FALSE;
static gboolean global_scm_udid_autoset = TRUE;
@@ -2403,23 +2406,18 @@ dissect_opensafety_udpdata(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree
static void
apply_prefs ( void )
{
- static dissector_handle_t opensafety_udpdata_handle = NULL;
static guint opensafety_udp_port_number;
static guint opensafety_udp_siii_port_number;
static gboolean opensafety_init = FALSE;
/* It only should delete dissectors, if run for any time except the first */
- if ( !opensafety_init )
- {
- opensafety_udpdata_handle = find_dissector("opensafety_udpdata");
- opensafety_init = TRUE;
- }
- else
+ if ( opensafety_init )
{
/* Delete dissectors in preparation of a changed config setting */
dissector_delete_uint ("udp.port", opensafety_udp_port_number, opensafety_udpdata_handle);
dissector_delete_uint ("udp.port", opensafety_udp_siii_port_number, opensafety_udpdata_handle);
}
+ opensafety_init = TRUE;
/* Storing the port numbers locally, to being able to delete the old associations */
opensafety_udp_port_number = global_network_udp_port;
@@ -2854,9 +2852,9 @@ proto_register_opensafety(void)
&global_classify_transport);
/* Registering default and ModBus/TCP dissector */
- register_dissector("opensafety_udpdata", dissect_opensafety_udpdata, proto_opensafety );
- register_dissector("opensafety_mbtcp", dissect_opensafety_mbtcp, proto_opensafety );
- register_dissector("opensafety_pnio", dissect_opensafety_pn_io, proto_opensafety);
+ opensafety_udpdata_handle = register_dissector("opensafety_udpdata", dissect_opensafety_udpdata, proto_opensafety );
+ opensafety_mbtcp_handle = register_dissector("opensafety_mbtcp", dissect_opensafety_mbtcp, proto_opensafety );
+ opensafety_pnio_handle = register_dissector("opensafety_pnio", dissect_opensafety_pn_io, proto_opensafety);
}
void
@@ -2875,7 +2873,7 @@ proto_reg_handoff_opensafety(void)
heur_dissector_add("opensafety_udp", dissect_opensafety_udpdata, "openSAFETY over UDP", "opensafety_udp", proto_opensafety, HEURISTIC_ENABLE);
/* Modbus TCP dissector registration */
- dissector_add_string("modbus.data", "data", find_dissector("opensafety_mbtcp"));
+ dissector_add_string("modbus.data", "data", opensafety_mbtcp_handle);
/* For Profinet we have to register as a heuristic dissector, as Profinet
* is implemented as a plugin, and therefore the heuristic dissector is not
@@ -2891,7 +2889,7 @@ proto_reg_handoff_opensafety(void)
* the ethernet subdissector list. No PNIO specific data will be dissected
* and a warning will be displayed, recognizing the missing dissector plugin.
*/
- dissector_add_uint("ethertype", ETHERTYPE_PROFINET, find_dissector("opensafety_pnio"));
+ dissector_add_uint("ethertype", ETHERTYPE_PROFINET, opensafety_pnio_handle);
}
apply_prefs();
diff --git a/epan/dissectors/packet-ositp.c b/epan/dissectors/packet-ositp.c
index 789e7fb73f..7f9f5e19ef 100644
--- a/epan/dissectors/packet-ositp.c
+++ b/epan/dissectors/packet-ositp.c
@@ -154,6 +154,8 @@ static const fragment_items cotp_frag_items = {
static dissector_handle_t rdp_cr_handle;
static dissector_handle_t rdp_cc_handle;
+static dissector_handle_t ositp_handle;
+
/*
* ISO8073 OSI COTP definition
@@ -2427,7 +2429,7 @@ void proto_register_cotp(void)
cotp_heur_subdissector_list = register_heur_dissector_list("cotp", proto_cotp);
/* XXX - what about CLTP and proto_cltp? */
- register_dissector("ositp", dissect_ositp, proto_cotp);
+ ositp_handle = register_dissector("ositp", dissect_ositp, proto_cotp);
register_dissector("ositp_inactive", dissect_ositp_inactive, proto_cotp);
register_init_routine(cotp_reassemble_init);
@@ -2458,9 +2460,6 @@ void proto_register_cltp(void)
void
proto_reg_handoff_cotp(void)
{
- dissector_handle_t ositp_handle;
-
- ositp_handle = find_dissector("ositp");
dissector_add_uint("ip.proto", IP_PROTO_TP, ositp_handle);
rdp_cr_handle = find_dissector("rdp_cr");
diff --git a/epan/dissectors/packet-pflog.c b/epan/dissectors/packet-pflog.c
index 7f97bb6a2c..eb5edce97d 100644
--- a/epan/dissectors/packet-pflog.c
+++ b/epan/dissectors/packet-pflog.c
@@ -528,9 +528,6 @@ proto_reg_handoff_old_pflog(void)
{
dissector_handle_t pflog_handle;
- ip_handle = find_dissector("ip");
- ipv6_handle = find_dissector("ipv6");
-
pflog_handle = create_dissector_handle(dissect_old_pflog, proto_old_pflog);
dissector_add_uint("wtap_encap", WTAP_ENCAP_OLD_PFLOG, pflog_handle);
}
diff --git a/epan/dissectors/packet-pop.c b/epan/dissectors/packet-pop.c
index 0add98c34b..9b9dd325b9 100644
--- a/epan/dissectors/packet-pop.c
+++ b/epan/dissectors/packet-pop.c
@@ -461,7 +461,7 @@ proto_register_pop(void)
proto_pop = proto_register_protocol("Post Office Protocol", "POP", "pop");
- register_dissector("pop", dissect_pop, proto_pop);
+ pop_handle = register_dissector("pop", dissect_pop, proto_pop);
proto_register_field_array(proto_pop, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_init_routine (&pop_data_reassemble_init);
@@ -483,7 +483,6 @@ proto_register_pop(void)
void
proto_reg_handoff_pop(void)
{
- pop_handle = find_dissector("pop");
dissector_add_uint_with_preference("tcp.port", TCP_PORT_POP, pop_handle);
ssl_dissector_add(TCP_PORT_SSL_POP, pop_handle);
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index b45a6881af..181b9eb9cd 100644
--- a/epan/dissectors/packet-ppp.c
+++ b/epan/dissectors/packet-ppp.c
@@ -331,6 +331,8 @@ static gint ett_bap_call_status_opt = -1;
static expert_field ei_bap_sub_option_length = EI_INIT;
+static dissector_handle_t ppp_hdlc_handle, ppp_handle;
+
static int proto_comp_data = -1;
#if 0 /* see dissect_comp_data() */
@@ -6018,9 +6020,9 @@ proto_register_ppp(void)
ppp_subdissector_table = register_dissector_table("ppp.protocol",
"PPP protocol", proto_ppp, FT_UINT16, BASE_HEX);
- register_dissector("ppp_hdlc", dissect_ppp_hdlc, proto_ppp);
+ ppp_hdlc_handle = register_dissector("ppp_hdlc", dissect_ppp_hdlc, proto_ppp);
register_dissector("ppp_lcp_options", dissect_lcp_options, proto_ppp);
- register_dissector("ppp", dissect_ppp, proto_ppp);
+ ppp_handle = register_dissector("ppp", dissect_ppp, proto_ppp);
/* Register the preferences for the ppp protocol */
ppp_module = prefs_register_protocol(proto_ppp, NULL);
@@ -6039,17 +6041,13 @@ proto_register_ppp(void)
void
proto_reg_handoff_ppp(void)
{
- dissector_handle_t ppp_hdlc_handle, ppp_handle;
-
/*
* Get a handle for the CHDLC dissector.
*/
chdlc_handle = find_dissector_add_dependency("chdlc", proto_ppp);
- ppp_handle = find_dissector("ppp");
dissector_add_uint("fr.nlpid", NLPID_PPP, ppp_handle);
- ppp_hdlc_handle = find_dissector("ppp_hdlc");
dissector_add_uint("wtap_encap", WTAP_ENCAP_PPP, ppp_hdlc_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_PPP_WITH_PHDR,
ppp_hdlc_handle);
diff --git a/epan/dissectors/packet-pw-atm.c b/epan/dissectors/packet-pw-atm.c
index 844b9248aa..c770a24a24 100644
--- a/epan/dissectors/packet-pw-atm.c
+++ b/epan/dissectors/packet-pw-atm.c
@@ -1902,9 +1902,9 @@ proto_register_pw_atm_ata(void)
proto_register_subtree_array(ett_array, array_length(ett_array));
- register_dissector("mpls_pw_atm_control_word" ,dissect_control_word ,proto_control_word);
- register_dissector("mpls_pw_atm_cell" ,dissect_cell ,proto_cell);
- register_dissector("mpls_pw_atm_cell_header",dissect_cell_header ,proto_cell_header);
+ dh_control_word = register_dissector("mpls_pw_atm_control_word" ,dissect_control_word ,proto_control_word);
+ dh_cell = register_dissector("mpls_pw_atm_cell" ,dissect_cell ,proto_cell);
+ dh_cell_header = register_dissector("mpls_pw_atm_cell_header",dissect_cell_header ,proto_cell_header);
{
static const char description_allow_cw_length_nonzero[] =
"Enable to allow non-zero Length in Control Word."
@@ -1964,9 +1964,6 @@ proto_reg_handoff_pw_atm_ata(void)
h = create_dissector_handle( dissect_aal5_sdu, proto_aal5_sdu );
dissector_add_for_decode_as( "mpls.label", h );
- dh_cell = find_dissector("mpls_pw_atm_cell");
- dh_cell_header = find_dissector("mpls_pw_atm_cell_header");
- dh_control_word = find_dissector("mpls_pw_atm_control_word");
dh_atm_truncated = find_dissector("atm_pw_truncated");
dh_atm_untruncated = find_dissector("atm_pw_untruncated");
dh_atm_oam_cell = find_dissector("atm_pw_oam_cell");
diff --git a/epan/dissectors/packet-pw-cesopsn.c b/epan/dissectors/packet-pw-cesopsn.c
index 5f581341c4..882e2c092a 100644
--- a/epan/dissectors/packet-pw-cesopsn.c
+++ b/epan/dissectors/packet-pw-cesopsn.c
@@ -63,6 +63,8 @@ static expert_field ei_cw_lm = EI_INIT;
static expert_field ei_packet_size_too_small = EI_INIT;
static dissector_handle_t pw_padding_handle;
+static dissector_handle_t pw_cesopsn_udp_handle;
+
const char pwc_longname_pw_cesopsn[] = "CESoPSN basic NxDS0 mode (no RTP support)";
static const char shortname[] = "CESoPSN basic (no RTP)";
@@ -443,7 +445,7 @@ void proto_register_pw_cesopsn(void)
proto_register_subtree_array(ett_array, array_length(ett_array));
expert_pwcesopsn = expert_register_protocol(proto);
expert_register_field_array(expert_pwcesopsn, ei, array_length(ei));
- register_dissector("pw_cesopsn_udp", dissect_pw_cesopsn_udp, proto);
+ pw_cesopsn_udp_handle = register_dissector("pw_cesopsn_udp", dissect_pw_cesopsn_udp, proto);
}
@@ -457,8 +459,7 @@ void proto_reg_handoff_pw_cesopsn(void)
pw_cesopsn_mpls_handle = create_dissector_handle( dissect_pw_cesopsn_mpls, proto );
dissector_add_for_decode_as("mpls.label", pw_cesopsn_mpls_handle);
- dissector_add_for_decode_as_with_preference("udp.port", find_dissector("pw_cesopsn_udp"));
- return;
+ dissector_add_for_decode_as_with_preference("udp.port", pw_cesopsn_udp_handle);
}
/*
diff --git a/epan/dissectors/packet-pw-eth.c b/epan/dissectors/packet-pw-eth.c
index 04057d3cbb..d157c0ce0a 100644
--- a/epan/dissectors/packet-pw-eth.c
+++ b/epan/dissectors/packet-pw-eth.c
@@ -47,6 +47,7 @@ static int hf_pw_eth_cw_sequence_number = -1;
static dissector_handle_t eth_withoutfcs_handle;
static dissector_handle_t pw_eth_handle_cw;
static dissector_handle_t pw_eth_handle_nocw;
+static dissector_handle_t pw_eth_handle_heuristic;
static int
dissect_pw_eth_cw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -192,15 +193,13 @@ proto_register_pw_eth(void)
"pwethheuristic");
proto_register_field_array(proto_pw_eth_cw, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("pw_eth_heuristic", dissect_pw_eth_heuristic,
+ pw_eth_handle_heuristic = register_dissector("pw_eth_heuristic", dissect_pw_eth_heuristic,
proto_pw_eth_heuristic);
}
void
proto_reg_handoff_pw_eth(void)
{
- dissector_handle_t pw_eth_handle_heuristic;
-
eth_withoutfcs_handle = find_dissector_add_dependency("eth_withoutfcs", proto_pw_eth_cw);
pw_eth_handle_cw = create_dissector_handle( dissect_pw_eth_cw, proto_pw_eth_cw );
@@ -209,7 +208,6 @@ proto_reg_handoff_pw_eth(void)
pw_eth_handle_nocw = create_dissector_handle( dissect_pw_eth_nocw, proto_pw_eth_nocw );
dissector_add_for_decode_as("mpls.label", pw_eth_handle_nocw);
- pw_eth_handle_heuristic = find_dissector("pw_eth_heuristic");
dissector_add_for_decode_as("mpls.label", pw_eth_handle_heuristic);
}
diff --git a/epan/dissectors/packet-pw-satop.c b/epan/dissectors/packet-pw-satop.c
index 5905bf9170..36802d95c8 100644
--- a/epan/dissectors/packet-pw-satop.c
+++ b/epan/dissectors/packet-pw-satop.c
@@ -62,6 +62,8 @@ static expert_field ei_cw_bits03 = EI_INIT;
static expert_field ei_cw_packet_size_too_small = EI_INIT;
static dissector_handle_t pw_padding_handle;
+static dissector_handle_t pw_satop_udp_handle;
+
const char pwc_longname_pw_satop[] = "SAToP (no RTP support)";
static const char shortname[] = "SAToP (no RTP)";
@@ -459,8 +461,7 @@ void proto_register_pw_satop(void)
proto_register_subtree_array(ett_array, array_length(ett_array));
expert_pwsatop = expert_register_protocol(proto);
expert_register_field_array(expert_pwsatop, ei, array_length(ei));
- register_dissector("pw_satop_udp", dissect_pw_satop_udp, proto);
- return;
+ pw_satop_udp_handle = register_dissector("pw_satop_udp", dissect_pw_satop_udp, proto);
}
void proto_reg_handoff_pw_satop(void)
@@ -473,7 +474,7 @@ void proto_reg_handoff_pw_satop(void)
pw_satop_mpls_handle = create_dissector_handle( dissect_pw_satop_mpls, proto );
dissector_add_for_decode_as("mpls.label", pw_satop_mpls_handle);
- dissector_add_for_decode_as_with_preference("udp.port", find_dissector("pw_satop_udp"));
+ dissector_add_for_decode_as_with_preference("udp.port", pw_satop_udp_handle);
}
/*
diff --git a/epan/dissectors/packet-q933.c b/epan/dissectors/packet-q933.c
index d7a3f89350..7fbf6c1db9 100644
--- a/epan/dissectors/packet-q933.c
+++ b/epan/dissectors/packet-q933.c
@@ -142,6 +142,8 @@ static gint ett_q933_ie = -1;
static expert_field ei_q933_invalid_length = EI_INIT;
static expert_field ei_q933_information_element = EI_INIT;
+static dissector_handle_t q933_handle;
+
/*
* Q.933 message types.
*/
@@ -2231,15 +2233,12 @@ proto_register_q933(void)
expert_q933 = expert_register_protocol(proto_q933);
expert_register_field_array(expert_q933, ei, array_length(ei));
- register_dissector("q933", dissect_q933, proto_q933);
+ q933_handle = register_dissector("q933", dissect_q933, proto_q933);
}
void
proto_reg_handoff_q933(void)
{
- dissector_handle_t q933_handle;
-
- q933_handle = find_dissector("q933");
dissector_add_uint("fr.osinl", NLPID_Q_933, q933_handle);
dissector_add_uint("juniper.proto", JUNIPER_PROTO_Q933, q933_handle);
}
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c
index 9e609a212a..ffd3db1679 100644
--- a/epan/dissectors/packet-radius.c
+++ b/epan/dissectors/packet-radius.c
@@ -217,6 +217,8 @@ static radius_vendor_info_t no_vendor = {"Unknown Vendor", 0, NULL, -1, 1, 1, FA
static radius_attr_info_t no_dictionary_entry = {"Unknown-Attribute", 0, FALSE, FALSE, radius_octets, NULL, NULL, -1, -1, -1, -1, -1, NULL };
static dissector_handle_t eap_handle;
+static dissector_handle_t radius_handle;
+
static const gchar *shared_secret = "";
static gboolean validate_authenticator = FALSE;
@@ -2632,7 +2634,7 @@ proto_register_radius(void)
module_t *radius_module;
proto_radius = proto_register_protocol("RADIUS Protocol", "RADIUS", "radius");
- register_dissector("radius", dissect_radius, proto_radius);
+ radius_handle = register_dissector("radius", dissect_radius, proto_radius);
register_init_routine(&radius_init_protocol);
radius_module = prefs_register_protocol(proto_radius, NULL);
prefs_register_string_preference(radius_module, "shared_secret", "Shared Secret",
@@ -2662,9 +2664,6 @@ proto_register_radius(void)
void
proto_reg_handoff_radius(void)
{
- dissector_handle_t radius_handle;
-
- radius_handle = find_dissector("radius");
eap_handle = find_dissector_add_dependency("eap", proto_radius);
dissector_add_uint_range_with_preference("udp.port", DEFAULT_RADIUS_PORT_RANGE, radius_handle);
}
diff --git a/epan/dissectors/packet-rdt.c b/epan/dissectors/packet-rdt.c
index 30e6546561..60fb6ad3d0 100644
--- a/epan/dissectors/packet-rdt.c
+++ b/epan/dissectors/packet-rdt.c
@@ -2160,7 +2160,7 @@ void proto_register_rdt(void)
proto_register_subtree_array(ett, array_length(ett));
expert_rdt = expert_register_protocol(proto_rdt);
expert_register_field_array(expert_rdt, ei, array_length(ei));
- register_dissector("rdt", dissect_rdt, proto_rdt);
+ rdt_handle = register_dissector("rdt", dissect_rdt, proto_rdt);
/* Preference settings */
rdt_module = prefs_register_protocol(proto_rdt, NULL);
@@ -2175,7 +2175,6 @@ void proto_register_rdt(void)
void proto_reg_handoff_rdt(void)
{
- rdt_handle = find_dissector("rdt");
dissector_add_uint_with_preference("udp.port", RDT_UDP_PORT, rdt_handle);
}
diff --git a/epan/dissectors/packet-redbackli.c b/epan/dissectors/packet-redbackli.c
index 46cb174976..78b6359af1 100644
--- a/epan/dissectors/packet-redbackli.c
+++ b/epan/dissectors/packet-redbackli.c
@@ -46,6 +46,8 @@ static int hf_redbackli_unknownavp = -1; /* Unknown AVP */
static int ett_redbackli = -1;
static dissector_handle_t ip_handle;
+static dissector_handle_t redbackli_handle;
+
#define RB_AVP_SEQNO 1
#define RB_AVP_LIID 2
@@ -281,15 +283,12 @@ void proto_register_redbackli(void) {
proto_register_field_array(proto_redbackli, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("redbackli", redbackli_dissect, proto_redbackli);
+ redbackli_handle = register_dissector("redbackli", redbackli_dissect, proto_redbackli);
}
void proto_reg_handoff_redbackli(void) {
- dissector_handle_t redbackli_handle;
-
ip_handle = find_dissector_add_dependency("ip", proto_redbackli);
- redbackli_handle = find_dissector("redbackli");
dissector_add_for_decode_as_with_preference("udp.port", redbackli_handle);
heur_dissector_add("udp", redbackli_dissect_heur, "Redback Lawful Intercept over UDP", "redbackli_udp", proto_redbackli, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-rfc2190.c b/epan/dissectors/packet-rfc2190.c
index dc43395454..c020f0010f 100644
--- a/epan/dissectors/packet-rfc2190.c
+++ b/epan/dissectors/packet-rfc2190.c
@@ -73,6 +73,7 @@ static int hf_rfc2190_vmv2 = -1;
static gint ett_rfc2190 = -1;
static dissector_handle_t h263_handle;
+static dissector_handle_t rfc2190_handle;
static int
@@ -244,9 +245,6 @@ dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
void
proto_reg_handoff_rfc2190(void)
{
- dissector_handle_t rfc2190_handle;
-
- rfc2190_handle = find_dissector("rfc2190");
dissector_add_uint("rtp.pt", PT_H263, rfc2190_handle);
dissector_add_uint("iax2.codec", AST_FORMAT_H263, rfc2190_handle);
@@ -522,7 +520,7 @@ proto_register_rfc2190(void)
"RFC2190", "rfc2190");
proto_register_field_array(proto_rfc2190, hf, array_length(hf));
- register_dissector("rfc2190", dissect_rfc2190, proto_rfc2190);
+ rfc2190_handle = register_dissector("rfc2190", dissect_rfc2190, proto_rfc2190);
}
/*
diff --git a/epan/dissectors/packet-rmp.c b/epan/dissectors/packet-rmp.c
index d4d2ba8be1..ab620adabe 100644
--- a/epan/dissectors/packet-rmp.c
+++ b/epan/dissectors/packet-rmp.c
@@ -45,6 +45,8 @@ static int hf_rmp_reserved = -1;
static gint ett_rmp = -1;
+static dissector_handle_t rmp_handle;
+
/*
* Possible values for "rmp_type" fields.
*/
@@ -242,15 +244,12 @@ proto_register_rmp(void)
proto_register_field_array(proto_rmp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("rmp", dissect_rmp, proto_rmp);
+ rmp_handle = register_dissector("rmp", dissect_rmp, proto_rmp);
}
void
proto_reg_handoff_rmp(void)
{
- dissector_handle_t rmp_handle;
-
- rmp_handle = find_dissector("rmp");
dissector_add_uint("hpext.dxsap", HPEXT_DXSAP, rmp_handle);
dissector_add_uint("hpext.dxsap", HPEXT_SXSAP, rmp_handle);
}
diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c
index abe76c5c1b..db73e08f57 100644
--- a/epan/dissectors/packet-rpc.c
+++ b/epan/dissectors/packet-rpc.c
@@ -4398,8 +4398,8 @@ proto_register_rpc(void)
"Whether the RPC dissector should attempt to locate RPC PDU boundaries when initial fragment alignment is not known. This may cause false positives, or slow operation.",
&rpc_find_fragment_start);
- register_dissector("rpc", dissect_rpc, proto_rpc);
- register_dissector("rpc-tcp", dissect_rpc_tcp, proto_rpc);
+ rpc_handle = register_dissector("rpc", dissect_rpc, proto_rpc);
+ rpc_tcp_handle = register_dissector("rpc-tcp", dissect_rpc_tcp, proto_rpc);
rpc_tap = register_tap("rpc");
register_srt_table(proto_rpc, NULL, 1, rpcstat_packet, rpcstat_init, rpcstat_param);
@@ -4433,9 +4433,7 @@ proto_reg_handoff_rpc(void)
probably RPC traffic from some randomly-chosen port that happens
to match some port for which we have a dissector)
*/
- rpc_tcp_handle = find_dissector("rpc-tcp");
dissector_add_uint_with_preference("tcp.port", RPC_TCP_PORT, rpc_tcp_handle);
- rpc_handle = find_dissector("rpc");
dissector_add_uint_with_preference("udp.port", RPC_TCP_PORT, rpc_handle);
heur_dissector_add("tcp", dissect_rpc_tcp_heur, "RPC over TCP", "rpc_tcp", proto_rpc, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-rpki-rtr.c b/epan/dissectors/packet-rpki-rtr.c
index 926a5214ad..5a9e44e968 100644
--- a/epan/dissectors/packet-rpki-rtr.c
+++ b/epan/dissectors/packet-rpki-rtr.c
@@ -73,6 +73,8 @@ static gint ett_flags_nd = -1;
static expert_field ei_rpkirtr_wrong_version_router_key = EI_INIT;
+static dissector_handle_t rpkirtr_handle;
+
/* http://www.iana.org/assignments/rpki/rpki.xml#rpki-rtr-pdu */
#define RPKI_RTR_SERIAL_NOTIFY_PDU 0
@@ -474,7 +476,7 @@ proto_register_rpkirtr(void)
expert_rpkirtr = expert_register_protocol(proto_rpkirtr);
expert_register_field_array(expert_rpkirtr, ei, array_length(ei));
- register_dissector("rpkirtr", dissect_rpkirtr, proto_rpkirtr);
+ rpkirtr_handle = register_dissector("rpkirtr", dissect_rpkirtr, proto_rpkirtr);
}
@@ -482,11 +484,9 @@ void
proto_reg_handoff_rpkirtr(void)
{
static gboolean initialized = FALSE;
- static dissector_handle_t rpkirtr_handle;
static int rpki_rtr_tls_port;
if (!initialized) {
- rpkirtr_handle = find_dissector("rpkirtr");
dissector_add_uint_with_preference("tcp.port", RPKI_RTR_TCP_PORT, rpkirtr_handle);
initialized = TRUE;
} else {
diff --git a/epan/dissectors/packet-rpl.c b/epan/dissectors/packet-rpl.c
index 584c020f03..ec8e568f66 100644
--- a/epan/dissectors/packet-rpl.c
+++ b/epan/dissectors/packet-rpl.c
@@ -71,6 +71,8 @@ static gint ett_rpl_c005 = -1;
static gint ett_rpl_c014 = -1;
static gint ett_rpl_unkn = -1;
+static dissector_handle_t rpl_handle;
+
static const value_string rpl_type_vals[] = {
{ 1, "FIND Command" },
{ 2, "FOUND Frame" },
@@ -397,15 +399,12 @@ proto_register_rpl(void)
"RPL", "rpl");
proto_register_field_array(proto_rpl, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("rpl", dissect_rpl, proto_rpl);
+ rpl_handle = register_dissector("rpl", dissect_rpl, proto_rpl);
}
void
proto_reg_handoff_rpl(void)
{
- dissector_handle_t rpl_handle;
-
- rpl_handle = find_dissector("rpl");
dissector_add_uint("llc.dsap", SAP_RPL, rpl_handle);
}
diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c
index 2bb3e93e6c..a988edd95f 100644
--- a/epan/dissectors/packet-rtcp.c
+++ b/epan/dissectors/packet-rtcp.c
@@ -6506,7 +6506,7 @@ proto_register_rtcp(void)
expert_rtcp = expert_register_protocol(proto_rtcp);
expert_register_field_array(expert_rtcp, ei, array_length(ei));
- register_dissector("rtcp", dissect_rtcp, proto_rtcp);
+ rtcp_handle = register_dissector("rtcp", dissect_rtcp, proto_rtcp);
rtcp_module = prefs_register_protocol(proto_rtcp, NULL);
@@ -6543,7 +6543,6 @@ proto_reg_handoff_rtcp(void)
* Register this dissector as one that can be selected by a
* UDP port number.
*/
- rtcp_handle = find_dissector("rtcp");
dissector_add_for_decode_as_with_preference("udp.port", rtcp_handle);
dissector_add_for_decode_as("flip.payload", rtcp_handle );
diff --git a/epan/dissectors/packet-rtp-events.c b/epan/dissectors/packet-rtp-events.c
index 387c86a165..b2a70c585c 100644
--- a/epan/dissectors/packet-rtp-events.c
+++ b/epan/dissectors/packet-rtp-events.c
@@ -318,6 +318,8 @@ value_string_ext rtp_event_type_values_ext = VALUE_STRING_EXT_INIT(rtp_event_typ
static gint ett_rtp_events = -1;
+static dissector_handle_t rtp_events_handle;
+
static struct _rtp_event_info rtp_event_info;
static int
@@ -493,7 +495,7 @@ proto_register_rtp_events(void)
" that specifies Cisco Named Signaling Events", 10,
&cisco_nse_pt_value);
- register_dissector("rtpevent", dissect_rtp_events, proto_rtp_events);
+ rtp_events_handle = register_dissector("rtpevent", dissect_rtp_events, proto_rtp_events);
rtp_event_tap = register_tap("rtpevent");
}
@@ -502,7 +504,6 @@ proto_register_rtp_events(void)
void
proto_reg_handoff_rtp_events(void)
{
- static dissector_handle_t rtp_events_handle;
/* saved_payload_type_value is a temporary place to save */
/* the value so we can properly reinitialize when the */
/* settings get changed. */
@@ -511,7 +512,6 @@ proto_reg_handoff_rtp_events(void)
static gboolean rtp_events_prefs_initialized = FALSE;
if (!rtp_events_prefs_initialized) {
- rtp_events_handle = find_dissector("rtpevent");
dissector_add_string("rtp_dyn_payload_type", "telephone-event", rtp_events_handle);
dissector_add_string("rtp_dyn_payload_type", "X-NSE", rtp_events_handle);
rtp_events_prefs_initialized = TRUE;
diff --git a/epan/dissectors/packet-rtp-midi.c b/epan/dissectors/packet-rtp-midi.c
index 5eb601506d..2e500365c5 100644
--- a/epan/dissectors/packet-rtp-midi.c
+++ b/epan/dissectors/packet-rtp-midi.c
@@ -2902,6 +2902,7 @@ static guint saved_payload_type_value;
static int proto_rtp_midi = -1;
+static dissector_handle_t rtp_midi_handle;
void proto_reg_handoff_rtp_midi( void );
@@ -10034,7 +10035,7 @@ proto_register_rtp_midi( void )
rtp_midi_module = prefs_register_protocol ( proto_rtp_midi, proto_reg_handoff_rtp_midi );
prefs_register_uint_preference ( rtp_midi_module, "midi_payload_type_value", "Payload Type for RFC 4695/6295 RTP-MIDI", "This is the value of the Payload Type field that specifies RTP-MIDI", 10, &rtp_midi_payload_type_value );
- register_dissector( RTP_MIDI_DISSECTOR_ABBREVIATION, dissect_rtp_midi, proto_rtp_midi );
+ rtp_midi_handle = register_dissector( RTP_MIDI_DISSECTOR_ABBREVIATION, dissect_rtp_midi, proto_rtp_midi );
}
@@ -10042,12 +10043,10 @@ proto_register_rtp_midi( void )
void
proto_reg_handoff_rtp_midi( void )
{
- static dissector_handle_t rtp_midi_handle;
static int rtp_midi_prefs_initialized = FALSE;
if ( !rtp_midi_prefs_initialized ) {
- rtp_midi_handle = find_dissector( RTP_MIDI_DISSECTOR_ABBREVIATION );
dissector_add_string("rtp_dyn_payload_type", "rtp-midi", rtp_midi_handle);
rtp_midi_prefs_initialized = TRUE;
}
diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c
index c64ece61d9..ee49751cc6 100644
--- a/epan/dissectors/packet-rtp.c
+++ b/epan/dissectors/packet-rtp.c
@@ -155,6 +155,9 @@ static dissector_handle_t classicstun_heur_handle;
static dissector_handle_t stun_heur_handle;
static dissector_handle_t t38_handle;
static dissector_handle_t zrtp_handle;
+static dissector_handle_t rtp_rfc2198_handle;
+static dissector_handle_t rtp_hdr_ext_ed137_handle;
+static dissector_handle_t rtp_hdr_ext_ed137a_handle;
static dissector_handle_t sprt_handle;
static dissector_handle_t v150fw_handle;
@@ -3772,9 +3775,9 @@ proto_register_rtp(void)
expert_rtp = expert_register_protocol(proto_rtp);
expert_register_field_array(expert_rtp, ei, array_length(ei));
- register_dissector("rtp", dissect_rtp, proto_rtp);
- register_dissector("rtp.rfc2198", dissect_rtp_rfc2198, proto_rtp);
- register_dissector("rtp.rfc4571", dissect_rtp_rfc4571, proto_rtp);
+ rtp_handle = register_dissector("rtp", dissect_rtp, proto_rtp);
+ rtp_rfc2198_handle = register_dissector("rtp.rfc2198", dissect_rtp_rfc2198, proto_rtp);
+ rtp_rfc4571_handle = register_dissector("rtp.rfc4571", dissect_rtp_rfc4571, proto_rtp);
rtp_tap = register_tap("rtp");
@@ -3789,8 +3792,8 @@ proto_register_rtp(void)
rtp_hdr_ext_rfc5285_dissector_table = register_dissector_table("rtp.ext.rfc5285.id",
"RTP Generic header extension (RFC 5285)", proto_rtp, FT_UINT8, BASE_DEC);
- register_dissector("rtp.ext.ed137", dissect_rtp_hdr_ext_ed137, proto_rtp);
- register_dissector("rtp.ext.ed137a", dissect_rtp_hdr_ext_ed137a, proto_rtp);
+ rtp_hdr_ext_ed137_handle = register_dissector("rtp.ext.ed137", dissect_rtp_hdr_ext_ed137, proto_rtp);
+ rtp_hdr_ext_ed137a_handle = register_dissector("rtp.ext.ed137a", dissect_rtp_hdr_ext_ed137a, proto_rtp);
rtp_module = prefs_register_protocol(proto_rtp, proto_reg_handoff_rtp);
@@ -3828,16 +3831,9 @@ void
proto_reg_handoff_rtp(void)
{
static gboolean rtp_prefs_initialized = FALSE;
- static dissector_handle_t rtp_rfc2198_handle;
static guint rtp_saved_rfc2198_pt;
if (!rtp_prefs_initialized) {
- dissector_handle_t rtp_hdr_ext_ed137_handle;
- dissector_handle_t rtp_hdr_ext_ed137a_handle;
-
- rtp_handle = find_dissector("rtp");
- rtp_rfc2198_handle = find_dissector("rtp.rfc2198");
- rtp_rfc4571_handle = find_dissector("rtp.rfc4571");
dissector_add_for_decode_as("udp.port", rtp_handle);
dissector_add_for_decode_as("tcp.port", rtp_rfc4571_handle);
@@ -3846,8 +3842,6 @@ proto_reg_handoff_rtp(void)
heur_dissector_add("stun", dissect_rtp_heur_app, "RTP over TURN", "rtp_stun", proto_rtp, HEURISTIC_DISABLE);
heur_dissector_add("rtsp", dissect_rtp_heur_app, "RTP over RTSP", "rtp_rtsp", proto_rtp, HEURISTIC_DISABLE);
- rtp_hdr_ext_ed137_handle = find_dissector("rtp.ext.ed137");
- rtp_hdr_ext_ed137a_handle = find_dissector("rtp.ext.ed137a");
dissector_add_uint("rtp.hdr_ext", RTP_ED137_SIG, rtp_hdr_ext_ed137_handle);
dissector_add_uint("rtp.hdr_ext", RTP_ED137A_SIG, rtp_hdr_ext_ed137a_handle);
dissector_add_for_decode_as("flip.payload", rtp_handle );
diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c
index b0c59d5073..11b7cc84a2 100644
--- a/epan/dissectors/packet-rtse.c
+++ b/epan/dissectors/packet-rtse.c
@@ -117,6 +117,7 @@ static expert_field ei_rtse_unknown_rtse_pdu = EI_INIT;
static expert_field ei_rtse_abstract_syntax = EI_INIT;
static dissector_table_t rtse_oid_dissector_table=NULL;
+static dissector_handle_t rtse_handle = NULL;
static GHashTable *oid_table=NULL;
static gint ett_rtse_unknown = -1;
@@ -165,11 +166,8 @@ register_rtse_oid_dissector_handle(const char *oid, dissector_handle_t dissector
{
/* XXX: Note that this fcn is called from proto_reg_handoff in *other* dissectors ... */
- static dissector_handle_t rtse_handle = NULL;
static dissector_handle_t ros_handle = NULL;
- if (rtse_handle == NULL)
- rtse_handle = find_dissector("rtse");
if (ros_handle == NULL)
ros_handle = find_dissector("ros");
@@ -738,7 +736,7 @@ dissect_rtse_RTSE_apdus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
/*--- End of included file: packet-rtse-fn.c ---*/
-#line 194 "./asn1/rtse/packet-rtse-template.c"
+#line 192 "./asn1/rtse/packet-rtse-template.c"
/*
* Dissect RTSE PDUs inside a PPDU.
@@ -1011,7 +1009,7 @@ void proto_register_rtse(void) {
NULL, HFILL }},
/*--- End of included file: packet-rtse-hfarr.c ---*/
-#line 366 "./asn1/rtse/packet-rtse-template.c"
+#line 364 "./asn1/rtse/packet-rtse-template.c"
};
/* List of subtrees */
@@ -1033,7 +1031,7 @@ void proto_register_rtse(void) {
&ett_rtse_CallingSSuserReference,
/*--- End of included file: packet-rtse-ettarr.c ---*/
-#line 375 "./asn1/rtse/packet-rtse-template.c"
+#line 373 "./asn1/rtse/packet-rtse-template.c"
};
static ei_register_info ei[] = {
@@ -1047,7 +1045,7 @@ void proto_register_rtse(void) {
/* Register protocol */
proto_rtse = proto_register_protocol(PNAME, PSNAME, PFNAME);
- register_dissector("rtse", dissect_rtse, proto_rtse);
+ rtse_handle = register_dissector("rtse", dissect_rtse, proto_rtse);
/* Register fields and subtrees */
proto_register_field_array(proto_rtse, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
diff --git a/epan/dissectors/packet-rtsp.c b/epan/dissectors/packet-rtsp.c
index 359de98d25..f5744d971b 100644
--- a/epan/dissectors/packet-rtsp.c
+++ b/epan/dissectors/packet-rtsp.c
@@ -147,6 +147,7 @@ static expert_field ei_rtsp_rdtfeaturelevel_invalid = EI_INIT;
static expert_field ei_rtsp_bad_server_ip_address = EI_INIT;
static expert_field ei_rtsp_bad_client_ip_address = EI_INIT;
+static dissector_handle_t rtsp_handle;
static dissector_handle_t rtp_handle;
static dissector_handle_t rtp_rfc4571_handle;
static dissector_handle_t rtcp_handle;
@@ -1580,7 +1581,7 @@ proto_register_rtsp(void)
expert_register_field_array(expert_rtsp, ei, array_length(ei));
/* Make this dissector findable by name */
- register_dissector("rtsp", dissect_rtsp, proto_rtsp);
+ rtsp_handle = register_dissector("rtsp", dissect_rtsp, proto_rtsp);
/* Register our configuration options, particularly our ports */
@@ -1617,9 +1618,6 @@ proto_register_rtsp(void)
void
proto_reg_handoff_rtsp(void)
{
- dissector_handle_t rtsp_handle;
-
- rtsp_handle = find_dissector("rtsp");
rtp_handle = find_dissector_add_dependency("rtp", proto_rtsp);
rtp_rfc4571_handle = find_dissector_add_dependency("rtp.rfc4571", proto_rtsp);
rtcp_handle = find_dissector_add_dependency("rtcp", proto_rtsp);
diff --git a/epan/dissectors/packet-s1ap.c b/epan/dissectors/packet-s1ap.c
index 64b6307685..11d028f1d3 100644
--- a/epan/dissectors/packet-s1ap.c
+++ b/epan/dissectors/packet-s1ap.c
@@ -2401,7 +2401,7 @@ dissect_s1ap_GUMMEI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro
static int
dissect_s1ap_M_TMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 999 "./asn1/s1ap/s1ap.cnf"
+#line 996 "./asn1/s1ap/s1ap.cnf"
tvbuff_t *parameter_tvb = NULL;
offset = dissect_per_octet_string(tvb, offset, actx, tree, -1,
4, 4, FALSE, &parameter_tvb);
@@ -2490,7 +2490,7 @@ dissect_s1ap_CellBasedMDT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
static int
dissect_s1ap_TAC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 966 "./asn1/s1ap/s1ap.cnf"
+#line 963 "./asn1/s1ap/s1ap.cnf"
tvbuff_t *parameter_tvb = NULL;
struct s1ap_private_data *s1ap_data = s1ap_get_private_data(actx->pinfo);
offset = dissect_per_octet_string(tvb, offset, actx, tree, -1,
@@ -2558,7 +2558,7 @@ static const per_sequence_t TAI_sequence[] = {
static int
dissect_s1ap_TAI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1065 "./asn1/s1ap/s1ap.cnf"
+#line 1062 "./asn1/s1ap/s1ap.cnf"
struct s1ap_private_data *s1ap_data = s1ap_get_private_data(actx->pinfo);
s1ap_data->tai = wmem_new0(wmem_packet_scope(), struct s1ap_tai);
@@ -3426,7 +3426,7 @@ static value_string_ext s1ap_CauseRadioNetwork_vals_ext = VALUE_STRING_EXT_INIT(
static int
dissect_s1ap_CauseRadioNetwork(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1940 "./asn1/s1ap/s1ap.cnf"
+#line 1936 "./asn1/s1ap/s1ap.cnf"
guint32 value;
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
36, &value, TRUE, 3, NULL);
@@ -3448,7 +3448,7 @@ const value_string s1ap_CauseTransport_vals[] = {
static int
dissect_s1ap_CauseTransport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1945 "./asn1/s1ap/s1ap.cnf"
+#line 1941 "./asn1/s1ap/s1ap.cnf"
guint32 value;
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
2, &value, TRUE, 0, NULL);
@@ -3473,7 +3473,7 @@ const value_string s1ap_CauseNas_vals[] = {
static int
dissect_s1ap_CauseNas(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1950 "./asn1/s1ap/s1ap.cnf"
+#line 1946 "./asn1/s1ap/s1ap.cnf"
guint32 value;
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
4, &value, TRUE, 1, NULL);
@@ -3500,7 +3500,7 @@ const value_string s1ap_CauseProtocol_vals[] = {
static int
dissect_s1ap_CauseProtocol(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1955 "./asn1/s1ap/s1ap.cnf"
+#line 1951 "./asn1/s1ap/s1ap.cnf"
guint32 value;
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
7, &value, TRUE, 0, NULL);
@@ -3526,7 +3526,7 @@ const value_string s1ap_CauseMisc_vals[] = {
static int
dissect_s1ap_CauseMisc(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1960 "./asn1/s1ap/s1ap.cnf"
+#line 1956 "./asn1/s1ap/s1ap.cnf"
guint32 value;
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
6, &value, TRUE, 0, NULL);
@@ -3792,7 +3792,7 @@ dissect_s1ap_CellType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p
static int
dissect_s1ap_LAC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 981 "./asn1/s1ap/s1ap.cnf"
+#line 978 "./asn1/s1ap/s1ap.cnf"
tvbuff_t *parameter_tvb = NULL;
offset = dissect_per_octet_string(tvb, offset, actx, tree, -1,
2, 2, FALSE, &parameter_tvb);
@@ -3820,7 +3820,7 @@ dissect_s1ap_CI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_t
static int
dissect_s1ap_RAC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 990 "./asn1/s1ap/s1ap.cnf"
+#line 987 "./asn1/s1ap/s1ap.cnf"
tvbuff_t *parameter_tvb = NULL;
offset = dissect_per_octet_string(tvb, offset, actx, tree, -1,
1, 1, FALSE, &parameter_tvb);
@@ -4388,7 +4388,7 @@ dissect_s1ap_ENB_StatusTransfer_TransparentContainer(tvbuff_t *tvb _U_, int offs
static int
dissect_s1ap_ENB_UE_S1AP_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1059 "./asn1/s1ap/s1ap.cnf"
+#line 1056 "./asn1/s1ap/s1ap.cnf"
guint32 enb_ue_s1ap_id;
struct s1ap_private_data *s1ap_data = s1ap_get_private_data(actx->pinfo);
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
@@ -5170,7 +5170,7 @@ dissect_s1ap_ImmediateMDT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
static int
dissect_s1ap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1006 "./asn1/s1ap/s1ap.cnf"
+#line 1003 "./asn1/s1ap/s1ap.cnf"
tvbuff_t *parameter_tvb;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
3, 8, FALSE, &parameter_tvb);
@@ -6151,7 +6151,7 @@ tvbuff_t *parameter_tvb=NULL;
static int
dissect_s1ap_NASSecurityParametersfromE_UTRAN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1014 "./asn1/s1ap/s1ap.cnf"
+#line 1011 "./asn1/s1ap/s1ap.cnf"
tvbuff_t *parameter_tvb;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
NO_BOUND, NO_BOUND, FALSE, &parameter_tvb);
@@ -6170,7 +6170,7 @@ dissect_s1ap_NASSecurityParametersfromE_UTRAN(tvbuff_t *tvb _U_, int offset _U_,
static int
dissect_s1ap_NASSecurityParameterstoE_UTRAN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1022 "./asn1/s1ap/s1ap.cnf"
+#line 1019 "./asn1/s1ap/s1ap.cnf"
tvbuff_t *parameter_tvb;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
NO_BOUND, NO_BOUND, FALSE, &parameter_tvb);
@@ -6642,7 +6642,7 @@ static const value_string s1ap_RAT_Type_vals[] = {
static int
dissect_s1ap_RAT_Type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1044 "./asn1/s1ap/s1ap.cnf"
+#line 1041 "./asn1/s1ap/s1ap.cnf"
guint32 rat_type = 0xffffffff;
struct s1ap_private_data *s1ap_data = s1ap_get_private_data(actx->pinfo);
offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
@@ -7437,7 +7437,7 @@ static const per_sequence_t SupportedTAs_Item_sequence[] = {
static int
dissect_s1ap_SupportedTAs_Item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1030 "./asn1/s1ap/s1ap.cnf"
+#line 1027 "./asn1/s1ap/s1ap.cnf"
struct s1ap_private_data *s1ap_data = s1ap_get_private_data(actx->pinfo);
if (!PINFO_FD_VISITED(actx->pinfo) &&
@@ -7452,7 +7452,7 @@ dissect_s1ap_SupportedTAs_Item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_s1ap_SupportedTAs_Item, SupportedTAs_Item_sequence);
-#line 1041 "./asn1/s1ap/s1ap.cnf"
+#line 1038 "./asn1/s1ap/s1ap.cnf"
s1ap_data->supported_ta = NULL;
@@ -8283,7 +8283,7 @@ static const per_sequence_t HandoverPreparationFailure_sequence[] = {
static int
dissect_s1ap_HandoverPreparationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1766 "./asn1/s1ap/s1ap.cnf"
+#line 1762 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverPreparationFailure");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8421,7 +8421,7 @@ static const per_sequence_t HandoverFailure_sequence[] = {
static int
dissect_s1ap_HandoverFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1772 "./asn1/s1ap/s1ap.cnf"
+#line 1768 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverFailure");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8438,7 +8438,7 @@ static const per_sequence_t HandoverNotify_sequence[] = {
static int
dissect_s1ap_HandoverNotify(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1774 "./asn1/s1ap/s1ap.cnf"
+#line 1770 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverNotify");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8455,7 +8455,7 @@ static const per_sequence_t PathSwitchRequest_sequence[] = {
static int
dissect_s1ap_PathSwitchRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1776 "./asn1/s1ap/s1ap.cnf"
+#line 1772 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PathSwitchRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8498,7 +8498,7 @@ static const per_sequence_t PathSwitchRequestAcknowledge_sequence[] = {
static int
dissect_s1ap_PathSwitchRequestAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1778 "./asn1/s1ap/s1ap.cnf"
+#line 1774 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PathSwitchRequestAcknowledge");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8541,7 +8541,7 @@ static const per_sequence_t PathSwitchRequestFailure_sequence[] = {
static int
dissect_s1ap_PathSwitchRequestFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1780 "./asn1/s1ap/s1ap.cnf"
+#line 1776 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PathSwitchRequestFailure");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8558,7 +8558,7 @@ static const per_sequence_t HandoverCancel_sequence[] = {
static int
dissect_s1ap_HandoverCancel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1782 "./asn1/s1ap/s1ap.cnf"
+#line 1778 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverCancel");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8575,7 +8575,7 @@ static const per_sequence_t HandoverCancelAcknowledge_sequence[] = {
static int
dissect_s1ap_HandoverCancelAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1784 "./asn1/s1ap/s1ap.cnf"
+#line 1780 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "HandoverCancelAcknowledge");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8592,7 +8592,7 @@ static const per_sequence_t E_RABSetupRequest_sequence[] = {
static int
dissect_s1ap_E_RABSetupRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1786 "./asn1/s1ap/s1ap.cnf"
+#line 1782 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "E-RABSetupRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8642,7 +8642,7 @@ static const per_sequence_t E_RABSetupResponse_sequence[] = {
static int
dissect_s1ap_E_RABSetupResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1788 "./asn1/s1ap/s1ap.cnf"
+#line 1784 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "E-RABSetupResponse");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8690,7 +8690,7 @@ static const per_sequence_t E_RABModifyRequest_sequence[] = {
static int
dissect_s1ap_E_RABModifyRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1790 "./asn1/s1ap/s1ap.cnf"
+#line 1786 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "E-RABModifyRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8738,7 +8738,7 @@ static const per_sequence_t E_RABModifyResponse_sequence[] = {
static int
dissect_s1ap_E_RABModifyResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1792 "./asn1/s1ap/s1ap.cnf"
+#line 1788 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "E-RABModifyResponse");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8784,7 +8784,7 @@ static const per_sequence_t E_RABReleaseCommand_sequence[] = {
static int
dissect_s1ap_E_RABReleaseCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1794 "./asn1/s1ap/s1ap.cnf"
+#line 1790 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "E-RABReleaseCommand");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8801,7 +8801,7 @@ static const per_sequence_t E_RABReleaseResponse_sequence[] = {
static int
dissect_s1ap_E_RABReleaseResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1796 "./asn1/s1ap/s1ap.cnf"
+#line 1792 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "E-RABReleaseResponse");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8847,7 +8847,7 @@ static const per_sequence_t E_RABReleaseIndication_sequence[] = {
static int
dissect_s1ap_E_RABReleaseIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1798 "./asn1/s1ap/s1ap.cnf"
+#line 1794 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "E-RABReleaseIndication");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8864,7 +8864,7 @@ static const per_sequence_t InitialContextSetupRequest_sequence[] = {
static int
dissect_s1ap_InitialContextSetupRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1800 "./asn1/s1ap/s1ap.cnf"
+#line 1796 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "InitialContextSetupRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8914,7 +8914,7 @@ static const per_sequence_t InitialContextSetupResponse_sequence[] = {
static int
dissect_s1ap_InitialContextSetupResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1802 "./asn1/s1ap/s1ap.cnf"
+#line 1798 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "InitialContextSetupResponse");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8962,7 +8962,7 @@ static const per_sequence_t InitialContextSetupFailure_sequence[] = {
static int
dissect_s1ap_InitialContextSetupFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1804 "./asn1/s1ap/s1ap.cnf"
+#line 1800 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "InitialContextSetupFailure");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -8979,7 +8979,7 @@ static const per_sequence_t Paging_sequence[] = {
static int
dissect_s1ap_Paging(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1806 "./asn1/s1ap/s1ap.cnf"
+#line 1802 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "Paging");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9025,7 +9025,7 @@ static const per_sequence_t UEContextReleaseRequest_sequence[] = {
static int
dissect_s1ap_UEContextReleaseRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1808 "./asn1/s1ap/s1ap.cnf"
+#line 1804 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextReleaseRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9042,7 +9042,7 @@ static const per_sequence_t UEContextReleaseCommand_sequence[] = {
static int
dissect_s1ap_UEContextReleaseCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1810 "./asn1/s1ap/s1ap.cnf"
+#line 1806 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextReleaseCommand");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9059,7 +9059,7 @@ static const per_sequence_t UEContextReleaseComplete_sequence[] = {
static int
dissect_s1ap_UEContextReleaseComplete(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1812 "./asn1/s1ap/s1ap.cnf"
+#line 1808 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextReleaseComplete");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9076,7 +9076,7 @@ static const per_sequence_t UEContextModificationRequest_sequence[] = {
static int
dissect_s1ap_UEContextModificationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1814 "./asn1/s1ap/s1ap.cnf"
+#line 1810 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextModificationRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9093,7 +9093,7 @@ static const per_sequence_t UEContextModificationResponse_sequence[] = {
static int
dissect_s1ap_UEContextModificationResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1816 "./asn1/s1ap/s1ap.cnf"
+#line 1812 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextModificationResponse");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9110,7 +9110,7 @@ static const per_sequence_t UEContextModificationFailure_sequence[] = {
static int
dissect_s1ap_UEContextModificationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1818 "./asn1/s1ap/s1ap.cnf"
+#line 1814 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextModificationFailure");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9127,7 +9127,7 @@ static const per_sequence_t UERadioCapabilityMatchRequest_sequence[] = {
static int
dissect_s1ap_UERadioCapabilityMatchRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1820 "./asn1/s1ap/s1ap.cnf"
+#line 1816 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UERadioCapabilityMatchRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9144,7 +9144,7 @@ static const per_sequence_t UERadioCapabilityMatchResponse_sequence[] = {
static int
dissect_s1ap_UERadioCapabilityMatchResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1822 "./asn1/s1ap/s1ap.cnf"
+#line 1818 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UERadioCapabilityMatchResponse");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9221,7 +9221,7 @@ static const per_sequence_t NASNonDeliveryIndication_sequence[] = {
static int
dissect_s1ap_NASNonDeliveryIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1830 "./asn1/s1ap/s1ap.cnf"
+#line 1826 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "NASNonDeliveryIndication");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9238,7 +9238,7 @@ static const per_sequence_t RerouteNASRequest_sequence[] = {
static int
dissect_s1ap_RerouteNASRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1832 "./asn1/s1ap/s1ap.cnf"
+#line 1828 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "RerouteNASRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9276,7 +9276,7 @@ static const per_sequence_t Reset_sequence[] = {
static int
dissect_s1ap_Reset(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1834 "./asn1/s1ap/s1ap.cnf"
+#line 1830 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "Reset");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9344,7 +9344,7 @@ static const per_sequence_t ResetAcknowledge_sequence[] = {
static int
dissect_s1ap_ResetAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1836 "./asn1/s1ap/s1ap.cnf"
+#line 1832 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "ResetAcknowledge");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9389,7 +9389,7 @@ static const per_sequence_t S1SetupRequest_sequence[] = {
static int
dissect_s1ap_S1SetupRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1840 "./asn1/s1ap/s1ap.cnf"
+#line 1836 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "S1SetupRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9406,7 +9406,7 @@ static const per_sequence_t S1SetupResponse_sequence[] = {
static int
dissect_s1ap_S1SetupResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1842 "./asn1/s1ap/s1ap.cnf"
+#line 1838 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "S1SetupResponse");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9423,7 +9423,7 @@ static const per_sequence_t S1SetupFailure_sequence[] = {
static int
dissect_s1ap_S1SetupFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1844 "./asn1/s1ap/s1ap.cnf"
+#line 1840 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "S1SetupFailure");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9440,7 +9440,7 @@ static const per_sequence_t ENBConfigurationUpdate_sequence[] = {
static int
dissect_s1ap_ENBConfigurationUpdate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1846 "./asn1/s1ap/s1ap.cnf"
+#line 1842 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "ENBConfigurationUpdate");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9457,7 +9457,7 @@ static const per_sequence_t ENBConfigurationUpdateAcknowledge_sequence[] = {
static int
dissect_s1ap_ENBConfigurationUpdateAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1848 "./asn1/s1ap/s1ap.cnf"
+#line 1844 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "ENBConfigurationUpdateAcknowledge");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9474,7 +9474,7 @@ static const per_sequence_t ENBConfigurationUpdateFailure_sequence[] = {
static int
dissect_s1ap_ENBConfigurationUpdateFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1850 "./asn1/s1ap/s1ap.cnf"
+#line 1846 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "ENBConfigurationUpdateFailure");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9491,7 +9491,7 @@ static const per_sequence_t MMEConfigurationUpdate_sequence[] = {
static int
dissect_s1ap_MMEConfigurationUpdate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1852 "./asn1/s1ap/s1ap.cnf"
+#line 1848 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "MMEConfigurationUpdate");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9508,7 +9508,7 @@ static const per_sequence_t MMEConfigurationUpdateAcknowledge_sequence[] = {
static int
dissect_s1ap_MMEConfigurationUpdateAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1854 "./asn1/s1ap/s1ap.cnf"
+#line 1850 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "MMEConfigurationUpdateAcknowledge");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9525,7 +9525,7 @@ static const per_sequence_t MMEConfigurationUpdateFailure_sequence[] = {
static int
dissect_s1ap_MMEConfigurationUpdateFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1856 "./asn1/s1ap/s1ap.cnf"
+#line 1852 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "MMEConfigurationUpdateFailure");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9542,7 +9542,7 @@ static const per_sequence_t DownlinkS1cdma2000tunnelling_sequence[] = {
static int
dissect_s1ap_DownlinkS1cdma2000tunnelling(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1858 "./asn1/s1ap/s1ap.cnf"
+#line 1854 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "DownlinkS1cdma2000tunnelling");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9559,7 +9559,7 @@ static const per_sequence_t UplinkS1cdma2000tunnelling_sequence[] = {
static int
dissect_s1ap_UplinkS1cdma2000tunnelling(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1860 "./asn1/s1ap/s1ap.cnf"
+#line 1856 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UplinkS1cdma2000tunnelling");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9576,7 +9576,7 @@ static const per_sequence_t UECapabilityInfoIndication_sequence[] = {
static int
dissect_s1ap_UECapabilityInfoIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1862 "./asn1/s1ap/s1ap.cnf"
+#line 1858 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UECapabilityInfoIndication");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9593,7 +9593,7 @@ static const per_sequence_t ENBStatusTransfer_sequence[] = {
static int
dissect_s1ap_ENBStatusTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1864 "./asn1/s1ap/s1ap.cnf"
+#line 1860 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "ENBStatusTransfer");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9610,7 +9610,7 @@ static const per_sequence_t MMEStatusTransfer_sequence[] = {
static int
dissect_s1ap_MMEStatusTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1866 "./asn1/s1ap/s1ap.cnf"
+#line 1862 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "MMEStatusTransfer");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9627,7 +9627,7 @@ static const per_sequence_t TraceStart_sequence[] = {
static int
dissect_s1ap_TraceStart(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1868 "./asn1/s1ap/s1ap.cnf"
+#line 1864 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "TraceStart");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9644,7 +9644,7 @@ static const per_sequence_t TraceFailureIndication_sequence[] = {
static int
dissect_s1ap_TraceFailureIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1870 "./asn1/s1ap/s1ap.cnf"
+#line 1866 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "TraceFailureIndication");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9661,7 +9661,7 @@ static const per_sequence_t DeactivateTrace_sequence[] = {
static int
dissect_s1ap_DeactivateTrace(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1872 "./asn1/s1ap/s1ap.cnf"
+#line 1868 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "DeactivateTrace");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9678,7 +9678,7 @@ static const per_sequence_t CellTrafficTrace_sequence[] = {
static int
dissect_s1ap_CellTrafficTrace(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1874 "./asn1/s1ap/s1ap.cnf"
+#line 1870 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "CellTrafficTrace");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9695,7 +9695,7 @@ static const per_sequence_t LocationReportingControl_sequence[] = {
static int
dissect_s1ap_LocationReportingControl(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1876 "./asn1/s1ap/s1ap.cnf"
+#line 1872 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "LocationReportingControl");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9712,7 +9712,7 @@ static const per_sequence_t LocationReportingFailureIndication_sequence[] = {
static int
dissect_s1ap_LocationReportingFailureIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1878 "./asn1/s1ap/s1ap.cnf"
+#line 1874 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "LocationReportingFailureIndication");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9729,7 +9729,7 @@ static const per_sequence_t LocationReport_sequence[] = {
static int
dissect_s1ap_LocationReport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1880 "./asn1/s1ap/s1ap.cnf"
+#line 1876 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "LocationReport");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9746,7 +9746,7 @@ static const per_sequence_t OverloadStart_sequence[] = {
static int
dissect_s1ap_OverloadStart(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1882 "./asn1/s1ap/s1ap.cnf"
+#line 1878 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "OverloadStart");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9763,7 +9763,7 @@ static const per_sequence_t OverloadStop_sequence[] = {
static int
dissect_s1ap_OverloadStop(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1884 "./asn1/s1ap/s1ap.cnf"
+#line 1880 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "OverloadStop");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9780,7 +9780,7 @@ static const per_sequence_t WriteReplaceWarningRequest_sequence[] = {
static int
dissect_s1ap_WriteReplaceWarningRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1886 "./asn1/s1ap/s1ap.cnf"
+#line 1882 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "WriteReplaceWarningRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9797,7 +9797,7 @@ static const per_sequence_t WriteReplaceWarningResponse_sequence[] = {
static int
dissect_s1ap_WriteReplaceWarningResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1888 "./asn1/s1ap/s1ap.cnf"
+#line 1884 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "WriteReplaceWarningResponse");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9814,7 +9814,7 @@ static const per_sequence_t ENBDirectInformationTransfer_sequence[] = {
static int
dissect_s1ap_ENBDirectInformationTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1890 "./asn1/s1ap/s1ap.cnf"
+#line 1886 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "ENBDirectInformationTransfer");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9851,7 +9851,7 @@ static const per_sequence_t MMEDirectInformationTransfer_sequence[] = {
static int
dissect_s1ap_MMEDirectInformationTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1892 "./asn1/s1ap/s1ap.cnf"
+#line 1888 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "MMEDirectInformationTransfer");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9868,7 +9868,7 @@ static const per_sequence_t ENBConfigurationTransfer_sequence[] = {
static int
dissect_s1ap_ENBConfigurationTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1894 "./asn1/s1ap/s1ap.cnf"
+#line 1890 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "ENBConfigurationTransfer");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9885,7 +9885,7 @@ static const per_sequence_t MMEConfigurationTransfer_sequence[] = {
static int
dissect_s1ap_MMEConfigurationTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1896 "./asn1/s1ap/s1ap.cnf"
+#line 1892 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "MMEConfigurationTransfer");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9902,7 +9902,7 @@ static const per_sequence_t PrivateMessage_sequence[] = {
static int
dissect_s1ap_PrivateMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1898 "./asn1/s1ap/s1ap.cnf"
+#line 1894 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PrivateMessage");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9919,7 +9919,7 @@ static const per_sequence_t KillRequest_sequence[] = {
static int
dissect_s1ap_KillRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1900 "./asn1/s1ap/s1ap.cnf"
+#line 1896 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "KillRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9936,7 +9936,7 @@ static const per_sequence_t KillResponse_sequence[] = {
static int
dissect_s1ap_KillResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1902 "./asn1/s1ap/s1ap.cnf"
+#line 1898 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "KillResponse");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9953,7 +9953,7 @@ static const per_sequence_t PWSRestartIndication_sequence[] = {
static int
dissect_s1ap_PWSRestartIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1904 "./asn1/s1ap/s1ap.cnf"
+#line 1900 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PWSRestartIndication");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9970,7 +9970,7 @@ static const per_sequence_t PWSFailureIndication_sequence[] = {
static int
dissect_s1ap_PWSFailureIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1906 "./asn1/s1ap/s1ap.cnf"
+#line 1902 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "PWSFailureIndication");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -9987,7 +9987,7 @@ static const per_sequence_t DownlinkUEAssociatedLPPaTransport_sequence[] = {
static int
dissect_s1ap_DownlinkUEAssociatedLPPaTransport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1908 "./asn1/s1ap/s1ap.cnf"
+#line 1904 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "DownlinkUEAssociatedLPPaTransport");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10004,7 +10004,7 @@ static const per_sequence_t UplinkUEAssociatedLPPaTransport_sequence[] = {
static int
dissect_s1ap_UplinkUEAssociatedLPPaTransport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1910 "./asn1/s1ap/s1ap.cnf"
+#line 1906 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UplinkUEAssociatedLPPaTransport");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10021,7 +10021,7 @@ static const per_sequence_t DownlinkNonUEAssociatedLPPaTransport_sequence[] = {
static int
dissect_s1ap_DownlinkNonUEAssociatedLPPaTransport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1912 "./asn1/s1ap/s1ap.cnf"
+#line 1908 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "DownlinkNonUEAssociatedLPPaTransport");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10038,7 +10038,7 @@ static const per_sequence_t UplinkNonUEAssociatedLPPaTransport_sequence[] = {
static int
dissect_s1ap_UplinkNonUEAssociatedLPPaTransport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1914 "./asn1/s1ap/s1ap.cnf"
+#line 1910 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UplinkNonUEAssociatedLPPaTransport");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10055,7 +10055,7 @@ static const per_sequence_t E_RABModificationIndication_sequence[] = {
static int
dissect_s1ap_E_RABModificationIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1916 "./asn1/s1ap/s1ap.cnf"
+#line 1912 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "E-RABModificationIndication");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10142,7 +10142,7 @@ static const per_sequence_t E_RABModificationConfirm_sequence[] = {
static int
dissect_s1ap_E_RABModificationConfirm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1918 "./asn1/s1ap/s1ap.cnf"
+#line 1914 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "E-RABModificationConfirm");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10188,7 +10188,7 @@ static const per_sequence_t UEContextModificationIndication_sequence[] = {
static int
dissect_s1ap_UEContextModificationIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1920 "./asn1/s1ap/s1ap.cnf"
+#line 1916 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextModificationIndication");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10205,7 +10205,7 @@ static const per_sequence_t UEContextModificationConfirm_sequence[] = {
static int
dissect_s1ap_UEContextModificationConfirm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1922 "./asn1/s1ap/s1ap.cnf"
+#line 1918 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextModificationConfirm");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10222,7 +10222,7 @@ static const per_sequence_t UEContextSuspendRequest_sequence[] = {
static int
dissect_s1ap_UEContextSuspendRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1924 "./asn1/s1ap/s1ap.cnf"
+#line 1920 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextSuspendRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10239,7 +10239,7 @@ static const per_sequence_t UEContextSuspendResponse_sequence[] = {
static int
dissect_s1ap_UEContextSuspendResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1926 "./asn1/s1ap/s1ap.cnf"
+#line 1922 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextSuspendResponse");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10256,7 +10256,7 @@ static const per_sequence_t UEContextResumeRequest_sequence[] = {
static int
dissect_s1ap_UEContextResumeRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1928 "./asn1/s1ap/s1ap.cnf"
+#line 1924 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextResumeRequest");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10298,7 +10298,7 @@ static const per_sequence_t UEContextResumeResponse_sequence[] = {
static int
dissect_s1ap_UEContextResumeResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1930 "./asn1/s1ap/s1ap.cnf"
+#line 1926 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextResumeResponse");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10340,7 +10340,7 @@ static const per_sequence_t UEContextResumeFailure_sequence[] = {
static int
dissect_s1ap_UEContextResumeFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1932 "./asn1/s1ap/s1ap.cnf"
+#line 1928 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "UEContextResumeFailure");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
@@ -10357,7 +10357,7 @@ static const per_sequence_t ConnectionEstablishmentIndication_sequence[] = {
static int
dissect_s1ap_ConnectionEstablishmentIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 1934 "./asn1/s1ap/s1ap.cnf"
+#line 1930 "./asn1/s1ap/s1ap.cnf"
col_append_sep_str(actx->pinfo->cinfo, COL_INFO, NULL, "ConnectionEstablishmentIndication");
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c
index 40a4db1f49..fe852b9f1a 100644
--- a/epan/dissectors/packet-sccp.c
+++ b/epan/dissectors/packet-sccp.c
@@ -773,6 +773,7 @@ typedef struct _sccp_user_t {
static sccp_user_t *sccp_users;
static guint num_sccp_users;
+static dissector_handle_t sccp_handle;
static dissector_handle_t data_handle;
static dissector_handle_t tcap_handle;
static dissector_handle_t ranap_handle;
@@ -4104,7 +4105,7 @@ proto_register_sccp(void)
/* Register the protocol name and description */
proto_sccp = proto_register_protocol("Signalling Connection Control Part", "SCCP", "sccp");
- register_dissector("sccp", dissect_sccp, proto_sccp);
+ sccp_handle = register_dissector("sccp", dissect_sccp, proto_sccp);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_sccp, hf, array_length(hf));
@@ -4170,13 +4171,9 @@ proto_register_sccp(void)
void
proto_reg_handoff_sccp(void)
{
- dissector_handle_t sccp_handle;
-
static gboolean initialised = FALSE;
if (!initialised) {
- sccp_handle = find_dissector("sccp");
-
dissector_add_uint("wtap_encap", WTAP_ENCAP_SCCP, sccp_handle);
dissector_add_uint("mtp3.service_indicator", MTP_SI_SCCP, sccp_handle);
dissector_add_string("tali.opcode", "sccp", sccp_handle);
diff --git a/epan/dissectors/packet-scop.c b/epan/dissectors/packet-scop.c
index 953a038710..7e33b24d66 100644
--- a/epan/dissectors/packet-scop.c
+++ b/epan/dissectors/packet-scop.c
@@ -117,6 +117,9 @@ static const value_string scop_services [] = {
/* Dissector handle */
static dissector_handle_t ieee802154_handle;
+static dissector_handle_t scop_udp_handle;
+static dissector_handle_t scop_tcp_handle;
+
/*FUNCTION:------------------------------------------------------
* NAME
@@ -356,8 +359,8 @@ void proto_register_scop(void)
proto_register_subtree_array(ett, array_length(ett));
/* Register dissector with Wireshark. */
- register_dissector("scop.udp", dissect_scop, proto_scop);
- register_dissector("scop.tcp", dissect_scop_tcp, proto_scop);
+ scop_udp_handle = register_dissector("scop.udp", dissect_scop, proto_scop);
+ scop_tcp_handle = register_dissector("scop.tcp", dissect_scop_tcp, proto_scop);
} /* proto_register_scop() */
/*FUNCTION:------------------------------------------------------
@@ -374,11 +377,6 @@ void proto_register_scop(void)
*/
void proto_reg_handoff_scop(void)
{
- dissector_handle_t scop_udp_handle;
- dissector_handle_t scop_tcp_handle;
-
- scop_udp_handle = find_dissector("scop.udp");
- scop_tcp_handle = find_dissector("scop.tcp");
ieee802154_handle = find_dissector_add_dependency("wpan_nofcs", proto_scop);
dissector_add_uint_range_with_preference("udp.port", SCOP_DEFAULT_PORT_RANGE, scop_udp_handle);
diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c
index 9d129185e2..457ca8235b 100644
--- a/epan/dissectors/packet-sctp.c
+++ b/epan/dissectors/packet-sctp.c
@@ -560,6 +560,8 @@ sctp_chunk_type_update_cb(void *r, char **err)
return TRUE;
}
+static dissector_handle_t sctp_handle;
+
static struct _sctp_info sctp_info;
#define RETURN_DIRECTION(direction) \
@@ -5098,7 +5100,7 @@ proto_register_sctp(void)
sctp_port_dissector_table = register_dissector_table("sctp.port", "SCTP port", proto_sctp, FT_UINT16, BASE_DEC);
sctp_ppi_dissector_table = register_dissector_table("sctp.ppi", "SCTP payload protocol identifier", proto_sctp, FT_UINT32, BASE_HEX);
- register_dissector("sctp", dissect_sctp, proto_sctp);
+ sctp_handle = register_dissector("sctp", dissect_sctp, proto_sctp);
sctp_heur_subdissector_list = register_heur_dissector_list("sctp", proto_sctp);
register_init_routine(sctp_init);
@@ -5116,10 +5118,8 @@ proto_register_sctp(void)
void
proto_reg_handoff_sctp(void)
{
- dissector_handle_t sctp_handle;
capture_dissector_handle_t sctp_cap_handle;
- sctp_handle = find_dissector("sctp");
dissector_add_uint("wtap_encap", WTAP_ENCAP_SCTP, sctp_handle);
dissector_add_uint("ip.proto", IP_PROTO_SCTP, sctp_handle);
dissector_add_uint_with_preference("udp.port", UDP_TUNNELING_PORT, sctp_handle);
diff --git a/epan/dissectors/packet-sdh.c b/epan/dissectors/packet-sdh.c
index 5604c5182b..0c35c243cc 100644
--- a/epan/dissectors/packet-sdh.c
+++ b/epan/dissectors/packet-sdh.c
@@ -68,6 +68,8 @@ static int hf_sdh_h1 = -1;
static int hf_sdh_h2 = -1;
static int hf_sdh_j1 = -1;
+static dissector_handle_t sdh_handle;
+
static gint sdh_data_rate = 1;
static const enum_val_t data_rates[] = {
@@ -277,15 +279,12 @@ proto_register_sdh(void)
"Data rate",
&sdh_data_rate, data_rates, ENC_BIG_ENDIAN);
- register_dissector("sdh", dissect_sdh, proto_sdh);
+ sdh_handle = register_dissector("sdh", dissect_sdh, proto_sdh);
}
void
proto_reg_handoff_sdh(void)
{
- dissector_handle_t sdh_handle;
-
- sdh_handle = find_dissector("sdh");
dissector_add_uint("wtap_encap", WTAP_ENCAP_SDH, sdh_handle);
}
diff --git a/epan/dissectors/packet-sdp.c b/epan/dissectors/packet-sdp.c
index 0e89645daf..c6c5c21575 100644
--- a/epan/dissectors/packet-sdp.c
+++ b/epan/dissectors/packet-sdp.c
@@ -58,6 +58,7 @@
void proto_register_sdp(void);
void proto_reg_handoff_sdp(void);
+static dissector_handle_t sdp_handle;
static dissector_handle_t rtcp_handle;
static dissector_handle_t sprt_handle;
static dissector_handle_t msrp_handle;
@@ -3251,7 +3252,7 @@ proto_register_sdp(void)
* Register the dissector by name, so other dissectors can
* grab it by name rather than just referring to it directly.
*/
- register_dissector("sdp", dissect_sdp, proto_sdp);
+ sdp_handle = register_dissector("sdp", dissect_sdp, proto_sdp);
/* Register for tapping */
sdp_tap = register_tap("sdp");
@@ -3264,8 +3265,6 @@ proto_register_sdp(void)
void
proto_reg_handoff_sdp(void)
{
- dissector_handle_t sdp_handle;
-
rtcp_handle = find_dissector_add_dependency("rtcp", proto_sdp);
msrp_handle = find_dissector_add_dependency("msrp", proto_sdp);
sprt_handle = find_dissector_add_dependency("sprt", proto_sdp);
@@ -3274,7 +3273,6 @@ proto_reg_handoff_sdp(void)
proto_sprt = dissector_handle_get_protocol_index(find_dissector("sprt"));
- sdp_handle = find_dissector("sdp");
dissector_add_string("media_type", "application/sdp", sdp_handle);
dissector_add_uint("bctp.tpi", 0x20, sdp_handle);
}
diff --git a/epan/dissectors/packet-sgsap.c b/epan/dissectors/packet-sgsap.c
index af63afcdcc..0b3e300869 100644
--- a/epan/dissectors/packet-sgsap.c
+++ b/epan/dissectors/packet-sgsap.c
@@ -78,6 +78,8 @@ static int ett_sgsap_sel_cs_dmn_op = -1;
static expert_field ei_sgsap_extraneous_data = EI_INIT;
static expert_field ei_sgsap_missing_mandatory_element = EI_INIT;
+static dissector_handle_t sgsap_handle;
+
static void get_sgsap_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p);
/*
@@ -1708,7 +1710,7 @@ void proto_register_sgsap(void) {
expert_register_field_array(expert_sgsap, ei, array_length(ei));
/* Register dissector */
- register_dissector(PFNAME, dissect_sgsap, proto_sgsap);
+ sgsap_handle = register_dissector(PFNAME, dissect_sgsap, proto_sgsap);
/* Set default SCTP ports */
range_convert_str(&global_sgsap_port_range, SGSAP_SCTP_PORT_RANGE, MAX_SCTP_PORT);
@@ -1729,10 +1731,8 @@ proto_reg_handoff_sgsap(void)
* The payload protocol identifier to be used for SGsAP is 0.
*/
static gboolean Initialized = FALSE;
- static dissector_handle_t sgsap_handle;
static range_t *sgsap_port_range;
- sgsap_handle = find_dissector("sgsap");
gsm_a_dtap_handle = find_dissector_add_dependency("gsm_a_dtap", proto_sgsap);
if (!Initialized) {
diff --git a/epan/dissectors/packet-sigcomp.c b/epan/dissectors/packet-sigcomp.c
index 93e28e5e4d..321f17ba1d 100644
--- a/epan/dissectors/packet-sigcomp.c
+++ b/epan/dissectors/packet-sigcomp.c
@@ -168,6 +168,7 @@ static expert_field ei_sigcomp_sigcomp_message_decompression_failure = EI_INIT;
static expert_field ei_sigcomp_execution_of_this_instruction_is_not_implemented = EI_INIT;
static dissector_handle_t sip_handle;
+static dissector_handle_t sigcomp_handle;
/* set the tcp ports */
#define SIGCOMP_TCP_PORT_RANGE "5555,6666" /* Not IANA registered */
@@ -6691,7 +6692,7 @@ proto_register_sigcomp(void)
proto_sigcomp = proto_register_protocol("Signaling Compression", "SIGCOMP", "sigcomp");
proto_raw_sigcomp = proto_register_protocol("Decompressed SigComp message as raw text", "Raw_SigComp", "raw_sigcomp");
- register_dissector("sigcomp", dissect_sigcomp, proto_sigcomp);
+ sigcomp_handle = register_dissector("sigcomp", dissect_sigcomp, proto_sigcomp);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_sigcomp, hf, array_length(hf));
@@ -6739,10 +6740,8 @@ proto_register_sigcomp(void)
void
proto_reg_handoff_sigcomp(void)
{
- dissector_handle_t sigcomp_handle;
dissector_handle_t sigcomp_tcp_handle;
- sigcomp_handle = find_dissector("sigcomp");
sigcomp_tcp_handle = create_dissector_handle(dissect_sigcomp_tcp,proto_sigcomp);
sip_handle = find_dissector_add_dependency("sip",proto_sigcomp);
dissector_add_uint_range_with_preference("tcp.port", SIGCOMP_TCP_PORT_RANGE, sigcomp_tcp_handle);
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c
index e2875c92d7..b4f08afe52 100644
--- a/epan/dissectors/packet-sip.c
+++ b/epan/dissectors/packet-sip.c
@@ -67,10 +67,10 @@
void proto_register_sip(void);
-static dissector_handle_t sip_tcp_handle;
-
static gint sip_tap = -1;
static gint exported_pdu_tap = -1;
+static dissector_handle_t sip_handle;
+static dissector_handle_t sip_tcp_handle;
static dissector_handle_t sigcomp_handle;
static dissector_handle_t sip_diag_handle;
static dissector_handle_t sip_uri_userinfo_handle;
@@ -6800,8 +6800,8 @@ void proto_register_sip(void)
proto_sip = proto_register_protocol("Session Initiation Protocol", "SIP", "sip");
proto_raw_sip = proto_register_protocol("Session Initiation Protocol (SIP as raw text)",
"Raw_SIP", "raw_sip");
- register_dissector("sip", dissect_sip, proto_sip);
- register_dissector("sip.tcp", dissect_sip_tcp, proto_sip);
+ sip_handle = register_dissector("sip", dissect_sip, proto_sip);
+ sip_tcp_handle = register_dissector("sip.tcp", dissect_sip_tcp, proto_sip);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_sip, hf, array_length(hf));
@@ -6925,9 +6925,6 @@ proto_reg_handoff_sip(void)
static gboolean sip_prefs_initialized = FALSE;
if (!sip_prefs_initialized) {
- dissector_handle_t sip_handle;
- sip_handle = find_dissector("sip");
- sip_tcp_handle = find_dissector("sip.tcp");
sigcomp_handle = find_dissector_add_dependency("sigcomp", proto_sip);
sip_diag_handle = find_dissector("sip.diagnostic");
sip_uri_userinfo_handle = find_dissector("sip.uri_userinfo");
diff --git a/epan/dissectors/packet-sipfrag.c b/epan/dissectors/packet-sipfrag.c
index 3a23dc29b5..2c5baff2cf 100644
--- a/epan/dissectors/packet-sipfrag.c
+++ b/epan/dissectors/packet-sipfrag.c
@@ -41,6 +41,7 @@ static int ett_sipfrag = -1;
void proto_reg_handoff_sipfrag(void);
+static dissector_handle_t sipfrag_handle;
/* Main dissection function. */
static int dissect_sipfrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -115,12 +116,11 @@ void proto_register_sipfrag(void)
proto_register_subtree_array(ett, array_length(ett));
/* Allow other dissectors to find this one by name. */
- register_dissector("sipfrag", dissect_sipfrag, proto_sipfrag);
+ sipfrag_handle = register_dissector("sipfrag", dissect_sipfrag, proto_sipfrag);
}
void proto_reg_handoff_sipfrag(void)
{
- dissector_handle_t sipfrag_handle = find_dissector("sipfrag");
dissector_add_string("media_type", "message/sipfrag", sipfrag_handle);
}
diff --git a/epan/dissectors/packet-sita.c b/epan/dissectors/packet-sita.c
index 67466ea6d8..e59e34a67c 100644
--- a/epan/dissectors/packet-sita.c
+++ b/epan/dissectors/packet-sita.c
@@ -67,6 +67,8 @@ static int hf_rts = -1;
static int hf_dcd = -1;
static int hf_signals = -1;
+static dissector_handle_t sita_handle;
+
#define MAX_FLAGS_LEN 64 /* max size of a 'flags' decoded string */
#define IOP "Local"
#define REMOTE "Remote"
@@ -393,7 +395,7 @@ proto_register_sita(void)
sita_dissector_table = register_dissector_table("sita.proto", "SITA protocol number", proto_sita, FT_UINT8, BASE_HEX);
proto_register_field_array(proto_sita, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("sita", dissect_sita, proto_sita);
+ sita_handle = register_dissector("sita", dissect_sita, proto_sita);
}
void
@@ -403,13 +405,11 @@ proto_reg_handoff_sita(void)
dissector_handle_t frame_relay_handle;
dissector_handle_t uts_handle;
dissector_handle_t ipars_handle;
- dissector_handle_t sita_handle;
lapb_handle = find_dissector("lapb");
frame_relay_handle = find_dissector("fr");
uts_handle = find_dissector("uts");
ipars_handle = find_dissector("ipars");
- sita_handle = find_dissector("sita");
dissector_add_uint("sita.proto", SITA_PROTO_BOP_LAPB, lapb_handle);
dissector_add_uint("sita.proto", SITA_PROTO_BOP_FRL, frame_relay_handle);
diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c
index 2132139597..182e8ac506 100644
--- a/epan/dissectors/packet-smb.c
+++ b/epan/dissectors/packet-smb.c
@@ -873,6 +873,7 @@ static expert_field ei_smb_info_level_not_understood = EI_INIT;
static int smb_tap = -1;
static int smb_eo_tap = -1;
+static dissector_handle_t smb_handle;
static dissector_handle_t gssapi_handle;
static dissector_handle_t ntlmssp_handle;
@@ -21039,7 +21040,7 @@ proto_register_smb(void)
register_init_routine(smb_trans_reassembly_init);
smb_tap = register_tap("smb");
- register_dissector("smb", dissect_smb, proto_smb);
+ smb_handle = register_dissector("smb", dissect_smb, proto_smb);
register_srt_table(proto_smb, NULL, 3, smbstat_packet, smbstat_init, NULL);
/* Register the tap for the "Export Object" function */
@@ -21049,8 +21050,6 @@ proto_register_smb(void)
void
proto_reg_handoff_smb(void)
{
- dissector_handle_t smb_handle;
-
gssapi_handle = find_dissector_add_dependency("gssapi", proto_smb);
ntlmssp_handle = find_dissector_add_dependency("ntlmssp", proto_smb);
@@ -21059,7 +21058,6 @@ proto_reg_handoff_smb(void)
heur_dissector_add("cotp", dissect_smb_heur, "SMB over COTP", "smb_cotp", proto_smb, HEURISTIC_ENABLE);
heur_dissector_add("vines_spp", dissect_smb_heur, "SMB over Vines", "smb_vines", proto_smb, HEURISTIC_ENABLE);
- smb_handle = find_dissector("smb");
dissector_add_uint("ipx.socket", IPX_SOCKET_NWLINK_SMB_SERVER, smb_handle);
dissector_add_uint("ipx.socket", IPX_SOCKET_NWLINK_SMB_REDIR, smb_handle);
dissector_add_uint("ipx.socket", IPX_SOCKET_NWLINK_SMB_MESSENGER, smb_handle);
diff --git a/epan/dissectors/packet-smpp.c b/epan/dissectors/packet-smpp.c
index a711ee1700..45b33f1574 100644
--- a/epan/dissectors/packet-smpp.c
+++ b/epan/dissectors/packet-smpp.c
@@ -273,6 +273,8 @@ static gint ett_opt_params = -1;
static gint ett_opt_param = -1;
static gint ett_dcs = -1;
+static dissector_handle_t smpp_handle;
+
/* Reassemble SMPP TCP segments */
static gboolean reassemble_over_tcp = TRUE;
@@ -3741,7 +3743,7 @@ proto_register_smpp(void)
proto_register_subtree_array(ett, array_length(ett));
/* Allow other dissectors to find this one by name. */
- register_dissector("smpp", dissect_smpp, proto_smpp);
+ smpp_handle = register_dissector("smpp", dissect_smpp, proto_smpp);
/* Register for tapping */
smpp_tap = register_tap("smpp");
@@ -3760,8 +3762,6 @@ proto_register_smpp(void)
void
proto_reg_handoff_smpp(void)
{
- dissector_handle_t smpp_handle;
-
/*
* SMPP can be spoken on any port under TCP or X.25
* ...how *do* we do that under X.25?
@@ -3771,7 +3771,6 @@ proto_reg_handoff_smpp(void)
* to specify that a given X.25 circuit is to be dissected as SMPP,
* however.
*/
- smpp_handle = find_dissector("smpp");
dissector_add_for_decode_as_with_preference("tcp.port", smpp_handle);
heur_dissector_add("tcp", dissect_smpp_heur, "SMPP over TCP", "smpp_tcp", proto_smpp, HEURISTIC_ENABLE);
heur_dissector_add("x.25", dissect_smpp_heur, "SMPP over X.25", "smpp_x25", proto_smpp, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-smtp.c b/epan/dissectors/packet-smtp.c
index fc4f1c9fb3..5d0889016c 100644
--- a/epan/dissectors/packet-smtp.c
+++ b/epan/dissectors/packet-smtp.c
@@ -1291,7 +1291,7 @@ proto_register_smtp(void)
register_cleanup_routine (&smtp_data_reassemble_cleanup);
/* Allow dissector to find be found by name. */
- register_dissector("smtp", dissect_smtp, proto_smtp);
+ smtp_handle = register_dissector("smtp", dissect_smtp, proto_smtp);
/* Preferences */
smtp_module = prefs_register_protocol(proto_smtp, NULL);
@@ -1319,7 +1319,6 @@ proto_register_smtp(void)
void
proto_reg_handoff_smtp(void)
{
- smtp_handle = find_dissector("smtp");
dissector_add_uint_with_preference("tcp.port", TCP_PORT_SMTP, smtp_handle);
ssl_dissector_add(TCP_PORT_SSL_SMTP, smtp_handle);
/* No "auto" preference since handle is shared with SMTP */
diff --git a/epan/dissectors/packet-sna.c b/epan/dissectors/packet-sna.c
index 92ea0ba728..cfd27fd762 100644
--- a/epan/dissectors/packet-sna.c
+++ b/epan/dissectors/packet-sna.c
@@ -304,6 +304,9 @@ static gint ett_sna_control_05hpr = -1;
static gint ett_sna_control_05hpr_type = -1;
static gint ett_sna_control_0e = -1;
+static dissector_handle_t sna_handle;
+static dissector_handle_t sna_xid_handle;
+
static int sna_address_type = -1;
/* Defragment fragmented SNA BIUs*/
@@ -3477,11 +3480,11 @@ proto_register_sna(void)
"SNA", "sna");
proto_register_field_array(proto_sna, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("sna", dissect_sna, proto_sna);
+ sna_handle = register_dissector("sna", dissect_sna, proto_sna);
proto_sna_xid = proto_register_protocol(
"Systems Network Architecture XID", "SNA XID", "sna_xid");
- register_dissector("sna_xid", dissect_sna_xid, proto_sna_xid);
+ sna_xid_handle = register_dissector("sna_xid", dissect_sna_xid, proto_sna_xid);
sna_address_type = address_type_dissector_register("AT_SNA", "SNA Address", sna_fid_to_str_buf, sna_address_str_len, NULL, NULL, NULL, NULL, NULL);
@@ -3499,11 +3502,6 @@ proto_register_sna(void)
void
proto_reg_handoff_sna(void)
{
- dissector_handle_t sna_handle;
- dissector_handle_t sna_xid_handle;
-
- sna_handle = find_dissector("sna");
- sna_xid_handle = find_dissector("sna_xid");
dissector_add_uint("llc.dsap", SAP_SNA_PATHCTRL, sna_handle);
dissector_add_uint("llc.dsap", SAP_SNA1, sna_handle);
dissector_add_uint("llc.dsap", SAP_SNA2, sna_handle);
diff --git a/epan/dissectors/packet-sndcp.c b/epan/dissectors/packet-sndcp.c
index 717caa9048..be6aa64130 100644
--- a/epan/dissectors/packet-sndcp.c
+++ b/epan/dissectors/packet-sndcp.c
@@ -97,6 +97,8 @@ static const fragment_items npdu_frag_items = {
/* dissectors for the data portion of this protocol
*/
static dissector_handle_t ip_handle;
+static dissector_handle_t sndcp_handle;
+
/* reassembly of N-PDU
*/
@@ -559,7 +561,7 @@ proto_register_sndcp(void)
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_sndcp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("sndcp", dissect_sndcp, proto_sndcp);
+ sndcp_handle = register_dissector("sndcp", dissect_sndcp, proto_sndcp);
register_init_routine(sndcp_defragment_init);
register_cleanup_routine(sndcp_defragment_cleanup);
}
@@ -571,10 +573,6 @@ proto_register_sndcp(void)
void
proto_reg_handoff_sndcp(void)
{
- dissector_handle_t sndcp_handle;
-
- sndcp_handle = find_dissector("sndcp");
-
/* Register SNDCP dissector with LLC layer for SAPI 3,5,9 and 11
*/
dissector_add_uint("llcgprs.sapi", 3, sndcp_handle);
diff --git a/epan/dissectors/packet-sprt.c b/epan/dissectors/packet-sprt.c
index 2fdf7299c5..870a13cc2e 100644
--- a/epan/dissectors/packet-sprt.c
+++ b/epan/dissectors/packet-sprt.c
@@ -3407,7 +3407,7 @@ proto_register_sprt(void)
expert_register_field_array(expert_sprt, ei, array_length(ei));
/* register the dissector */
- register_dissector("sprt", dissect_sprt, proto_sprt);
+ sprt_handle = register_dissector("sprt", dissect_sprt, proto_sprt);
sprt_module = prefs_register_protocol(proto_sprt, NULL);
@@ -3428,7 +3428,6 @@ proto_register_sprt(void)
void
proto_reg_handoff_sprt(void)
{
- sprt_handle = find_dissector("sprt");
dissector_add_for_decode_as_with_preference("udp.port", sprt_handle);
heur_dissector_add( "udp", dissect_sprt_heur, "SPRT over UDP", "sprt_udp", proto_sprt, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c
index 94d91e21bf..2dd098fda8 100644
--- a/epan/dissectors/packet-ssl.c
+++ b/epan/dissectors/packet-ssl.c
@@ -4236,8 +4236,7 @@ proto_register_ssl(void)
/* heuristic dissectors for any premable e.g. CredSSP before RDP */
ssl_heur_subdissector_list = register_heur_dissector_list("ssl", proto_ssl);
- register_dissector("ssl", dissect_ssl, proto_ssl);
- ssl_handle = find_dissector("ssl");
+ ssl_handle = register_dissector("ssl", dissect_ssl, proto_ssl);
register_init_routine(ssl_init);
register_cleanup_routine(ssl_cleanup);
diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c
index b547038336..49259dc7f0 100644
--- a/epan/dissectors/packet-sua.c
+++ b/epan/dissectors/packet-sua.c
@@ -375,6 +375,7 @@ static guint16 sua_ri;
static gchar *sua_source_gt;
static gchar *sua_destination_gt;
+static dissector_handle_t sua_handle;
static dissector_handle_t sua_info_str_handle;
static dissector_table_t sua_parameter_table;
static dissector_table_t sccp_ssn_dissector_table;
@@ -2456,7 +2457,7 @@ proto_register_sua(void)
/* Register the protocol name and description */
proto_sua = proto_register_protocol("SS7 SCCP-User Adaptation Layer", "SUA", "sua");
- register_dissector("sua", dissect_sua, proto_sua);
+ sua_handle = register_dissector("sua", dissect_sua, proto_sua);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_sua, hf, array_length(hf));
@@ -2479,9 +2480,6 @@ proto_register_sua(void)
void
proto_reg_handoff_sua(void)
{
- dissector_handle_t sua_handle;
-
- sua_handle = find_dissector("sua");
/* Do we have an info string dissector ? */
sua_info_str_handle = find_dissector("sua.infostring");
dissector_add_uint("sctp.ppi", SUA_PAYLOAD_PROTOCOL_ID, sua_handle);
diff --git a/epan/dissectors/packet-synergy.c b/epan/dissectors/packet-synergy.c
index bdb23485d4..c3cc2be523 100644
--- a/epan/dissectors/packet-synergy.c
+++ b/epan/dissectors/packet-synergy.c
@@ -123,6 +123,8 @@ static int hf_synergy_ebad = -1;
/* Initialize the subtree pointers */
static gint ett_synergy = -1;
+static dissector_handle_t synergy_handle;
+
static void dissect_synergy_handshake(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
static void dissect_synergy_cinn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
static void dissect_synergy_cclp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
@@ -563,15 +565,12 @@ proto_register_synergy(void)
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_synergy, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("synergy", dissect_synergy, proto_synergy);
+ synergy_handle = register_dissector("synergy", dissect_synergy, proto_synergy);
}
void
proto_reg_handoff_synergy(void)
{
-
- dissector_handle_t synergy_handle;
- synergy_handle = find_dissector("synergy");
dissector_add_uint_with_preference("tcp.port", SYNERGY_PORT, synergy_handle);
}
diff --git a/epan/dissectors/packet-tapa.c b/epan/dissectors/packet-tapa.c
index 2400c97666..6d488e296e 100644
--- a/epan/dissectors/packet-tapa.c
+++ b/epan/dissectors/packet-tapa.c
@@ -83,6 +83,8 @@ static int hf_tapa_tunnel_tagsetc = -1;
static int hf_tapa_tunnel_remaining = -1;
+static dissector_handle_t tapa_handle;
+
#define PROTO_SHORT_NAME "TAPA"
#define PROTO_LONG_NAME "Trapeze Access Point Access Protocol"
@@ -616,16 +618,13 @@ proto_register_tapa(void)
proto_register_field_array(proto_tapa, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("tapa", dissect_tapa_static, proto_tapa);
+ tapa_handle = register_dissector("tapa", dissect_tapa_static, proto_tapa);
}
void
proto_reg_handoff_tapa(void)
{
- dissector_handle_t tapa_handle;
-
- tapa_handle = find_dissector("tapa");
dissector_add_uint_with_preference("udp.port", PORT_TAPA, tapa_handle);
heur_dissector_add( "ip", dissect_tapa_heur, "TAPA over IP", "tapa_ip", proto_tapa, HEURISTIC_ENABLE);
}
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 3b412f4eb0..ab07d95eb0 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -564,6 +564,7 @@ static const value_string mptcp_subtype_vs[] = {
static dissector_table_t subdissector_table;
static heur_dissector_list_t heur_subdissector_list;
static dissector_handle_t data_handle;
+static dissector_handle_t tcp_handle;
static dissector_handle_t sport_handle;
static guint32 tcp_stream_count;
static guint32 mptcp_stream_count;
@@ -7411,7 +7412,7 @@ proto_register_tcp(void)
expert_module_t* expert_mptcp;
proto_tcp = proto_register_protocol("Transmission Control Protocol", "TCP", "tcp");
- register_dissector("tcp", dissect_tcp, proto_tcp);
+ tcp_handle = register_dissector("tcp", dissect_tcp, proto_tcp);
proto_register_field_array(proto_tcp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_tcp = expert_register_protocol(proto_tcp);
@@ -7540,10 +7541,8 @@ proto_register_tcp(void)
void
proto_reg_handoff_tcp(void)
{
- dissector_handle_t tcp_handle;
capture_dissector_handle_t tcp_cap_handle;
- tcp_handle = find_dissector("tcp");
dissector_add_uint("ip.proto", IP_PROTO_TCP, tcp_handle);
data_handle = find_dissector("data");
sport_handle = find_dissector("sport");
diff --git a/epan/dissectors/packet-tpkt.c b/epan/dissectors/packet-tpkt.c
index 5f6c9de002..bed73e91ce 100644
--- a/epan/dissectors/packet-tpkt.c
+++ b/epan/dissectors/packet-tpkt.c
@@ -57,6 +57,7 @@ static gboolean tpkt_desegment = TRUE;
/* find the dissector for OSI TP (aka COTP) */
static dissector_handle_t osi_tp_handle;
+static dissector_handle_t tpkt_handle;
#define DEFAULT_TPKT_PORT_RANGE "102"
static range_t *tpkt_tcp_port_range;
@@ -649,7 +650,7 @@ proto_register_tpkt(void)
proto_tpkt_ptr = find_protocol_by_id(proto_tpkt);
proto_register_field_array(proto_tpkt, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("tpkt", dissect_tpkt, proto_tpkt);
+ tpkt_handle = register_dissector("tpkt", dissect_tpkt, proto_tpkt);
tpkt_module = prefs_register_protocol(proto_tpkt, proto_reg_handoff_tpkt);
prefs_register_bool_preference(tpkt_module, "desegment",
@@ -669,11 +670,9 @@ proto_register_tpkt(void)
void
proto_reg_handoff_tpkt(void)
{
- static dissector_handle_t tpkt_handle;
static range_t *port_range;
osi_tp_handle = find_dissector("ositp");
- tpkt_handle = find_dissector("tpkt");
dissector_add_uint_range_with_preference("tcp.port", TCP_PORT_TPKT_RANGE, tpkt_handle);
port_range = range_copy(tpkt_tcp_port_range);
diff --git a/epan/dissectors/packet-tr.c b/epan/dissectors/packet-tr.c
index 7a472c6ac9..46155349d2 100644
--- a/epan/dissectors/packet-tr.c
+++ b/epan/dissectors/packet-tr.c
@@ -126,6 +126,7 @@ static const value_string direction_vals[] = {
{ 0, NULL }
};
+static dissector_handle_t tr_handle;
static dissector_handle_t trmac_handle;
static dissector_handle_t llc_handle;
@@ -792,7 +793,7 @@ proto_register_tr(void)
"Whether Linux mangling of the link-layer header should be checked for and worked around",
&fix_linux_botches);
- register_dissector("tr", dissect_tr, proto_tr);
+ tr_handle = register_dissector("tr", dissect_tr, proto_tr);
tr_tap=register_tap("tr");
register_conversation_table(proto_tr, TRUE, tr_conversation_packet, tr_hostlist_packet);
@@ -803,7 +804,6 @@ proto_register_tr(void)
void
proto_reg_handoff_tr(void)
{
- dissector_handle_t tr_handle;
capture_dissector_handle_t tr_cap_handle;
/*
@@ -812,7 +812,6 @@ proto_reg_handoff_tr(void)
trmac_handle = find_dissector_add_dependency("trmac", proto_tr);
llc_handle = find_dissector_add_dependency("llc", proto_tr);
- tr_handle = find_dissector("tr");
dissector_add_uint("wtap_encap", WTAP_ENCAP_TOKEN_RING, tr_handle);
dissector_add_uint("sflow_245.header_protocol", SFLOW_245_HEADER_TOKENRING, tr_handle);
diff --git a/epan/dissectors/packet-tte-pcf.c b/epan/dissectors/packet-tte-pcf.c
index 82130f26bb..eb6f33b05a 100644
--- a/epan/dissectors/packet-tte-pcf.c
+++ b/epan/dissectors/packet-tte-pcf.c
@@ -52,6 +52,8 @@ static int hf_tte_pcf_tc = -1;
/* Initialize the subtree pointers */
static gint ett_tte_pcf = -1;
+static dissector_handle_t tte_pcf_handle;
+
static const value_string pcf_type_str_vals[] =
{ {2, "integration frame"}
, {4, "coldstart frame"}
@@ -203,19 +205,13 @@ proto_register_tte_pcf(void)
proto_register_field_array(proto_tte_pcf, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("tte_pcf", dissect_tte_pcf, proto_tte_pcf);
-
+ tte_pcf_handle = register_dissector("tte_pcf", dissect_tte_pcf, proto_tte_pcf);
}
void
proto_reg_handoff_tte_pcf(void)
{
- dissector_handle_t tte_pcf_handle;
-
- /* initialize the pcf handle */
- tte_pcf_handle = find_dissector("tte_pcf");
-
dissector_add_uint("ethertype", ETHERTYPE_TTE_PCF, tte_pcf_handle);
}
diff --git a/epan/dissectors/packet-turnchannel.c b/epan/dissectors/packet-turnchannel.c
index fde45dd392..d1b4f2f2a8 100644
--- a/epan/dissectors/packet-turnchannel.c
+++ b/epan/dissectors/packet-turnchannel.c
@@ -52,6 +52,8 @@ static int hf_turnchannel_len = -1;
/* Initialize the subtree pointers */
static gint ett_turnchannel = -1;
+static dissector_handle_t turnchannel_udp_handle;
+
static int
dissect_turnchannel_message(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data _U_)
@@ -182,8 +184,7 @@ proto_register_turnchannel(void)
proto_turnchannel = proto_register_protocol("TURN Channel",
"TURNCHANNEL", "turnchannel");
- register_dissector("turnchannel", dissect_turnchannel_message,
- proto_turnchannel);
+ turnchannel_udp_handle = register_dissector("turnchannel", dissect_turnchannel_message, proto_turnchannel);
/* subdissectors */
heur_subdissector_list = register_heur_dissector_list("turnchannel", proto_turnchannel);
@@ -199,10 +200,8 @@ void
proto_reg_handoff_turnchannel(void)
{
dissector_handle_t turnchannel_tcp_handle;
- dissector_handle_t turnchannel_udp_handle;
turnchannel_tcp_handle = create_dissector_handle(dissect_turnchannel_tcp, proto_turnchannel);
- turnchannel_udp_handle = find_dissector("turnchannel");
/* Register for "Decode As" in case STUN negotiation isn't captured */
dissector_add_for_decode_as_with_preference("tcp.port", turnchannel_tcp_handle);
diff --git a/epan/dissectors/packet-u3v.c b/epan/dissectors/packet-u3v.c
index 2af602741a..149561178e 100644
--- a/epan/dissectors/packet-u3v.c
+++ b/epan/dissectors/packet-u3v.c
@@ -568,6 +568,8 @@ static int ett_u3v_device_info_descriptor_speed_support = -1;
static int ett_u3v_device_info_descriptor_gencp_version = -1;
static int ett_u3v_device_info_descriptor_u3v_version = -1;
+static dissector_handle_t u3v_handle = NULL;
+
static const value_string command_names[] =
{
{ U3V_READMEM_CMD, "READMEM_CMD" },
@@ -2732,7 +2734,7 @@ proto_register_u3v(void)
proto_u3v = proto_register_protocol("USB 3 Vision", "U3V", "u3v");
proto_register_field_array(proto_u3v, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("u3v", dissect_u3v, proto_u3v);
+ u3v_handle = register_dissector("u3v", dissect_u3v, proto_u3v);
}
@@ -2740,10 +2742,8 @@ proto_register_u3v(void)
void
proto_reg_handoff_u3v(void)
{
- dissector_handle_t u3v_handle = NULL;
dissector_handle_t u3v_descr_handle = NULL;
- u3v_handle = find_dissector("u3v");
dissector_add_uint("usb.bulk", IF_CLASS_MISCELLANEOUS, u3v_handle);
heur_dissector_add("usb.bulk", dissect_u3v_heur, "USB3Vision Protocol", "u3v", proto_u3v,HEURISTIC_ENABLE);
u3v_descr_handle = create_dissector_handle(dissect_u3v_descriptors, proto_u3v);
diff --git a/epan/dissectors/packet-uma.c b/epan/dissectors/packet-uma.c
index 95cc991e20..9c1286e2f7 100644
--- a/epan/dissectors/packet-uma.c
+++ b/epan/dissectors/packet-uma.c
@@ -1752,8 +1752,6 @@ dissect_uma_urlc_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
void
proto_reg_handoff_uma(void)
{
- uma_tcp_handle = find_dissector("umatcp");
- uma_udp_handle = find_dissector("umaudp");
dissector_add_for_decode_as_with_preference("udp.port", uma_udp_handle);
rtcp_handle = find_dissector_add_dependency("rtcp", proto_uma);
llc_handle = find_dissector_add_dependency("llcgprs", proto_uma);
@@ -2288,8 +2286,9 @@ proto_register_uma(void)
/* Register the protocol name and description */
proto_uma = proto_register_protocol("Unlicensed Mobile Access","UMA", "uma");
/* subdissector code */
- register_dissector("umatcp", dissect_uma_tcp, proto_uma);
- register_dissector("umaudp", dissect_uma_urlc_udp, proto_uma);
+ uma_tcp_handle = register_dissector("umatcp", dissect_uma_tcp, proto_uma);
+ uma_udp_handle = register_dissector("umaudp", dissect_uma_urlc_udp, proto_uma);
+
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_uma, hf, array_length(hf));
diff --git a/epan/dissectors/packet-usb-audio.c b/epan/dissectors/packet-usb-audio.c
index 8376d9c6c4..43fe1b479c 100644
--- a/epan/dissectors/packet-usb-audio.c
+++ b/epan/dissectors/packet-usb-audio.c
@@ -137,6 +137,7 @@ static gint ett_ac_if_input_channelconfig = -1;
static gint ett_ac_if_mu_channelconfig = -1;
static dissector_handle_t sysex_handle;
+static dissector_handle_t usb_audio_bulk_handle;
#define AUDIO_IF_SUBCLASS_UNDEFINED 0x00
#define AUDIO_IF_SUBCLASS_AUDIOCONTROL 0x01
@@ -1302,19 +1303,18 @@ proto_register_usb_audio(void)
register_init_routine(&midi_data_reassemble_init);
register_cleanup_routine(&midi_data_reassemble_cleanup);
- register_dissector("usbaudio", dissect_usb_audio_bulk, proto_usb_audio);
+ usb_audio_bulk_handle = register_dissector("usbaudio", dissect_usb_audio_bulk, proto_usb_audio);
}
void
proto_reg_handoff_usb_audio(void)
{
- dissector_handle_t usb_audio_bulk_handle, usb_audio_descr_handle;
+ dissector_handle_t usb_audio_descr_handle;
usb_audio_descr_handle = create_dissector_handle(
dissect_usb_audio_descriptor, proto_usb_audio);
dissector_add_uint("usb.descriptor", IF_CLASS_AUDIO, usb_audio_descr_handle);
- usb_audio_bulk_handle = find_dissector("usbaudio");
dissector_add_uint("usb.bulk", IF_CLASS_AUDIO, usb_audio_bulk_handle);
sysex_handle = find_dissector_add_dependency("sysex", proto_usb_audio);
diff --git a/epan/dissectors/packet-usb-masstorage.c b/epan/dissectors/packet-usb-masstorage.c
index 919f7ef364..bec12768af 100644
--- a/epan/dissectors/packet-usb-masstorage.c
+++ b/epan/dissectors/packet-usb-masstorage.c
@@ -48,6 +48,7 @@ static int hf_usb_ms_maxlun = -1;
static gint ett_usb_ms = -1;
+static dissector_handle_t usb_ms_bulk_handle;
/* there is one such structure for each masstorage conversation */
typedef struct _usb_ms_conv_info_t {
@@ -454,16 +455,14 @@ proto_register_usb_ms(void)
proto_register_field_array(proto_usb_ms, hf, array_length(hf));
proto_register_subtree_array(usb_ms_subtrees, array_length(usb_ms_subtrees));
- register_dissector("usbms", dissect_usb_ms_bulk, proto_usb_ms);
+ usb_ms_bulk_handle = register_dissector("usbms", dissect_usb_ms_bulk, proto_usb_ms);
}
void
proto_reg_handoff_usb_ms(void)
{
- dissector_handle_t usb_ms_bulk_handle;
dissector_handle_t usb_ms_control_handle;
- usb_ms_bulk_handle = find_dissector("usbms");
dissector_add_uint("usb.bulk", IF_CLASS_MASS_STORAGE, usb_ms_bulk_handle);
usb_ms_control_handle = create_dissector_handle(dissect_usb_ms_control, proto_usb_ms);
diff --git a/epan/dissectors/packet-user_encap.c b/epan/dissectors/packet-user_encap.c
index 49531205c2..7e2f2c01e3 100644
--- a/epan/dissectors/packet-user_encap.c
+++ b/epan/dissectors/packet-user_encap.c
@@ -82,6 +82,8 @@ static uat_t* encaps_uat;
static gint exported_pdu_tap = -1;
+static dissector_handle_t user_encap_handle;
+
/*
* Use this for DLT_USER2 if we don't have an encapsulation for it.
*/
@@ -222,11 +224,8 @@ UAT_PROTO_DEF(user_encap, trailer_proto, trailer_proto, trailer_proto_name, user
void proto_reg_handoff_user_encap(void)
{
- dissector_handle_t user_encap_handle;
guint i;
- user_encap_handle = find_dissector("user_dlt");
-
user2_encap.encap = WTAP_ENCAP_USER2;
user2_encap.payload_proto_name = g_strdup("pktap");
user2_encap.payload_proto = find_dissector("pktap");
@@ -294,7 +293,7 @@ void proto_register_user_encap(void)
encaps_uat);
- register_dissector("user_dlt",dissect_user,proto_user_encap);
+ user_encap_handle = register_dissector("user_dlt",dissect_user,proto_user_encap);
/*
prefs_register_protocol_obsolete(proto_register_protocol("DLT User A","DLT_USER_A","user_dlt_a"));
diff --git a/epan/dissectors/packet-v5ef.c b/epan/dissectors/packet-v5ef.c
index 0207713d09..88ce8d9ad5 100644
--- a/epan/dissectors/packet-v5ef.c
+++ b/epan/dissectors/packet-v5ef.c
@@ -48,7 +48,8 @@ static int hf_v5ef_ea2 = -1;
static gint ett_v5ef = -1;
static gint ett_v5ef_address = -1;
-static dissector_handle_t v5dl_handle, lapd_handle;
+static dissector_handle_t v5dl_handle, lapd_handle, v5ef_handle;
+
/*
* Bits in the address field.
@@ -183,16 +184,12 @@ proto_register_v5ef(void)
proto_register_field_array (proto_v5ef, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("v5ef", dissect_v5ef, proto_v5ef);
-
+ v5ef_handle = register_dissector("v5ef", dissect_v5ef, proto_v5ef);
}
void
proto_reg_handoff_v5ef(void)
{
- dissector_handle_t v5ef_handle;
-
- v5ef_handle = find_dissector("v5ef");
dissector_add_uint("wtap_encap", WTAP_ENCAP_V5_EF, v5ef_handle);
lapd_handle = find_dissector_add_dependency("lapd", proto_v5ef);
diff --git a/epan/dissectors/packet-vp8.c b/epan/dissectors/packet-vp8.c
index c2ac54b7cb..44c4e87a90 100644
--- a/epan/dissectors/packet-vp8.c
+++ b/epan/dissectors/packet-vp8.c
@@ -580,7 +580,7 @@ proto_register_vp8(void)
"; Values must be in the range 96 - 127",
&temp_dynamic_payload_type_range, 127);
- register_dissector("vp8", dissect_vp8, proto_vp8);
+ vp8_handle = register_dissector("vp8", dissect_vp8, proto_vp8);
}
static void
@@ -602,7 +602,6 @@ proto_reg_handoff_vp8(void)
static gboolean vp8_prefs_initialized = FALSE;
if (!vp8_prefs_initialized) {
- vp8_handle = find_dissector("vp8");
dissector_add_string("rtp_dyn_payload_type" , "VP8", vp8_handle);
vp8_prefs_initialized = TRUE;
} else {
diff --git a/epan/dissectors/packet-wbxml.c b/epan/dissectors/packet-wbxml.c
index 90bf47f6cb..8693764caa 100644
--- a/epan/dissectors/packet-wbxml.c
+++ b/epan/dissectors/packet-wbxml.c
@@ -180,6 +180,8 @@ static expert_field ei_wbxml_content_type_disabled = EI_INIT;
static expert_field ei_wbxml_oversized_uintvar = EI_INIT;
static expert_field ei_wbxml_too_much_recursion = EI_INIT;
+static dissector_handle_t wbxml_handle;
+
/* WBXML Preferences */
static gboolean skip_wbxml_token_mapping = FALSE;
static gboolean disable_wbxml_token_parsing = FALSE;
@@ -8159,8 +8161,6 @@ proto_register_wbxml(void)
void
proto_reg_handoff_wbxml(void)
{
- dissector_handle_t wbxml_handle;
-
/* Heuristic dissectors would be declared by means of:
* heur_dissector_add("wsp", dissect_wbxml_heur, proto_wbxml);
*/
diff --git a/epan/dissectors/packet-wfleet-hdlc.c b/epan/dissectors/packet-wfleet-hdlc.c
index 190253a7a2..d91c4e302e 100644
--- a/epan/dissectors/packet-wfleet-hdlc.c
+++ b/epan/dissectors/packet-wfleet-hdlc.c
@@ -36,6 +36,7 @@ static int hf_wfleet_hdlc_cmd = -1;
static gint ett_wfleet_hdlc = -1;
static dissector_handle_t eth_withoutfcs_handle;
+static dissector_handle_t wfleet_hdlc_handle;
static const value_string wfleet_hdlc_cmd_vals[] = {
{ 0x03, "Un-numbered I frame"},
@@ -98,16 +99,13 @@ proto_register_wfleet_hdlc(void)
proto_register_field_array(proto_wfleet_hdlc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("wfleet_hdlc", dissect_wfleet_hdlc, proto_wfleet_hdlc);
+ wfleet_hdlc_handle = register_dissector("wfleet_hdlc", dissect_wfleet_hdlc, proto_wfleet_hdlc);
}
void
proto_reg_handoff_wfleet_hdlc(void)
{
- dissector_handle_t wfleet_hdlc_handle;
-
- wfleet_hdlc_handle = find_dissector("wfleet_hdlc");
dissector_add_uint("wtap_encap", WTAP_ENCAP_WFLEET_HDLC, wfleet_hdlc_handle);
/*
diff --git a/epan/dissectors/packet-wtp.c b/epan/dissectors/packet-wtp.c
index 709c81e6ff..20639e74e9 100644
--- a/epan/dissectors/packet-wtp.c
+++ b/epan/dissectors/packet-wtp.c
@@ -221,6 +221,7 @@ static const fragment_items wtp_frag_items = {
/* Handle for WSP dissector */
static dissector_handle_t wsp_handle;
+static dissector_handle_t wtp_fromudp_handle;
/*
* reassembly of WSP
@@ -1061,7 +1062,7 @@ proto_register_wtp(void)
proto_register_subtree_array(ett, array_length(ett));
register_dissector("wtp-wtls", dissect_wtp_fromwtls, proto_wtp);
- register_dissector("wtp-udp", dissect_wtp_fromudp, proto_wtp);
+ wtp_fromudp_handle = register_dissector("wtp-udp", dissect_wtp_fromudp, proto_wtp);
register_init_routine(wtp_defragment_init);
register_cleanup_routine(wtp_defragment_cleanup);
}
@@ -1069,15 +1070,12 @@ proto_register_wtp(void)
void
proto_reg_handoff_wtp(void)
{
- dissector_handle_t wtp_fromudp_handle;
-
/*
* Get a handle for the connection-oriented WSP dissector - if WTP
* PDUs have data, it is WSP.
*/
wsp_handle = find_dissector_add_dependency("wsp-co", proto_wtp);
- wtp_fromudp_handle = find_dissector("wtp-udp");
dissector_add_uint_with_preference("udp.port", UDP_PORT_WTP_WSP, wtp_fromudp_handle);
dissector_add_uint("gsm_sms_ud.udh.port", UDP_PORT_WTP_WSP, wtp_fromudp_handle);
dissector_add_uint("gsm_sms.udh.port", UDP_PORT_WTP_WSP, wtp_fromudp_handle);
diff --git a/epan/dissectors/packet-x25.c b/epan/dissectors/packet-x25.c
index 64522064ed..5ad0d1d02a 100644
--- a/epan/dissectors/packet-x25.c
+++ b/epan/dissectors/packet-x25.c
@@ -237,6 +237,8 @@ static gint hf_x25_reg_confirm_diagnostic = -1;
static expert_field ei_x25_facility_length = EI_INIT;
+static dissector_handle_t x25_handle;
+
static const value_string vals_modulo[] = {
{ 1, "8" },
{ 2, "128" },
@@ -2373,7 +2375,7 @@ proto_register_x25(void)
x25_heur_subdissector_list = register_heur_dissector_list("x.25", proto_x25);
register_dissector("x.25_dir", dissect_x25_dir, proto_x25);
- register_dissector("x.25", dissect_x25, proto_x25);
+ x25_handle = register_dissector("x.25", dissect_x25, proto_x25);
/* Preferences */
x25_module = prefs_register_protocol(proto_x25, NULL);
@@ -2401,8 +2403,6 @@ proto_register_x25(void)
void
proto_reg_handoff_x25(void)
{
- dissector_handle_t x25_handle;
-
/*
* Get handles for various dissectors.
*/
@@ -2411,7 +2411,6 @@ proto_reg_handoff_x25(void)
ositp_handle = find_dissector_add_dependency("ositp", proto_x25);
qllc_handle = find_dissector_add_dependency("qllc", proto_x25);
- x25_handle = find_dissector("x.25");
dissector_add_uint("llc.dsap", SAP_X25, x25_handle);
dissector_add_uint("lapd.sapi", LAPD_SAPI_X25, x25_handle);
dissector_add_uint("ax25.pid", AX25_P_ROSE, x25_handle);
diff --git a/epan/dissectors/packet-xml.c b/epan/dissectors/packet-xml.c
index f13159b340..a1876b91e4 100644
--- a/epan/dissectors/packet-xml.c
+++ b/epan/dissectors/packet-xml.c
@@ -1458,7 +1458,7 @@ proto_register_xml(void)
g_array_free(ett_arr, TRUE);
- register_dissector("xml", dissect_xml, xml_ns.hf_tag);
+ xml_handle = register_dissector("xml", dissect_xml, xml_ns.hf_tag);
init_xml_parser();
@@ -1476,8 +1476,6 @@ add_dissector_media(gpointer k, gpointer v _U_, gpointer p _U_)
void
proto_reg_handoff_xml(void)
{
- xml_handle = find_dissector("xml");
-
g_hash_table_foreach(media_types, add_dissector_media, NULL);
dissector_add_uint_range_with_preference("tcp.port", "", xml_handle);
diff --git a/epan/dissectors/packet-zrtp.c b/epan/dissectors/packet-zrtp.c
index 85fcfa2605..b899b88b6b 100644
--- a/epan/dissectors/packet-zrtp.c
+++ b/epan/dissectors/packet-zrtp.c
@@ -134,6 +134,8 @@ static gint ett_zrtp_checksum = -1;
static expert_field ei_zrtp_checksum = EI_INIT;
+static dissector_handle_t zrtp_handle;
+
/*
Definitions
@@ -1142,7 +1144,7 @@ proto_register_zrtp(void)
proto_zrtp = proto_register_protocol("ZRTP", "ZRTP", "zrtp");
proto_register_field_array(proto_zrtp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("zrtp", dissect_zrtp, proto_zrtp);
+ zrtp_handle = register_dissector("zrtp", dissect_zrtp, proto_zrtp);
expert_zrtp = expert_register_protocol(proto_zrtp);
expert_register_field_array(expert_zrtp, ei, array_length(ei));
}
@@ -1150,9 +1152,6 @@ proto_register_zrtp(void)
void
proto_reg_handoff_zrtp(void)
{
- dissector_handle_t zrtp_handle;
-
- zrtp_handle = find_dissector("zrtp");
dissector_add_for_decode_as_with_preference("udp.port", zrtp_handle);
}