aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/asn1/ldap/packet-ldap-template.c7
-rw-r--r--epan/dissectors/packet-ber.c4
-rw-r--r--epan/dissectors/packet-carp.c6
-rw-r--r--epan/dissectors/packet-cdp.c6
-rw-r--r--epan/dissectors/packet-cups.c6
-rw-r--r--epan/dissectors/packet-dccp.c6
-rw-r--r--epan/dissectors/packet-dlt.c5
-rw-r--r--epan/dissectors/packet-dsr.c7
-rw-r--r--epan/dissectors/packet-dvb-sit.c6
-rw-r--r--epan/dissectors/packet-ecmp.c10
-rw-r--r--epan/dissectors/packet-etag.c5
-rw-r--r--epan/dissectors/packet-fcip.c6
-rw-r--r--epan/dissectors/packet-fcoe.c6
-rw-r--r--epan/dissectors/packet-gdb.c7
-rw-r--r--epan/dissectors/packet-gre.c11
-rw-r--r--epan/dissectors/packet-gsm_cbsp.c5
-rw-r--r--epan/dissectors/packet-hdmi.c6
-rw-r--r--epan/dissectors/packet-hip.c15
-rw-r--r--epan/dissectors/packet-ieee17221.c9
-rw-r--r--epan/dissectors/packet-ieee8021ah.c12
-rw-r--r--epan/dissectors/packet-iso10681.c2
-rw-r--r--epan/dissectors/packet-jdwp.c6
-rw-r--r--epan/dissectors/packet-json.c4
-rw-r--r--epan/dissectors/packet-l2tp.c10
-rw-r--r--epan/dissectors/packet-lat.c6
-rw-r--r--epan/dissectors/packet-ldap.c15
-rw-r--r--epan/dissectors/packet-lpd.c6
-rw-r--r--epan/dissectors/packet-lsc.c10
-rw-r--r--epan/dissectors/packet-mpeg1.c6
-rw-r--r--epan/dissectors/packet-nbt.c12
-rw-r--r--epan/dissectors/packet-nettl.c5
-rw-r--r--epan/dissectors/packet-ospf.c10
-rw-r--r--epan/dissectors/packet-pptp.c6
-rw-r--r--epan/dissectors/packet-pvfs2.c6
-rw-r--r--epan/dissectors/packet-rtls.c6
-rw-r--r--epan/dissectors/packet-rtpproxy.c12
-rw-r--r--epan/dissectors/packet-sasp.c6
-rw-r--r--epan/dissectors/packet-sigcomp.c6
-rw-r--r--epan/dissectors/packet-symantec.c9
-rw-r--r--epan/dissectors/packet-ubdp.c3
-rw-r--r--epan/dissectors/packet-vnc.c3
-rw-r--r--epan/dissectors/packet-x11.c7
42 files changed, 140 insertions, 161 deletions
diff --git a/epan/dissectors/asn1/ldap/packet-ldap-template.c b/epan/dissectors/asn1/ldap/packet-ldap-template.c
index 8465111e9c..fa06939487 100644
--- a/epan/dissectors/asn1/ldap/packet-ldap-template.c
+++ b/epan/dissectors/asn1/ldap/packet-ldap-template.c
@@ -221,7 +221,8 @@ static dissector_handle_t gssapi_wrap_handle;
static dissector_handle_t ntlmssp_handle;
static dissector_handle_t spnego_handle;
static dissector_handle_t tls_handle;
-static dissector_handle_t ldap_handle ;
+static dissector_handle_t ldap_handle;
+static dissector_handle_t cldap_handle;
static void prefs_register_ldap(void); /* forward declaration for use in preferences registration */
@@ -2255,6 +2256,7 @@ void proto_register_ldap(void) {
proto_cldap = proto_register_protocol(
"Connectionless Lightweight Directory Access Protocol",
"CLDAP", "cldap");
+ cldap_handle = register_dissector("cldap", dissect_mscldap, proto_cldap);
ldap_tap=register_tap("ldap");
@@ -2268,9 +2270,6 @@ void proto_register_ldap(void) {
void
proto_reg_handoff_ldap(void)
{
- dissector_handle_t cldap_handle;
-
- cldap_handle = create_dissector_handle(dissect_mscldap, proto_cldap);
dissector_add_uint_with_preference("udp.port", UDP_PORT_CLDAP, cldap_handle);
gssapi_handle = find_dissector_add_dependency("gssapi", proto_ldap);
diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c
index 831c976cba..1522952683 100644
--- a/epan/dissectors/packet-ber.c
+++ b/epan/dissectors/packet-ber.c
@@ -183,6 +183,7 @@ static expert_field ei_ber_constr_bitstr = EI_INIT;
static expert_field ei_ber_real_not_primitive = EI_INIT;
static dissector_handle_t ber_handle;
+static dissector_handle_t ber_file_handle;
static gboolean show_internal_ber_fields = FALSE;
static gboolean decode_octetstring_as_ber = FALSE;
@@ -4522,6 +4523,7 @@ proto_register_ber(void)
proto_ber = proto_register_protocol("Basic Encoding Rules (ASN.1 X.690)", "BER", "ber");
ber_handle = register_dissector("ber", dissect_ber, proto_ber);
+ ber_file_handle = register_dissector("ber_file", dissect_ber_file, proto_ber);
proto_register_field_array(proto_ber, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -4579,7 +4581,6 @@ void
proto_reg_handoff_ber(void)
{
guint i = 1;
- dissector_handle_t ber_file_handle;
oid_add_from_string("asn1", "2.1");
oid_add_from_string("basic-encoding", "2.1.1");
@@ -4598,7 +4599,6 @@ proto_reg_handoff_ber(void)
ber_update_oids();
- ber_file_handle = create_dissector_handle(dissect_ber_file, proto_ber);
dissector_add_uint("wtap_encap", WTAP_ENCAP_BER, ber_file_handle);
}
diff --git a/epan/dissectors/packet-carp.c b/epan/dissectors/packet-carp.c
index 4738fd6b87..b9a852f454 100644
--- a/epan/dissectors/packet-carp.c
+++ b/epan/dissectors/packet-carp.c
@@ -20,6 +20,8 @@
void proto_register_carp(void);
void proto_reg_handoff_carp(void);
+static dissector_handle_t carp_handle;
+
static gint proto_carp = -1;
static gint ett_carp = -1;
static gint ett_carp_ver_type = -1;
@@ -233,6 +235,7 @@ void proto_register_carp(void)
expert_module_t* expert_carp;
proto_carp = proto_register_protocol("Common Address Redundancy Protocol", "CARP", "carp");
+ carp_handle = register_dissector("carp", dissect_carp, proto_carp);
proto_register_field_array(proto_carp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_carp = expert_register_protocol(proto_carp);
@@ -242,9 +245,6 @@ void proto_register_carp(void)
void
proto_reg_handoff_carp(void)
{
- dissector_handle_t carp_handle;
-
- carp_handle = create_dissector_handle(dissect_carp, proto_carp);
dissector_add_uint("ip.proto", IP_PROTO_VRRP, carp_handle);
heur_dissector_add( "ip", dissect_carp_heur, "CARP over IP", "carp_ip", proto_carp, HEURISTIC_ENABLE);
}
diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c
index f280e9fb19..ccf7dc66c8 100644
--- a/epan/dissectors/packet-cdp.c
+++ b/epan/dissectors/packet-cdp.c
@@ -38,6 +38,8 @@
void proto_register_cdp(void);
void proto_reg_handoff_cdp(void);
+static dissector_handle_t cdp_handle;
+
/* Offsets in TLV structure. */
#define TLV_TYPE 0
#define TLV_LENGTH 2
@@ -1494,6 +1496,7 @@ proto_register_cdp(void)
expert_module_t* expert_cdp;
proto_cdp = proto_register_protocol("Cisco Discovery Protocol", "CDP", "cdp");
+ cdp_handle = register_dissector("cdp", dissect_cdp, proto_cdp);
proto_register_field_array(proto_cdp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -1504,9 +1507,6 @@ proto_register_cdp(void)
void
proto_reg_handoff_cdp(void)
{
- dissector_handle_t cdp_handle;
-
- cdp_handle = create_dissector_handle(dissect_cdp, proto_cdp);
dissector_add_uint("llc.cisco_pid", CISCO_PID_CDP, cdp_handle);
dissector_add_uint("chdlc.protocol", 0x2000, cdp_handle);
dissector_add_uint("ppp.protocol", 0x0207, cdp_handle);
diff --git a/epan/dissectors/packet-cups.c b/epan/dissectors/packet-cups.c
index 3c7144c7e8..a07cd69d79 100644
--- a/epan/dissectors/packet-cups.c
+++ b/epan/dissectors/packet-cups.c
@@ -19,6 +19,8 @@
void proto_register_cups(void);
void proto_reg_handoff_cups(void);
+static dissector_handle_t cups_handle;
+
/* From cups/cups.h, GNU GPL, Copyright 1997-2001 by Easy Software Products. */
typedef guint32 cups_ptype_t; /**** Printer Type/Capability Bits ****/
enum /* Not a typedef'd enum so we can OR */
@@ -378,6 +380,7 @@ proto_register_cups(void)
};
proto_cups = proto_register_protocol("Common Unix Printing System (CUPS) Browsing Protocol", "CUPS", "cups");
+ cups_handle = register_dissector("cups", dissect_cups, proto_cups);
proto_register_field_array(proto_cups, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -388,9 +391,6 @@ proto_register_cups(void)
void
proto_reg_handoff_cups(void)
{
- dissector_handle_t cups_handle;
-
- cups_handle = create_dissector_handle(dissect_cups, proto_cups);
dissector_add_uint_with_preference("udp.port", UDP_PORT_CUPS, cups_handle);
}
diff --git a/epan/dissectors/packet-dccp.c b/epan/dissectors/packet-dccp.c
index 8617bab716..f16079a819 100644
--- a/epan/dissectors/packet-dccp.c
+++ b/epan/dissectors/packet-dccp.c
@@ -80,6 +80,8 @@
void proto_register_dccp(void);
void proto_reg_handoff_dccp(void);
+static dissector_handle_t dccp_handle;
+
/*
* FF: please keep this list in sync with
* http://www.iana.org/assignments/dccp-parameters/dccp-parameters.xml
@@ -1686,6 +1688,7 @@ proto_register_dccp(void)
proto_dccp =
proto_register_protocol("Datagram Congestion Control Protocol", "DCCP",
"dccp");
+ dccp_handle = register_dissector("dccp", dissect_dccp, proto_dccp);
proto_register_field_array(proto_dccp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_dccp = expert_register_protocol(proto_dccp);
@@ -1738,9 +1741,6 @@ proto_register_dccp(void)
void
proto_reg_handoff_dccp(void)
{
- dissector_handle_t dccp_handle;
-
- dccp_handle = create_dissector_handle(dissect_dccp, proto_dccp);
dissector_add_uint("ip.proto", IP_PROTO_DCCP, dccp_handle);
dccp_tap = register_tap("dccp");
dccp_follow_tap = register_tap("dccp_follow");
diff --git a/epan/dissectors/packet-dlt.c b/epan/dissectors/packet-dlt.c
index cc4b595d81..ce432b2849 100644
--- a/epan/dissectors/packet-dlt.c
+++ b/epan/dissectors/packet-dlt.c
@@ -1377,6 +1377,8 @@ void proto_register_dlt(void) {
/* Register the protocol name and description */
proto_dlt = proto_register_protocol(DLT_NAME_LONG, DLT_NAME, DLT_NAME_FILTER);
+ dlt_handle_tcp = register_dissector("dlt_tcp", dissect_dlt_tcp, proto_dlt);
+ dlt_handle_udp = register_dissector("dlt_udp", dissect_dlt_udp, proto_dlt);
proto_register_subtree_array(ett, array_length(ett));
proto_register_field_array(proto_dlt, hf_dlt, array_length(hf_dlt));
@@ -1388,10 +1390,7 @@ void proto_register_dlt(void) {
}
void proto_reg_handoff_dlt(void) {
- dlt_handle_udp = create_dissector_handle(dissect_dlt_udp, proto_dlt);
dissector_add_uint_with_preference("udp.port", 0, dlt_handle_udp);
-
- dlt_handle_tcp = create_dissector_handle(dissect_dlt_tcp, proto_dlt);
dissector_add_uint_with_preference("tcp.port", 0, dlt_handle_tcp);
}
diff --git a/epan/dissectors/packet-dsr.c b/epan/dissectors/packet-dsr.c
index ea3ff052f3..35506a3242 100644
--- a/epan/dissectors/packet-dsr.c
+++ b/epan/dissectors/packet-dsr.c
@@ -25,6 +25,8 @@
void proto_reg_handoff_dsr(void);
void proto_register_dsr(void);
+static dissector_handle_t dsr_handle;
+
static dissector_table_t ip_dissector_table;
/* Initialize the protocol and registered fields */
@@ -728,6 +730,7 @@ proto_register_dsr(void)
"Dynamic Source Routing",
"DSR",
"dsr");
+ dsr_handle = register_dissector("dsr", dissect_dsr, proto_dsr);
/* Required function calls to register the header fields and subtrees */
proto_register_field_array(proto_dsr, hf, array_length(hf));
@@ -738,11 +741,7 @@ proto_register_dsr(void)
void
proto_reg_handoff_dsr(void)
{
- dissector_handle_t dsr_handle;
-
ip_dissector_table = find_dissector_table("ip.proto");
-
- dsr_handle = create_dissector_handle(dissect_dsr, proto_dsr);
dissector_add_uint("ip.proto", IP_PROTO_DSR, dsr_handle);
}
/*
diff --git a/epan/dissectors/packet-dvb-sit.c b/epan/dissectors/packet-dvb-sit.c
index 7e9aec006c..a73bad0007 100644
--- a/epan/dissectors/packet-dvb-sit.c
+++ b/epan/dissectors/packet-dvb-sit.c
@@ -18,6 +18,8 @@
void proto_register_dvb_sit(void);
void proto_reg_handoff_dvb_sit(void);
+static dissector_handle_t dvb_sit_handle;
+
static int proto_dvb_sit = -1;
static int hf_dvb_sit_reserved_future_use1 = -1;
@@ -210,6 +212,7 @@ proto_register_dvb_sit(void)
};
proto_dvb_sit = proto_register_protocol("DVB Selection Information Table", "DVB SIT", "dvb_sit");
+ dvb_sit_handle = register_dissector("dvb_sit", dissect_dvb_sit, proto_dvb_sit);
proto_register_field_array(proto_dvb_sit, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -219,9 +222,6 @@ proto_register_dvb_sit(void)
void proto_reg_handoff_dvb_sit(void)
{
- dissector_handle_t dvb_sit_handle;
-
- dvb_sit_handle = create_dissector_handle(dissect_dvb_sit, proto_dvb_sit);
dissector_add_uint("mpeg_sect.tid", DVB_SIT_TID, dvb_sit_handle);
}
diff --git a/epan/dissectors/packet-ecmp.c b/epan/dissectors/packet-ecmp.c
index 5b0ed6a954..2263695fd0 100644
--- a/epan/dissectors/packet-ecmp.c
+++ b/epan/dissectors/packet-ecmp.c
@@ -29,6 +29,8 @@
void proto_reg_handoff_ecmp(void);
void proto_register_ecmp (void);
+static dissector_handle_t ecmp_tcp_handle, ecmp_udp_handle;
+
/* Wireshark ID of the ECMP protocol */
static int proto_ecmp = -1;
@@ -3530,6 +3532,9 @@ void proto_register_ecmp (void)
expert_module_t* expert_ecmp;
proto_ecmp = proto_register_protocol ("ECMP", PROTO_TAG_ECMP, "ecmp");
+ ecmp_tcp_handle = register_dissector("ecmp_tcp", dissect_ecmp_tcp, proto_ecmp);
+ ecmp_udp_handle = register_dissector("ecmp_udp", dissect_ecmp_udp, proto_ecmp);
+
/* full name short name and abbreviation (display filter name)*/
proto_register_field_array(proto_ecmp, hf, array_length (hf));
@@ -3542,11 +3547,6 @@ void proto_register_ecmp (void)
/* Wireshark literally scans this file (packet-ecmp.c) to find this function */
void proto_reg_handoff_ecmp(void)
{
- dissector_handle_t ecmp_tcp_handle, ecmp_udp_handle;
-
- ecmp_tcp_handle = create_dissector_handle(dissect_ecmp_tcp, proto_ecmp);
- ecmp_udp_handle = create_dissector_handle(dissect_ecmp_udp, proto_ecmp);
-
/* Cyclic frames are over UDP and non-cyclic are over TCP */
dissector_add_uint_with_preference("udp.port", ECMP_TCP_PORT, ecmp_udp_handle);
dissector_add_uint_with_preference("tcp.port", ECMP_TCP_PORT, ecmp_tcp_handle);
diff --git a/epan/dissectors/packet-etag.c b/epan/dissectors/packet-etag.c
index 662a8d7dea..7c488538e1 100644
--- a/epan/dissectors/packet-etag.c
+++ b/epan/dissectors/packet-etag.c
@@ -23,6 +23,7 @@
void proto_register_etag(void);
void proto_reg_handoff_etag(void);
+static dissector_handle_t etag_handle;
static dissector_handle_t ethertype_handle;
static int proto_etag = -1;
@@ -205,6 +206,7 @@ proto_register_etag(void)
module_t *etag_module;
proto_etag = proto_register_protocol("802.1BR E-Tag", "ETAG", "etag");
+ etag_handle = register_dissector("etag", dissect_etag, proto_etag);
proto_register_field_array(proto_etag, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -218,9 +220,6 @@ proto_register_etag(void)
void
proto_reg_handoff_etag(void)
{
- dissector_handle_t etag_handle;
-
- etag_handle = create_dissector_handle(dissect_etag, proto_etag);
dissector_add_uint("ethertype", ETHERTYPE_IEEE_802_1BR, etag_handle);
ethertype_handle = find_dissector_add_dependency("ethertype", proto_etag);
diff --git a/epan/dissectors/packet-fcip.c b/epan/dissectors/packet-fcip.c
index 28323888ef..7232af4b60 100644
--- a/epan/dissectors/packet-fcip.c
+++ b/epan/dissectors/packet-fcip.c
@@ -122,6 +122,8 @@ static guint fcip_port = 3225;
static gboolean fcip_desegment = TRUE;
static dissector_handle_t fc_handle;
+static dissector_handle_t fcip_handle;
+
/* This routine attempts to locate the position of the next header in the
* provided segment
@@ -611,6 +613,7 @@ proto_register_fcip (void)
/* Register the protocol name and description */
proto_fcip = proto_register_protocol("FCIP", "Fibre Channel over IP", "fcip");
+ fcip_handle = register_dissector("fcip", dissect_fcip_handle, proto_fcip);
proto_register_field_array(proto_fcip, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -634,11 +637,8 @@ proto_register_fcip (void)
void
proto_reg_handoff_fcip (void)
{
- dissector_handle_t fcip_handle;
-
heur_dissector_add("tcp", dissect_fcip_heur, "FCIP over TCP", "fcip_tcp", proto_fcip, HEURISTIC_ENABLE);
- fcip_handle = create_dissector_handle(dissect_fcip_handle, proto_fcip);
dissector_add_for_decode_as_with_preference("tcp.port", fcip_handle);
fc_handle = find_dissector_add_dependency("fc", proto_fcip);
diff --git a/epan/dissectors/packet-fcoe.c b/epan/dissectors/packet-fcoe.c
index fa924ebf89..52721697e7 100644
--- a/epan/dissectors/packet-fcoe.c
+++ b/epan/dissectors/packet-fcoe.c
@@ -89,6 +89,8 @@ static int ett_fcoe = -1;
static expert_field ei_fcoe_crc = EI_INIT;
static dissector_handle_t fc_handle;
+static dissector_handle_t fcoe_handle;
+
/* Looks for the EOF at a given offset. Returns NULL if the EOF is not
* present, is not one of the known values, or if the next three bytes, if
@@ -323,6 +325,7 @@ proto_register_fcoe(void)
/* Register the protocol name and description */
proto_fcoe = proto_register_protocol("Fibre Channel over Ethernet",
"FCoE", "fcoe");
+ fcoe_handle = register_dissector("fcoe", dissect_fcoe, proto_fcoe);
/* Required function calls to register the header fields and
* subtrees used */
@@ -339,9 +342,6 @@ proto_register_fcoe(void)
void
proto_reg_handoff_fcoe(void)
{
- dissector_handle_t fcoe_handle;
-
- fcoe_handle = create_dissector_handle(dissect_fcoe, proto_fcoe);
dissector_add_uint("ethertype", ETHERTYPE_FCOE, fcoe_handle);
fc_handle = find_dissector_add_dependency("fc", proto_fcoe);
}
diff --git a/epan/dissectors/packet-gdb.c b/epan/dissectors/packet-gdb.c
index 6cdd18faf6..253269fd30 100644
--- a/epan/dissectors/packet-gdb.c
+++ b/epan/dissectors/packet-gdb.c
@@ -43,6 +43,8 @@ static const value_string gdb_ack[] = {
void proto_register_gdb(void);
void proto_reg_handoff_gdb(void);
+static dissector_handle_t gdb_handle;
+
static int proto_gdb = -1;
static gint ett_gdb = -1;
@@ -205,6 +207,7 @@ proto_register_gdb(void)
proto_gdb = proto_register_protocol("GDB Remote Serial Protocol", "GDB remote", "gdb");
+ gdb_handle = register_dissector("gdb", dissect_gdb_tcp, proto_gdb);
proto_register_field_array(proto_gdb, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -216,10 +219,6 @@ proto_register_gdb(void)
void
proto_reg_handoff_gdb(void)
{
- dissector_handle_t gdb_handle;
-
- gdb_handle = create_dissector_handle(dissect_gdb_tcp, proto_gdb);
-
dissector_add_for_decode_as_with_preference("tcp.port", gdb_handle);
}
diff --git a/epan/dissectors/packet-gre.c b/epan/dissectors/packet-gre.c
index f49df0f196..f7d45764f3 100644
--- a/epan/dissectors/packet-gre.c
+++ b/epan/dissectors/packet-gre.c
@@ -26,6 +26,10 @@
void proto_register_gre(void);
void proto_reg_handoff_gre(void);
+static dissector_handle_t gre_handle;
+static capture_dissector_handle_t gre_cap_handle;
+
+
/*
* See RFC 1701 "Generic Routing Encapsulation (GRE)", RFC 1702
* "Generic Routing Encapsulation over IPv4 networks", RFC 2637
@@ -720,6 +724,8 @@ proto_register_gre(void)
proto_gre = proto_register_protocol("Generic Routing Encapsulation",
"GRE", "gre");
+ gre_handle = register_dissector("gre", dissect_gre, proto_gre);
+ gre_cap_handle = register_capture_dissector("gre", capture_gre, proto_gre);
proto_register_field_array(proto_gre, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_gre = expert_register_protocol(proto_gre);
@@ -751,13 +757,8 @@ proto_register_gre(void)
void
proto_reg_handoff_gre(void)
{
- dissector_handle_t gre_handle;
- capture_dissector_handle_t gre_cap_handle;
-
- gre_handle = create_dissector_handle(dissect_gre, proto_gre);
dissector_add_uint("ip.proto", IP_PROTO_GRE, gre_handle);
dissector_add_uint("udp.port", GRE_IN_UDP_PORT, gre_handle);
- gre_cap_handle = create_capture_dissector_handle(capture_gre, proto_gre);
capture_dissector_add_uint("ip.proto", IP_PROTO_GRE, gre_cap_handle);
}
diff --git a/epan/dissectors/packet-gsm_cbsp.c b/epan/dissectors/packet-gsm_cbsp.c
index 4c8331b072..4f430c7708 100644
--- a/epan/dissectors/packet-gsm_cbsp.c
+++ b/epan/dissectors/packet-gsm_cbsp.c
@@ -346,6 +346,8 @@ static const struct tlv_definition cbsp_att_tlvdef = {
void proto_register_cbsp(void);
void proto_reg_handoff_cbsp(void);
+static dissector_handle_t cbsp_handle;
+
static int proto_cbsp = -1;
static int hf_cbsp_msg_type = -1;
@@ -918,6 +920,7 @@ proto_register_cbsp(void)
};
proto_cbsp = proto_register_protocol("3GPP/GSM Cell Broadcast Service Protocol", "cbsp", "cbsp");
+ cbsp_handle = register_dissector("cbsp", dissect_cbsp, proto_cbsp);
proto_register_field_array(proto_cbsp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
@@ -925,8 +928,6 @@ proto_register_cbsp(void)
void
proto_reg_handoff_cbsp(void)
{
- dissector_handle_t cbsp_handle;
- cbsp_handle = create_dissector_handle(dissect_cbsp, proto_cbsp);
dissector_add_uint_with_preference("tcp.port", CBSP_TCP_PORT, cbsp_handle);
}
diff --git a/epan/dissectors/packet-hdmi.c b/epan/dissectors/packet-hdmi.c
index 5574dce99a..e9f2698838 100644
--- a/epan/dissectors/packet-hdmi.c
+++ b/epan/dissectors/packet-hdmi.c
@@ -24,6 +24,7 @@ void proto_reg_handoff_hdmi(void);
static int proto_hdmi = -1;
+static dissector_handle_t hdmi_handle;
static dissector_handle_t hdcp_handle;
static gint ett_hdmi = -1;
@@ -243,6 +244,7 @@ proto_register_hdmi(void)
proto_hdmi = proto_register_protocol(
"High-Definition Multimedia Interface", "HDMI", "hdmi");
+ hdmi_handle = register_dissector("hdmi", dissect_hdmi, proto_hdmi );
proto_register_field_array(proto_hdmi, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -252,11 +254,7 @@ proto_register_hdmi(void)
void
proto_reg_handoff_hdmi(void)
{
- dissector_handle_t hdmi_handle;
-
hdcp_handle = find_dissector_add_dependency("hdcp", proto_hdmi);
-
- hdmi_handle = create_dissector_handle( dissect_hdmi, proto_hdmi );
dissector_add_for_decode_as("i2c.message", hdmi_handle );
}
diff --git a/epan/dissectors/packet-hip.c b/epan/dissectors/packet-hip.c
index 3c24df84ea..a5b0103c02 100644
--- a/epan/dissectors/packet-hip.c
+++ b/epan/dissectors/packet-hip.c
@@ -31,6 +31,9 @@
void proto_register_hip(void);
void proto_reg_handoff_hip(void);
+static dissector_handle_t hip_ip_handle;
+static dissector_handle_t hip_udp_handle;
+
#define HIP_UDP_PORT 10500
#define HI_ALG_DSA 3
@@ -1580,6 +1583,8 @@ proto_register_hip(void)
expert_module_t* expert_hip;
proto_hip = proto_register_protocol("Host Identity Protocol", "HIP", "hip");
+ hip_ip_handle = register_dissector("hip", dissect_hip, proto_hip);
+ hip_udp_handle = register_dissector("hip_udp", dissect_hip_in_udp, proto_hip);
proto_register_field_array(proto_hip, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -1590,14 +1595,8 @@ proto_register_hip(void)
void
proto_reg_handoff_hip(void)
{
- dissector_handle_t hip_handle;
- dissector_handle_t hip_handle2;
-
- hip_handle = create_dissector_handle(dissect_hip, proto_hip);
- dissector_add_uint("ip.proto", IP_PROTO_HIP, hip_handle);
-
- hip_handle2 = create_dissector_handle(dissect_hip_in_udp, proto_hip);
- dissector_add_uint_with_preference("udp.port", HIP_UDP_PORT, hip_handle2);
+ dissector_add_uint("ip.proto", IP_PROTO_HIP, hip_ip_handle);
+ dissector_add_uint_with_preference("udp.port", HIP_UDP_PORT, hip_udp_handle);
}
/*
* Editor modelines - https://www.wireshark.org/tools/modelines.html
diff --git a/epan/dissectors/packet-ieee17221.c b/epan/dissectors/packet-ieee17221.c
index af935ca450..7ec75a46ad 100644
--- a/epan/dissectors/packet-ieee17221.c
+++ b/epan/dissectors/packet-ieee17221.c
@@ -25,6 +25,8 @@
void proto_register_17221(void);
void proto_reg_handoff_17221(void);
+static dissector_handle_t avb17221_handle;
+
/* 17221 Offsets */
#define P1722_HEADER_OFFSET 12
@@ -7015,6 +7017,7 @@ proto_register_17221(void)
/* Register the protocol name and description */
proto_17221 = proto_register_protocol("IEEE 1722.1 Protocol", "IEEE1722.1", "ieee17221");
+ avb17221_handle = register_dissector("ieee17221", dissect_17221, proto_17221);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_17221, hf, array_length(hf));
@@ -7027,12 +7030,6 @@ proto_register_17221(void)
void
proto_reg_handoff_17221(void)
{
-
- dissector_handle_t avb17221_handle;
-
- /* avb17221_handle = find_dissector("ieee1722"); */
-
- avb17221_handle = create_dissector_handle(dissect_17221, proto_17221);
dissector_add_uint("ieee1722.subtype", 0xFA, avb17221_handle);
dissector_add_uint("ieee1722.subtype", 0xFB, avb17221_handle);
dissector_add_uint("ieee1722.subtype", 0xFC, avb17221_handle);
diff --git a/epan/dissectors/packet-ieee8021ah.c b/epan/dissectors/packet-ieee8021ah.c
index 251089d381..cc127990e9 100644
--- a/epan/dissectors/packet-ieee8021ah.c
+++ b/epan/dissectors/packet-ieee8021ah.c
@@ -23,6 +23,8 @@
void proto_register_ieee8021ah(void);
void proto_reg_handoff_ieee8021ah(void);
+static dissector_handle_t ieee8021ah_handle;
+static dissector_handle_t ieee8021ad_handle;
static dissector_handle_t ethertype_handle;
static capture_dissector_handle_t ipx_cap_handle;
@@ -396,10 +398,14 @@ proto_register_ieee8021ah(void)
/* dot1ah */
proto_ieee8021ah = proto_register_protocol("IEEE 802.1ah", "IEEE 802.1AH",
"ieee8021ah");
+ ieee8021ah_handle = register_dissector("ieee8021ah", dissect_ieee8021ah,
+ proto_ieee8021ah);
proto_register_field_array(proto_ieee8021ah, hf, array_length(hf));
proto_ieee8021ad = proto_register_protocol("IEEE 802.1ad", "IEEE 802.1AD",
"ieee8021ad");
+ ieee8021ad_handle = register_dissector("ieee8021ad", dissect_ieee8021ad,
+ proto_ieee8021ad);
proto_register_field_array(proto_ieee8021ad, hf_1ad, array_length(hf_1ad));
/* register subtree array for both */
@@ -418,16 +424,10 @@ void
proto_reg_handoff_ieee8021ah(void)
{
static gboolean prefs_initialized = FALSE;
- static dissector_handle_t ieee8021ah_handle;
static unsigned int old_ieee8021ah_ethertype;
static capture_dissector_handle_t ieee8021ah_cap_handle;
if (!prefs_initialized){
- dissector_handle_t ieee8021ad_handle;
- ieee8021ah_handle = create_dissector_handle(dissect_ieee8021ah,
- proto_ieee8021ah);
- ieee8021ad_handle = create_dissector_handle(dissect_ieee8021ad,
- proto_ieee8021ad);
dissector_add_uint("ethertype", ETHERTYPE_IEEE_802_1AD, ieee8021ad_handle);
ethertype_handle = find_dissector_add_dependency("ethertype", proto_ieee8021ah);
find_dissector_add_dependency("ethertype", proto_ieee8021ad);
diff --git a/epan/dissectors/packet-iso10681.c b/epan/dissectors/packet-iso10681.c
index 9e749eea8c..7aee84e56d 100644
--- a/epan/dissectors/packet-iso10681.c
+++ b/epan/dissectors/packet-iso10681.c
@@ -520,6 +520,7 @@ proto_register_iso10681(void) {
"ISO 10681", /* short name */
"iso10681" /* abbrev */
);
+ iso10681_handle_flexray = register_dissector("iso10681", dissect_iso10681_flexray, proto_iso10681);
/* Register configuration options */
iso10681_module = prefs_register_protocol(proto_iso10681, proto_reg_handoff_iso10681);
@@ -550,7 +551,6 @@ proto_reg_handoff_iso10681(void) {
static gboolean initialized = FALSE;
if (!initialized) {
- iso10681_handle_flexray = create_dissector_handle(dissect_iso10681_flexray, proto_iso10681);
dissector_add_for_decode_as("flexray.subdissector", iso10681_handle_flexray);
initialized = TRUE;
diff --git a/epan/dissectors/packet-jdwp.c b/epan/dissectors/packet-jdwp.c
index 2f8a6de7ea..83413961f4 100644
--- a/epan/dissectors/packet-jdwp.c
+++ b/epan/dissectors/packet-jdwp.c
@@ -23,6 +23,8 @@
void proto_register_jdwp(void);
void proto_reg_handoff_jdwp(void);
+static dissector_handle_t jdwp_handle;
+
/* IMPORTANT IMPLEMENTATION NOTES
*
* You need to be looking at:
@@ -698,6 +700,7 @@ proto_register_jdwp(void)
};
proto_jdwp = proto_register_protocol("Java Debug Wire Protocol", "JDWP", "jdwp");
+ jdwp_handle = register_dissector("jdwp", dissect_jdwp, proto_jdwp);
proto_register_field_array(proto_jdwp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_jdwp = expert_register_protocol(proto_jdwp);
@@ -708,9 +711,6 @@ proto_register_jdwp(void)
void
proto_reg_handoff_jdwp(void)
{
- dissector_handle_t jdwp_handle;
-
- jdwp_handle = create_dissector_handle(dissect_jdwp, proto_jdwp);
dissector_add_uint_with_preference("tcp.port", JDWP_PORT, jdwp_handle);
}
diff --git a/epan/dissectors/packet-json.c b/epan/dissectors/packet-json.c
index 15f9d7d1d8..bee4768b93 100644
--- a/epan/dissectors/packet-json.c
+++ b/epan/dissectors/packet-json.c
@@ -35,6 +35,7 @@ static char* json_string_unescape(tvbparse_elem_t *tok, gboolean enclose_in_quot
static dissector_handle_t json_handle;
+static dissector_handle_t json_file_handle;
static int proto_json = -1;
static int proto_json_3gpp = -1;
@@ -2080,6 +2081,7 @@ proto_register_json(void)
proto_register_subtree_array(ett, array_length(ett));
json_handle = register_dissector("json", dissect_json, proto_json);
+ json_file_handle = register_dissector("json_file", dissect_json_file, proto_json);
init_json_parser();
@@ -2108,8 +2110,6 @@ proto_register_json(void)
void
proto_reg_handoff_json(void)
{
- dissector_handle_t json_file_handle = create_dissector_handle(dissect_json_file, proto_json);
-
heur_dissector_add("hpfeeds", dissect_json_heur, "JSON over HPFEEDS", "json_hpfeeds", proto_json, HEURISTIC_ENABLE);
heur_dissector_add("db-lsp", dissect_json_heur, "JSON over DB-LSP", "json_db_lsp", proto_json, HEURISTIC_ENABLE);
heur_dissector_add("udp", dissect_json_acdr_heur, "JSON over AC DR", "json_acdr", proto_json, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-l2tp.c b/epan/dissectors/packet-l2tp.c
index 9afeaed1cd..a99c4b1762 100644
--- a/epan/dissectors/packet-l2tp.c
+++ b/epan/dissectors/packet-l2tp.c
@@ -962,6 +962,7 @@ static dissector_handle_t llc_handle;
static dissector_handle_t l2tp_udp_handle;
static dissector_handle_t l2tp_ip_handle;
+static dissector_handle_t atm_oam_llc_handle;
#define L2TP_HMAC_MD5 0
#define L2TP_HMAC_SHA1 1
@@ -3713,6 +3714,9 @@ proto_register_l2tp(void)
proto_l2tp = proto_register_protocol(
"Layer 2 Tunneling Protocol", "L2TP", "l2tp");
+ l2tp_udp_handle = register_dissector("lt2p_udp", dissect_l2tp_udp, proto_l2tp);
+ l2tp_ip_handle = register_dissector("l2tp_ip", dissect_l2tp_ip, proto_l2tp);
+ atm_oam_llc_handle = register_dissector("atm_oam_llc", dissect_atm_oam_llc, proto_l2tp );
proto_register_field_array(proto_l2tp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_l2tp = expert_register_protocol(proto_l2tp);
@@ -3755,12 +3759,7 @@ proto_register_l2tp(void)
void
proto_reg_handoff_l2tp(void)
{
- dissector_handle_t atm_oam_llc_handle;
-
- l2tp_udp_handle = create_dissector_handle(dissect_l2tp_udp, proto_l2tp);
dissector_add_uint_with_preference("udp.port", UDP_PORT_L2TP, l2tp_udp_handle);
-
- l2tp_ip_handle = create_dissector_handle(dissect_l2tp_ip, proto_l2tp);
dissector_add_uint("ip.proto", IP_PROTO_L2TP, l2tp_ip_handle);
/*
@@ -3779,7 +3778,6 @@ proto_reg_handoff_l2tp(void)
atm_oam_handle = find_dissector_add_dependency("atm_oam_cell", proto_l2tp);
llc_handle = find_dissector_add_dependency("llc", proto_l2tp);
- atm_oam_llc_handle = create_dissector_handle( dissect_atm_oam_llc, proto_l2tp );
dissector_add_uint("l2tp.pw_type", L2TPv3_PW_AAL5, atm_oam_llc_handle);
/*
diff --git a/epan/dissectors/packet-lat.c b/epan/dissectors/packet-lat.c
index c9973bf77e..a04ca533c0 100644
--- a/epan/dissectors/packet-lat.c
+++ b/epan/dissectors/packet-lat.c
@@ -25,6 +25,8 @@ void proto_reg_handoff_lat(void);
* http://www.bitsavers.org/pdf/dec/ethernet/lat/AA-NL26A-TE_LAT_Specification_Jun89.pdf
*/
+static dissector_handle_t lat_handle;
+
static int proto_lat = -1;
static int hf_lat_rrf = -1;
static int hf_lat_master = -1;
@@ -2088,6 +2090,7 @@ proto_register_lat(void)
proto_lat = proto_register_protocol("Local Area Transport",
"LAT", "lat");
+ lat_handle = register_dissector("lat", dissect_lat, proto_lat);
proto_register_field_array(proto_lat, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_lat = expert_register_protocol(proto_lat);
@@ -2097,9 +2100,6 @@ proto_register_lat(void)
void
proto_reg_handoff_lat(void)
{
- dissector_handle_t lat_handle;
-
- lat_handle = create_dissector_handle(dissect_lat, proto_lat);
dissector_add_uint("ethertype", ETHERTYPE_LAT, lat_handle);
}
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c
index 73e819e014..d9ad4b112b 100644
--- a/epan/dissectors/packet-ldap.c
+++ b/epan/dissectors/packet-ldap.c
@@ -435,7 +435,8 @@ static dissector_handle_t gssapi_wrap_handle;
static dissector_handle_t ntlmssp_handle;
static dissector_handle_t spnego_handle;
static dissector_handle_t tls_handle;
-static dissector_handle_t ldap_handle ;
+static dissector_handle_t ldap_handle;
+static dissector_handle_t cldap_handle;
static void prefs_register_ldap(void); /* forward declaration for use in preferences registration */
@@ -3815,7 +3816,7 @@ static int dissect_PasswordPolicyResponseValue_PDU(tvbuff_t *tvb _U_, packet_inf
/*--- End of included file: packet-ldap-fn.c ---*/
-#line 909 "./asn1/ldap/packet-ldap-template.c"
+#line 910 "./asn1/ldap/packet-ldap-template.c"
static int dissect_LDAPMessage_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ldap_conv_info_t *ldap_info) {
int offset = 0;
@@ -5653,7 +5654,7 @@ void proto_register_ldap(void) {
NULL, HFILL }},
/*--- End of included file: packet-ldap-hfarr.c ---*/
-#line 2178 "./asn1/ldap/packet-ldap-template.c"
+#line 2179 "./asn1/ldap/packet-ldap-template.c"
};
/* List of subtrees */
@@ -5727,7 +5728,7 @@ void proto_register_ldap(void) {
&ett_ldap_T_warning,
/*--- End of included file: packet-ldap-ettarr.c ---*/
-#line 2192 "./asn1/ldap/packet-ldap-template.c"
+#line 2193 "./asn1/ldap/packet-ldap-template.c"
};
/* UAT for header fields */
static uat_field_t custom_attribute_types_uat_fields[] = {
@@ -5794,6 +5795,7 @@ void proto_register_ldap(void) {
proto_cldap = proto_register_protocol(
"Connectionless Lightweight Directory Access Protocol",
"CLDAP", "cldap");
+ cldap_handle = register_dissector("cldap", dissect_mscldap, proto_cldap);
ldap_tap=register_tap("ldap");
@@ -5807,9 +5809,6 @@ void proto_register_ldap(void) {
void
proto_reg_handoff_ldap(void)
{
- dissector_handle_t cldap_handle;
-
- cldap_handle = create_dissector_handle(dissect_mscldap, proto_cldap);
dissector_add_uint_with_preference("udp.port", UDP_PORT_CLDAP, cldap_handle);
gssapi_handle = find_dissector_add_dependency("gssapi", proto_ldap);
@@ -5938,7 +5937,7 @@ proto_reg_handoff_ldap(void)
/*--- End of included file: packet-ldap-dis-tab.c ---*/
-#line 2386 "./asn1/ldap/packet-ldap-template.c"
+#line 2385 "./asn1/ldap/packet-ldap-template.c"
dissector_add_uint_range_with_preference("tcp.port", TCP_PORT_RANGE_LDAP, ldap_handle);
diff --git a/epan/dissectors/packet-lpd.c b/epan/dissectors/packet-lpd.c
index 2cf16025bb..f6065eb14b 100644
--- a/epan/dissectors/packet-lpd.c
+++ b/epan/dissectors/packet-lpd.c
@@ -16,6 +16,8 @@
void proto_register_lpd(void);
void proto_reg_handoff_lpd(void);
+static dissector_handle_t lpd_handle;
+
#define TCP_PORT_PRINTER 515
static int proto_lpd = -1;
@@ -176,6 +178,7 @@ proto_register_lpd(void)
};
proto_lpd = proto_register_protocol("Line Printer Daemon Protocol", "LPD", "lpd");
+ lpd_handle = register_dissector("lpd", dissect_lpd, proto_lpd);
proto_register_field_array(proto_lpd, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
@@ -183,9 +186,6 @@ proto_register_lpd(void)
void
proto_reg_handoff_lpd(void)
{
- dissector_handle_t lpd_handle;
-
- lpd_handle = create_dissector_handle(dissect_lpd, proto_lpd);
dissector_add_uint_with_preference("tcp.port", TCP_PORT_PRINTER, lpd_handle);
}
diff --git a/epan/dissectors/packet-lsc.c b/epan/dissectors/packet-lsc.c
index 0b1fdb4c7a..9b5536d43d 100644
--- a/epan/dissectors/packet-lsc.c
+++ b/epan/dissectors/packet-lsc.c
@@ -116,6 +116,9 @@ static int hf_lsc_mode = -1;
/* Initialize the subtree pointers */
static gint ett_lsc = -1;
+static dissector_handle_t lsc_udp_handle;
+static dissector_handle_t lsc_tcp_handle;
+
/* Code to actually dissect the packets */
static int
dissect_lsc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -377,6 +380,8 @@ proto_register_lsc(void)
/* Register the protocol name and description */
proto_lsc = proto_register_protocol("Pegasus Lightweight Stream Control", "LSC", "lsc");
+ lsc_udp_handle = register_dissector("lsc_udp", dissect_lsc_udp, proto_lsc);
+ lsc_tcp_handle = register_dissector("lsc_tcp", dissect_lsc_tcp, proto_lsc);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_lsc, hf, array_length(hf));
@@ -386,11 +391,6 @@ proto_register_lsc(void)
void
proto_reg_handoff_lsc(void)
{
- dissector_handle_t lsc_udp_handle;
- dissector_handle_t lsc_tcp_handle;
-
- lsc_udp_handle = create_dissector_handle(dissect_lsc_udp, proto_lsc);
- lsc_tcp_handle = create_dissector_handle(dissect_lsc_tcp, proto_lsc);
dissector_add_for_decode_as_with_preference("udp.port", lsc_udp_handle);
dissector_add_for_decode_as_with_preference("tcp.port", lsc_tcp_handle);
}
diff --git a/epan/dissectors/packet-mpeg1.c b/epan/dissectors/packet-mpeg1.c
index eff259fea8..82b8be661c 100644
--- a/epan/dissectors/packet-mpeg1.c
+++ b/epan/dissectors/packet-mpeg1.c
@@ -26,6 +26,8 @@
void proto_register_mpeg1(void);
void proto_reg_handoff_mpeg1(void);
+static dissector_handle_t mpeg1_handle;
+
/* MPEG1 header fields */
static int proto_mpg = -1;
@@ -307,6 +309,7 @@ proto_register_mpeg1(void)
proto_mpg = proto_register_protocol("RFC 2250 MPEG1","MPEG1","mpeg1");
+ mpeg1_handle = register_dissector("mpeg1", dissect_mpeg1, proto_mpg);
proto_register_field_array(proto_mpg, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
@@ -314,9 +317,6 @@ proto_register_mpeg1(void)
void
proto_reg_handoff_mpeg1(void)
{
- dissector_handle_t mpeg1_handle;
-
- mpeg1_handle = create_dissector_handle(dissect_mpeg1, proto_mpg);
dissector_add_uint("rtp.pt", PT_MPV, mpeg1_handle);
}
diff --git a/epan/dissectors/packet-nbt.c b/epan/dissectors/packet-nbt.c
index abfae997a5..d97988d01b 100644
--- a/epan/dissectors/packet-nbt.c
+++ b/epan/dissectors/packet-nbt.c
@@ -25,6 +25,8 @@
void proto_register_nbt(void);
void proto_reg_handoff_nbt(void);
+static dissector_handle_t nbns_handle, nbdgm_handle, nbss_handle;
+
static int proto_nbns = -1;
static int hf_nbns_flags = -1;
static int hf_nbns_flags_response = -1;
@@ -1944,16 +1946,19 @@ proto_register_nbt(void)
expert_module_t* expert_nbns;
proto_nbns = proto_register_protocol("NetBIOS Name Service", "NBNS", "nbns");
+ nbns_handle = register_dissector("nbns", dissect_nbns, proto_nbns);
proto_register_field_array(proto_nbns, hf_nbns, array_length(hf_nbns));
expert_nbns = expert_register_protocol(proto_nbns);
expert_register_field_array(expert_nbns, ei, array_length(ei));
proto_nbdgm = proto_register_protocol("NetBIOS Datagram Service",
"NBDS", "nbdgm");
+ nbdgm_handle = register_dissector("nbds", dissect_nbdgm, proto_nbdgm);
proto_register_field_array(proto_nbdgm, hf_nbdgm, array_length(hf_nbdgm));
proto_nbss = proto_register_protocol("NetBIOS Session Service",
"NBSS", "nbss");
+ nbss_handle = register_dissector("nbss", dissect_nbss, proto_nbss);
proto_register_field_array(proto_nbss, hf_nbss, array_length(hf_nbss));
proto_register_subtree_array(ett, array_length(ett));
@@ -1970,15 +1975,8 @@ proto_register_nbt(void)
void
proto_reg_handoff_nbt(void)
{
- dissector_handle_t nbns_handle, nbdgm_handle, nbss_handle;
-
- nbns_handle = create_dissector_handle(dissect_nbns, proto_nbns);
dissector_add_uint_with_preference("udp.port", UDP_PORT_NBNS, nbns_handle);
-
- nbdgm_handle = create_dissector_handle(dissect_nbdgm, proto_nbdgm);
dissector_add_uint_with_preference("udp.port", UDP_PORT_NBDGM, nbdgm_handle);
-
- nbss_handle = create_dissector_handle(dissect_nbss, proto_nbss);
dissector_add_uint_range_with_preference("tcp.port", TCP_NBSS_PORT_RANGE, nbss_handle);
netbios_heur_subdissector_list = find_heur_dissector_list("netbios");
diff --git a/epan/dissectors/packet-nettl.c b/epan/dissectors/packet-nettl.c
index 76d9d23288..fd912395f6 100644
--- a/epan/dissectors/packet-nettl.c
+++ b/epan/dissectors/packet-nettl.c
@@ -32,6 +32,7 @@ static int hf_nettl_kind = -1;
static int hf_nettl_pid = -1;
static int hf_nettl_uid = -1;
+static dissector_handle_t nettl_handle;
static dissector_handle_t eth_withoutfcs_handle;
static dissector_handle_t tr_handle;
static dissector_handle_t fddi_bitswapped_handle;
@@ -310,6 +311,7 @@ proto_register_nettl(void)
/* Register the protocol name and description */
proto_nettl = proto_register_protocol("HP-UX Network Tracing and Logging", "nettl", "nettl");
+ nettl_handle = register_dissector("nettl", dissect_nettl, proto_nettl);
/* Required function calls to register the header fields and subtrees used */
@@ -322,8 +324,6 @@ proto_register_nettl(void)
void
proto_reg_handoff_nettl(void)
{
- dissector_handle_t nettl_handle;
-
/*
* Get handles for various dissectors and dissector tables.
*/
@@ -337,7 +337,6 @@ proto_reg_handoff_nettl(void)
ip_proto_dissector_table = find_dissector_table("ip.proto");
tcp_subdissector_table = find_dissector_table("tcp.port");
- nettl_handle = create_dissector_handle(dissect_nettl, proto_nettl);
dissector_add_uint("wtap_encap", WTAP_ENCAP_NETTL_ETHERNET, nettl_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_NETTL_TOKEN_RING, nettl_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_NETTL_FDDI, nettl_handle);
diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c
index a39e38b302..f3f54fac81 100644
--- a/epan/dissectors/packet-ospf.c
+++ b/epan/dissectors/packet-ospf.c
@@ -68,6 +68,9 @@
void proto_register_ospf(void);
void proto_reg_handoff_ospf(void);
+static dissector_handle_t ospf_handle;
+static capture_dissector_handle_t ospf_cap_handle;
+
#define OSPF_VERSION_2 2
#define OSPF_VERSION_3 3
#define OSPF_AF_4 4
@@ -5255,6 +5258,8 @@ proto_register_ospf(void)
proto_ospf = proto_register_protocol("Open Shortest Path First",
"OSPF", "ospf");
+ ospf_handle = register_dissector("ospf", dissect_ospf, proto_ospf);
+ ospf_cap_handle = register_capture_dissector("ospf", capture_ospf, proto_ospf);
proto_register_field_array(proto_ospf, ospff_info, array_length(ospff_info));
proto_register_subtree_array(ett, array_length(ett));
expert_ospf = expert_register_protocol(proto_ospf);
@@ -5264,12 +5269,7 @@ proto_register_ospf(void)
void
proto_reg_handoff_ospf(void)
{
- dissector_handle_t ospf_handle;
- capture_dissector_handle_t ospf_cap_handle;
-
- ospf_handle = create_dissector_handle(dissect_ospf, proto_ospf);
dissector_add_uint("ip.proto", IP_PROTO_OSPF, ospf_handle);
- ospf_cap_handle = create_capture_dissector_handle(capture_ospf, proto_ospf);
capture_dissector_add_uint("ip.proto", IP_PROTO_OSPF, ospf_cap_handle);
}
diff --git a/epan/dissectors/packet-pptp.c b/epan/dissectors/packet-pptp.c
index 05aaa015c6..9c5334afb3 100644
--- a/epan/dissectors/packet-pptp.c
+++ b/epan/dissectors/packet-pptp.c
@@ -20,6 +20,8 @@
void proto_register_pptp(void);
void proto_reg_handoff_pptp(void);
+static dissector_handle_t pptp_handle;
+
static int proto_pptp = -1;
static int hf_pptp_length = -1;
static int hf_pptp_message_type = -1;
@@ -937,6 +939,7 @@ proto_register_pptp(void)
proto_pptp = proto_register_protocol("Point-to-Point Tunnelling Protocol",
"PPTP", "pptp");
+ pptp_handle = register_dissector("pptp", dissect_pptp, proto_pptp);
proto_register_field_array(proto_pptp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_pptp = expert_register_protocol(proto_pptp);
@@ -946,9 +949,6 @@ proto_register_pptp(void)
void
proto_reg_handoff_pptp(void)
{
- dissector_handle_t pptp_handle;
-
- pptp_handle = create_dissector_handle(dissect_pptp, proto_pptp);
dissector_add_uint_with_preference("tcp.port", TCP_PORT_PPTP, pptp_handle);
}
diff --git a/epan/dissectors/packet-pvfs2.c b/epan/dissectors/packet-pvfs2.c
index 0848d50c1e..eb8edbf1ce 100644
--- a/epan/dissectors/packet-pvfs2.c
+++ b/epan/dissectors/packet-pvfs2.c
@@ -42,6 +42,8 @@ static gboolean pvfs_desegment = TRUE;
void proto_register_pvfs(void);
void proto_reg_handoff_pvfs(void);
+static dissector_handle_t pvfs_handle;
+
/* Initialize the protocol and registered fields */
static int proto_pvfs = -1;
static int hf_pvfs_magic_nr = -1;
@@ -3575,6 +3577,7 @@ proto_register_pvfs(void)
/* Register the protocol name and description */
proto_pvfs = proto_register_protocol("Parallel Virtual File System",
"PVFS", "pvfs");
+ pvfs_handle = register_dissector("pvfs", dissect_pvfs_heur, proto_pvfs);
/*
* Required function calls to register the header fields and
@@ -3599,9 +3602,6 @@ proto_register_pvfs(void)
void
proto_reg_handoff_pvfs(void)
{
- dissector_handle_t pvfs_handle;
-
- pvfs_handle = create_dissector_handle(dissect_pvfs_heur, proto_pvfs);
dissector_add_uint_with_preference("tcp.port", TCP_PORT_PVFS2, pvfs_handle);
heur_dissector_add("tcp", dissect_pvfs_heur, "PVFS over TCP", "pvfs_tcp", proto_pvfs, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-rtls.c b/epan/dissectors/packet-rtls.c
index 5ca97e49f6..b3d2b5707a 100644
--- a/epan/dissectors/packet-rtls.c
+++ b/epan/dissectors/packet-rtls.c
@@ -21,6 +21,8 @@
void proto_reg_handoff_rtls(void);
void proto_register_rtls(void);
+static dissector_handle_t rtls_handle;
+
static int proto_rtls = -1;
static int hf_rtls_message_type = -1;
static int hf_rtls_message_id = -1;
@@ -759,6 +761,7 @@ proto_register_rtls(void)
proto_rtls = proto_register_protocol("Real Time Location System", "RTLS", "rtls");
+ rtls_handle = register_dissector("rtls", dissect_rtls, proto_rtls);
proto_register_field_array(proto_rtls, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -771,9 +774,6 @@ proto_register_rtls(void)
void
proto_reg_handoff_rtls(void)
{
- dissector_handle_t rtls_handle;
-
- rtls_handle = create_dissector_handle(dissect_rtls, proto_rtls);
dissector_add_for_decode_as_with_preference("udp.port", rtls_handle);
}
diff --git a/epan/dissectors/packet-rtpproxy.c b/epan/dissectors/packet-rtpproxy.c
index 0ae8b5abc6..2010ad9252 100644
--- a/epan/dissectors/packet-rtpproxy.c
+++ b/epan/dissectors/packet-rtpproxy.c
@@ -32,6 +32,8 @@
void proto_register_rtpproxy(void);
+static dissector_handle_t rtpproxy_handle;
+
static int proto_rtpproxy = -1;
static int hf_rtpproxy_cookie = -1;
@@ -1452,6 +1454,7 @@ proto_register_rtpproxy(void)
};
proto_rtpproxy = proto_register_protocol ("Sippy RTPproxy Protocol", "RTPproxy", "rtpproxy");
+ rtpproxy_handle = register_dissector("rtpproxy", dissect_rtpproxy, proto_rtpproxy);
proto_register_field_array(proto_rtpproxy, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -1479,15 +1482,10 @@ proto_reg_handoff_rtpproxy(void)
{
static gboolean rtpproxy_initialized = FALSE;
- dissector_handle_t rtpproxy_tcp_handle, rtpproxy_udp_handle;
-
if(!rtpproxy_initialized){
- rtpproxy_tcp_handle = create_dissector_handle(dissect_rtpproxy, proto_rtpproxy);
- rtpproxy_udp_handle = create_dissector_handle(dissect_rtpproxy, proto_rtpproxy);
-
/* Register TCP port for dissection */
- dissector_add_uint_range_with_preference("tcp.port", RTPPROXY_PORT, rtpproxy_tcp_handle);
- dissector_add_uint_range_with_preference("udp.port", RTPPROXY_PORT, rtpproxy_udp_handle);
+ dissector_add_uint_range_with_preference("tcp.port", RTPPROXY_PORT, rtpproxy_handle);
+ dissector_add_uint_range_with_preference("udp.port", RTPPROXY_PORT, rtpproxy_handle);
rtpproxy_prefs_apply();
rtpproxy_initialized = TRUE;
}
diff --git a/epan/dissectors/packet-sasp.c b/epan/dissectors/packet-sasp.c
index 365e95dd8e..b1e9052c24 100644
--- a/epan/dissectors/packet-sasp.c
+++ b/epan/dissectors/packet-sasp.c
@@ -22,6 +22,8 @@
void proto_register_sasp(void);
void proto_reg_handoff_sasp(void);
+static dissector_handle_t sasp_handle;
+
static void dissect_reg_req(tvbuff_t *tvb, proto_tree *tree, guint32 offset);
static void dissect_dereg_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset);
static void dissect_reg_rep(tvbuff_t *tvb, proto_tree *tree, guint32 offset);
@@ -1508,6 +1510,7 @@ void proto_register_sasp(void)
expert_module_t* expert_sasp;
proto_sasp = proto_register_protocol("Server/Application State Protocol", "SASP", "sasp");
+ sasp_handle = register_dissector("sasp", dissect_sasp, proto_sasp);
proto_register_field_array(proto_sasp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -1530,9 +1533,6 @@ void proto_register_sasp(void)
void
proto_reg_handoff_sasp(void)
{
- dissector_handle_t sasp_handle;
-
- sasp_handle = create_dissector_handle(dissect_sasp, proto_sasp);
dissector_add_uint_with_preference("tcp.port", SASP_GLOBAL_PORT, sasp_handle);
}
diff --git a/epan/dissectors/packet-sigcomp.c b/epan/dissectors/packet-sigcomp.c
index dc8e9db325..2ab1467b40 100644
--- a/epan/dissectors/packet-sigcomp.c
+++ b/epan/dissectors/packet-sigcomp.c
@@ -158,6 +158,8 @@ static expert_field ei_sigcomp_execution_of_this_instruction_is_not_implemented
static dissector_handle_t sip_handle;
static dissector_handle_t sigcomp_handle;
+static dissector_handle_t sigcomp_tcp_handle;
+
/* set the tcp ports */
#define SIGCOMP_TCP_PORT_RANGE "5555,6666" /* Not IANA registered */
@@ -6863,6 +6865,7 @@ proto_register_sigcomp(void)
proto_raw_sigcomp = proto_register_protocol("Decompressed SigComp message as raw text", "Raw_SigComp", "raw_sigcomp");
sigcomp_handle = register_dissector("sigcomp", dissect_sigcomp, proto_sigcomp);
+ sigcomp_tcp_handle = register_dissector("sigcomp_tcp", dissect_sigcomp_tcp,proto_sigcomp);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_sigcomp, hf, array_length(hf));
@@ -6910,9 +6913,6 @@ proto_register_sigcomp(void)
void
proto_reg_handoff_sigcomp(void)
{
- dissector_handle_t sigcomp_tcp_handle;
-
- 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);
dissector_add_uint_range_with_preference("udp.port", SIGCOMP_TCP_PORT_RANGE, sigcomp_handle);
diff --git a/epan/dissectors/packet-symantec.c b/epan/dissectors/packet-symantec.c
index 2b5bd6c5eb..1a0bec71a6 100644
--- a/epan/dissectors/packet-symantec.c
+++ b/epan/dissectors/packet-symantec.c
@@ -18,6 +18,8 @@
void proto_register_symantec(void);
void proto_reg_handoff_symantec(void);
+static dissector_handle_t symantec_handle;
+
static dissector_table_t ethertype_dissector_table;
/* protocols and header fields */
@@ -121,6 +123,8 @@ proto_register_symantec(void)
proto_symantec = proto_register_protocol("Symantec Enterprise Firewall",
"Symantec", "symantec");
+ symantec_handle = register_dissector("symantec", dissect_symantec,
+ proto_symantec);
proto_register_field_array(proto_symantec, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
@@ -128,12 +132,7 @@ proto_register_symantec(void)
void
proto_reg_handoff_symantec(void)
{
- dissector_handle_t symantec_handle;
-
ethertype_dissector_table = find_dissector_table("ethertype");
-
- symantec_handle = create_dissector_handle(dissect_symantec,
- proto_symantec);
dissector_add_uint("wtap_encap", WTAP_ENCAP_SYMANTEC, symantec_handle);
}
diff --git a/epan/dissectors/packet-ubdp.c b/epan/dissectors/packet-ubdp.c
index fe414bd7fc..e4da04addf 100644
--- a/epan/dissectors/packet-ubdp.c
+++ b/epan/dissectors/packet-ubdp.c
@@ -305,8 +305,7 @@ proto_register_ubdp(void)
expert_ubdp = expert_register_protocol(proto_ubdp);
expert_register_field_array(expert_ubdp, ei, array_length(ei));
- register_dissector("ubdp", dissect_ubdp, proto_ubdp);
- ubdp_handle = create_dissector_handle(dissect_ubdp, proto_ubdp);
+ ubdp_handle = register_dissector("ubdp", dissect_ubdp, proto_ubdp);
}
void
diff --git a/epan/dissectors/packet-vnc.c b/epan/dissectors/packet-vnc.c
index 55360107d4..bf95114597 100644
--- a/epan/dissectors/packet-vnc.c
+++ b/epan/dissectors/packet-vnc.c
@@ -4888,6 +4888,7 @@ proto_register_vnc(void)
/* Register the protocol name and description */
proto_vnc = proto_register_protocol("Virtual Network Computing", "VNC", "vnc");
+ vnc_handle = register_dissector("vnc", dissect_vnc, proto_vnc);
/* Required function calls to register the header fields and subtrees */
proto_register_field_array(proto_vnc, hf, array_length(hf));
@@ -4909,8 +4910,6 @@ proto_register_vnc(void)
void
proto_reg_handoff_vnc(void)
{
- vnc_handle = create_dissector_handle(dissect_vnc, proto_vnc);
-
dissector_add_uint_range_with_preference("tcp.port", VNC_PORT_RANGE, vnc_handle);
heur_dissector_add("tcp", test_vnc_protocol, "VNC over TCP", "vnc_tcp", proto_vnc, HEURISTIC_ENABLE);
/* We don't register a port for the VNC HTTP server because
diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c
index 410f76110c..1a2ac6acde 100644
--- a/epan/dissectors/packet-x11.c
+++ b/epan/dissectors/packet-x11.c
@@ -52,6 +52,8 @@
void proto_register_x11(void);
void proto_reg_handoff_x11(void);
+static dissector_handle_t x11_handle = NULL;
+
#define cVALS(x) (const value_string*)(x)
@@ -6281,6 +6283,7 @@ void proto_register_x11(void)
/* Register the protocol name and description */
proto_x11 = proto_register_protocol("X11", "X11", "x11");
+ x11_handle = register_dissector("x11", dissect_x11, proto_x11);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_x11, hf, array_length(hf));
@@ -6306,10 +6309,6 @@ void proto_register_x11(void)
void
proto_reg_handoff_x11(void)
{
- dissector_handle_t x11_handle = NULL;
-
- x11_handle = create_dissector_handle(dissect_x11, proto_x11);
-
dissector_add_uint_range_with_preference("tcp.port", DEFAULT_X11_PORT_RANGE, x11_handle);
}