aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-03-19 20:33:14 -0400
committerMichael Mann <mmann78@netscape.net>2016-03-20 17:38:03 +0000
commit1e60d63c8c6882c8c0bdb00cf6df594e1bb6fccf (patch)
tree4147c4f2bee3b93c250a49fa8ec337072c80e713
parent2b2fc64447e5f778d969e6c850e9196d248cbbe1 (diff)
Create call_data_dissector() to call data dissector.
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--debian/libwireshark0.symbols1
-rw-r--r--epan/dissectors/asn1/cdt/cdt.cnf4
-rw-r--r--epan/dissectors/asn1/cdt/packet-cdt-template.c4
-rw-r--r--epan/dissectors/asn1/gsm_map/gsm_map.cnf2
-rw-r--r--epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c2
-rw-r--r--epan/dissectors/asn1/inap/inap.cnf2
-rw-r--r--epan/dissectors/asn1/inap/packet-inap-template.c2
-rw-r--r--epan/dissectors/asn1/tetra/packet-tetra-template.c4
-rw-r--r--epan/dissectors/file-file.c11
-rw-r--r--epan/dissectors/packet-3com-xns.c4
-rw-r--r--epan/dissectors/packet-6lowpan.c14
-rw-r--r--epan/dissectors/packet-9p.c9
-rw-r--r--epan/dissectors/packet-adb_cs.c4
-rw-r--r--epan/dissectors/packet-adwin.c11
-rw-r--r--epan/dissectors/packet-aeron.c4
-rw-r--r--epan/dissectors/packet-afp.c4
-rw-r--r--epan/dissectors/packet-ansi_a.c4
-rw-r--r--epan/dissectors/packet-ap1394.c6
-rw-r--r--epan/dissectors/packet-arcnet.c4
-rw-r--r--epan/dissectors/packet-aruba-erm.c6
-rw-r--r--epan/dissectors/packet-aruba-papi.c5
-rw-r--r--epan/dissectors/packet-asf.c5
-rw-r--r--epan/dissectors/packet-atalk.c19
-rw-r--r--epan/dissectors/packet-atm.c8
-rw-r--r--epan/dissectors/packet-atmtcp.c5
-rw-r--r--epan/dissectors/packet-ax25-nol3.c5
-rw-r--r--epan/dissectors/packet-ax25.c7
-rw-r--r--epan/dissectors/packet-bacnet.c4
-rw-r--r--epan/dissectors/packet-bat.c12
-rw-r--r--epan/dissectors/packet-batadv.c54
-rw-r--r--epan/dissectors/packet-bctp.c4
-rw-r--r--epan/dissectors/packet-bluetooth.c8
-rw-r--r--epan/dissectors/packet-bssap.c8
-rw-r--r--epan/dissectors/packet-bssgp.c11
-rw-r--r--epan/dissectors/packet-btavctp.c15
-rw-r--r--epan/dissectors/packet-btbnep.c6
-rw-r--r--epan/dissectors/packet-bthcrp.c5
-rw-r--r--epan/dissectors/packet-btrfcomm.c7
-rw-r--r--epan/dissectors/packet-bvlc.c5
-rw-r--r--epan/dissectors/packet-capwap.c12
-rw-r--r--epan/dissectors/packet-cast.c3
-rw-r--r--epan/dissectors/packet-cattp.c7
-rw-r--r--epan/dissectors/packet-ccsds.c6
-rw-r--r--epan/dissectors/packet-cdp.c5
-rw-r--r--epan/dissectors/packet-cdt.c18
-rw-r--r--epan/dissectors/packet-cfdp.c5
-rw-r--r--epan/dissectors/packet-chdlc.c8
-rw-r--r--epan/dissectors/packet-cisco-sm.c8
-rw-r--r--epan/dissectors/packet-clnp.c12
-rw-r--r--epan/dissectors/packet-cnip.c4
-rw-r--r--epan/dissectors/packet-cosine.c4
-rw-r--r--epan/dissectors/packet-dccp.c4
-rw-r--r--epan/dissectors/packet-distcc.c5
-rw-r--r--epan/dissectors/packet-dmx.c5
-rw-r--r--epan/dissectors/packet-dsi.c5
-rwxr-xr-xepan/dissectors/packet-dsr.c5
-rw-r--r--epan/dissectors/packet-dtn.c4
-rw-r--r--epan/dissectors/packet-dtpt.c5
-rw-r--r--epan/dissectors/packet-dua.c4
-rw-r--r--epan/dissectors/packet-eapol.c4
-rw-r--r--epan/dissectors/packet-egd.c7
-rw-r--r--epan/dissectors/packet-eiss.c4
-rw-r--r--epan/dissectors/packet-enc.c5
-rw-r--r--epan/dissectors/packet-enip.c8
-rw-r--r--epan/dissectors/packet-epl.c8
-rw-r--r--epan/dissectors/packet-erf.c18
-rw-r--r--epan/dissectors/packet-eth.c6
-rw-r--r--epan/dissectors/packet-ethertype.c11
-rw-r--r--epan/dissectors/packet-fc.c10
-rw-r--r--epan/dissectors/packet-fcct.c5
-rw-r--r--epan/dissectors/packet-fcels.c5
-rw-r--r--epan/dissectors/packet-fcfcs.c6
-rw-r--r--epan/dissectors/packet-fcfzs.c6
-rw-r--r--epan/dissectors/packet-fcip.c6
-rw-r--r--epan/dissectors/packet-fcoe.c6
-rw-r--r--epan/dissectors/packet-fcoib.c6
-rw-r--r--epan/dissectors/packet-fcp.c8
-rw-r--r--epan/dissectors/packet-fcsb3.c10
-rw-r--r--epan/dissectors/packet-fcswils.c5
-rw-r--r--epan/dissectors/packet-fddi.c4
-rw-r--r--epan/dissectors/packet-fefd.c5
-rw-r--r--epan/dissectors/packet-flexnet.c9
-rw-r--r--epan/dissectors/packet-flexray.c7
-rw-r--r--epan/dissectors/packet-flip.c6
-rw-r--r--epan/dissectors/packet-fmtp.c5
-rw-r--r--epan/dissectors/packet-frame.c8
-rw-r--r--epan/dissectors/packet-geneve.c4
-rw-r--r--epan/dissectors/packet-gfp.c14
-rw-r--r--epan/dissectors/packet-giop.c4
-rw-r--r--epan/dissectors/packet-gmr1_rach.c12
-rw-r--r--epan/dissectors/packet-gmr1_rr.c11
-rw-r--r--epan/dissectors/packet-gmrp.c32
-rw-r--r--epan/dissectors/packet-gprs-llc.c10
-rw-r--r--epan/dissectors/packet-gre.c4
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c4
-rw-r--r--epan/dissectors/packet-gsm_a_gm.c4
-rw-r--r--epan/dissectors/packet-gsm_a_rr.c4
-rw-r--r--epan/dissectors/packet-gsm_cbch.c8
-rw-r--r--epan/dissectors/packet-gsm_map.c16
-rw-r--r--epan/dissectors/packet-gsm_rlcmac.c23
-rw-r--r--epan/dissectors/packet-gsm_um.c6
-rw-r--r--epan/dissectors/packet-gtp.c4
-rw-r--r--epan/dissectors/packet-gvrp.c27
-rw-r--r--epan/dissectors/packet-h1.c6
-rw-r--r--epan/dissectors/packet-hci_h1.c5
-rw-r--r--epan/dissectors/packet-hci_h4.c5
-rw-r--r--epan/dissectors/packet-hpext.c6
-rw-r--r--epan/dissectors/packet-hsr.c5
-rw-r--r--epan/dissectors/packet-hsrp.c12
-rw-r--r--epan/dissectors/packet-http.c20
-rw-r--r--epan/dissectors/packet-http2.c3
-rw-r--r--epan/dissectors/packet-i2c.c5
-rw-r--r--epan/dissectors/packet-iax2.c5
-rw-r--r--epan/dissectors/packet-icap.c2
-rw-r--r--epan/dissectors/packet-icmp.c14
-rw-r--r--epan/dissectors/packet-icmpv6.c6
-rw-r--r--epan/dissectors/packet-idp.c6
-rw-r--r--epan/dissectors/packet-ieee80211.c10
-rw-r--r--epan/dissectors/packet-ieee802154.c32
-rw-r--r--epan/dissectors/packet-ieee802a.c6
-rw-r--r--epan/dissectors/packet-ifcp.c6
-rw-r--r--epan/dissectors/packet-inap.c16
-rw-r--r--epan/dissectors/packet-infiniband.c10
-rw-r--r--epan/dissectors/packet-ip.c6
-rw-r--r--epan/dissectors/packet-ipmi-session.c6
-rw-r--r--epan/dissectors/packet-ipmi-trace.c10
-rw-r--r--epan/dissectors/packet-ipmi.c6
-rw-r--r--epan/dissectors/packet-ipos.c2
-rw-r--r--epan/dissectors/packet-ipp.c6
-rw-r--r--epan/dissectors/packet-ipv6.c7
-rw-r--r--epan/dissectors/packet-ipx.c7
-rw-r--r--epan/dissectors/packet-isdn.c4
-rw-r--r--epan/dissectors/packet-isi.c6
-rw-r--r--epan/dissectors/packet-isl.c4
-rw-r--r--epan/dissectors/packet-itdm.c7
-rw-r--r--epan/dissectors/packet-iua.c5
-rw-r--r--epan/dissectors/packet-iuup.c4
-rw-r--r--epan/dissectors/packet-iwarp-ddp-rdmap.c11
-rw-r--r--epan/dissectors/packet-juniper.c6
-rw-r--r--epan/dissectors/packet-jxta.c4
-rw-r--r--epan/dissectors/packet-kismet.c5
-rw-r--r--epan/dissectors/packet-l2tp.c4
-rw-r--r--epan/dissectors/packet-lanforge.c8
-rw-r--r--epan/dissectors/packet-lapd.c10
-rw-r--r--epan/dissectors/packet-lapdm.c13
-rw-r--r--epan/dissectors/packet-lapsat.c13
-rw-r--r--epan/dissectors/packet-lat.c3
-rw-r--r--epan/dissectors/packet-lbmc.c6
-rw-r--r--epan/dissectors/packet-lisp.c26
-rw-r--r--epan/dissectors/packet-llc.c27
-rw-r--r--epan/dissectors/packet-lon.c5
-rw-r--r--epan/dissectors/packet-loop.c6
-rw-r--r--epan/dissectors/packet-lpd.c9
-rw-r--r--epan/dissectors/packet-lwapp.c4
-rw-r--r--epan/dissectors/packet-lwm.c21
-rw-r--r--epan/dissectors/packet-m3ua.c5
-rw-r--r--epan/dissectors/packet-macsec.c5
-rw-r--r--epan/dissectors/packet-mactelnet.c7
-rw-r--r--epan/dissectors/packet-mdshdr.c5
-rw-r--r--epan/dissectors/packet-mime-encap.c4
-rw-r--r--epan/dissectors/packet-mp2t.c4
-rw-r--r--epan/dissectors/packet-mpeg-dsmcc.c7
-rw-r--r--epan/dissectors/packet-mpls-y1711.c5
-rw-r--r--epan/dissectors/packet-mpls.c8
-rw-r--r--epan/dissectors/packet-mq.c10
-rw-r--r--epan/dissectors/packet-mstp.c4
-rw-r--r--epan/dissectors/packet-mtp3.c6
-rw-r--r--epan/dissectors/packet-multipart.c8
-rw-r--r--epan/dissectors/packet-nbipx.c5
-rw-r--r--epan/dissectors/packet-nbt.c5
-rw-r--r--epan/dissectors/packet-ncp.c10
-rw-r--r--epan/dissectors/packet-ndps.c5
-rw-r--r--epan/dissectors/packet-netanalyzer.c4
-rw-r--r--epan/dissectors/packet-netbios.c8
-rw-r--r--epan/dissectors/packet-netlink.c5
-rw-r--r--epan/dissectors/packet-netrom.c9
-rw-r--r--epan/dissectors/packet-nettl.c12
-rw-r--r--epan/dissectors/packet-nflog.c4
-rw-r--r--epan/dissectors/packet-nhrp.c7
-rw-r--r--epan/dissectors/packet-null.c8
-rw-r--r--epan/dissectors/packet-ocfs2.c7
-rw-r--r--epan/dissectors/packet-osi.c9
-rw-r--r--epan/dissectors/packet-ositp.c23
-rw-r--r--epan/dissectors/packet-ospf.c6
-rw-r--r--epan/dissectors/packet-ossp.c6
-rw-r--r--epan/dissectors/packet-p_mul.c5
-rw-r--r--epan/dissectors/packet-packetlogger.c7
-rw-r--r--epan/dissectors/packet-pcli.c5
-rw-r--r--epan/dissectors/packet-pdcp-lte.c4
-rw-r--r--epan/dissectors/packet-pflog.c8
-rw-r--r--epan/dissectors/packet-pgm.c4
-rw-r--r--epan/dissectors/packet-pktgen.c8
-rw-r--r--epan/dissectors/packet-pop.c4
-rw-r--r--epan/dissectors/packet-ppcap.c4
-rw-r--r--epan/dissectors/packet-ppi.c4
-rw-r--r--epan/dissectors/packet-ppp.c20
-rw-r--r--epan/dissectors/packet-pptp.c5
-rw-r--r--epan/dissectors/packet-pw-atm.c4
-rw-r--r--epan/dissectors/packet-pw-cesopsn.c4
-rw-r--r--epan/dissectors/packet-pw-common.c8
-rw-r--r--epan/dissectors/packet-pw-satop.c4
-rw-r--r--epan/dissectors/packet-q931.c5
-rw-r--r--epan/dissectors/packet-quake.c6
-rw-r--r--epan/dissectors/packet-quake2.c5
-rw-r--r--epan/dissectors/packet-quake3.c7
-rw-r--r--epan/dissectors/packet-quakeworld.c7
-rw-r--r--epan/dissectors/packet-raw.c4
-rw-r--r--epan/dissectors/packet-redback.c4
-rw-r--r--epan/dissectors/packet-reload.c5
-rw-r--r--epan/dissectors/packet-rfid-felica.c11
-rw-r--r--epan/dissectors/packet-rmcp.c5
-rw-r--r--epan/dissectors/packet-rmp.c21
-rw-r--r--epan/dissectors/packet-rohc.c10
-rw-r--r--epan/dissectors/packet-rpcap.c6
-rw-r--r--epan/dissectors/packet-rpcrdma.c4
-rw-r--r--epan/dissectors/packet-rpl.c12
-rw-r--r--epan/dissectors/packet-rtacser.c5
-rw-r--r--epan/dissectors/packet-rtp.c10
-rw-r--r--epan/dissectors/packet-rudp.c5
-rw-r--r--epan/dissectors/packet-s5066sis.c4
-rw-r--r--epan/dissectors/packet-scop.c6
-rw-r--r--epan/dissectors/packet-scsi.c19
-rw-r--r--epan/dissectors/packet-sctp.c5
-rw-r--r--epan/dissectors/packet-sdlc.c4
-rw-r--r--epan/dissectors/packet-ses.c8
-rw-r--r--epan/dissectors/packet-sflow.c4
-rw-r--r--epan/dissectors/packet-sita.c4
-rw-r--r--epan/dissectors/packet-sll.c4
-rw-r--r--epan/dissectors/packet-slowprotocols.c6
-rw-r--r--epan/dissectors/packet-smb-direct.c4
-rw-r--r--epan/dissectors/packet-smb-mailslot.c4
-rw-r--r--epan/dissectors/packet-smb-pipe.c12
-rw-r--r--epan/dissectors/packet-smb2.c4
-rw-r--r--epan/dissectors/packet-sna.c62
-rw-r--r--epan/dissectors/packet-sndcp.c4
-rw-r--r--epan/dissectors/packet-socketcan.c6
-rw-r--r--epan/dissectors/packet-spdy.c6
-rw-r--r--epan/dissectors/packet-spp.c6
-rw-r--r--epan/dissectors/packet-stt.c4
-rw-r--r--epan/dissectors/packet-sua.c4
-rw-r--r--epan/dissectors/packet-tali.c6
-rw-r--r--epan/dissectors/packet-tdmoe.c4
-rw-r--r--epan/dissectors/packet-tdmop.c4
-rw-r--r--epan/dissectors/packet-tds.c4
-rw-r--r--epan/dissectors/packet-tetra.c14
-rw-r--r--epan/dissectors/packet-tftp.c4
-rw-r--r--epan/dissectors/packet-tipc.c8
-rw-r--r--epan/dissectors/packet-tns.c9
-rw-r--r--epan/dissectors/packet-tr.c4
-rw-r--r--epan/dissectors/packet-turbocell.c7
-rw-r--r--epan/dissectors/packet-turnchannel.c7
-rw-r--r--epan/dissectors/packet-tzsp.c4
-rw-r--r--epan/dissectors/packet-ua.c5
-rw-r--r--epan/dissectors/packet-udld.c5
-rw-r--r--epan/dissectors/packet-udp.c4
-rw-r--r--epan/dissectors/packet-udt.c4
-rw-r--r--epan/dissectors/packet-uma.c19
-rw-r--r--epan/dissectors/packet-usb.c6
-rw-r--r--epan/dissectors/packet-usbip.c5
-rw-r--r--epan/dissectors/packet-user_encap.c6
-rw-r--r--epan/dissectors/packet-v120.c11
-rw-r--r--epan/dissectors/packet-vines.c10
-rw-r--r--epan/dissectors/packet-wai.c7
-rw-r--r--epan/dissectors/packet-websocket.c4
-rw-r--r--epan/dissectors/packet-wsmp.c6
-rw-r--r--epan/dissectors/packet-x25.c4
-rw-r--r--epan/dissectors/packet-xip-serval.c4
-rw-r--r--epan/dissectors/packet-xip.c4
-rw-r--r--epan/dissectors/packet-zbee-aps.c22
-rw-r--r--epan/dissectors/packet-zbee-nwk-gp.c7
-rw-r--r--epan/dissectors/packet-zbee-nwk.c13
-rw-r--r--epan/dissectors/packet-zbee-security.c24
-rw-r--r--epan/dissectors/packet-zbee-security.h1
-rw-r--r--epan/dissectors/packet-zbee-zcl.c7
-rw-r--r--epan/dissectors/packet-zbee-zdp.c10
-rw-r--r--epan/dissectors/packet-ziop.c5
-rw-r--r--epan/packet.c5
-rw-r--r--epan/packet.h2
-rw-r--r--plugins/docsis/packet-docsis.c4
-rw-r--r--plugins/docsis/packet-macmgmt.c5
-rw-r--r--plugins/ethercat/packet-ethercat-frame.c4
-rw-r--r--plugins/irda/packet-ircomm.c19
-rw-r--r--plugins/irda/packet-irda.c15
-rw-r--r--plugins/irda/packet-sir.c4
-rw-r--r--plugins/profinet/packet-pn-rt.c4
285 files changed, 615 insertions, 1576 deletions
diff --git a/debian/libwireshark0.symbols b/debian/libwireshark0.symbols
index 76f9a386d8..033ffa79bf 100644
--- a/debian/libwireshark0.symbols
+++ b/debian/libwireshark0.symbols
@@ -88,6 +88,7 @@ libwireshark.so.0 libwireshark0 #MINVER#
bytes_to_str@Base 1.99.2
bytestring_to_str@Base 1.9.1
call_ber_oid_callback@Base 1.9.1
+ call_data_dissector@Base 2.1.0
call_dissector@Base 1.9.1
call_dissector_only@Base 1.9.1
call_dissector_with_data@Base 1.9.1
diff --git a/epan/dissectors/asn1/cdt/cdt.cnf b/epan/dissectors/asn1/cdt/cdt.cnf
index a3b8e0a7e2..299ee1e7b2 100644
--- a/epan/dissectors/asn1/cdt/cdt.cnf
+++ b/epan/dissectors/asn1/cdt/cdt.cnf
@@ -90,7 +90,7 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
switch (content_type) {
case CDT_UNDEFINED:
- call_dissector (data_handle, next_tvb, actx->pinfo, top_tree);
+ call_data_dissector(next_tvb, actx->pinfo, top_tree);
break;
case CDT_EXTERNAL:
dissect_unknown_ber (actx->pinfo, next_tvb, 0, top_tree);
@@ -99,7 +99,7 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
dissect_p1_mts_apdu (next_tvb, actx->pinfo, top_tree, NULL);
break;
default:
- call_dissector (data_handle, next_tvb, actx->pinfo, top_tree);
+ call_data_dissector(next_tvb, actx->pinfo, top_tree);
break;
}
diff --git a/epan/dissectors/asn1/cdt/packet-cdt-template.c b/epan/dissectors/asn1/cdt/packet-cdt-template.c
index 355737d926..ef2857ddcd 100644
--- a/epan/dissectors/asn1/cdt/packet-cdt-template.c
+++ b/epan/dissectors/asn1/cdt/packet-cdt-template.c
@@ -59,8 +59,6 @@ static guint32 content_type = 0;
static int proto_cdt = -1;
#include "packet-cdt-hf.c"
-static dissector_handle_t data_handle = NULL;
-
/* Initialize the subtree pointers */
#include "packet-cdt-ett.c"
@@ -128,6 +126,4 @@ void proto_register_cdt (void) {
/*--- proto_reg_handoff_cdt ---------------------------------------*/
void proto_reg_handoff_cdt (void) {
#include "packet-cdt-dis-tab.c"
-
- data_handle = find_dissector ("data");
}
diff --git a/epan/dissectors/asn1/gsm_map/gsm_map.cnf b/epan/dissectors/asn1/gsm_map/gsm_map.cnf
index e8b1cbb1bb..5429d72903 100644
--- a/epan/dissectors/asn1/gsm_map/gsm_map.cnf
+++ b/epan/dissectors/asn1/gsm_map/gsm_map.cnf
@@ -233,7 +233,7 @@ MAP-DialoguePDU B "0.4.0.0.1.1.1.1" "map-DialogueAS"
if (actx->external.direct_ref_present){
offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, ext_tree, NULL);
}else{
- call_dissector(data_handle, tvb, actx->pinfo, ext_tree);
+ call_data_dissector(tvb, actx->pinfo, ext_tree);
offset = tvb_reported_length_remaining(tvb,offset);
}
diff --git a/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c b/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c
index 01dc00b359..1151f9876f 100644
--- a/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c
+++ b/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c
@@ -189,7 +189,6 @@ static expert_field ei_gsm_map_unknown_invokeData = EI_INIT;
static expert_field ei_gsm_map_undecoded = EI_INIT;
static dissector_handle_t gsm_sms_handle; /* SMS TPDU */
-static dissector_handle_t data_handle;
static dissector_handle_t ranap_handle;
static dissector_handle_t dtap_handle;
static dissector_handle_t map_handle;
@@ -2631,7 +2630,6 @@ void proto_reg_handoff_gsm_map(void) {
if (!map_prefs_initialized) {
map_prefs_initialized = TRUE;
- data_handle = find_dissector("data");
ranap_handle = find_dissector_add_dependency("ranap", proto_gsm_map);
dtap_handle = find_dissector_add_dependency("gsm_a_dtap", proto_gsm_map);
gsm_sms_handle = find_dissector_add_dependency("gsm_sms", proto_gsm_map);
diff --git a/epan/dissectors/asn1/inap/inap.cnf b/epan/dissectors/asn1/inap/inap.cnf
index 589796c152..60ea294711 100644
--- a/epan/dissectors/asn1/inap/inap.cnf
+++ b/epan/dissectors/asn1/inap/inap.cnf
@@ -220,7 +220,7 @@ static const inap_err_t inap_err_tab[] = {
if (obj_id){
offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, ext_tree, NULL);
}else{
- call_dissector(data_handle, tvb, actx->pinfo, ext_tree);
+ call_data_dissector(tvb, actx->pinfo, ext_tree);
offset = tvb_reported_length_remaining(tvb,offset);
}
diff --git a/epan/dissectors/asn1/inap/packet-inap-template.c b/epan/dissectors/asn1/inap/packet-inap-template.c
index d1fc40d8c3..e0c8bf3cf5 100644
--- a/epan/dissectors/asn1/inap/packet-inap-template.c
+++ b/epan/dissectors/asn1/inap/packet-inap-template.c
@@ -61,7 +61,6 @@ static int proto_inap = -1;
static range_t *global_ssn_range;
static dissector_handle_t inap_handle;
-static dissector_handle_t data_handle;
/* Global variables */
static guint32 opcode=0;
@@ -179,7 +178,6 @@ void proto_reg_handoff_inap(void) {
if (!inap_prefs_initialized) {
inap_prefs_initialized = TRUE;
inap_handle = find_dissector("inap");
- data_handle = find_dissector("data");
oid_add_from_string("Core-INAP-CS1-Codes","0.4.0.1.1.0.3.0");
oid_add_from_string("iso(1) identified-organization(3) icd-ecma(12) member-company(2) 1107 oen(3) inap(3) extensions(2)","1.3.12.2.1107.3.3.2");
oid_add_from_string("alcatel(1006)","1.3.12.2.1006.64");
diff --git a/epan/dissectors/asn1/tetra/packet-tetra-template.c b/epan/dissectors/asn1/tetra/packet-tetra-template.c
index 2b8dea2183..fbff495526 100644
--- a/epan/dissectors/asn1/tetra/packet-tetra-template.c
+++ b/epan/dissectors/asn1/tetra/packet-tetra-template.c
@@ -46,9 +46,6 @@ void proto_reg_handoff_tetra(void);
/* Wireshark ID of the tetra protocol */
static int proto_tetra = -1;
-/* These are the handles of our subdissectors */
-static dissector_handle_t data_handle = NULL;
-
static dissector_handle_t tetra_handle;
static int global_tetra_port = 7074;
@@ -552,7 +549,6 @@ void proto_reg_handoff_tetra(void)
static gboolean initialized=FALSE;
if (!initialized) {
- data_handle = find_dissector("data");
tetra_handle = create_dissector_handle(dissect_tetra, proto_tetra);
dissector_add_uint("udp.port", global_tetra_port, tetra_handle);
}
diff --git a/epan/dissectors/file-file.c b/epan/dissectors/file-file.c
index 625a908e0c..5748057558 100644
--- a/epan/dissectors/file-file.c
+++ b/epan/dissectors/file-file.c
@@ -46,7 +46,6 @@
#include "file-file.h"
void proto_register_file(void);
-void proto_reg_handoff_file(void);
static int proto_file = -1;
static int hf_file_record_number = -1;
@@ -64,8 +63,6 @@ static gint ett_file = -1;
static int file_tap = -1;
-static dissector_handle_t data_handle;
-
dissector_table_t file_encap_dissector_table;
/*
@@ -203,7 +200,7 @@ dissect_file_record(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
col_add_fstr(pinfo->cinfo, COL_INFO, "FTAP_ENCAP = %d",
pinfo->pkt_encap);
- call_dissector(data_handle,tvb, pinfo, parent_tree);
+ call_data_dissector(tvb, pinfo, parent_tree);
}
#ifdef _MSC_VER
} __except(EXCEPTION_EXECUTE_HANDLER /* handle all exceptions */) {
@@ -420,12 +417,6 @@ proto_register_file(void)
file_tap=register_tap("file");
}
-void
-proto_reg_handoff_file(void)
-{
- data_handle = find_dissector("data");
-}
-
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissectors/packet-3com-xns.c b/epan/dissectors/packet-3com-xns.c
index 62bd78a6ac..617f5b3fc7 100644
--- a/epan/dissectors/packet-3com-xns.c
+++ b/epan/dissectors/packet-3com-xns.c
@@ -45,7 +45,6 @@ static const value_string retix_bpdu_type_vals[] = {
static dissector_table_t ethertype_subdissector_table;
static dissector_handle_t retix_bpdu_handle;
-static dissector_handle_t data_handle;
/*
* Apparently 3Com had some scheme for encapsulating XNS in 802.2 LLC,
@@ -86,7 +85,7 @@ dissect_3com_xns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
tvb, 0, 2, type);
if (!dissector_try_uint(ethertype_subdissector_table,
type, next_tvb, pinfo, tree))
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -120,7 +119,6 @@ proto_reg_handoff_3com_xns(void)
dissector_handle_t our_xns_handle;
retix_bpdu_handle = find_dissector_add_dependency("rbpdu", proto_3com_xns);
- data_handle = find_dissector("data");
ethertype_subdissector_table = find_dissector_table("ethertype");
diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c
index 512c243686..754b61fd8b 100644
--- a/epan/dissectors/packet-6lowpan.c
+++ b/epan/dissectors/packet-6lowpan.c
@@ -296,7 +296,6 @@ static expert_field ei_6lowpan_bad_ext_header_length = EI_INIT;
/* Subdissector handles. */
static dissector_handle_t handle_6lowpan;
-static dissector_handle_t data_handle;
static dissector_handle_t ipv6_handle;
/* Value Strings */
@@ -1963,7 +1962,7 @@ dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi
*/
if (!tvb_bytes_exist(tvb, offset, ext_len)) {
/* Call the data dissector for the remainder. */
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, nhc_tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, nhc_tree);
/* Copy the remainder, and truncate the real buffer length. */
nhdr->length = tvb_captured_length_remaining(tvb, offset) + ext_hlen;
@@ -1975,10 +1974,10 @@ dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi
if (ext_proto == IP_PROTO_FRAGMENT) {
/* Display the extension header using the data dissector. */
- call_dissector(data_handle, tvb_new_subset_length(tvb, offset+1, ext_len-1), pinfo, nhc_tree);
+ call_data_dissector(tvb_new_subset_length(tvb, offset+1, ext_len-1), pinfo, nhc_tree);
} else {
/* Display the extension header using the data dissector. */
- call_dissector(data_handle, tvb_new_subset_length(tvb, offset, ext_len), pinfo, nhc_tree);
+ call_data_dissector(tvb_new_subset_length(tvb, offset, ext_len), pinfo, nhc_tree);
}
/* Copy the extension header into the struct. */
@@ -2445,7 +2444,7 @@ dissect_6lowpan_frag_first(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Reassembly was unsuccessful; show this fragment. This may
just mean that we don't yet have all the fragments, so
we should not just continue dissecting. */
- call_dissector(data_handle, frag_tvb, pinfo, proto_tree_get_root(tree));
+ call_data_dissector(frag_tvb, pinfo, proto_tree_get_root(tree));
return NULL;
}
} /* dissect_6lowpan_frag_first */
@@ -2526,7 +2525,7 @@ dissect_6lowpan_frag_middle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* If reassembly failed, display the payload fragment using the data dissector. */
else {
new_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, new_tvb, pinfo, proto_tree_get_root(tree));
+ call_data_dissector(new_tvb, pinfo, proto_tree_get_root(tree));
return NULL;
}
} /* dissect_6lowpan_frag_middle */
@@ -2563,7 +2562,7 @@ dissect_6lowpan_unknown(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Create a tvbuff subset for the remaining data. */
data_tvb = tvb_new_subset_remaining(tvb, 1);
- call_dissector(data_handle, data_tvb, pinfo, proto_tree_get_root(tree));
+ call_data_dissector(data_tvb, pinfo, proto_tree_get_root(tree));
} /* dissect_6lowpan_unknown */
/*FUNCTION:------------------------------------------------------
@@ -2977,7 +2976,6 @@ prefs_6lowpan_apply(void)
void
proto_reg_handoff_6lowpan(void)
{
- data_handle = find_dissector("data");
ipv6_handle = find_dissector_add_dependency("ipv6", proto_6lowpan);
/* Register the 6LoWPAN dissector with IEEE 802.15.4 */
diff --git a/epan/dissectors/packet-9p.c b/epan/dissectors/packet-9p.c
index b439cd06ad..97034e0699 100644
--- a/epan/dissectors/packet-9p.c
+++ b/epan/dissectors/packet-9p.c
@@ -942,9 +942,6 @@ static int hf_9P_lock_procid = -1;
static int hf_9P_lock_status = -1;
static int hf_9P_unknown_message = -1;
-/*handle for dissecting data in 9P msgs*/
-static dissector_handle_t data_handle;
-
/* subtree pointers */
static gint ett_9P = -1;
static gint ett_9P_omode = -1;
@@ -1553,7 +1550,7 @@ static int dissect_9P_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
len = tvb_reported_length_remaining(tvb, offset);
reportedlen = ((gint)u32&0xffff) > len ? len : (gint)u32&0xffff;
next_tvb = tvb_new_subset(tvb, offset, len, reportedlen);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
offset += len;
conv_free_tag(pinfo, tag);
@@ -1574,7 +1571,7 @@ static int dissect_9P_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
len = tvb_reported_length_remaining(tvb, offset);
reportedlen = ((gint)u32&0xffff) > len ? len : (gint)u32&0xffff;
next_tvb = tvb_new_subset(tvb, offset, len, reportedlen);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
offset += len;
conv_set_tag(pinfo, tag, ninemsg, _9P_NOFID, NULL);
@@ -2760,8 +2757,6 @@ void proto_reg_handoff_9P(void)
{
dissector_handle_t ninep_handle;
- data_handle = find_dissector("data");
-
ninep_handle = create_dissector_handle(dissect_9P, proto_9P);
dissector_add_uint("tcp.port", NINEPORT, ninep_handle);
diff --git a/epan/dissectors/packet-adb_cs.c b/epan/dissectors/packet-adb_cs.c
index 124c249859..5bac91b1b7 100644
--- a/epan/dissectors/packet-adb_cs.c
+++ b/epan/dissectors/packet-adb_cs.c
@@ -48,7 +48,6 @@ static expert_field ei_incomplete_message = EI_INIT;
static dissector_handle_t adb_cs_handle;
static dissector_handle_t adb_service_handle;
-static dissector_handle_t data_handle;
static wmem_tree_t *client_requests = NULL;
@@ -350,7 +349,7 @@ dissect_adb_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
PROTO_ITEM_SET_GENERATED(p_item);
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, main_tree);
+ call_data_dissector(next_tvb, pinfo, main_tree);
offset += tvb_captured_length_remaining(tvb, offset);
}
@@ -434,7 +433,6 @@ proto_register_adb_cs(void)
void
proto_reg_handoff_adb_cs(void)
{
- data_handle = find_dissector("data");
adb_service_handle = find_dissector_add_dependency("adb_service", proto_adb_cs);
dissector_add_for_decode_as("tcp.port", adb_cs_handle);
diff --git a/epan/dissectors/packet-adwin.c b/epan/dissectors/packet-adwin.c
index 236ef32599..033d1ff66e 100644
--- a/epan/dissectors/packet-adwin.c
+++ b/epan/dissectors/packet-adwin.c
@@ -498,8 +498,6 @@ static int hf_adwin_val4 = -1;
static gint ett_adwin = -1;
static gint ett_adwin_debug = -1;
-static dissector_handle_t data_handle;
-
/* response/request tracking */
typedef struct _adwin_transaction_t {
guint32 req_frame;
@@ -854,7 +852,7 @@ dissect_UDPR2(tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item(adwin_tree, hf_adwin_packet_index, tvb, 4, 4, ENC_LITTLE_ENDIAN);
if (! global_adwin_dissect_data) {
- call_dissector(data_handle, tvb_new_subset_length(tvb, 8, 250*4), pinfo, adwin_debug_tree);
+ call_data_dissector(tvb_new_subset_length(tvb, 8, 250*4), pinfo, adwin_debug_tree);
return;
}
@@ -893,7 +891,7 @@ dissect_UDPR3(tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item(adwin_tree, hf_adwin_packet_no, tvb, 4, 4, ENC_LITTLE_ENDIAN);
if (! global_adwin_dissect_data) {
- call_dissector(data_handle, tvb_new_subset_length(tvb, 8, 350*4), pinfo, adwin_debug_tree);
+ call_data_dissector(tvb_new_subset_length(tvb, 8, 350*4), pinfo, adwin_debug_tree);
return;
}
@@ -945,7 +943,7 @@ dissect_UDPR4(tvbuff_t *tvb, packet_info *pinfo,
data_type = tvb_get_letohl(tvb, 1412);
if (! global_adwin_dissect_data) {
- call_dissector(data_handle, tvb_new_subset_length(tvb, 8, 350*4), pinfo, adwin_debug_tree);
+ call_data_dissector(tvb_new_subset_length(tvb, 8, 350*4), pinfo, adwin_debug_tree);
return;
}
@@ -1004,7 +1002,7 @@ dissect_GDSHP(tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item(adwin_tree, hf_adwin_unused, tvb, 8, 4, ENC_NA);
if (! global_adwin_dissect_data) {
- call_dissector(data_handle, tvb_new_subset_length(tvb, 12, 336*4), pinfo, adwin_debug_tree);
+ call_data_dissector(tvb_new_subset_length(tvb, 12, 336*4), pinfo, adwin_debug_tree);
return;
}
@@ -1170,7 +1168,6 @@ proto_reg_handoff_adwin(void)
if (! adwin_prefs_initialized) {
adwin_handle = create_dissector_handle(dissect_adwin, proto_adwin);
- data_handle = find_dissector("data");
adwin_prefs_initialized = TRUE;
} else {
dissector_delete_uint("udp.port", udp_port, adwin_handle);
diff --git a/epan/dissectors/packet-aeron.c b/epan/dissectors/packet-aeron.c
index 20a05657ac..d89eb0fde3 100644
--- a/epan/dissectors/packet-aeron.c
+++ b/epan/dissectors/packet-aeron.c
@@ -42,7 +42,6 @@ static int proto_aeron = -1;
/* Dissector handles */
static dissector_handle_t aeron_dissector_handle;
-static dissector_handle_t aeron_data_dissector_handle;
static heur_dissector_list_t aeron_heuristic_subdissector_list;
/*----------------------------------------------------------------------------*/
@@ -2403,7 +2402,7 @@ static int dissect_aeron_data(tvbuff_t * tvb, int offset, packet_info * pinfo, p
}
if (!dissector_found)
{
- call_dissector(aeron_data_dissector_handle, data_tvb, pinfo, subtree);
+ call_data_dissector(data_tvb, pinfo, subtree);
}
}
aeron_sequence_report(tvb, pinfo, subtree, transport, &pktinfo, finfo);
@@ -3135,7 +3134,6 @@ void proto_reg_handoff_aeron(void)
aeron_dissector_handle = create_dissector_handle(dissect_aeron, proto_aeron);
dissector_add_for_decode_as("udp.port", aeron_dissector_handle);
heur_dissector_add("udp", test_aeron_packet, "Aeron over UDP", "aeron_udp", proto_aeron, HEURISTIC_DISABLE);
- aeron_data_dissector_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-afp.c b/epan/dissectors/packet-afp.c
index bf8df16ba7..6a81665b86 100644
--- a/epan/dissectors/packet-afp.c
+++ b/epan/dissectors/packet-afp.c
@@ -370,7 +370,6 @@ static expert_field ei_afp_toc_offset = EI_INIT;
static int afp_tap = -1;
-static dissector_handle_t data_handle;
static dissector_handle_t spotlight_handle;
static const value_string vol_signature_vals[] = {
@@ -5520,7 +5519,7 @@ dissect_afp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
}
}
if (offset < len) {
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset),
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset),
pinfo, afp_tree);
}
@@ -7279,7 +7278,6 @@ proto_register_afp(void)
void
proto_reg_handoff_afp(void)
{
- data_handle = find_dissector("data");
spotlight_handle = find_dissector_add_dependency("afp_spotlight", proto_afp);
}
diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c
index e8673c07e6..b0a60c7ee8 100644
--- a/epan/dissectors/packet-ansi_a.c
+++ b/epan/dissectors/packet-ansi_a.c
@@ -1373,7 +1373,6 @@ static expert_field ei_ansi_a_unknown_dtap_msg = EI_INIT;
static expert_field ei_ansi_a_unknown_bsmap_msg = EI_INIT;
static expert_field ei_ansi_a_undecoded = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t dtap_handle;
static dissector_table_t is637_dissector_table; /* IS-637-A Transport Layer (SMS) */
static dissector_table_t is683_dissector_table; /* IS-683-A (OTA) */
@@ -10360,7 +10359,7 @@ dissect_dtap_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
/*
* too short to be DTAP
*/
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return;
}
@@ -12917,7 +12916,6 @@ proto_reg_handoff_ansi_a(void)
bsmap_handle = create_dissector_handle(dissect_bsmap, proto_a_bsmap);
dtap_handle = create_dissector_handle(dissect_dtap, proto_a_dtap);
sip_dtap_bsmap_handle = create_dissector_handle(dissect_sip_dtap_bsmap, proto_a_dtap);
- data_handle = find_dissector("data");
dissector_add_uint("bsap.pdu_type", BSSAP_PDU_TYPE_BSMAP, bsmap_handle);
dissector_add_uint("bsap.pdu_type", BSSAP_PDU_TYPE_DTAP, dtap_handle);
diff --git a/epan/dissectors/packet-ap1394.c b/epan/dissectors/packet-ap1394.c
index f864af397e..90939a2d8f 100644
--- a/epan/dissectors/packet-ap1394.c
+++ b/epan/dissectors/packet-ap1394.c
@@ -41,8 +41,6 @@ static gint ett_ap1394 = -1;
static dissector_table_t ethertype_subdissector_table;
-static dissector_handle_t data_handle;
-
static gboolean
capture_ap1394(const guchar *pd, int offset, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header _U_)
{
@@ -90,7 +88,7 @@ dissect_ap1394(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
if (!dissector_try_uint(ethertype_subdissector_table, etype, next_tvb,
pinfo, tree))
{
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -124,8 +122,6 @@ proto_reg_handoff_ap1394(void)
{
dissector_handle_t ap1394_handle;
- data_handle = find_dissector("data");
-
ethertype_subdissector_table = find_dissector_table("ethertype");
ap1394_handle = create_dissector_handle(dissect_ap1394, proto_ap1394);
diff --git a/epan/dissectors/packet-arcnet.c b/epan/dissectors/packet-arcnet.c
index 9338a393b8..fb1a0cec5c 100644
--- a/epan/dissectors/packet-arcnet.c
+++ b/epan/dissectors/packet-arcnet.c
@@ -52,7 +52,6 @@ static gint ett_arcnet = -1;
static int arcnet_address_type = -1;
static dissector_table_t arcnet_dissector_table;
-static dissector_handle_t data_handle;
/* Cache protocol for packet counting */
static int proto_ipx = -1;
@@ -283,7 +282,7 @@ dissect_arcnet_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
next_tvb, pinfo, tree))
{
col_add_fstr (pinfo->cinfo, COL_PROTOCOL, "0x%04x", protID);
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -414,7 +413,6 @@ proto_reg_handoff_arcnet (void)
register_capture_dissector("wtap_encap", WTAP_ENCAP_ARCNET_LINUX, capture_arcnet, proto_arcnet);
register_capture_dissector("wtap_encap", WTAP_ENCAP_ARCNET, capture_arcnet_has_exception, proto_arcnet);
- data_handle = find_dissector ("data");
}
/*
diff --git a/epan/dissectors/packet-aruba-erm.c b/epan/dissectors/packet-aruba-erm.c
index b34d5054be..2a6c1f02b1 100644
--- a/epan/dissectors/packet-aruba-erm.c
+++ b/epan/dissectors/packet-aruba-erm.c
@@ -159,7 +159,6 @@ static dissector_handle_t wlan_radio_handle;
static dissector_handle_t wlan_withfcs_handle;
static dissector_handle_t peek_handle;
static dissector_handle_t ppi_handle;
-static dissector_handle_t data_handle;
static dissector_table_t aruba_erm_subdissector_table;
@@ -216,7 +215,7 @@ dissect_aruba_erm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
dissect_aruba_erm_common(tvb, pinfo, tree, &offset);
/* Add Expert info how decode...*/
proto_tree_add_expert(tree, pinfo, &ei_aruba_erm_decode, tvb, offset, -1);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -264,7 +263,7 @@ dissect_aruba_erm_type2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
/* Not (yet) supported launch data dissector */
proto_tree_add_expert(tree, pinfo, &ei_aruba_erm_airmagnet, tvb, offset, -1);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -479,7 +478,6 @@ proto_reg_handoff_aruba_erm(void)
wlan_withfcs_handle = find_dissector_add_dependency("wlan_withfcs", proto_aruba_erm);
ppi_handle = find_dissector_add_dependency("ppi", proto_aruba_erm);
peek_handle = find_dissector_add_dependency("peekremote", proto_aruba_erm);
- data_handle = find_dissector("data");
aruba_erm_handle = create_dissector_handle(dissect_aruba_erm, proto_aruba_erm);
aruba_erm_handle_type0 = create_dissector_handle(dissect_aruba_erm_type0, proto_aruba_erm_type0);
aruba_erm_handle_type1 = create_dissector_handle(dissect_aruba_erm_type1, proto_aruba_erm_type1);
diff --git a/epan/dissectors/packet-aruba-papi.c b/epan/dissectors/packet-aruba-papi.c
index 1155a84c18..9cd1681438 100644
--- a/epan/dissectors/packet-aruba-papi.c
+++ b/epan/dissectors/packet-aruba-papi.c
@@ -63,8 +63,6 @@ static expert_field ei_papi_debug_unknown = EI_INIT;
/* Global PAPI Debug Preference */
static gboolean g_papi_debug = FALSE;
-static dissector_handle_t data_handle;
-
/* Initialize the subtree pointers */
static gint ett_papi = -1;
@@ -194,7 +192,7 @@ dissect_papi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return(TRUE);
}
@@ -342,7 +340,6 @@ proto_reg_handoff_papi(void)
papi_handle = create_dissector_handle(dissect_papi, proto_papi);
dissector_add_uint("udp.port", UDP_PORT_PAPI, papi_handle);
- data_handle = find_dissector("data");
}
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
diff --git a/epan/dissectors/packet-asf.c b/epan/dissectors/packet-asf.c
index 986ae6d2db..a94282369f 100644
--- a/epan/dissectors/packet-asf.c
+++ b/epan/dissectors/packet-asf.c
@@ -57,7 +57,6 @@ static int hf_asf_auth_alg = -1;
static int hf_asf_integrity_alg = -1;
static int hf_asf_reserved = -1;
-static dissector_handle_t data_handle;
static gint ett_asf = -1;
static gint ett_asf_payload = -1;
static gint ett_asf_alg_payload = -1;
@@ -189,7 +188,7 @@ dissect_asf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
default:
next_tvb = tvb_new_subset_length(tvb, 8, len);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
}
@@ -388,8 +387,6 @@ proto_reg_handoff_asf(void)
{
dissector_handle_t asf_handle;
- data_handle = find_dissector("data");
-
asf_handle = create_dissector_handle(dissect_asf, proto_asf);
dissector_add_uint("rmcp.class", RMCP_CLASS_ASF, asf_handle);
}
diff --git a/epan/dissectors/packet-atalk.c b/epan/dissectors/packet-atalk.c
index bd8d87d99a..e6db3c2ad3 100644
--- a/epan/dissectors/packet-atalk.c
+++ b/epan/dissectors/packet-atalk.c
@@ -365,8 +365,6 @@ static value_string_ext pap_function_vals_ext = VALUE_STRING_EXT_INIT(pap_functi
static dissector_table_t ddp_dissector_table;
-static dissector_handle_t data_handle;
-
#define DDP_SHORT_HEADER_SIZE 5
/*
@@ -879,7 +877,7 @@ dissect_atp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
}
else if (!try_conversation_dissector(&pinfo->src, &pinfo->dst, pinfo->ptype,
pinfo->srcport, pinfo->destport, new_tvb,pinfo, tree, &aspinfo)) {
- call_dissector(data_handle, new_tvb, pinfo, tree);
+ call_data_dissector(new_tvb, pinfo, tree);
}
}
@@ -887,7 +885,7 @@ dissect_atp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
else {
/* Just show this as a fragment. */
new_tvb = tvb_new_subset_remaining (tvb, ATP_HDRSIZE -1);
- call_dissector(data_handle, new_tvb, pinfo, tree);
+ call_data_dissector(new_tvb, pinfo, tree);
}
pinfo->fragmented = save_fragmented;
return tvb_captured_length(tvb);
@@ -958,7 +956,7 @@ dissect_pap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
offset++;
PAD(1);
/* follow by data */
- call_dissector(data_handle,tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
break;
case PAPTickle:
@@ -1105,7 +1103,7 @@ dissect_asp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
default:
proto_item_set_len(asp_tree, 4);
offset += 3;
- call_dissector(data_handle,tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
break;
}
}
@@ -1154,7 +1152,7 @@ dissect_asp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
default:
proto_item_set_len(asp_tree, 4);
offset += 4;
- call_dissector(data_handle,tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
break;
}
}
@@ -1478,7 +1476,7 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
new_tvb = tvb_new_subset_remaining(tvb, DDP_SHORT_HEADER_SIZE);
if (!dissector_try_uint(ddp_dissector_table, type, new_tvb, pinfo, tree))
- call_dissector(data_handle,new_tvb, pinfo, tree);
+ call_data_dissector(new_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -1557,7 +1555,7 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (!dissector_try_uint(ddp_dissector_table, ddp.type, new_tvb, pinfo, tree))
{
- call_dissector(data_handle,new_tvb, pinfo, tree);
+ call_data_dissector(new_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -1619,7 +1617,7 @@ dissect_llap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
return tvb_captured_length(tvb);
break;
}
- call_dissector(data_handle,new_tvb, pinfo, tree);
+ call_data_dissector(new_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -2126,7 +2124,6 @@ proto_reg_handoff_atalk(void)
afp_handle = find_dissector_add_dependency("afp", proto_asp);
afp_server_status_handle = find_dissector_add_dependency("afp_server_status", proto_asp);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-atm.c b/epan/dissectors/packet-atm.c
index 2a23ffcb2e..574e54104f 100644
--- a/epan/dissectors/packet-atm.c
+++ b/epan/dissectors/packet-atm.c
@@ -147,7 +147,6 @@ static dissector_handle_t sscop_handle;
static dissector_handle_t ppp_handle;
static dissector_handle_t eth_maybefcs_handle;
static dissector_handle_t ip_handle;
-static dissector_handle_t data_handle;
static gboolean dissect_lanesscop = FALSE;
@@ -709,7 +708,7 @@ dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
/* Dump it as raw data. */
col_set_str(pinfo->cinfo, COL_INFO, "Unknown LANE traffic type");
next_tvb = tvb_new_subset_remaining(tvb, 0);
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
return tvb_captured_length(tvb);
@@ -1063,7 +1062,7 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (!decoded) {
/* Dump it as raw data. */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -1432,7 +1431,7 @@ dissect_atm_cell_payload(tvbuff_t *tvb, int offset, packet_info *pinfo,
default:
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
}
@@ -2017,7 +2016,6 @@ proto_reg_handoff_atm(void)
ppp_handle = find_dissector_add_dependency("ppp", proto_atm);
eth_maybefcs_handle = find_dissector_add_dependency("eth_maybefcs", proto_atm);
ip_handle = find_dissector_add_dependency("ip", proto_atm);
- data_handle = find_dissector("data");
dissector_add_uint("wtap_encap", WTAP_ENCAP_ATM_PDUS, atm_handle);
dissector_add_uint("atm.aal5.type", TRAF_LANE, create_dissector_handle(dissect_lane, proto_atm_lane));
diff --git a/epan/dissectors/packet-atmtcp.c b/epan/dissectors/packet-atmtcp.c
index e1ad0ddf25..f143af42c1 100644
--- a/epan/dissectors/packet-atmtcp.c
+++ b/epan/dissectors/packet-atmtcp.c
@@ -43,8 +43,6 @@ static guint global_atmtcp_tcp_port = 2812;
static gint ett_atmtcp = -1;
-static dissector_handle_t data_handle;
-
#define ATMTCP_HDR_MAGIC (~0) /* this length indicates a command */
#define ATMTCP_CTRL_OPEN 1 /* request/reply */
#define ATMTCP_CTRL_CLOSE 2 /* request/reply */
@@ -98,7 +96,7 @@ dissect_atmtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
/* Data (for the moment...) */
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_reported_length(tvb);
}
@@ -153,7 +151,6 @@ proto_reg_handoff_atmtcp(void)
if (!initialized) {
atmtcp_handle = create_dissector_handle(dissect_atmtcp, proto_atmtcp);
- data_handle = find_dissector("data");
initialized = TRUE;
} else {
dissector_delete_uint("tcp.port", current_port, atmtcp_handle);
diff --git a/epan/dissectors/packet-ax25-nol3.c b/epan/dissectors/packet-ax25-nol3.c
index 5efb3b0090..d825d72b53 100644
--- a/epan/dissectors/packet-ax25-nol3.c
+++ b/epan/dissectors/packet-ax25-nol3.c
@@ -57,7 +57,6 @@ void proto_reg_handoff_ax25_nol3(void);
/* Dissector handles - all the possibles are listed */
static dissector_handle_t aprs_handle;
-static dissector_handle_t default_handle;
/* Initialize the protocol and registered fields */
static int proto_ax25_nol3 = -1;
@@ -212,7 +211,7 @@ dissect_ax25_nol3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, vo
}
}
if ( ! dissected )
- call_dissector( default_handle , next_tvb, pinfo, ax25_nol3_tree );
+ call_data_dissector(next_tvb, pinfo, ax25_nol3_tree );
return tvb_captured_length(tvb);
}
@@ -289,8 +288,6 @@ proto_reg_handoff_ax25_nol3(void)
/*
*/
aprs_handle = find_dissector_add_dependency( "aprs", proto_ax25_nol3 );
- default_handle = find_dissector( "data" );
-
}
/*
diff --git a/epan/dissectors/packet-ax25.c b/epan/dissectors/packet-ax25.c
index 7eadce8e1d..17483d62fc 100644
--- a/epan/dissectors/packet-ax25.c
+++ b/epan/dissectors/packet-ax25.c
@@ -122,8 +122,6 @@ static gint ett_ax25_ctl = -1;
static dissector_handle_t ax25_handle;
-static dissector_handle_t data_handle;
-
static int
dissect_ax25( tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_ )
{
@@ -243,7 +241,7 @@ dissect_ax25( tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
if (!dissector_try_uint(ax25_dissector_table, pid, next_tvb, pinfo, parent_tree))
{
- call_dissector(data_handle, next_tvb, pinfo, parent_tree);
+ call_data_dissector(next_tvb, pinfo, parent_tree);
}
}
else
@@ -422,9 +420,6 @@ proto_reg_handoff_ax25(void)
dissector_add_uint("ip.proto", IP_PROTO_AX25, ax25_handle);
register_capture_dissector("wtap_encap", WTAP_ENCAP_AX25, capture_ax25, proto_ax25);
-
- data_handle = find_dissector( "data" );
-
}
/*
diff --git a/epan/dissectors/packet-bacnet.c b/epan/dissectors/packet-bacnet.c
index 3095a9a0cf..372f80383b 100644
--- a/epan/dissectors/packet-bacnet.c
+++ b/epan/dissectors/packet-bacnet.c
@@ -34,7 +34,6 @@ void proto_register_bacnet(void);
void proto_reg_handoff_bacnet(void);
static dissector_handle_t bacapp_handle;
-static dissector_handle_t data_handle;
/* Defined to allow vendor identifier registration of private transfer dissectors */
static dissector_table_t bacnet_dissector_table;
@@ -435,7 +434,7 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
next_tvb = tvb_new_subset_remaining(tvb,offset);
if (bacnet_control & BAC_CONTROL_NET) {
/* Unknown function - dissect the payload as data */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else {
/* APDU - call the APDU dissector */
call_dissector(bacapp_handle, next_tvb, pinfo, tree);
@@ -637,7 +636,6 @@ proto_reg_handoff_bacnet(void)
dissector_add_uint("bvlc.function", 0x0b, bacnet_handle);
dissector_add_uint("llc.dsap", SAP_BACNET, bacnet_handle);
bacapp_handle = find_dissector_add_dependency("bacapp", proto_bacnet);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-bat.c b/epan/dissectors/packet-bat.c
index 0dfdf8e31f..bf9143922b 100644
--- a/epan/dissectors/packet-bat.c
+++ b/epan/dissectors/packet-bat.c
@@ -170,7 +170,6 @@ static void dissect_bat_hna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* other dissectors */
static dissector_handle_t ip_handle;
-static dissector_handle_t data_handle;
static int proto_bat_plugin = -1;
static int proto_bat_gw = -1;
@@ -205,7 +204,7 @@ static int dissect_bat_batman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
return tvb_captured_length(tvb);
@@ -418,7 +417,7 @@ static int dissect_bat_gw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
if (gw_packeth->type == TUNNEL_DATA) {
call_dissector(ip_handle, next_tvb, pinfo, tree);
} else {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
return tvb_captured_length(tvb);
@@ -441,7 +440,7 @@ static int dissect_bat_vis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
return tvb_captured_length(tvb);
@@ -524,7 +523,7 @@ static void dissect_bat_vis_v22(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
tap_queue_packet(bat_follow_tap, pinfo, next_tvb);
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -645,7 +644,7 @@ static void dissect_bat_vis_v23(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
tap_queue_packet(bat_follow_tap, pinfo, next_tvb);
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -890,7 +889,6 @@ void proto_reg_handoff_bat(void)
vis_handle = create_dissector_handle(dissect_bat_vis, proto_bat_vis);
ip_handle = find_dissector_add_dependency("ip", proto_bat_gw);
- data_handle = find_dissector("data");
inited = TRUE;
} else {
diff --git a/epan/dissectors/packet-batadv.c b/epan/dissectors/packet-batadv.c
index 758a9c7578..7fc4c126ff 100644
--- a/epan/dissectors/packet-batadv.c
+++ b/epan/dissectors/packet-batadv.c
@@ -829,7 +829,6 @@ static int dissect_batadv_tvlv_v15_tt_change(tvbuff_t *tvb, packet_info *pinfo _
/* other dissectors */
-static dissector_handle_t data_handle;
static dissector_handle_t eth_handle;
static int proto_batadv_plugin = -1;
@@ -903,7 +902,7 @@ static void dissect_batadv_v5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
length_remaining = tvb_reported_length_remaining(tvb, 0);
if (length_remaining > 0) {
next_tvb = tvb_new_subset_remaining(tvb, 0);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
break;
}
@@ -953,7 +952,7 @@ static void dissect_batadv_v15(tvbuff_t *tvb, packet_info *pinfo,
length_remaining = tvb_captured_length_remaining(tvb, 0);
if (length_remaining > 0) {
next_tvb = tvb_new_subset_remaining(tvb, 0);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
break;
}
@@ -1006,7 +1005,7 @@ static void dissect_batadv_batman(tvbuff_t *tvb, packet_info *pinfo, proto_tree
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -1604,7 +1603,7 @@ static int dissect_batadv_batman_v14(tvbuff_t *tvb, int offset, packet_info *pin
length_remaining = tvb_reported_length_remaining(tvb, offset);
if (length_remaining > 0) {
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return offset;
@@ -1628,7 +1627,7 @@ static void dissect_batadv_iv_ogm(tvbuff_t *tvb, packet_info *pinfo, proto_tree
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -1786,7 +1785,7 @@ static void dissect_batadv_bcast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -2009,7 +2008,7 @@ static void dissect_batadv_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -2085,7 +2084,7 @@ static void dissect_batadv_icmp_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree
if (length_remaining > 0) {
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -2217,7 +2216,7 @@ static void dissect_batadv_icmp_v7(tvbuff_t *tvb, packet_info *pinfo, proto_tree
length_remaining = tvb_reported_length_remaining(tvb, offset);
if (length_remaining > 0) {
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -2303,7 +2302,7 @@ static void dissect_batadv_icmp_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tre
length_remaining = tvb_reported_length_remaining(tvb, offset);
if (length_remaining > 0) {
next_tvb = tvb_new_subset(tvb, offset, length_remaining, -1);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -2406,7 +2405,7 @@ static void dissect_batadv_icmp_v15(tvbuff_t *tvb, packet_info *pinfo,
length_remaining = tvb_captured_length_remaining(tvb, offset);
if (length_remaining > 0) {
next_tvb = tvb_new_subset(tvb, offset, length_remaining, -1);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -2435,7 +2434,7 @@ static void dissect_batadv_unicast(tvbuff_t *tvb, packet_info *pinfo, proto_tree
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -2581,7 +2580,7 @@ static void dissect_batadv_unicast_4addr(tvbuff_t *tvb, packet_info *pinfo, prot
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -2689,7 +2688,7 @@ static void dissect_batadv_unicast_frag(tvbuff_t *tvb, packet_info *pinfo, proto
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -3032,7 +3031,7 @@ static void dissect_batadv_vis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -3153,7 +3152,7 @@ static void dissect_batadv_vis_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree
tap_queue_packet(batadv_follow_tap, pinfo, next_tvb);
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -3248,7 +3247,7 @@ static void dissect_batadv_vis_v10(tvbuff_t *tvb, packet_info *pinfo, proto_tree
tap_queue_packet(batadv_follow_tap, pinfo, next_tvb);
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -3346,7 +3345,7 @@ static void dissect_batadv_vis_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tree
tap_queue_packet(batadv_follow_tap, pinfo, next_tvb);
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -3393,7 +3392,7 @@ static void dissect_batadv_tt_query(tvbuff_t *tvb, packet_info *pinfo, proto_tre
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -3509,7 +3508,7 @@ static void dissect_batadv_tt_query_v14(tvbuff_t *tvb, packet_info *pinfo _U_, p
tap_queue_packet(batadv_follow_tap, pinfo, next_tvb);
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -3542,7 +3541,7 @@ static void dissect_batadv_roam_adv(tvbuff_t *tvb, packet_info *pinfo, proto_tre
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -3614,7 +3613,7 @@ static void dissect_batadv_roam_adv_v14(tvbuff_t *tvb, packet_info *pinfo, proto
tap_queue_packet(batadv_follow_tap, pinfo, next_tvb);
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -3632,7 +3631,7 @@ static void dissect_batadv_coded(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
break;
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d", version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -3750,7 +3749,7 @@ static void dissect_batadv_coded_v15(tvbuff_t *tvb, packet_info *pinfo,
tap_queue_packet(batadv_follow_tap, pinfo, next_tvb);
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -3769,7 +3768,7 @@ static void dissect_batadv_unicast_tvlv(tvbuff_t *tvb, packet_info *pinfo, proto
default:
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported Version %d",
version);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -3931,7 +3930,7 @@ static void dissect_batadv_tvlv_v15(tvbuff_t *tvb, packet_info *pinfo,
version);
break;
default:
- call_dissector(data_handle, next_tvb, pinfo,
+ call_data_dissector(next_tvb, pinfo,
batadv_tvlv_tree);
break;
}
@@ -5049,7 +5048,6 @@ void proto_reg_handoff_batadv(void)
if (!inited) {
batman_handle = create_dissector_handle(dissect_batadv_plugin, proto_batadv_plugin);
- data_handle = find_dissector("data");
eth_handle = find_dissector_add_dependency("eth_withoutfcs", proto_batadv_plugin);
batadv_tap = register_tap("batman");
diff --git a/epan/dissectors/packet-bctp.c b/epan/dissectors/packet-bctp.c
index f3689f1ce9..fbaad00954 100644
--- a/epan/dissectors/packet-bctp.c
+++ b/epan/dissectors/packet-bctp.c
@@ -44,7 +44,6 @@ static int hf_bctp_tpi = -1;
static gint ett_bctp = -1;
static dissector_table_t bctp_dissector_table;
-static dissector_handle_t data_handle;
static dissector_handle_t text_handle;
/*
@@ -80,7 +79,7 @@ static int dissect_bctp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, voi
if (!dissector_try_uint(bctp_dissector_table, tpi, sub_tvb, pinfo, tree) ) {
if (tpi <= 0x22) {
- call_dissector(data_handle,sub_tvb, pinfo, tree);
+ call_data_dissector(sub_tvb, pinfo, tree);
} else {
/* tpi > 0x22 */
call_dissector(text_handle,sub_tvb, pinfo, tree);
@@ -114,7 +113,6 @@ proto_register_bctp (void)
void
proto_reg_handoff_bctp(void)
{
- data_handle = find_dissector("data");
text_handle = find_dissector_add_dependency("data-text-lines", proto_bctp);
}
diff --git a/epan/dissectors/packet-bluetooth.c b/epan/dissectors/packet-bluetooth.c
index 773a2a5cd3..12a6dbff55 100644
--- a/epan/dissectors/packet-bluetooth.c
+++ b/epan/dissectors/packet-bluetooth.c
@@ -55,7 +55,6 @@ static gint ett_bluetooth = -1;
static dissector_handle_t btle_handle;
static dissector_handle_t hci_usb_handle;
-static dissector_handle_t data_handle;
static dissector_table_t bluetooth_table;
static dissector_table_t hci_vendor_table;
@@ -1851,7 +1850,7 @@ dissect_bluetooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
bluetooth_data->previous_protocol_data.none = NULL;
if (!dissector_try_uint_new(bluetooth_table, pinfo->phdr->pkt_encap, tvb, pinfo, tree, TRUE, bluetooth_data)) {
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -1880,7 +1879,7 @@ dissect_bluetooth_bthci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
bluetooth_data->previous_protocol_data.bthci = (struct bthci_phdr *)data;
if (!dissector_try_uint_new(bluetooth_table, pinfo->phdr->pkt_encap, tvb, pinfo, tree, TRUE, bluetooth_data)) {
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -1908,7 +1907,7 @@ dissect_bluetooth_btmon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
bluetooth_data->previous_protocol_data.btmon = (struct btmon_phdr *)data;
if (!dissector_try_uint_new(bluetooth_table, pinfo->phdr->pkt_encap, tvb, pinfo, tree, TRUE, bluetooth_data)) {
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -2055,7 +2054,6 @@ proto_reg_handoff_bluetooth(void)
dissector_handle_t btl2cap_handle;
btle_handle = find_dissector_add_dependency("btle", proto_bluetooth);
- data_handle = find_dissector("data");
hci_usb_handle = find_dissector_add_dependency("hci_usb", proto_bluetooth);
dissector_add_uint("wtap_encap", WTAP_ENCAP_BLUETOOTH_HCI, bluetooth_bthci_handle);
diff --git a/epan/dissectors/packet-bssap.c b/epan/dissectors/packet-bssap.c
index 83ec8360d1..2f8b640858 100644
--- a/epan/dissectors/packet-bssap.c
+++ b/epan/dissectors/packet-bssap.c
@@ -352,7 +352,6 @@ static expert_field ei_bssap_unknown_parameter = EI_INIT;
static expert_field ei_bssap_mandatory_ie = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t rrlp_handle;
static dissector_table_t bssap_dissector_table;
@@ -405,7 +404,7 @@ dissect_bssap_data_param(tvbuff_t *tvb, packet_info *pinfo,
}
/* No sub-dissection occurred, treat it as raw data */
- call_dissector(data_handle, tvb, pinfo, bssap_tree);
+ call_data_dissector(tvb, pinfo, bssap_tree);
}
static void
@@ -749,7 +748,7 @@ dissect_bssap_dlink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info *
if ((prot_disc == 2)&&(rrlp_handle))
call_dissector(rrlp_handle, next_tvb, pinfo, ie_tree);
else
- call_dissector(data_handle, next_tvb, pinfo, ie_tree);
+ call_data_dissector(next_tvb, pinfo, ie_tree);
return offset + ie_len;
@@ -1471,7 +1470,7 @@ dissect_bssap_ulink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info *
if ((prot_disc == 2)&&(rrlp_handle))
call_dissector(rrlp_handle, next_tvb, pinfo, ie_tree);
else
- call_dissector(data_handle, next_tvb, pinfo, ie_tree);
+ call_data_dissector(next_tvb, pinfo, ie_tree);
return offset + ie_len;
@@ -2563,7 +2562,6 @@ proto_reg_handoff_bssap(void)
/* BSSAP+ */
bssap_plus_handle = create_dissector_handle(dissect_bssap_plus, proto_bssap);
- data_handle = find_dissector("data");
rrlp_handle = find_dissector_add_dependency("rrlp", proto_bssap_plus);
gsm_bssmap_le_dissector_handle = find_dissector_add_dependency("gsm_bssmap_le", proto_bssap);
gsm_a_bssmap_dissector_handle = find_dissector_add_dependency("gsm_a_bssmap", proto_bssap);
diff --git a/epan/dissectors/packet-bssgp.c b/epan/dissectors/packet-bssgp.c
index 494d1355a5..82c05ce0a5 100644
--- a/epan/dissectors/packet-bssgp.c
+++ b/epan/dissectors/packet-bssgp.c
@@ -80,7 +80,6 @@ static guint8 g_pdu_type, g_rim_application_identity;
static proto_tree *gparent_tree;
static dissector_handle_t llc_handle;
static dissector_handle_t rrlp_handle;
-static dissector_handle_t data_handle;
static module_t *bssgp_module;
static dissector_table_t diameter_3gpp_avp_dissector_table;
@@ -941,9 +940,8 @@ de_bssgp_llc_pdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 of
if(next_tvb){
if (llc_handle) {
call_dissector(llc_handle, next_tvb, pinfo, gparent_tree);
- }
- else if (data_handle) {
- call_dissector(data_handle, next_tvb, pinfo, gparent_tree);
+ } else {
+ call_data_dissector(next_tvb, pinfo, gparent_tree);
}
}
@@ -1584,8 +1582,8 @@ de_bssgp_rrlp_apdu(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32
if(next_tvb){
if (rrlp_handle) {
call_dissector(rrlp_handle, next_tvb, pinfo, gparent_tree);
- }else if (data_handle) {
- call_dissector(data_handle, next_tvb, pinfo, gparent_tree);
+ } else {
+ call_data_dissector(next_tvb, pinfo, gparent_tree);
}
}
return(len);
@@ -7064,7 +7062,6 @@ proto_reg_handoff_bssgp(void)
{
llc_handle = find_dissector("llcgprs");
rrlp_handle = find_dissector("rrlp");
- data_handle = find_dissector("data");
diameter_3gpp_avp_dissector_table = find_dissector_table("diameter.3gpp");
}
diff --git a/epan/dissectors/packet-btavctp.c b/epan/dissectors/packet-btavctp.c
index 288d337fb7..225adfd28b 100644
--- a/epan/dissectors/packet-btavctp.c
+++ b/epan/dissectors/packet-btavctp.c
@@ -56,7 +56,6 @@ static expert_field ei_btavctp_unexpected_frame = EI_INIT;
static expert_field ei_btavctp_invalid_profile = EI_INIT;
static dissector_handle_t btavctp_handle;
-static dissector_handle_t data_handle = NULL;
typedef struct _fragment_t {
guint length;
@@ -231,7 +230,7 @@ dissect_btavctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
uuid.data[1] = pid & 0xFF;
if (!dissector_try_string(bluetooth_uuid_table, print_numeric_uuid(&uuid), next_tvb, pinfo, tree, avctp_data)) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
} else {
@@ -285,7 +284,7 @@ dissect_btavctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
fragments = NULL;
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else if (packet_type == PACKET_TYPE_CONTINUE) {
fragments = (fragments_t *)wmem_tree_lookup32_array_le(reassembling, key);
@@ -327,7 +326,7 @@ dissect_btavctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
wmem_tree_insert32_array(reassembling, key, fragments);
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else if (packet_type == PACKET_TYPE_END) {
guint i_length = 0;
@@ -374,7 +373,7 @@ dissect_btavctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
length = 0;
if (!fragments || fragments->count != fragments->number_of_packets) {
expert_add_info(pinfo, pitem, &ei_btavctp_unexpected_frame);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else {
guint8 *reassembled;
bluetooth_uuid_t uuid;
@@ -403,13 +402,13 @@ dissect_btavctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
uuid.data[1] = fragments->pid & 0xFF;
if (!dissector_try_string(bluetooth_uuid_table, print_numeric_uuid(&uuid), next_tvb, pinfo, tree, avctp_data)) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
fragments = NULL;
} else {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -490,8 +489,6 @@ proto_register_btavctp(void)
void
proto_reg_handoff_btavctp(void)
{
- data_handle = find_dissector("data");
-
dissector_add_string("bluetooth.uuid", "17", btavctp_handle);
dissector_add_uint("btl2cap.psm", BTL2CAP_PSM_AVCTP_CTRL, btavctp_handle);
diff --git a/epan/dissectors/packet-btbnep.c b/epan/dissectors/packet-btbnep.c
index 3c2f9d77aa..e2c59ecbfc 100644
--- a/epan/dissectors/packet-btbnep.c
+++ b/epan/dissectors/packet-btbnep.c
@@ -80,7 +80,6 @@ static gboolean top_dissect = TRUE;
static dissector_handle_t llc_handle;
static dissector_handle_t ipx_handle;
-static dissector_handle_t data_handle;
static dissector_handle_t ethertype_handle;
static const true_false_string ig_tfs = {
@@ -449,7 +448,7 @@ dissect_btbnep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
tvbuff_t *next_tvb;
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else {
/*
* Valid Ethertype.
@@ -469,7 +468,7 @@ dissect_btbnep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
tvbuff_t *next_tvb;
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -645,7 +644,6 @@ proto_reg_handoff_btbnep(void)
{
ipx_handle = find_dissector_add_dependency("ipx", proto_btbnep);
llc_handle = find_dissector_add_dependency("llc", proto_btbnep);
- data_handle = find_dissector("data");
ethertype_handle = find_dissector_add_dependency("ethertype", proto_btbnep);
dissector_add_string("bluetooth.uuid", "1115", btbnep_handle);
diff --git a/epan/dissectors/packet-bthcrp.c b/epan/dissectors/packet-bthcrp.c
index f163b1162c..27caf65308 100644
--- a/epan/dissectors/packet-bthcrp.c
+++ b/epan/dissectors/packet-bthcrp.c
@@ -70,7 +70,6 @@ static expert_field ei_bthcrp_control_parameter_length = EI_INIT;
static expert_field ei_bthcrp_unexpected_data = EI_INIT;
static dissector_handle_t bthcrp_handle;
-static dissector_handle_t data_handle;
static gint force_client = FORCE_CLIENT_DEFAULT;
static gint psm_control = 0;
@@ -308,7 +307,7 @@ dissect_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset)
col_append_str(pinfo->cinfo, COL_INFO, "HCRP data stream");
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
offset += tvb_reported_length_remaining(tvb, offset);
@@ -672,8 +671,6 @@ proto_register_bthcrp(void)
void
proto_reg_handoff_bthcrp(void)
{
- data_handle = find_dissector("data");
-
dissector_add_string("bluetooth.uuid", "12", bthcrp_handle);
dissector_add_string("bluetooth.uuid", "14", bthcrp_handle);
dissector_add_string("bluetooth.uuid", "16", bthcrp_handle);
diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c
index 84fe745b7d..a36403769f 100644
--- a/epan/dissectors/packet-btrfcomm.c
+++ b/epan/dissectors/packet-btrfcomm.c
@@ -156,7 +156,6 @@ static uat_field_t uat_rfcomm_channels_fields[] = {
UAT_END_FIELDS
};
-static dissector_handle_t data_handle;
static dissector_handle_t ppp_handle;
static const value_string vs_ctl_pn_i[] = {
@@ -872,7 +871,7 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
call_dissector_with_data(decode_by_dissector, next_tvb, pinfo, tree, rfcomm_data);
} else {
/* unknown service, let the data dissector handle it */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
}
@@ -1178,8 +1177,6 @@ proto_reg_handoff_btrfcomm(void)
{
dissector_add_uint("btl2cap.psm", BTL2CAP_PSM_RFCOMM, btrfcomm_handle);
dissector_add_for_decode_as("btl2cap.cid", btrfcomm_handle);
-
- data_handle = find_dissector("data");
}
/* Bluetooth Dial-Up Networking (DUN) profile dissection */
@@ -1221,7 +1218,7 @@ dissect_btdun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PPP");
col_add_fstr(pinfo->cinfo, COL_INFO, "%s <PPP frame>", (pinfo->p2p_dir == P2P_DIR_SENT) ? "Sent" : "Rcvd");
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
}
diff --git a/epan/dissectors/packet-bvlc.c b/epan/dissectors/packet-bvlc.c
index 51bbf0b613..626f6f855c 100644
--- a/epan/dissectors/packet-bvlc.c
+++ b/epan/dissectors/packet-bvlc.c
@@ -58,8 +58,6 @@ static int hf_bvlc_fdt_timeout = -1;
static int hf_bvlc_fwd_ip = -1;
static int hf_bvlc_fwd_port = -1;
-static dissector_handle_t data_handle;
-
static dissector_table_t bvlc_dissector_table;
static const value_string bvlc_function_names[] = {
@@ -302,7 +300,7 @@ dissect_bvlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
if (!dissector_try_uint(bvlc_dissector_table,
bvlc_function, next_tvb, pinfo, tree)) {
/* Unknown function - dissect the paylod as data */
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_reported_length(tvb);
}
@@ -422,7 +420,6 @@ proto_reg_handoff_bvlc(void)
{
bvlc_handle = find_dissector("bvlc");
dissector_add_uint("udp.port", 0xBAC0, bvlc_handle);
- data_handle = find_dissector("data");
bvlc_initialized = TRUE;
}
else
diff --git a/epan/dissectors/packet-capwap.c b/epan/dissectors/packet-capwap.c
index 916d785d3a..e38549cd31 100644
--- a/epan/dissectors/packet-capwap.c
+++ b/epan/dissectors/packet-capwap.c
@@ -572,7 +572,6 @@ static dissector_handle_t dtls_handle;
static dissector_handle_t ieee8023_handle;
static dissector_handle_t ieee80211_handle;
static dissector_handle_t ieee80211_bsfc_handle;
-static dissector_handle_t data_handle;
static gint ett_capwap = -1;
static gint ett_capwap_control = -1;
@@ -3266,7 +3265,7 @@ dissect_capwap_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
if (next_tvb == NULL)
{ /* make a new subset */
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
col_append_fstr(pinfo->cinfo, COL_INFO, " (Fragment ID: %u, Fragment Offset: %u)", fragment_id, fragment_offset);
}
else
@@ -3351,7 +3350,7 @@ dissect_capwap_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
if (next_tvb == NULL)
{ /* make a new subset */
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
col_append_fstr(pinfo->cinfo, COL_INFO, " (Fragment ID: %u, Fragment Offset: %u)", fragment_id, fragment_offset);
return tvb_captured_length(tvb);
}
@@ -3379,16 +3378,16 @@ dissect_capwap_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
switch (payload_wbid) {
case 0: /* Reserved - Cisco seems to use this instead of 1 */
/* It seems that just calling ieee80211_handle is not
- * quite enough to get this right, so call data_handle
+ * quite enough to get this right, so call data dissector
* for now:
*/
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
case 1: /* IEEE 802.11 */
call_dissector(global_capwap_swap_frame_control ? ieee80211_bsfc_handle : ieee80211_handle, next_tvb, pinfo, tree);
break;
default: /* Unknown Data */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
}
@@ -5804,7 +5803,6 @@ proto_reg_handoff_capwap(void)
ieee8023_handle = find_dissector_add_dependency("eth_withoutfcs", proto_capwap_data);
ieee80211_handle = find_dissector_add_dependency("wlan_withoutfcs", proto_capwap_data);
ieee80211_bsfc_handle = find_dissector_add_dependency("wlan_bsfc", proto_capwap_data);
- data_handle = find_dissector("data");
inited = TRUE;
} else {
diff --git a/epan/dissectors/packet-cast.c b/epan/dissectors/packet-cast.c
index 04e4032f00..9875e33a04 100644
--- a/epan/dissectors/packet-cast.c
+++ b/epan/dissectors/packet-cast.c
@@ -393,8 +393,6 @@ static gint ett_cast_tree = -1;
/* desegmentation of SCCP */
static gboolean cast_desegment = TRUE;
-static dissector_handle_t data_handle;
-
/* Dissect a single CAST PDU */
static int
dissect_cast_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -1710,7 +1708,6 @@ proto_reg_handoff_cast(void)
{
dissector_handle_t cast_handle;
- data_handle = find_dissector("data");
cast_handle = create_dissector_handle(dissect_cast, proto_cast);
dissector_add_uint("tcp.port", TCP_PORT_CAST, cast_handle);
}
diff --git a/epan/dissectors/packet-cattp.c b/epan/dissectors/packet-cattp.c
index fa32308338..d10f9d08cf 100644
--- a/epan/dissectors/packet-cattp.c
+++ b/epan/dissectors/packet-cattp.c
@@ -96,8 +96,6 @@ static int hf_cattp_rc = -1;
static int hf_cattp_eaklen = -1;
static int hf_cattp_eaks = -1;
-static dissector_handle_t data_handle;
-
/* Preference to control whether to check the CATTP checksum */
static gboolean cattp_check_checksum = TRUE;
@@ -332,7 +330,7 @@ dissect_cattp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
if (plen > 0) { /* Call generic data handle if data exists. */
col_append_fstr(pinfo->cinfo, COL_INFO, " DataLen=%u", plen);
tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -577,9 +575,6 @@ proto_reg_handoff_cattp(void)
/* Create dissector handle */
cattp_handle = create_dissector_handle(dissect_cattp, proto_cattp);
- /* find data handle */
- data_handle = find_dissector("data");
-
heur_dissector_add("udp", dissect_cattp_heur, "CAT-TP over UDP", "cattp_udp", proto_cattp, HEURISTIC_ENABLE);
dissector_add_for_decode_as("udp.port", cattp_handle);
initialized = TRUE;
diff --git a/epan/dissectors/packet-ccsds.c b/epan/dissectors/packet-ccsds.c
index 923555649c..311457e83c 100644
--- a/epan/dissectors/packet-ccsds.c
+++ b/epan/dissectors/packet-ccsds.c
@@ -98,9 +98,6 @@ static expert_field ei_ccsds_checkword = EI_INIT;
/* Dissectot table */
static dissector_table_t ccsds_dissector_table;
-/* Generic data handle */
-static dissector_handle_t data_handle;
-
static const enum_val_t dissect_checkword[] = {
{ "hdr", "Use header flag", 2 },
{ "no", "Override header flag to be false", 0 },
@@ -502,7 +499,7 @@ dissect_ccsds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
}
/* Give the data dissector any bytes past the CCSDS packet length */
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -726,7 +723,6 @@ void
proto_reg_handoff_ccsds(void)
{
dissector_add_for_decode_as ( "udp.port", find_dissector("ccsds") );
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c
index 9925cfa4aa..fb975fa89a 100644
--- a/epan/dissectors/packet-cdp.c
+++ b/epan/dissectors/packet-cdp.c
@@ -147,8 +147,6 @@ static gint ett_cdp_checksum = -1;
static expert_field ei_cdp_invalid_data = EI_INIT;
static expert_field ei_cdp_nrgyz_tlvlength = EI_INIT;
-static dissector_handle_t data_handle;
-
static int
dissect_address_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree);
static void
@@ -1045,7 +1043,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
offset += length;
}
}
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, cdp_tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, cdp_tree);
return tvb_captured_length(tvb);
}
@@ -1474,7 +1472,6 @@ proto_reg_handoff_cdp(void)
{
dissector_handle_t cdp_handle;
- data_handle = find_dissector("data");
cdp_handle = create_dissector_handle(dissect_cdp, proto_cdp);
dissector_add_uint("llc.cisco_pid", 0x2000, cdp_handle);
dissector_add_uint("chdlc.protocol", 0x2000, cdp_handle);
diff --git a/epan/dissectors/packet-cdt.c b/epan/dissectors/packet-cdt.c
index 7117e04954..fd22997a4b 100644
--- a/epan/dissectors/packet-cdt.c
+++ b/epan/dissectors/packet-cdt.c
@@ -81,8 +81,6 @@ static int hf_cdt_compressedContent = -1; /* CompressedContent */
/*--- End of included file: packet-cdt-hf.c ---*/
#line 61 "./asn1/cdt/packet-cdt-template.c"
-static dissector_handle_t data_handle = NULL;
-
/* Initialize the subtree pointers */
/*--- Included file: packet-cdt-ett.c ---*/
@@ -93,7 +91,7 @@ static gint ett_cdt_CompressedContentInfo = -1;
static gint ett_cdt_T_contentType = -1;
/*--- End of included file: packet-cdt-ett.c ---*/
-#line 66 "./asn1/cdt/packet-cdt-template.c"
+#line 64 "./asn1/cdt/packet-cdt-template.c"
static expert_field ei_cdt_unable_compress_content = EI_INIT;
static expert_field ei_cdt_unable_uncompress_content = EI_INIT;
@@ -272,7 +270,7 @@ dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
switch (content_type) {
case CDT_UNDEFINED:
- call_dissector (data_handle, next_tvb, actx->pinfo, top_tree);
+ call_data_dissector(next_tvb, actx->pinfo, top_tree);
break;
case CDT_EXTERNAL:
dissect_unknown_ber (actx->pinfo, next_tvb, 0, top_tree);
@@ -281,7 +279,7 @@ dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
dissect_p1_mts_apdu (next_tvb, actx->pinfo, top_tree, NULL);
break;
default:
- call_dissector (data_handle, next_tvb, actx->pinfo, top_tree);
+ call_data_dissector(next_tvb, actx->pinfo, top_tree);
break;
}
@@ -338,7 +336,7 @@ static int dissect_CompressedData_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
/*--- End of included file: packet-cdt-fn.c ---*/
-#line 71 "./asn1/cdt/packet-cdt-template.c"
+#line 69 "./asn1/cdt/packet-cdt-template.c"
/*--- proto_register_cdt -------------------------------------------*/
@@ -411,7 +409,7 @@ void proto_register_cdt (void) {
NULL, HFILL }},
/*--- End of included file: packet-cdt-hfarr.c ---*/
-#line 103 "./asn1/cdt/packet-cdt-template.c"
+#line 101 "./asn1/cdt/packet-cdt-template.c"
};
/* List of subtrees */
@@ -425,7 +423,7 @@ void proto_register_cdt (void) {
&ett_cdt_T_contentType,
/*--- End of included file: packet-cdt-ettarr.c ---*/
-#line 108 "./asn1/cdt/packet-cdt-template.c"
+#line 106 "./asn1/cdt/packet-cdt-template.c"
};
static ei_register_info ei[] = {
@@ -455,7 +453,5 @@ void proto_reg_handoff_cdt (void) {
/*--- End of included file: packet-cdt-dis-tab.c ---*/
-#line 131 "./asn1/cdt/packet-cdt-template.c"
-
- data_handle = find_dissector ("data");
+#line 129 "./asn1/cdt/packet-cdt-template.c"
}
diff --git a/epan/dissectors/packet-cfdp.c b/epan/dissectors/packet-cfdp.c
index bc26a27417..af727f003b 100644
--- a/epan/dissectors/packet-cfdp.c
+++ b/epan/dissectors/packet-cfdp.c
@@ -128,8 +128,6 @@ static expert_field ei_cfdp_bad_length = EI_INIT;
static dissector_handle_t cfdp_handle;
-/* Generic data handle */
-static dissector_handle_t data_handle;
/* Some parameters */
#define CFDP_HEADER_FIXED_FIELDS_LEN 4
@@ -1270,7 +1268,7 @@ dissect_cfdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
proto_item_set_end(cfdp_crc, tvb, offset);
}
/* Give the data dissector any bytes past the CFDP packet length */
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -1634,7 +1632,6 @@ proto_reg_handoff_cfdp(void)
{
dissector_add_uint("ccsds.apid", CFDP_APID, cfdp_handle);
dissector_add_for_decode_as("udp.port", cfdp_handle);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-chdlc.c b/epan/dissectors/packet-chdlc.c
index 06392c31b1..ebc24d53f3 100644
--- a/epan/dissectors/packet-chdlc.c
+++ b/epan/dissectors/packet-chdlc.c
@@ -67,8 +67,6 @@ static int hf_slarp_reliability = -1;
static expert_field ei_slarp_reliability = EI_INIT;
static gint ett_slarp = -1;
-static dissector_handle_t data_handle;
-
/*
* Protocol types for the Cisco HDLC format.
*
@@ -152,7 +150,7 @@ chdlctype(guint16 chdlc_type, tvbuff_t *tvb, int offset_after_chdlctype,
/* do lookup with the subdissector table */
if (!dissector_try_uint(subdissector_table, chdlc_type, next_tvb, pinfo, tree)) {
col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "0x%04x", chdlc_type);
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -254,7 +252,6 @@ proto_reg_handoff_chdlc(void)
{
dissector_handle_t chdlc_handle;
- data_handle = find_dissector("data");
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);
@@ -336,8 +333,7 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown packet type 0x%08X", code);
proto_tree_add_uint(slarp_tree, hf_slarp_ptype, tvb, 0, 4, code);
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, 4), pinfo,
- slarp_tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, 4), pinfo, slarp_tree);
break;
}
return tvb_captured_length(tvb);
diff --git a/epan/dissectors/packet-cisco-sm.c b/epan/dissectors/packet-cisco-sm.c
index b0cf5a68d9..b7c8e6f3bf 100644
--- a/epan/dissectors/packet-cisco-sm.c
+++ b/epan/dissectors/packet-cisco-sm.c
@@ -261,7 +261,6 @@ static gint ett_sm = -1;
static dissector_handle_t sdp_handle;
static dissector_handle_t mtp3_handle;
static dissector_handle_t q931_handle;
-static dissector_handle_t data_handle;
/* Code to actually dissect the packets */
static int
@@ -322,7 +321,7 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if ((msg_type == PDU_MTP3_TO_SLT || msg_type == PDU_MTP3_FROM_SLT)) {
call_dissector(q931_handle, next_tvb, pinfo, tree);
} else {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -340,7 +339,7 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
/* This should be the EISUP dissector but we haven't got one
* right now - so decode it as data for now ... */
next_tvb = tvb_new_subset_length(tvb, offset, length);
- call_dissector(data_handle, next_tvb, pinfo, sm_tree);
+ call_data_dissector(next_tvb, pinfo, sm_tree);
break;
case SM_PROTOCOL_X101:
@@ -469,7 +468,7 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_tree_add_item(sm_tree, hf_sm_stat_request_type, tvb, offset, 4, ENC_BIG_ENDIAN);
break;
default:
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
}
@@ -608,7 +607,6 @@ proto_reg_handoff_sm(void)
sdp_handle = find_dissector_add_dependency("sdp", proto_sm);
mtp3_handle = find_dissector_add_dependency("mtp3", proto_sm);
q931_handle = find_dissector_add_dependency("q931", proto_sm);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-clnp.c b/epan/dissectors/packet-clnp.c
index c090de07d3..99997180ad 100644
--- a/epan/dissectors/packet-clnp.c
+++ b/epan/dissectors/packet-clnp.c
@@ -101,7 +101,6 @@ static dissector_handle_t clnp_handle;
static dissector_handle_t ositp_handle;
static dissector_handle_t ositp_inactive_handle;
static dissector_handle_t idrp_handle;
-static dissector_handle_t data_handle;
/*
* ISO 8473 OSI CLNP definition (see RFC994)
@@ -245,15 +244,14 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
proto_tree_add_uint_format(clnp_tree, hf_clnp_id, tvb, P_CLNP_PROTO_ID, 1,
cnf_proto_id, "Inactive subset");
next_tvb = tvb_new_subset_remaining(tvb, 1);
- if (call_dissector(ositp_inactive_handle, next_tvb, pinfo, tree) == 0)
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_dissector(ositp_inactive_handle, next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
/* return if version not known */
cnf_vers = tvb_get_guint8(tvb, P_CLNP_VERS);
if (cnf_vers != ISO8473_V1) {
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -524,8 +522,7 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
/* As we haven't reassembled anything, we haven't changed "pi", so
we don't have to restore it. */
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo,
- tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
pinfo->fragmented = save_fragmented;
return tvb_captured_length(tvb);
}
@@ -593,7 +590,7 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
}
col_add_fstr(pinfo->cinfo, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string);
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
pinfo->fragmented = save_fragmented;
return tvb_captured_length(tvb);
} /* dissect_clnp */
@@ -768,7 +765,6 @@ proto_reg_handoff_clnp(void)
ositp_handle = find_dissector_add_dependency("ositp", proto_clnp);
ositp_inactive_handle = find_dissector_add_dependency("ositp_inactive", proto_clnp);
idrp_handle = find_dissector_add_dependency("idrp", proto_clnp);
- data_handle = find_dissector("data");
dissector_add_uint("osinl.incl", NLPID_ISO8473_CLNP, clnp_handle);
dissector_add_uint("osinl.incl", NLPID_NULL, clnp_handle); /* Inactive subset */
diff --git a/epan/dissectors/packet-cnip.c b/epan/dissectors/packet-cnip.c
index ed959304e8..3b7c83964f 100644
--- a/epan/dissectors/packet-cnip.c
+++ b/epan/dissectors/packet-cnip.c
@@ -71,7 +71,6 @@ static gint ett_pf = -1;
static expert_field ei_cnip_type_unknown = EI_INIT;
static dissector_table_t cnip_dissector_table;
-static dissector_handle_t data_handle;
static int dissect_cnip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
@@ -148,7 +147,7 @@ static int dissect_cnip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
"This dissector doesn't yet decode packets of type %s (0x%x)",
val_to_str_const(type, type_tuple, "Unknown"), type);
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -243,7 +242,6 @@ void proto_reg_handoff_cnip(void)
dissector_handle_t cnip_handle;
cnip_handle = create_dissector_handle(dissect_cnip, proto_cnip);
- data_handle = find_dissector("data");
dissector_add_uint ("udp.port", 1628, cnip_handle);
dissector_add_uint ("udp.port", 1629, cnip_handle);
diff --git a/epan/dissectors/packet-cosine.c b/epan/dissectors/packet-cosine.c
index 13da1374de..9778656ad1 100644
--- a/epan/dissectors/packet-cosine.c
+++ b/epan/dissectors/packet-cosine.c
@@ -51,7 +51,6 @@ static dissector_handle_t ppp_hdlc_handle;
static dissector_handle_t llc_handle;
static dissector_handle_t chdlc_handle;
static dissector_handle_t fr_handle;
-static dissector_handle_t data_handle;
static int
dissect_cosine(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -134,7 +133,7 @@ dissect_cosine(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
break;
case COSINE_ENCAP_TEST:
case COSINE_ENCAP_UNKNOWN:
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
default:
break;
@@ -185,7 +184,6 @@ proto_reg_handoff_cosine(void)
llc_handle = find_dissector_add_dependency("llc", proto_cosine);
chdlc_handle = find_dissector_add_dependency("chdlc", proto_cosine);
fr_handle = find_dissector_add_dependency("fr", proto_cosine);
- data_handle = find_dissector("data");
cosine_handle = create_dissector_handle(dissect_cosine, proto_cosine);
dissector_add_uint("wtap_encap", WTAP_ENCAP_COSINE, cosine_handle);
diff --git a/epan/dissectors/packet-dccp.c b/epan/dissectors/packet-dccp.c
index ecc4610a4c..4075dc827c 100644
--- a/epan/dissectors/packet-dccp.c
+++ b/epan/dissectors/packet-dccp.c
@@ -226,7 +226,6 @@ static expert_field ei_dccp_packet_type_reserved = EI_INIT;
static dissector_table_t dccp_subdissector_table;
static heur_dissector_list_t heur_subdissector_list;
-static dissector_handle_t data_handle;
/* preferences */
static gboolean dccp_summary_in_tree = TRUE;
@@ -305,7 +304,7 @@ decode_dccp_ports(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
/* Oh, well, we don't know this; dissect it as data. */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
/*
@@ -1330,7 +1329,6 @@ proto_reg_handoff_dccp(void)
dccp_handle = create_dissector_handle(dissect_dccp, proto_dccp);
dissector_add_uint("ip.proto", IP_PROTO_DCCP, dccp_handle);
- data_handle = find_dissector("data");
dccp_tap = register_tap("dccp");
}
diff --git a/epan/dissectors/packet-distcc.c b/epan/dissectors/packet-distcc.c
index d28d839b57..88294b7098 100644
--- a/epan/dissectors/packet-distcc.c
+++ b/epan/dissectors/packet-distcc.c
@@ -47,8 +47,6 @@ static gint ett_distcc = -1;
static expert_field ei_distcc_short_pdu = EI_INIT;
-static dissector_handle_t data_handle;
-
static gboolean distcc_desegment = TRUE;
@@ -302,7 +300,7 @@ dissect_distcc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
} else if(!strncmp(buf, "DOTO", 4)){
offset=dissect_distcc_doto(tvb, pinfo, tree, offset, parameter);
} else {
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
}
@@ -396,7 +394,6 @@ proto_reg_handoff_distcc(void)
*/
distcc_handle = create_dissector_handle(dissect_distcc,
proto_distcc);
- data_handle = find_dissector("data");
registered_dissector = TRUE;
} else {
/*
diff --git a/epan/dissectors/packet-dmx.c b/epan/dissectors/packet-dmx.c
index e75f89284d..0e6900a86f 100644
--- a/epan/dissectors/packet-dmx.c
+++ b/epan/dissectors/packet-dmx.c
@@ -112,7 +112,6 @@ static int ett_dmx_text = -1;
static dissector_table_t dmx_dissector_table;
static dissector_handle_t dmx_text_handle;
-static dissector_handle_t data_handle;
/*
* Here are the global variables associated with the preferences for DMX
@@ -421,7 +420,7 @@ dissect_dmx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (!dissector_try_uint_new(dmx_dissector_table, start_code, tvb, pinfo,
tree, TRUE, NULL)) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -694,8 +693,6 @@ proto_reg_handoff_dmx(void)
dissector_add_uint("dmx", DMX_SC_SIP, create_dissector_handle(dissect_dmx_sip, proto_dmx_sip));
dissector_add_uint("dmx", DMX_SC_TEST, create_dissector_handle(dissect_dmx_test, proto_dmx_test));
dissector_add_uint("dmx", DMX_SC_TEXT, create_dissector_handle(dissect_dmx_text, proto_dmx_text));
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-dsi.c b/epan/dissectors/packet-dsi.c
index b358a30018..a682c3ec78 100644
--- a/epan/dissectors/packet-dsi.c
+++ b/epan/dissectors/packet-dsi.c
@@ -114,7 +114,6 @@ static const value_string dsi_open_type_vals[] = {
/* desegmentation of DSI */
static gboolean dsi_desegment = TRUE;
-static dissector_handle_t data_handle;
static dissector_handle_t afp_handle;
static dissector_handle_t afp_server_status_handle;
@@ -315,8 +314,7 @@ dissect_dsi_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
}
break;
default:
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, DSI_BLOCKSIZ),
+ call_data_dissector(tvb_new_subset_remaining(tvb, DSI_BLOCKSIZ),
pinfo, dsi_tree);
break;
}
@@ -482,7 +480,6 @@ proto_reg_handoff_dsi(void)
dsi_handle = create_dissector_handle(dissect_dsi, proto_dsi);
dissector_add_uint("tcp.port", TCP_PORT_DSI, dsi_handle);
- data_handle = find_dissector("data");
afp_handle = find_dissector_add_dependency("afp", proto_dsi);
afp_server_status_handle = find_dissector_add_dependency("afp_server_status", proto_dsi);
}
diff --git a/epan/dissectors/packet-dsr.c b/epan/dissectors/packet-dsr.c
index 56fbd0f0cf..634d866276 100755
--- a/epan/dissectors/packet-dsr.c
+++ b/epan/dissectors/packet-dsr.c
@@ -37,7 +37,6 @@
void proto_reg_handoff_dsr(void);
void proto_register_dsr(void);
-static dissector_handle_t data_handle;
static dissector_table_t ip_dissector_table;
/* Initialize the protocol and registered fields */
@@ -466,7 +465,7 @@ dissect_dsr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Call other dissectors if needed */
next_tvb = tvb_new_subset_remaining(tvb, offset);
if (!dissector_try_uint(ip_dissector_table, nexthdr, next_tvb, pinfo, tree)) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return offset+4;
@@ -753,8 +752,6 @@ proto_reg_handoff_dsr(void)
{
dissector_handle_t dsr_handle;
- data_handle = find_dissector("data");
-
ip_dissector_table = find_dissector_table("ip.proto");
dsr_handle = create_dissector_handle(dissect_dsr, proto_dsr);
diff --git a/epan/dissectors/packet-dtn.c b/epan/dissectors/packet-dtn.c
index bdc72a1a7e..e740e6c215 100644
--- a/epan/dissectors/packet-dtn.c
+++ b/epan/dissectors/packet-dtn.c
@@ -269,7 +269,6 @@ static expert_field ei_tcp_convergence_ack_length = EI_INIT;
static dissector_handle_t bundle_handle;
-static dissector_handle_t data_handle;
static guint bundle_tcp_port = 4556;
static guint bundle_udp_port = 4556;
@@ -1888,7 +1887,7 @@ dissect_tcpcl_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
if (bundle_size == 0) {
/*Couldn't parse bundle, treat as raw data */
- call_dissector(data_handle, new_tvb, pinfo, sub_tree);
+ call_data_dissector(new_tvb, pinfo, sub_tree);
return tvb_captured_length(tvb);
}
}
@@ -2775,7 +2774,6 @@ proto_reg_handoff_bundle(void)
if (!Initialized) {
tcpcl_handle = create_dissector_handle(dissect_tcpcl, proto_bundle);
- data_handle = find_dissector("data");
Initialized = TRUE;
}
else {
diff --git a/epan/dissectors/packet-dtpt.c b/epan/dissectors/packet-dtpt.c
index 79fff44987..37bd2718f9 100644
--- a/epan/dissectors/packet-dtpt.c
+++ b/epan/dissectors/packet-dtpt.c
@@ -133,7 +133,6 @@ static gint ett_dtpt_blob = -1;
static dissector_handle_t dtpt_conversation_handle;
/** static dissector_handle_t dtpt_data_handle; **/
-static dissector_handle_t data_handle;
/* Server port */
@@ -411,8 +410,7 @@ dissect_dtpt_conversation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
/* Handle any remaining bytes ... */
if (tvb_reported_length_remaining(tvb, offset) > 0) {
/* ... as data. */
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
}
return tvb_reported_length(tvb);
}
@@ -1201,7 +1199,6 @@ proto_reg_handoff_dtpt(void)
dtpt_conversation_handle = create_dissector_handle(dissect_dtpt_conversation, proto_dtpt);
/** dtpt_data_handle = create_dissector_handle(dissect_dtpt_data, proto_dtpt); **/
- data_handle = find_dissector("data");
Initialized=TRUE;
} else {
dissector_delete_uint("tcp.port", ServerPort, dtpt_handle);
diff --git a/epan/dissectors/packet-dua.c b/epan/dissectors/packet-dua.c
index 8232a3c069..d5620a2e0f 100644
--- a/epan/dissectors/packet-dua.c
+++ b/epan/dissectors/packet-dua.c
@@ -76,7 +76,6 @@ static int hf_message_length = -1;
static gint ett_dua = -1;
static gint ett_dua_parameter = -1;
-static dissector_handle_t data_handle;
static dissector_handle_t dpnss_handle;
#define ADD_PADDING(x) ((((x) + 3) >> 2) << 2)
@@ -334,7 +333,7 @@ dissect_protocol_data_parameter(tvbuff_t *parameter_tvb, proto_item *parameter_i
return;
}
- call_dissector(data_handle, protocol_data_tvb, pinfo, tree);
+ call_data_dissector(protocol_data_tvb, pinfo, tree);
proto_item_append_text(parameter_item, " (%u byte%s)", protocol_data_length, plurality(protocol_data_length, "", "s"));
}
@@ -913,7 +912,6 @@ proto_reg_handoff_dua(void)
dissector_handle_t dua_handle;
dua_handle = find_dissector("dua");
- data_handle = find_dissector("data");
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-eapol.c b/epan/dissectors/packet-eapol.c
index 0cab0ea846..984c2fad75 100644
--- a/epan/dissectors/packet-eapol.c
+++ b/epan/dissectors/packet-eapol.c
@@ -57,7 +57,6 @@ static dissector_handle_t eapol_handle;
static dissector_handle_t eap_handle;
static dissector_handle_t mka_handle;
-static dissector_handle_t data_handle;
#define EAPOL_HDR_LEN 4
@@ -163,7 +162,7 @@ dissect_eapol(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
case EAPOL_ENCAP_ASF_ALERT: /* XXX - is this an SNMP trap? */
default:
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, eapol_tree);
+ call_data_dissector(next_tvb, pinfo, eapol_tree);
break;
}
return tvb_captured_length(tvb);
@@ -322,7 +321,6 @@ proto_reg_handoff_eapol(void)
*/
eap_handle = find_dissector_add_dependency("eap", proto_eapol);
mka_handle = find_dissector_add_dependency("mka", proto_eapol);
- data_handle = find_dissector("data");
dissector_add_uint("ethertype", ETHERTYPE_EAPOL, eapol_handle);
dissector_add_uint("ethertype", ETHERTYPE_RSN_PREAUTH, eapol_handle);
diff --git a/epan/dissectors/packet-egd.c b/epan/dissectors/packet-egd.c
index 5a96c3a484..4d1ee44635 100644
--- a/epan/dissectors/packet-egd.c
+++ b/epan/dissectors/packet-egd.c
@@ -72,8 +72,6 @@ static const value_string egd_stat_vals[] = {
static int proto_egd = -1;
-static dissector_handle_t data_handle;
-
static int hf_egd_ver = -1;
static int hf_egd_type = -1;
static int hf_egd_rid = -1;
@@ -150,7 +148,7 @@ static int dissect_egd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
if (data_length > 0)
{
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, egd_tree);
+ call_data_dissector(next_tvb, pinfo, egd_tree);
}
}
return tvb_captured_length(tvb);
@@ -243,9 +241,6 @@ void proto_reg_handoff_egd(void)
egd_handle = create_dissector_handle(dissect_egd, proto_egd);
dissector_add_uint("udp.port", EGD_PORT, egd_handle);
-
- /* find data dissector */
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-eiss.c b/epan/dissectors/packet-eiss.c
index 9cbe3323b5..57e8884519 100644
--- a/epan/dissectors/packet-eiss.c
+++ b/epan/dissectors/packet-eiss.c
@@ -32,7 +32,6 @@ void proto_register_eiss(void);
void proto_reg_handoff_eiss(void);
static int proto_eiss = -1;
-static dissector_handle_t data_handle;
static int hf_eiss_reserved2 = -1;
static int hf_eiss_section_number = -1;
@@ -236,7 +235,7 @@ dissect_eiss_descriptors(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
offset += 4;
payload = tvb_new_subset_length(tvb, offset, tmp-4);
- call_dissector(data_handle, payload, pinfo, sub_tree);
+ call_data_dissector(payload, pinfo, sub_tree);
return (3+tmp);
} else {
@@ -579,7 +578,6 @@ proto_reg_handoff_eiss(void)
eiss_handle = create_dissector_handle(dissect_eiss, proto_eiss);
dissector_add_uint("mpeg_sect.tid", EISS_SECTION_TID, eiss_handle);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-enc.c b/epan/dissectors/packet-enc.c
index fb4aef0f17..61ed92e849 100644
--- a/epan/dissectors/packet-enc.c
+++ b/epan/dissectors/packet-enc.c
@@ -48,7 +48,6 @@ struct enchdr {
#define BSD_ENC_M_AUTH_AH 0x2000 /* header authenticated */
static dissector_table_t enc_dissector_table;
-static dissector_handle_t data_handle;
/* header fields */
static int proto_enc = -1;
@@ -118,7 +117,7 @@ dissect_enc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
/* Set the tvbuff for the payload after the header */
next_tvb = tvb_new_subset_remaining(tvb, BSD_ENC_HDRLEN);
if (!dissector_try_uint(enc_dissector_table, ench.af, next_tvb, pinfo, tree))
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -169,8 +168,6 @@ proto_reg_handoff_enc(void)
{
dissector_handle_t enc_handle;
- data_handle = find_dissector("data");
-
enc_handle = create_dissector_handle(dissect_enc, proto_enc);
dissector_add_uint("wtap_encap", WTAP_ENCAP_ENC, enc_handle);
diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c
index 1b394c421c..47be693193 100644
--- a/epan/dissectors/packet-enip.c
+++ b/epan/dissectors/packet-enip.c
@@ -377,7 +377,6 @@ static dissector_table_t subdissector_sud_table;
static dissector_table_t subdissector_io_table;
static dissector_table_t subdissector_class_table;
-static dissector_handle_t data_handle;
static dissector_handle_t arp_handle;
static dissector_handle_t cipsafety_handle;
static dissector_handle_t cipmotion_handle;
@@ -2299,7 +2298,7 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb,
{
/* Show the undissected payload */
if ( tvb_reported_length_remaining(tvb, offset) > 0 )
- call_dissector( data_handle, next_tvb, pinfo, dissector_tree);
+ call_data_dissector(next_tvb, pinfo, dissector_tree);
}
/* Check if this is a ForwardOpen packet, because special handling is needed
@@ -2367,7 +2366,7 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb,
if (!dissector_try_uint(subdissector_sud_table, ifacehndl, next_tvb, pinfo, dissector_tree) )
{
/* Show the undissected payload */
- call_dissector( data_handle, next_tvb, pinfo, dissector_tree );
+ call_data_dissector(next_tvb, pinfo, dissector_tree );
}
p_remove_proto_data(wmem_file_scope(), pinfo, proto_enip, ENIP_REQUEST_INFO);
}
@@ -4423,9 +4422,6 @@ proto_reg_handoff_enip(void)
ssl_dissector_add(ENIP_SECURE_PORT, enip_tcp_handle);
dtls_dissector_add(ENIP_SECURE_PORT, enipio_handle);
- /* Find dissector for data packet */
- data_handle = find_dissector("data");
-
/* Find ARP dissector for TCP/IP object */
arp_handle = find_dissector_add_dependency("arp", proto_enip);
diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c
index 2d9391b41c..2203fc643a 100644
--- a/epan/dissectors/packet-epl.c
+++ b/epan/dissectors/packet-epl.c
@@ -1209,8 +1209,6 @@ static value_string_ext epl_sdo_asnd_commands_short_ext = VALUE_STRING_EXT_INIT(
static const gchar* addr_str_cn = " (Controlled Node)";
static const gchar* addr_str_res = " (reserved)";
-static dissector_handle_t data_dissector = NULL;
-
static gint dissect_epl_payload ( proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset, gint len, guint8 msgType );
static gint dissect_epl_soc(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset);
@@ -1928,7 +1926,7 @@ dissect_epl_payload ( proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, g
}
if ( ! dissector_try_heuristic(heur_epl_data_subdissector_list, payload_tvb, pinfo, epl_tree, &hdtbl_entry, &msgType))
- call_dissector(data_dissector, payload_tvb, pinfo, epl_tree);
+ call_data_dissector(payload_tvb, pinfo, epl_tree);
off += len;
}
@@ -4386,10 +4384,6 @@ proto_reg_handoff_epl(void)
{
dissector_handle_t epl_udp_handle = create_dissector_handle( dissect_epludp, proto_epl );
- /* Store a pointer to the data_dissector */
- if ( data_dissector == NULL )
- data_dissector = find_dissector ( "data" );
-
dissector_add_uint("ethertype", ETHERTYPE_EPL_V2, epl_handle);
dissector_add_uint("udp.port", UDP_PORT_EPL, epl_udp_handle);
diff --git a/epan/dissectors/packet-erf.c b/epan/dissectors/packet-erf.c
index 1379cd0881..33807cbac1 100644
--- a/epan/dissectors/packet-erf.c
+++ b/epan/dissectors/packet-erf.c
@@ -229,9 +229,6 @@ static expert_field ei_erf_extension_headers_not_shown = EI_INIT;
static expert_field ei_erf_packet_loss = EI_INIT;
static expert_field ei_erf_checksum_error = EI_INIT;
-/* Default subdissector, display raw hex data */
-static dissector_handle_t data_handle;
-
typedef enum {
ERF_HDLC_CHDLC = 0,
ERF_HDLC_PPP = 1,
@@ -1183,7 +1180,7 @@ dissect_erf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
call_dissector(sdh_handle, tvb, pinfo, tree);
}
else{
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
break;
@@ -1197,7 +1194,7 @@ dissect_erf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
case ERF_TYPE_INFINIBAND:
case ERF_TYPE_INFINIBAND_LINK:
if (!dissector_try_uint(erf_dissector_table, erf_type, tvb, pinfo, tree)) {
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
break;
@@ -1213,14 +1210,12 @@ dissect_erf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
case ERF_TYPE_MC_RAW:
dissect_mc_raw_header(tvb, pinfo, erf_tree);
- if (data_handle)
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
case ERF_TYPE_MC_RAW_CHANNEL:
dissect_mc_rawlink_header(tvb, pinfo, erf_tree);
- if (data_handle)
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
case ERF_TYPE_MC_ATM:
@@ -1420,7 +1415,7 @@ dissect_erf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
case ERF_TYPE_META:
/* use data dissector for now */
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
default:
@@ -1890,9 +1885,6 @@ proto_reg_handoff_erf(void)
{
dissector_add_uint("wtap_encap", WTAP_ENCAP_ERF, erf_handle);
- /* Dissector called to dump raw data, or unknown protocol */
- data_handle = find_dissector("data");
-
/* Get handles for serial line protocols */
chdlc_handle = find_dissector_add_dependency("chdlc", proto_erf);
ppp_handle = find_dissector_add_dependency("ppp_hdlc", proto_erf);
diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c
index 2475107a64..cb735f9d85 100644
--- a/epan/dissectors/packet-eth.c
+++ b/epan/dissectors/packet-eth.c
@@ -92,7 +92,6 @@ static expert_field ei_eth_len = EI_INIT;
static dissector_handle_t fw1_handle;
static dissector_handle_t ethertype_handle;
-static dissector_handle_t data_handle;
static heur_dissector_list_t heur_subdissector_list;
static heur_dissector_list_t eth_trailer_subdissector_list;
@@ -412,7 +411,7 @@ dissect_eth_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
expert_add_info_format(pinfo, ti, &ei_eth_invalid_lentype,
"Invalid length/type: 0x%04x (%d)", ehdr->type, ehdr->type);
next_tvb = tvb_new_subset_remaining(tvb, 14);
- call_dissector(data_handle, next_tvb, pinfo, parent_tree);
+ call_data_dissector(next_tvb, pinfo, parent_tree);
return fh_tree;
}
@@ -1046,9 +1045,6 @@ proto_reg_handoff_eth(void)
/* Get a handle for the ethertype dissector. */
ethertype_handle = find_dissector_add_dependency("ethertype", proto_eth);
- /* Get a handle for the generic data dissector. */
- data_handle = find_dissector("data");
-
eth_handle = create_dissector_handle(dissect_eth, proto_eth);
dissector_add_uint("wtap_encap", WTAP_ENCAP_ETHERNET, eth_handle);
diff --git a/epan/dissectors/packet-ethertype.c b/epan/dissectors/packet-ethertype.c
index 4b177417d5..8a88cebf4e 100644
--- a/epan/dissectors/packet-ethertype.c
+++ b/epan/dissectors/packet-ethertype.c
@@ -37,12 +37,9 @@
#include "packet-eth.h"
void proto_register_ethertype(void);
-void proto_reg_handoff_ethertype(void);
static dissector_table_t ethertype_dissector_table;
-static dissector_handle_t data_handle;
-
static int proto_ethertype = -1;
const value_string etype_vals[] = {
@@ -281,7 +278,7 @@ dissect_ethertype(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
if (!dissector_found) {
/* No sub-dissector found.
Label rest of packet as "Data" */
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
/* Label protocol */
col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "0x%04x", ethertype_data->etype);
@@ -358,12 +355,6 @@ proto_register_ethertype(void)
register_decode_as(&ethertype_da);
}
-void
-proto_reg_handoff_ethertype(void)
-{
- data_handle = find_dissector("data");
-}
-
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c
index 0dd06499a1..5f372efff1 100644
--- a/epan/dissectors/packet-fc.c
+++ b/epan/dissectors/packet-fc.c
@@ -145,8 +145,6 @@ static expert_field ei_frag_size = EI_INIT;
static dissector_handle_t fc_handle, fcsof_handle;
static dissector_table_t fcftype_dissector_table;
-static dissector_handle_t data_handle;
-
static int fc_tap = -1;
typedef struct _fc_conv_data_t {
@@ -1141,7 +1139,7 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
tvb, offset+9, 1, 0);
PROTO_ITEM_SET_HIDDEN(hidden_item);
next_tvb = tvb_new_subset_remaining (tvb, next_offset);
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return;
}
}
@@ -1156,11 +1154,11 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
/* If relative offset is used, only dissect the pdu with
* offset 0 (param) */
if( (fchdr->fctl&FC_FCTL_REL_OFFSET) && param ){
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else {
if (!dissector_try_uint_new (fcftype_dissector_table, ftype,
next_tvb, pinfo, tree, FALSE, fchdr)) {
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
} else if (ftype == FC_FTYPE_BLS) {
@@ -1622,8 +1620,6 @@ proto_reg_handoff_fc (void)
create_dissector_handle(dissect_fc_wtap, proto_fc));
dissector_add_uint("wtap_encap", WTAP_ENCAP_FIBRE_CHANNEL_FC2_WITH_FRAME_DELIMS, fcsof_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-fcct.c b/epan/dissectors/packet-fcct.c
index 4adeb16f97..5a5cc8526a 100644
--- a/epan/dissectors/packet-fcct.c
+++ b/epan/dissectors/packet-fcct.c
@@ -90,7 +90,6 @@ const value_string fc_ct_gsserver_vals[] = {
};
static dissector_table_t fcct_gserver_table;
-static dissector_handle_t data_handle;
guint8
get_gs_server (guint8 gstype, guint8 gssubtype)
@@ -211,7 +210,7 @@ dissect_fcct (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
next_tvb = tvb_new_subset_remaining (tvb, 0);
if (!dissector_try_uint_new(fcct_gserver_table, server, next_tvb, pinfo,
tree, TRUE, data)) {
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -286,8 +285,6 @@ proto_reg_handoff_fcct (void)
fcct_handle = create_dissector_handle (dissect_fcct, proto_fcct);
dissector_add_uint("fc.ftype", FC_FTYPE_FCCT, fcct_handle);
-
- data_handle = find_dissector ("data");
}
/*
diff --git a/epan/dissectors/packet-fcels.c b/epan/dissectors/packet-fcels.c
index acbde217f9..06d053adaf 100644
--- a/epan/dissectors/packet-fcels.c
+++ b/epan/dissectors/packet-fcels.c
@@ -621,7 +621,7 @@ typedef struct _fcels_conv_data {
static GHashTable *fcels_req_hash = NULL;
-static dissector_handle_t data_handle, fcsp_handle;
+static dissector_handle_t fcsp_handle;
/*
* Hash Functions
@@ -2103,7 +2103,7 @@ dissect_fcels (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
dissect_fcels_unbind (tvb, pinfo, tree, ti);
break;
default:
- call_dissector (data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
@@ -2627,7 +2627,6 @@ proto_reg_handoff_fcels (void)
els_handle = create_dissector_handle (dissect_fcels, proto_fcels);
dissector_add_uint("fc.ftype", FC_FTYPE_ELS, els_handle);
- data_handle = find_dissector ("data");
fcsp_handle = find_dissector_add_dependency ("fcsp", proto_fcels);
}
diff --git a/epan/dissectors/packet-fcfcs.c b/epan/dissectors/packet-fcfcs.c
index 614f3853e2..f46094bbba 100644
--- a/epan/dissectors/packet-fcfcs.c
+++ b/epan/dissectors/packet-fcfcs.c
@@ -99,8 +99,6 @@ typedef struct _fcfcs_conv_data {
static GHashTable *fcfcs_req_hash = NULL;
-static dissector_handle_t data_handle;
-
/*
* Hash Functions
*/
@@ -903,7 +901,7 @@ dissect_fcfcs (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
dissect_fcfcs_gcap (tvb, fcfcs_tree, isreq);
break;
default:
- call_dissector (data_handle, tvb, pinfo, fcfcs_tree);
+ call_data_dissector(tvb, pinfo, fcfcs_tree);
break;
}
@@ -1056,8 +1054,6 @@ proto_reg_handoff_fcfcs (void)
fcs_handle = create_dissector_handle (dissect_fcfcs, proto_fcfcs);
dissector_add_uint("fcct.server", FCCT_GSRVR_FCS, fcs_handle);
-
- data_handle = find_dissector ("data");
}
/*
diff --git a/epan/dissectors/packet-fcfzs.c b/epan/dissectors/packet-fcfzs.c
index 6c113b68e1..6af7818ce8 100644
--- a/epan/dissectors/packet-fcfzs.c
+++ b/epan/dissectors/packet-fcfzs.c
@@ -83,8 +83,6 @@ typedef struct _fcfzs_conv_data {
static GHashTable *fcfzs_req_hash = NULL;
-static dissector_handle_t data_handle;
-
/*
* Hash Functions
*/
@@ -687,7 +685,7 @@ dissect_fcfzs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
dissect_fcfzs_arzs(tvb, fcfzs_tree, isreq);
break;
default:
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
@@ -881,8 +879,6 @@ proto_reg_handoff_fcfzs(void)
fzs_handle = create_dissector_handle(dissect_fcfzs, proto_fcfzs);
dissector_add_uint("fcct.server", FCCT_GSRVR_FZS, fzs_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-fcip.c b/epan/dissectors/packet-fcip.c
index 6e230da629..4772a8c051 100644
--- a/epan/dissectors/packet-fcip.c
+++ b/epan/dissectors/packet-fcip.c
@@ -133,7 +133,6 @@ static int ett_fcip = -1;
static guint fcip_port = 3225;
static gboolean fcip_desegment = TRUE;
-static dissector_handle_t data_handle;
static dissector_handle_t fc_handle;
/* This routine attempts to locate the position of the next header in the
@@ -493,8 +492,8 @@ dissect_fcip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
fc_data.ethertype = 0;
call_dissector_with_data(fc_handle, next_tvb, pinfo, tree, &fc_data);
}
- else if (data_handle) {
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ else {
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
else {
@@ -654,7 +653,6 @@ proto_reg_handoff_fcip (void)
fcip_handle = create_dissector_handle(dissect_fcip_handle, proto_fcip);
dissector_add_for_decode_as("tcp.port", fcip_handle);
- data_handle = find_dissector("data");
fc_handle = find_dissector_add_dependency("fc", proto_fcip);
}
diff --git a/epan/dissectors/packet-fcoe.c b/epan/dissectors/packet-fcoe.c
index 864d017d6f..08bb769d21 100644
--- a/epan/dissectors/packet-fcoe.c
+++ b/epan/dissectors/packet-fcoe.c
@@ -103,7 +103,6 @@ static int ett_fcoe_crc = -1;
static expert_field ei_fcoe_crc = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t fc_handle;
static int
@@ -269,8 +268,8 @@ dissect_fcoe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if (fc_handle) {
call_dissector_with_data(fc_handle, next_tvb, pinfo, tree, &fc_data);
- } else if (data_handle) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ } else {
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -336,7 +335,6 @@ proto_reg_handoff_fcoe(void)
fcoe_handle = create_dissector_handle(dissect_fcoe, proto_fcoe);
dissector_add_uint("ethertype", ETHERTYPE_FCOE, fcoe_handle);
- data_handle = find_dissector("data");
fc_handle = find_dissector_add_dependency("fc", proto_fcoe);
}
diff --git a/epan/dissectors/packet-fcoib.c b/epan/dissectors/packet-fcoib.c
index b48d6f5164..de50bd3373 100644
--- a/epan/dissectors/packet-fcoib.c
+++ b/epan/dissectors/packet-fcoib.c
@@ -104,7 +104,6 @@ static int ett_fcoib_crc = -1;
static expert_field ei_fcoib_crc = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t fc_handle;
/* global preferences */
@@ -324,8 +323,8 @@ dissect_fcoib(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
if (fc_handle) {
call_dissector_with_data(fc_handle, next_tvb, pinfo, tree, &fc_data);
- } else if (data_handle) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ } else {
+ call_data_dissector(next_tvb, pinfo, tree);
}
return TRUE;
@@ -417,7 +416,6 @@ proto_reg_handoff_fcoib(void)
if (!initialized) {
heur_dissector_add("infiniband.payload", dissect_fcoib, "Fibre Channel over Infiniband", "fc_infiniband", proto_fcoib, HEURISTIC_ENABLE);
- data_handle = find_dissector("data");
fc_handle = find_dissector_add_dependency("fc", proto_fcoib);
initialized = TRUE;
diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c
index 45b20d55a4..d54a73726d 100644
--- a/epan/dissectors/packet-fcp.c
+++ b/epan/dissectors/packet-fcp.c
@@ -99,8 +99,6 @@ typedef struct fcp_request_data {
itlq_nexus_t *itlq;
} fcp_request_data_t;
-static dissector_handle_t data_handle;
-
/* Information Categories based on lower 4 bits of R_CTL */
#define FCP_IU_DATA 0x1
#define FCP_IU_UNSOL_CTL 0x2
@@ -621,7 +619,7 @@ dissect_fcp_els(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, fc_hdr *fch
dissect_fcp_srr(tvb, pinfo, tree, fchdr);
break;
default:
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -737,7 +735,7 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
dissect_fcp_rsp(tvb, pinfo, tree, fcp_tree, fc_conv, fchdr, request_data);
break;
default:
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
/*xxx once the subdissectors return bytes consumed: proto_item_set_end(ti, tvb, offset);*/
@@ -986,8 +984,6 @@ proto_reg_handoff_fcp(void)
fcp_handle = create_dissector_handle(dissect_fcp, proto_fcp);
dissector_add_uint("fc.ftype", FC_FTYPE_SCSI, fcp_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-fcsb3.c b/epan/dissectors/packet-fcsb3.c
index 0c58937e3e..12c2f48238 100644
--- a/epan/dissectors/packet-fcsb3.c
+++ b/epan/dissectors/packet-fcsb3.c
@@ -114,8 +114,6 @@ static gint ett_sbccs_dib_status = -1;
static gint ett_sbccs_dib_ctlparam = -1;
static gint ett_sbccs_dib_linkctlinfo = -1;
-static dissector_handle_t data_handle;
-
#if 0
typedef struct {
guint32 conv_id;
@@ -546,7 +544,7 @@ static void dissect_fc_sbccs_dib_status_hdr (tvbuff_t *tvb, packet_info *pinfo,
if (supp_status_cnt) {
next_tvb = tvb_new_subset_remaining (tvb, offset+FC_SBCCS_DIB_LRC_HDR_SIZE);
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -744,14 +742,14 @@ static int dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo,
break;
default:
next_tvb = tvb_new_subset_remaining (tvb, offset);
- call_dissector (data_handle, next_tvb, pinfo, dib_tree);
+ call_data_dissector(next_tvb, pinfo, dib_tree);
break;
}
if ((get_fc_sbccs_iu_type (tvb, 0) != FC_SBCCS_IU_CTL) &&
(get_fc_sbccs_iu_type (tvb, 0) != FC_SBCCS_IU_CMD_LINK_CTL)) {
next_tvb = tvb_new_subset_remaining (tvb, offset+FC_SBCCS_DIB_LRC_HDR_SIZE);
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -1144,8 +1142,6 @@ proto_reg_handoff_fcsbccs (void)
proto_fc_sbccs);
dissector_add_uint("fc.ftype", FC_FTYPE_SBCCS, fc_sbccs_handle);
-
- data_handle = find_dissector ("data");
}
/*
diff --git a/epan/dissectors/packet-fcswils.c b/epan/dissectors/packet-fcswils.c
index 9f15317153..e66711523d 100644
--- a/epan/dissectors/packet-fcswils.c
+++ b/epan/dissectors/packet-fcswils.c
@@ -453,7 +453,7 @@ typedef struct _fcswils_func_table_t {
fcswils_dissector_t func;
} fcswils_func_table_t;
-static dissector_handle_t data_handle, fcsp_handle;
+static dissector_handle_t fcsp_handle;
static gint get_zoneobj_len(tvbuff_t *tvb, gint offset);
@@ -1802,7 +1802,7 @@ dissect_fcswils(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
} else {
/* data dissector */
next_tvb = tvb_new_subset_remaining(tvb, offset+4);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -2544,7 +2544,6 @@ proto_reg_handoff_fcswils(void)
swils_handle = create_dissector_handle(dissect_fcswils, proto_fcswils);
dissector_add_uint("fc.ftype", FC_FTYPE_SWILS, swils_handle);
- data_handle = find_dissector("data");
fcsp_handle = find_dissector_add_dependency("fcsp", proto_fcswils);
}
diff --git a/epan/dissectors/packet-fddi.c b/epan/dissectors/packet-fddi.c
index 6230e8f8ae..975d423776 100644
--- a/epan/dissectors/packet-fddi.c
+++ b/epan/dissectors/packet-fddi.c
@@ -140,7 +140,6 @@ typedef struct _fddi_hdr {
#define FDDI_P_SHOST 7
static dissector_handle_t llc_handle;
-static dissector_handle_t data_handle;
static void
swap_mac_addr(guint8 *swapped_addr, tvbuff_t *tvb, gint offset)
@@ -439,7 +438,7 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
return;
default :
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return;
} /* fc */
@@ -539,7 +538,6 @@ proto_reg_handoff_fddi(void)
* Get a handle for the LLC dissector.
*/
llc_handle = find_dissector_add_dependency("llc", proto_fddi);
- data_handle = find_dissector("data");
dissector_add_uint("wtap_encap", WTAP_ENCAP_FDDI_BITSWAPPED,
fddi_bitswapped_handle);
diff --git a/epan/dissectors/packet-fefd.c b/epan/dissectors/packet-fefd.c
index a238340741..26982e63db 100644
--- a/epan/dissectors/packet-fefd.c
+++ b/epan/dissectors/packet-fefd.c
@@ -51,8 +51,6 @@ static gint ett_fefd = -1;
static gint ett_fefd_flags = -1;
static gint ett_fefd_tlv = -1;
-static dissector_handle_t data_handle;
-
#define TYPE_DEVICE_ID 0x0001
#define TYPE_PORT_ID 0x0002
#define TYPE_ECHO 0x0003
@@ -217,7 +215,7 @@ dissect_fefd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
}
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, fefd_tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, fefd_tree);
return tvb_captured_length(tvb);
}
@@ -286,7 +284,6 @@ proto_reg_handoff_fefd(void)
{
dissector_handle_t fefd_handle;
- data_handle = find_dissector("data");
fefd_handle = create_dissector_handle(dissect_fefd, proto_fefd);
dissector_add_uint("llc.force10_pid", 0x0111, fefd_handle);
}
diff --git a/epan/dissectors/packet-flexnet.c b/epan/dissectors/packet-flexnet.c
index 5555a2d952..02633ec16d 100644
--- a/epan/dissectors/packet-flexnet.c
+++ b/epan/dissectors/packet-flexnet.c
@@ -46,8 +46,6 @@ void proto_reg_handoff_flexnet(void);
#define FLEXNET_CTLLEN 15
#define FLEXNET_HDRLEN (FLEXNET_ADRLEN + FLEXNET_ADRLEN + FLEXNET_CTLLEN)
-static dissector_handle_t default_handle;
-
static int proto_flexnet = -1;
static int hf_flexnet_dst = -1;
static int hf_flexnet_src = -1;
@@ -91,7 +89,7 @@ dissect_flexnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void
/* Call sub-dissectors here */
next_tvb = tvb_new_subset_remaining(tvb, FLEXNET_HDRLEN);
- call_dissector( default_handle , next_tvb, pinfo, parent_tree );
+ call_data_dissector(next_tvb, pinfo, parent_tree );
return tvb_captured_length(tvb);
}
@@ -135,11 +133,6 @@ void
proto_reg_handoff_flexnet(void)
{
dissector_add_uint( "ax25.pid", AX25_P_FLEXNET, create_dissector_handle( dissect_flexnet, proto_flexnet ) );
-
- /*
- */
- default_handle = find_dissector( "data" );
-
}
/*
diff --git a/epan/dissectors/packet-flexray.c b/epan/dissectors/packet-flexray.c
index 98f22418d9..937fbfa4fe 100644
--- a/epan/dissectors/packet-flexray.c
+++ b/epan/dissectors/packet-flexray.c
@@ -82,7 +82,6 @@ static expert_field ei_flexray_symbol_frame = EI_INIT;
static expert_field ei_flexray_error_flag = EI_INIT;
static expert_field ei_flexray_stfi_flag = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_table_t subdissector_table;
#define FLEXRAY_FRAME 0x01
@@ -252,11 +251,11 @@ dissect_flexray(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
if (call_subdissector) {
if (!dissector_try_uint_new(subdissector_table, 0, next_tvb, pinfo, tree, FALSE, &flexray_id))
{
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
else {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
}
@@ -471,8 +470,6 @@ proto_reg_handoff_flexray(void)
flexray_handle = create_dissector_handle( dissect_flexray, proto_flexray );
dissector_add_uint("wtap_encap", WTAP_ENCAP_FLEXRAY, flexray_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-flip.c b/epan/dissectors/packet-flip.c
index 1e5fb1d68a..869e8632d7 100644
--- a/epan/dissectors/packet-flip.c
+++ b/epan/dissectors/packet-flip.c
@@ -86,8 +86,6 @@ static const value_string flip_etype[] = {
static dissector_table_t subdissector_table;
-static dissector_handle_t data_handle = NULL;
-
static gint ett_flip = -1;
static gint ett_flip_basic = -1;
static gint ett_flip_chksum = -1;
@@ -382,7 +380,7 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
data_len = dissector_try_uint(subdissector_table, 0, payload_tvb, pinfo, tree);
if (data_len <= 0)
{
- data_len = call_dissector(data_handle, payload_tvb, pinfo, tree);
+ data_len = call_data_dissector(payload_tvb, pinfo, tree);
}
bytes_dissected += data_len;
@@ -492,8 +490,6 @@ proto_reg_handoff_flip(void)
flip_handle = create_dissector_handle(dissect_flip, proto_flip);
dissector_add_uint("ethertype", ETHERTYPE_FLIP, flip_handle);
-
- data_handle = find_dissector("data");
} /* proto_reg_handoff_flip() */
/*
diff --git a/epan/dissectors/packet-fmtp.c b/epan/dissectors/packet-fmtp.c
index b1bbef29ea..0f1aa764bc 100644
--- a/epan/dissectors/packet-fmtp.c
+++ b/epan/dissectors/packet-fmtp.c
@@ -53,8 +53,6 @@ static gint ett_fmtp = -1;
#define INFO_STR_SIZE 1024
-static dissector_handle_t data_handle;
-
static const value_string packet_type_names[] = {
{ FMTP_TYP_OPERATIONAL, "Operational message" },
{ FMTP_TYP_OPERATOR, "Operator message" },
@@ -122,7 +120,7 @@ dissect_fmtp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
proto_tree_add_item(fmtp_tree, hf_fmtp_pdu_type, tvb, 4, 1, ENC_BIG_ENDIAN);
next_tvb = tvb_new_subset_remaining(tvb, FMTP_HEADER_LEN);
- call_dissector(data_handle, next_tvb, pinfo, fmtp_tree);
+ call_data_dissector(next_tvb, pinfo, fmtp_tree);
}
return tvb_captured_length(tvb);
@@ -204,7 +202,6 @@ proto_reg_handoff_fmtp(void)
{
/* Register as heuristic dissector for TCP */
heur_dissector_add("tcp", dissect_fmtp, "FMTP over TCP", "fmtp_tcp", proto_fmtp, HEURISTIC_ENABLE);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c
index 24419c9c3e..483f6a326a 100644
--- a/epan/dissectors/packet-frame.c
+++ b/epan/dissectors/packet-frame.c
@@ -97,7 +97,6 @@ static expert_field ei_incomplete = EI_INIT;
static int frame_tap = -1;
-static dissector_handle_t data_handle;
static dissector_handle_t docsis_handle;
/* Preferences */
@@ -497,9 +496,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
col_add_fstr(pinfo->cinfo, COL_INFO, "WTAP_ENCAP = %d",
pinfo->pkt_encap);
- call_dissector_with_data(data_handle,
- tvb, pinfo, parent_tree,
- (void *)pinfo->pseudo_header);
+ call_data_dissector(tvb, pinfo, parent_tree);
}
}
break;
@@ -516,7 +513,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
col_add_fstr(pinfo->cinfo, COL_INFO, "WTAP_ENCAP = %d",
file_type_subtype);
- call_dissector(data_handle,tvb, pinfo, parent_tree);
+ call_data_dissector(tvb, pinfo, parent_tree);
}
}
break;
@@ -931,7 +928,6 @@ proto_register_frame(void)
void
proto_reg_handoff_frame(void)
{
- data_handle = find_dissector("data");
docsis_handle = find_dissector_add_dependency("docsis", proto_frame);
}
diff --git a/epan/dissectors/packet-geneve.c b/epan/dissectors/packet-geneve.c
index 39fe82249f..58461c4599 100644
--- a/epan/dissectors/packet-geneve.c
+++ b/epan/dissectors/packet-geneve.c
@@ -83,7 +83,6 @@ static expert_field ei_geneve_ver_unknown = EI_INIT;
static expert_field ei_geneve_opt_len_invalid = EI_INIT;
static dissector_table_t ethertype_dissector_table;
-static dissector_handle_t data_handle;
static void
print_flags(guint8 flags, proto_item *flag_item)
@@ -311,7 +310,7 @@ dissect_geneve(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
next_tvb = tvb_new_subset_remaining(tvb, offset);
if (!dissector_try_uint(ethertype_dissector_table, proto_type, next_tvb, pinfo, tree))
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -451,7 +450,6 @@ proto_reg_handoff_geneve(void)
dissector_add_for_decode_as("udp.port", geneve_handle);
ethertype_dissector_table = find_dissector_table("ethertype");
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-gfp.c b/epan/dissectors/packet-gfp.c
index e7ffb9582c..9eb79daf4c 100644
--- a/epan/dissectors/packet-gfp.c
+++ b/epan/dissectors/packet-gfp.c
@@ -99,7 +99,6 @@ static gint ett_gfp_thec = -1;
static gint ett_gfp_ehec = -1;
static gint ett_gfp_fcs = -1;
-static dissector_handle_t data_handle;
static dissector_table_t gfp_dissector_table;
/* ITU-T G.7041 6.1.1, 6.2 */
@@ -245,7 +244,6 @@ dissect_gfp_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_t
guint pti, pfi, exi, upi;
guint fcs, fcs_calc;
guint fcs_len = 0;
- dissector_handle_t handle;
/* G.7041 6.1.2.3 Payload area scrambling
* Note that payload when sent on the wire is scrambled as per ATM
@@ -364,18 +362,14 @@ dissect_gfp_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_t
switch (pti) {
case GFP_USER_DATA:
case GFP_MANAGEMENT_COMMUNICATIONS:
- handle = dissector_get_uint_handle(gfp_dissector_table, upi);
- if (handle == NULL) {
+ if (!dissector_try_uint(gfp_dissector_table, upi, payload_tvb, pinfo, tree)) {
expert_add_info_format(pinfo, type_ti, &ei_gfp_payload_undecoded, "Payload type 0x%02x (%s) unsupported", upi, rval_to_str_const(upi, gfp_upi_data_rvals, "UNKNOWN"));
- handle = data_handle;
- }
- if (!call_dissector(handle, payload_tvb, pinfo, tree)) {
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
}
break;
case GFP_CLIENT_MANAGEMENT:
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
break;
default:
@@ -648,8 +642,6 @@ proto_reg_handoff_gfp(void)
gfp_handle = create_dissector_handle(dissect_gfp,
proto_gfp);
- data_handle = find_dissector("data");
-
dissector_add_uint("wtap_encap", WTAP_ENCAP_GFP_T, gfp_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_GFP_F, gfp_handle);
diff --git a/epan/dissectors/packet-giop.c b/epan/dissectors/packet-giop.c
index 752aa48dc8..b4515790e4 100644
--- a/epan/dissectors/packet-giop.c
+++ b/epan/dissectors/packet-giop.c
@@ -502,7 +502,6 @@ static const int *giop_message_flags[] = {
NULL
};
-static dissector_handle_t data_handle;
static dissector_handle_t giop_tcp_handle;
#define GIOP_MESSAGE_FLAGS_ZIOP_ENABLED 0x08
@@ -4735,7 +4734,7 @@ static int dissect_giop_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree
header.GIOP_version.major, header.GIOP_version.minor);
payload_tvb = tvb_new_subset_remaining (tvb, GIOP_HEADER_SIZE);
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -5566,7 +5565,6 @@ proto_register_giop (void)
void proto_reg_handoff_giop (void) {
- data_handle = find_dissector("data");
heur_dissector_add("tcp", dissect_giop_heur, "GIOP over TCP", "giop_tcp", proto_giop, HEURISTIC_ENABLE);
/* Support DIOP (GIOP/UDP) */
heur_dissector_add("udp", dissect_giop_heur, "DIOP (GIOP/UDP)", "giop_udp", proto_giop, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-gmr1_rach.c b/epan/dissectors/packet-gmr1_rach.c
index 7f0dfcc0f7..5e7dff7d35 100644
--- a/epan/dissectors/packet-gmr1_rach.c
+++ b/epan/dissectors/packet-gmr1_rach.c
@@ -37,7 +37,6 @@
void proto_register_gmr1_rach(void);
-void proto_reg_handoff_gmr1_rach(void);
/* GMR-1 RACH proto */
static int proto_gmr1_rach = -1;
@@ -53,9 +52,6 @@ static gint ett_rach_dialed_num = -1;
static gint ett_rach_gps_pos = -1;
static gint ett_rach_gmprs_req_type = -1;
-/* Handoffs */
-static dissector_handle_t data_handle;
-
/* Fields */
static int hf_rach_prio = -1;
static int hf_rach_est_cause = -1;
@@ -915,7 +911,7 @@ dissect_gmr1_rach(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
if (!ies) {
col_append_str(pinfo->cinfo, COL_INFO, "(Invalid)");
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -1188,12 +1184,6 @@ proto_register_gmr1_rach(void)
register_dissector("gmr1_rach", dissect_gmr1_rach, proto_gmr1_rach);
}
-void
-proto_reg_handoff_gmr1_rach(void)
-{
- data_handle = find_dissector("data");
-}
-
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissectors/packet-gmr1_rr.c b/epan/dissectors/packet-gmr1_rr.c
index bd06ef0439..fd47e47586 100644
--- a/epan/dissectors/packet-gmr1_rr.c
+++ b/epan/dissectors/packet-gmr1_rr.c
@@ -50,9 +50,6 @@ static gint ett_msg_ccch = -1;
static gint ett_rr_pd = -1;
-/* Handoffs */
-static dissector_handle_t data_handle;
-
/* ------------------------------------------------------------------------ */
@@ -1897,7 +1894,7 @@ dissect_gmr1_ccch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
/* Error handling */
err:
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -2459,12 +2456,6 @@ proto_register_gmr1_rr(void)
register_dissector("gmr1_ccch", dissect_gmr1_ccch, proto_gmr1_ccch);
}
-void
-proto_reg_handoff_gmr1_rr(void)
-{
- data_handle = find_dissector("data");
-}
-
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissectors/packet-gmrp.c b/epan/dissectors/packet-gmrp.c
index 60f20f30c0..092908e1b4 100644
--- a/epan/dissectors/packet-gmrp.c
+++ b/epan/dissectors/packet-gmrp.c
@@ -31,7 +31,6 @@
#include <epan/llcsaps.h>
void proto_register_gmrp(void);
-void proto_reg_handoff_gmrp(void);
/* Initialize the protocol and registered fields */
static int proto_gmrp = -1;
@@ -52,8 +51,6 @@ static gint ett_gmrp_attribute_list = -1;
static expert_field ei_gmrp_proto_id = EI_INIT;
-static dissector_handle_t data_handle;
-
/* Constant definitions */
#define GARP_DEFAULT_PROTOCOL_ID 0x0001
#define GARP_END_OF_MARK 0x00
@@ -139,8 +136,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if (protocol_id != GARP_DEFAULT_PROTOCOL_ID)
{
expert_add_info(pinfo, ti, &ei_gmrp_proto_id);
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, GARP_PROTOCOL_ID + 2),
+ call_data_dissector(tvb_new_subset_remaining(tvb, GARP_PROTOCOL_ID + 2),
pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -170,8 +166,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
else
{
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -189,8 +184,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
/* GMRP supports Group Membership and Service Requirement as attribute types */
if ( (octet != GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP) && (octet != GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT) )
{
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo,
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo,
tree);
return tvb_captured_length(tvb);
}
@@ -224,8 +218,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
else
{
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -257,8 +250,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
case GMRP_EVENT_LEAVEALL:
if (octet != GMRP_LENGTH_LEAVEALL)
{
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -272,8 +264,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if ( (octet != GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL) &&
(octet != GMRP_SERVICE_REQUIREMENT_NON_LEAVEALL) )
{
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -301,8 +292,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
else
{
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -310,8 +300,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
break;
default:
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -398,11 +387,6 @@ proto_register_gmrp(void)
}
-void
-proto_reg_handoff_gmrp(void){
- data_handle = find_dissector("data");
-}
-
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissectors/packet-gprs-llc.c b/epan/dissectors/packet-gprs-llc.c
index 1ed653ba90..d47f869f0a 100644
--- a/epan/dissectors/packet-gprs-llc.c
+++ b/epan/dissectors/packet-gprs-llc.c
@@ -124,7 +124,6 @@ static gint ett_llcgprs_sframe = -1;
static expert_field ei_llcgprs_no_info_field = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t sndcp_xid_handle;
static gboolean ignore_cipher_bit = FALSE;
@@ -860,7 +859,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
if (!dissector_try_uint(llcgprs_subdissector_table, sapi, next_tvb, pinfo, tree))
/* if no subdissector is found, call the data dissector */
{
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
break;
@@ -928,7 +927,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
next_tvb = tvb_new_subset_length(tvb, offset, (llc_data_length-offset));
if (!dissector_try_uint(llcgprs_subdissector_table, sapi, next_tvb, pinfo, tree))
{
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
break;
@@ -1008,14 +1007,14 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
/* otherwise - call a subdissector */
if (!dissector_try_uint(llcgprs_subdissector_table, sapi, next_tvb, pinfo, tree))
{
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
}
else
{
/* ciphered information - just parse it as data */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
break;
@@ -1352,7 +1351,6 @@ proto_reg_handoff_llcgprs(void)
gprs_llc_handle = find_dissector("llcgprs");
dissector_add_uint("wtap_encap", WTAP_ENCAP_GPRS_LLC, gprs_llc_handle);
- data_handle = find_dissector("data");
sndcp_xid_handle = find_dissector_add_dependency("sndcpxid", proto_llcgprs);
}
diff --git a/epan/dissectors/packet-gre.c b/epan/dissectors/packet-gre.c
index 9953608df2..7995ebd3ce 100644
--- a/epan/dissectors/packet-gre.c
+++ b/epan/dissectors/packet-gre.c
@@ -99,7 +99,6 @@ static gint ett_3gpp2_attr = -1;
static expert_field ei_gre_checksum_incorrect = EI_INIT;
static dissector_table_t gre_dissector_table;
-static dissector_handle_t data_handle;
/* bit positions for flags in header */
#define GRE_CHECKSUM 0x8000
@@ -514,7 +513,7 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
next_tvb = tvb_new_subset_remaining(tvb, offset);
pinfo->flags.in_gre_pkt = TRUE;
if (!dissector_try_uint(gre_dissector_table, type, next_tvb, pinfo, tree))
- call_dissector(data_handle,next_tvb, pinfo, gre_tree);
+ call_data_dissector(next_tvb, pinfo, gre_tree);
}
return tvb_captured_length(tvb);
}
@@ -758,7 +757,6 @@ proto_reg_handoff_gre(void)
dissector_add_uint("ip.proto", IP_PROTO_GRE, gre_handle);
register_capture_dissector("ip.proto", IP_PROTO_GRE, capture_gre, proto_gre);
register_capture_dissector("ipv6.nxt", IP_PROTO_GRE, capture_gre, proto_gre);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index f0d6cdc13d..5a053fe70a 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -756,7 +756,6 @@ static expert_field ei_gsm_a_dtap_coding_scheme = EI_INIT;
static dissector_table_t u2u_dissector_table;
-static dissector_handle_t data_handle;
static dissector_handle_t gsm_map_handle;
static dissector_handle_t rp_handle;
@@ -6721,7 +6720,7 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
/*
* too short to be DTAP
*/
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return len;
}
@@ -8328,7 +8327,6 @@ proto_reg_handoff_gsm_a_dtap(void)
dissector_add_uint("lapdm.sapi", 0 , dtap_handle); /* LAPDm: CC/RR/MM */
dissector_add_uint("lapdm.sapi", 3 , dtap_handle); /* LAPDm: SMS/SS */
- data_handle = find_dissector("data");
gsm_map_handle = find_dissector_add_dependency("gsm_map", proto_a_dtap);
rp_handle = find_dissector_add_dependency("gsm_a_rp", proto_a_dtap);
}
diff --git a/epan/dissectors/packet-gsm_a_gm.c b/epan/dissectors/packet-gsm_a_gm.c
index f83a021b87..fcb3ec842a 100644
--- a/epan/dissectors/packet-gsm_a_gm.c
+++ b/epan/dissectors/packet-gsm_a_gm.c
@@ -531,7 +531,6 @@ static expert_field ei_gsm_a_gm_extraneous_data = EI_INIT;
static expert_field ei_gsm_a_gm_not_enough_data = EI_INIT;
static expert_field ei_gsm_a_gm_undecoded = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t rrc_irat_ho_info_handle;
static dissector_handle_t lte_rrc_ue_eutra_cap_handle;
@@ -4323,7 +4322,7 @@ de_sm_pco(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, g
/*
* dissect the embedded DATA message
*/
- call_dissector(data_handle, l3_tvb, pinfo, pco_tree);
+ call_data_dissector(l3_tvb, pinfo, pco_tree);
}
}
}
@@ -8692,7 +8691,6 @@ proto_register_gsm_a_gm(void)
void
proto_reg_handoff_gsm_a_gm(void)
{
- data_handle = find_dissector("data");
rrc_irat_ho_info_handle = find_dissector_add_dependency("rrc.irat.irat_ho_info", proto_a_gm);
lte_rrc_ue_eutra_cap_handle = find_dissector_add_dependency("lte-rrc.ue_eutra_cap", proto_a_gm);
}
diff --git a/epan/dissectors/packet-gsm_a_rr.c b/epan/dissectors/packet-gsm_a_rr.c
index cb08dd31cf..d1e543a6de 100644
--- a/epan/dissectors/packet-gsm_a_rr.c
+++ b/epan/dissectors/packet-gsm_a_rr.c
@@ -1119,7 +1119,6 @@ static expert_field ei_gsm_a_rr_data_not_dissected = EI_INIT;
static expert_field ei_gsm_a_rr_unknown_version = EI_INIT;
static expert_field ei_gsm_a_rr_extraneous_data = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t rrlp_dissector;
@@ -10849,7 +10848,7 @@ dissect_ccch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
/*
* too short to be CCCH
*/
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -13366,7 +13365,6 @@ proto_register_gsm_a_rr(void)
void
proto_reg_handoff_gsm_a_rr(void)
{
- data_handle = find_dissector("data");
rrc_irat_ho_info_handle = find_dissector_add_dependency("rrc.irat.irat_ho_info", proto_a_rr);
rrc_irat_ho_to_utran_cmd_handle = find_dissector_add_dependency("rrc.irat.ho_to_utran_cmd", proto_a_rr);
rrlp_dissector = find_dissector("rrlp");
diff --git a/epan/dissectors/packet-gsm_cbch.c b/epan/dissectors/packet-gsm_cbch.c
index fd8bd05d63..925fc124d7 100644
--- a/epan/dissectors/packet-gsm_cbch.c
+++ b/epan/dissectors/packet-gsm_cbch.c
@@ -98,7 +98,6 @@ static expert_field ei_gsm_cbch_seq_num_null = EI_INIT;
static expert_field ei_gsm_cbch_seq_num_reserved = EI_INIT;
static expert_field ei_gsm_cbch_lpd = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t cbs_handle;
/* reassembly of CHCH blocks */
@@ -439,12 +438,12 @@ dissect_cbch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
case 0x0F:
expert_add_info(pinfo, seq_item, &ei_gsm_cbch_seq_num_null);
- call_dissector(data_handle, tvb, pinfo, cbch_tree);
+ call_data_dissector(tvb, pinfo, cbch_tree);
break;
default:
expert_add_info(pinfo, seq_item, &ei_gsm_cbch_seq_num_reserved);
- call_dissector(data_handle, tvb, pinfo, cbch_tree);
+ call_data_dissector(tvb, pinfo, cbch_tree);
break;
}
if (reass_tvb)
@@ -471,7 +470,7 @@ dissect_cbch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
else
{
expert_add_info(pinfo, lpd_item, &ei_gsm_cbch_lpd);
- call_dissector(data_handle, tvb, pinfo, cbch_tree);
+ call_data_dissector(tvb, pinfo, cbch_tree);
}
return tvb_captured_length(tvb);
}
@@ -656,7 +655,6 @@ proto_register_gsm_cbch(void)
void
proto_reg_handoff_gsm_cbch(void)
{
- data_handle = find_dissector("data");
cbs_handle = find_dissector_add_dependency("gsm_cbs", proto_cbch);
}
diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c
index acb302b123..f2fe6b0ecc 100644
--- a/epan/dissectors/packet-gsm_map.c
+++ b/epan/dissectors/packet-gsm_map.c
@@ -2672,7 +2672,6 @@ static expert_field ei_gsm_map_unknown_invokeData = EI_INIT;
static expert_field ei_gsm_map_undecoded = EI_INIT;
static dissector_handle_t gsm_sms_handle; /* SMS TPDU */
-static dissector_handle_t data_handle;
static dissector_handle_t ranap_handle;
static dissector_handle_t dtap_handle;
static dissector_handle_t map_handle;
@@ -3399,7 +3398,7 @@ dissect_gsm_map_T_extType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs
if (actx->external.direct_ref_present){
offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, ext_tree, NULL);
}else{
- call_dissector(data_handle, tvb, actx->pinfo, ext_tree);
+ call_data_dissector(tvb, actx->pinfo, ext_tree);
offset = tvb_reported_length_remaining(tvb,offset);
}
@@ -20725,7 +20724,7 @@ dissect_NokiaMAP_Extensions_AllowedServiceData(gboolean implicit_tag _U_, tvbuff
/*--- End of included file: packet-gsm_map-fn.c ---*/
-#line 831 "./asn1/gsm_map/packet-gsm_map-template.c"
+#line 830 "./asn1/gsm_map/packet-gsm_map-template.c"
/* Specific translation for MAP V3 */
const value_string gsm_map_V1V2_opr_code_strings[] = {
@@ -20947,7 +20946,7 @@ const value_string gsm_map_opr_code_strings[] = {
/* Unknown or empty loop list OPERATION */
/*--- End of included file: packet-gsm_map-table.c ---*/
-#line 842 "./asn1/gsm_map/packet-gsm_map-template.c"
+#line 841 "./asn1/gsm_map/packet-gsm_map-template.c"
{ 0, NULL }
};
@@ -21164,7 +21163,7 @@ static const value_string gsm_map_err_code_string_vals[] = {
/* Unknown or empty loop list OPERATION */
/*--- End of included file: packet-gsm_map-table.c ---*/
-#line 848 "./asn1/gsm_map/packet-gsm_map-template.c"
+#line 847 "./asn1/gsm_map/packet-gsm_map-template.c"
{ 0, NULL }
};
#endif
@@ -22951,7 +22950,6 @@ void proto_reg_handoff_gsm_map(void) {
if (!map_prefs_initialized) {
map_prefs_initialized = TRUE;
- data_handle = find_dissector("data");
ranap_handle = find_dissector_add_dependency("ranap", proto_gsm_map);
dtap_handle = find_dissector_add_dependency("gsm_a_dtap", proto_gsm_map);
gsm_sms_handle = find_dissector_add_dependency("gsm_sms", proto_gsm_map);
@@ -30326,7 +30324,7 @@ void proto_register_gsm_map(void) {
NULL, HFILL }},
/*--- End of included file: packet-gsm_map-hfarr.c ---*/
-#line 3056 "./asn1/gsm_map/packet-gsm_map-template.c"
+#line 3054 "./asn1/gsm_map/packet-gsm_map-template.c"
};
/* List of subtrees */
@@ -31052,7 +31050,7 @@ void proto_register_gsm_map(void) {
&ett_NokiaMAP_Extensions_AllowedServiceData,
/*--- End of included file: packet-gsm_map-ettarr.c ---*/
-#line 3090 "./asn1/gsm_map/packet-gsm_map-template.c"
+#line 3088 "./asn1/gsm_map/packet-gsm_map-template.c"
};
static ei_register_info ei[] = {
@@ -31174,7 +31172,7 @@ void proto_register_gsm_map(void) {
/*--- End of included file: packet-gsm_map-dis-tab.c ---*/
-#line 3146 "./asn1/gsm_map/packet-gsm_map-template.c"
+#line 3144 "./asn1/gsm_map/packet-gsm_map-template.c"
oid_add_from_string("ericsson-gsm-Map-Ext","1.2.826.0.1249.58.1.0" );
oid_add_from_string("accessTypeNotAllowed-id","1.3.12.2.1107.3.66.1.2");
/*oid_add_from_string("map-ac networkLocUp(1) version3(3)","0.4.0.0.1.0.1.3" );
diff --git a/epan/dissectors/packet-gsm_rlcmac.c b/epan/dissectors/packet-gsm_rlcmac.c
index 36e29ef775..16b4a8b1a4 100644
--- a/epan/dissectors/packet-gsm_rlcmac.c
+++ b/epan/dissectors/packet-gsm_rlcmac.c
@@ -56,7 +56,6 @@
#include "packet-gsm_rlcmac.h"
void proto_register_gsm_rlcmac(void);
-void proto_reg_handoff_gsm_rlcmac(void);
/* private typedefs */
typedef struct
@@ -1583,8 +1582,6 @@ static expert_field ei_gsm_rlcmac_unexpected_header_extension = EI_INIT;
static expert_field ei_gsm_rlcmac_unknown_pacch_access_burst = EI_INIT;
static expert_field ei_gsm_rlcmac_stream_not_supported = EI_INIT;
-static dissector_handle_t data_handle;
-
/* Payload type as defined in TS 44.060 / 10.4.7 */
#define PAYLOAD_TYPE_DATA 0
#define PAYLOAD_TYPE_CTRL_NO_OPT_OCTET 1
@@ -7586,7 +7583,7 @@ static guint8 dissect_gprs_data_segments(tvbuff_t *tvb, packet_info *pinfo, prot
i, li);
}
data_tvb = tvb_new_subset_length(tvb, octet_offset, octet_length - octet_offset);
- call_dissector(data_handle, data_tvb, pinfo, subtree);
+ call_data_dissector(data_tvb, pinfo, subtree);
octet_offset = octet_length;
break;
@@ -7595,7 +7592,7 @@ static guint8 dissect_gprs_data_segments(tvbuff_t *tvb, packet_info *pinfo, prot
"data segment: LI[%d]=%d indicates: (Last segment of) LLC frame (%d octets)",
i, li, li);
data_tvb = tvb_new_subset_length(tvb, octet_offset, li);
- call_dissector(data_handle, data_tvb, pinfo, subtree);
+ call_data_dissector(data_tvb, pinfo, subtree);
octet_offset += li;
break;
}
@@ -7614,7 +7611,7 @@ static guint8 dissect_gprs_data_segments(tvbuff_t *tvb, packet_info *pinfo, prot
subtree = proto_tree_add_subtree(tree, tvb, octet_offset, octet_length - octet_offset, ett_data_segments, NULL, "Padding Octets");
}
data_tvb = tvb_new_subset_length(tvb, octet_offset, octet_length - octet_offset);
- call_dissector(data_handle, data_tvb, pinfo, subtree);
+ call_data_dissector(data_tvb, pinfo, subtree);
octet_offset = octet_length;
}
return (octet_offset - initial_offset);
@@ -7698,7 +7695,7 @@ static guint16 dissect_egprs_data_segments(tvbuff_t *tvb, packet_info *pinfo, pr
i, li);
}
data_tvb = tvb_new_subset_length(tvb, octet_offset, octet_length - octet_offset);
- call_dissector(data_handle, data_tvb, pinfo, subtree);
+ call_data_dissector(data_tvb, pinfo, subtree);
octet_offset = octet_length;
break;
@@ -7707,7 +7704,7 @@ static guint16 dissect_egprs_data_segments(tvbuff_t *tvb, packet_info *pinfo, pr
"data segment: LI[%d]=%d indicates: (Last segment of) LLC frame (%d octets)",
i, li, li);
data_tvb = tvb_new_subset_length(tvb, octet_offset, li);
- call_dissector(data_handle, data_tvb, pinfo, subtree);
+ call_data_dissector(data_tvb, pinfo, subtree);
octet_offset += li;
break;
}
@@ -7719,7 +7716,7 @@ static guint16 dissect_egprs_data_segments(tvbuff_t *tvb, packet_info *pinfo, pr
subtree = proto_tree_add_subtree(tree, tvb, octet_offset, octet_length - octet_offset, ett_data_segments, NULL,
"data segment: LI not present: \n The Upper Layer PDU in the current RLC data block either fills the current RLC data block precisely \nor continues in the following in-sequence RLC data block");
data_tvb = tvb_new_subset_length(tvb, octet_offset, octet_length - octet_offset);
- call_dissector(data_handle, data_tvb, pinfo, subtree);
+ call_data_dissector(data_tvb, pinfo, subtree);
octet_offset = octet_length;
}
return (octet_offset - initial_offset);
@@ -8202,7 +8199,7 @@ dissect_ul_pacch_access_burst(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
else
{
proto_tree_add_expert(tree, pinfo, &ei_gsm_rlcmac_unknown_pacch_access_burst, tvb, 0, -1);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
}
@@ -16496,12 +16493,6 @@ proto_register_gsm_rlcmac(void)
register_dissector("gsm_rlcmac_dl", dissect_gsm_rlcmac_downlink, proto_gsm_rlcmac);
}
-void
-proto_reg_handoff_gsm_rlcmac(void)
-{
- data_handle = find_dissector("data");
-}
-
/*
* Editor modelines
diff --git a/epan/dissectors/packet-gsm_um.c b/epan/dissectors/packet-gsm_um.c
index eca32c6d27..f8e77b433b 100644
--- a/epan/dissectors/packet-gsm_um.c
+++ b/epan/dissectors/packet-gsm_um.c
@@ -47,7 +47,6 @@ static gint ett_gsm_um = -1;
static dissector_handle_t lapdm_handle;
static dissector_handle_t dtap_handle;
-static dissector_handle_t data_handle;
static gboolean dcs1800_gsm = TRUE;
@@ -215,7 +214,7 @@ dissect_gsm_um(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
}
else {
/* Either RACH, or something invalid */
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
break;
case GSM_UM_CHANNEL_SACCH:
@@ -224,7 +223,7 @@ dissect_gsm_um(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
call_dissector(lapdm_handle, tvb, pinfo, tree);
break;
default:
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
return tvb_captured_length(tvb);
@@ -299,7 +298,6 @@ proto_reg_handoff_gsm_um(void)
lapdm_handle = find_dissector_add_dependency("lapdm", proto_gsm_um);
dtap_handle = find_dissector_add_dependency("gsm_a_dtap", proto_gsm_um);
- data_handle = find_dissector("data");
gsm_um_handle = create_dissector_handle(dissect_gsm_um, proto_gsm_um);
diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c
index 418eb410a5..457e944d20 100644
--- a/epan/dissectors/packet-gtp.c
+++ b/epan/dissectors/packet-gtp.c
@@ -1834,7 +1834,6 @@ static dissector_handle_t ppp_handle;
static dissector_handle_t sync_handle;
static dissector_handle_t gtpcdr_handle;
static dissector_handle_t sndcpxid_handle;
-static dissector_handle_t data_handle;
static dissector_handle_t gtpv2_handle;
static dissector_handle_t bssgp_handle;
static dissector_table_t bssap_pdu_type_table;
@@ -7117,7 +7116,7 @@ decode_gtp_ps_handover_xid(tvbuff_t * tvb, int offset, packet_info * pinfo, prot
if (sndcpxid_handle)
call_dissector(sndcpxid_handle, next_tvb, pinfo, tree);
else
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return 4 + length;
@@ -10194,7 +10193,6 @@ proto_reg_handoff_gtp(void)
sync_handle = find_dissector_add_dependency("sync", proto_gtp);
gtpcdr_handle = find_dissector_add_dependency("gtpcdr", proto_gtp);
sndcpxid_handle = find_dissector_add_dependency("sndcpxid", proto_gtp);
- data_handle = find_dissector("data");
gtpv2_handle = find_dissector_add_dependency("gtpv2", proto_gtp);
bssgp_handle = find_dissector_add_dependency("bssgp", proto_gtp);
bssap_pdu_type_table = find_dissector_table("bssap.pdu_type");
diff --git a/epan/dissectors/packet-gvrp.c b/epan/dissectors/packet-gvrp.c
index 75871d6f35..be8b75c181 100644
--- a/epan/dissectors/packet-gvrp.c
+++ b/epan/dissectors/packet-gvrp.c
@@ -27,7 +27,6 @@
#include <epan/expert.h>
void proto_register_gvrp(void);
-void proto_reg_handoff_gvrp(void);
/* Initialize the protocol and registered fields */
static int proto_gvrp = -1;
@@ -45,8 +44,6 @@ static gint ett_gvrp_attribute = -1;
static expert_field ei_gvrp_proto_id = EI_INIT;
-static dissector_handle_t data_handle;
-
/* Constant definitions */
#define GARP_DEFAULT_PROTOCOL_ID 0x0001
#define GARP_END_OF_MARK 0x00
@@ -124,8 +121,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if (protocol_id != GARP_DEFAULT_PROTOCOL_ID)
{
expert_add_info(pinfo, id_item, &ei_gvrp_proto_id);
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, GARP_PROTOCOL_ID + 2),
+ call_data_dissector(tvb_new_subset_remaining(tvb, GARP_PROTOCOL_ID + 2),
pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -155,8 +151,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
else
{
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
return tvb_captured_length(tvb);
}
}
@@ -173,7 +168,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
/* GVRP only supports one attribute type. */
if (octet != GVRP_ATTRIBUTE_TYPE)
{
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset),
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -206,8 +201,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
else
{
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
return tvb_captured_length(tvb);
}
}
@@ -238,8 +232,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
case GVRP_EVENT_LEAVEALL:
if (octet != GVRP_LENGTH_LEAVEALL)
{
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo,
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo,
tree);
return tvb_captured_length(tvb);
}
@@ -252,8 +245,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
case GVRP_EVENT_EMPTY:
if (octet != GVRP_LENGTH_NON_LEAVEALL)
{
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),pinfo,
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset),pinfo,
tree);
return tvb_captured_length(tvb);
}
@@ -267,8 +259,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
break;
default:
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
return tvb_captured_length(tvb);
}
}
@@ -347,10 +338,6 @@ proto_register_gvrp(void)
register_dissector("gvrp", dissect_gvrp, proto_gvrp);
}
-void
-proto_reg_handoff_gvrp(void){
- data_handle = find_dissector("data");
-}
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
diff --git a/epan/dissectors/packet-h1.c b/epan/dissectors/packet-h1.c
index 43369049e3..5dd39fb3ad 100644
--- a/epan/dissectors/packet-h1.c
+++ b/epan/dissectors/packet-h1.c
@@ -41,8 +41,6 @@ static int hf_h1_dlen = -1;
static int hf_h1_org = -1;
static int hf_h1_response_value = -1;
-static dissector_handle_t data_handle;
-
#define EMPTY_BLOCK 0xFF
#define OPCODE_BLOCK 0x01
@@ -205,7 +203,7 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (tvb_reported_length_remaining(tvb, offset) > 0) {
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return TRUE;
@@ -264,8 +262,6 @@ proto_reg_handoff_h1(void)
"Sinec H1 over COTP (inactive subset)", "hi_cotp_is", proto_h1, HEURISTIC_ENABLE);
heur_dissector_add("tcp", dissect_h1,
"Sinec H1 over TCP", "hi_tcp", proto_h1, HEURISTIC_ENABLE);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-hci_h1.c b/epan/dissectors/packet-hci_h1.c
index 17dc9ad691..36520be98e 100644
--- a/epan/dissectors/packet-hci_h1.c
+++ b/epan/dissectors/packet-hci_h1.c
@@ -36,7 +36,6 @@ static gint ett_hci_h1 = -1;
static dissector_table_t hci_h1_table;
static dissector_handle_t hci_h1_handle;
-static dissector_handle_t data_handle;
static const value_string hci_h1_type_vals[] = {
{BTHCI_CHANNEL_COMMAND, "HCI Command"},
@@ -109,7 +108,7 @@ dissect_hci_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
next_tvb = tvb_new_subset_remaining(tvb, 0);
if (!dissector_try_uint_new(hci_h1_table, type, next_tvb, pinfo, tree, TRUE, bluetooth_data)) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_reported_length(tvb);
@@ -146,8 +145,6 @@ proto_register_hci_h1(void)
void
proto_reg_handoff_hci_h1(void)
{
- data_handle = find_dissector("data");
-
dissector_add_uint("bluetooth.encap", WTAP_ENCAP_BLUETOOTH_HCI, hci_h1_handle);
}
diff --git a/epan/dissectors/packet-hci_h4.c b/epan/dissectors/packet-hci_h4.c
index 7a68a13693..3336b04c29 100644
--- a/epan/dissectors/packet-hci_h4.c
+++ b/epan/dissectors/packet-hci_h4.c
@@ -41,7 +41,6 @@ static gint ett_hci_h4 = -1;
static dissector_handle_t hci_h4_handle;
static dissector_table_t hci_h4_table;
-static dissector_handle_t data_handle;
static const value_string hci_h4_type_vals[] = {
{HCI_H4_TYPE_CMD, "HCI Command"},
@@ -107,7 +106,7 @@ dissect_hci_h4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
next_tvb = tvb_new_subset_remaining(tvb, 1);
if (!dissector_try_uint_new(hci_h4_table, type, next_tvb, pinfo, tree, TRUE, bluetooth_data)) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return 1;
@@ -149,8 +148,6 @@ proto_register_hci_h4(void)
void
proto_reg_handoff_hci_h4(void)
{
- data_handle = find_dissector("data");
-
dissector_add_uint("bluetooth.encap", WTAP_ENCAP_BLUETOOTH_H4, hci_h4_handle);
dissector_add_uint("bluetooth.encap", WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR, hci_h4_handle);
}
diff --git a/epan/dissectors/packet-hpext.c b/epan/dissectors/packet-hpext.c
index 2ae8b80a06..f8f7f10497 100644
--- a/epan/dissectors/packet-hpext.c
+++ b/epan/dissectors/packet-hpext.c
@@ -64,8 +64,6 @@ static header_field_info hfi_hpext_reserved HPEXT_HFI_INIT =
static gint ett_hpext = -1;
-static dissector_handle_t data_handle;
-
static int
dissect_hpext(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
@@ -98,7 +96,7 @@ dissect_hpext(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
next_tvb = tvb_new_subset_remaining(tvb, 7);
if (!dissector_try_uint(subdissector_table,
dxsap, next_tvb, pinfo, tree)) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
return tvb_captured_length(tvb);
@@ -138,8 +136,6 @@ proto_register_hpext(void)
void
proto_reg_handoff_hpext(void)
{
- data_handle = find_dissector("data");
-
dissector_add_uint("llc.dsap", SAP_HPEXT, hpext_handle);
}
diff --git a/epan/dissectors/packet-hsr.c b/epan/dissectors/packet-hsr.c
index f8e3a347f9..d07bc87be7 100644
--- a/epan/dissectors/packet-hsr.c
+++ b/epan/dissectors/packet-hsr.c
@@ -69,8 +69,6 @@ static dissector_table_t ethertype_subdissector_table;
/* Initialize the subtree pointers */
static gint ett_hsr_frame = -1;
-static dissector_handle_t data_handle;
-
/* Code to actually dissect the packets */
static int
dissect_hsr_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -124,7 +122,7 @@ dissect_hsr_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
etype = tvb_get_ntohs(tvb, HSR_TOTAL_LENGTH);
if (!dissector_try_uint(ethertype_subdissector_table, etype, next_tvb, pinfo, tree))
- call_dissector(data_handle, next_tvb, pinfo, hsr_tree);
+ call_data_dissector(next_tvb, pinfo, hsr_tree);
return tvb_captured_length(tvb);
}
@@ -193,7 +191,6 @@ void proto_reg_handoff_hsr(void)
dissector_add_uint("ethertype", ETHERTYPE_HSR, hsr_frame_handle);
ethertype_subdissector_table = find_dissector_table("ethertype");
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-hsrp.c b/epan/dissectors/packet-hsrp.c
index 387e5c76bf..d3680564c1 100644
--- a/epan/dissectors/packet-hsrp.c
+++ b/epan/dissectors/packet-hsrp.c
@@ -142,7 +142,6 @@ void proto_register_hsrp(void);
void proto_reg_handoff_hsrp(void);
static gint proto_hsrp = -1;
-static dissector_handle_t data_handle;
static gint hf_hsrp_version = -1;
static gint hf_hsrp_opcode = -1;
@@ -450,7 +449,7 @@ dissect_hsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
/* offset += 4; */
} else {
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, hsrp_tree);
+ call_data_dissector(next_tvb, pinfo, hsrp_tree);
}
/* is MD5 authentication being used with HSRPv1? */
if (tvb_captured_length(tvb) == 50) { /* 20 bytes of regular HSRP data + 30 bytes of authentication payload */
@@ -547,7 +546,7 @@ dissect_hsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
} else {
/* Unknown protocol */
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, hsrp_tree);
+ call_data_dissector(next_tvb, pinfo, hsrp_tree);
break;
}
/* offset+=16; */
@@ -602,10 +601,8 @@ dissect_hsrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
}
} else {
/* Undefined TLV */
- if (tree) {
- next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, hsrp_tree);
- }
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
+ call_data_dissector(next_tvb, pinfo, hsrp_tree);
break;
}
offset = offset2+len+2;
@@ -853,7 +850,6 @@ proto_reg_handoff_hsrp(void)
{
dissector_handle_t hsrp_handle;
- data_handle = find_dissector("data");
hsrp_handle = create_dissector_handle(dissect_hsrp, proto_hsrp);
dissector_add_uint("udp.port", UDP_PORT_HSRP, hsrp_handle);
dissector_add_uint("udp.port", UDP_PORT_HSRP2_V6, hsrp_handle);
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index 9c56704b09..ba44f06f8b 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -152,7 +152,6 @@ static expert_field ei_http_leading_crlf = EI_INIT;
static dissector_handle_t http_handle;
-static dissector_handle_t data_handle;
static dissector_handle_t media_handle;
static dissector_handle_t websocket_handle;
static dissector_handle_t http2_handle;
@@ -1325,8 +1324,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (headers.transfer_encoding_chunked) {
if (!http_dechunk_body) {
/* Chunking disabled, cannot dissect further. */
- call_dissector(data_handle, next_tvb, pinfo,
- http_tree);
+ call_data_dissector(next_tvb, pinfo, http_tree);
goto body_dissected;
}
@@ -1366,7 +1364,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
* "compress", or "deflate" as *transfer* encodings;
* just handle them as data for now.
*/
- call_dissector(data_handle, next_tvb, pinfo, http_tree);
+ call_data_dissector(next_tvb, pinfo, http_tree);
goto body_dissected;
default:
/* Nothing to do for "identity" or when header is
@@ -1435,8 +1433,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
"Uncompressed entity body");
} else {
proto_item_append_text(e_ti, " [Error: Decompression failed]");
- call_dissector(data_handle, next_tvb, pinfo,
- e_tree);
+ call_data_dissector(next_tvb, pinfo, e_tree);
goto body_dissected;
}
@@ -1553,7 +1550,7 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
call_dissector_with_data(media_handle, next_tvb, pinfo, tree, media_str);
} else {
/* Call the default data dissector */
- call_dissector(data_handle, next_tvb, pinfo, http_tree);
+ call_data_dissector(next_tvb, pinfo, http_tree);
}
}
@@ -1823,8 +1820,7 @@ chunked_encoding_dissector(tvbuff_t **tvb_ptr, packet_info *pinfo,
* dissection is done on the reassembled data.
*/
data_tvb = tvb_new_subset_length(tvb, chunk_offset, chunk_size);
- call_dissector(data_handle, data_tvb, pinfo,
- chunk_subtree);
+ call_data_dissector(data_tvb, pinfo, chunk_subtree);
proto_tree_add_item(chunk_subtree, hf_http_chunked_boundary, tvb,
chunk_offset + chunk_size, 2, ENC_NA);
@@ -1978,8 +1974,7 @@ chunked_encoding_dissector(tvbuff_t **tvb_ptr, packet_info *pinfo,
* dissection is done on the reassembled data.
*/
data_tvb = tvb_new_subset_length(tvb, chunk_offset, chunk_size);
- call_dissector(data_handle, data_tvb, pinfo,
- chunk_subtree);
+ call_data_dissector(data_tvb, pinfo, chunk_subtree);
proto_tree_add_item(chunk_subtree, hf_http_chunk_boundary, tvb,
chunk_offset + chunk_size, 2, ENC_NA);
@@ -2089,7 +2084,7 @@ http_payload_subdissector(tvbuff_t *tvb, proto_tree *tree,
* dissector directly.
*/
if (value_is_in_range(http_tcp_range, uri_port) || (conv && conversation_get_dissector(conv, pinfo->num) == http_handle)) {
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
} else {
/* set pinfo->{src/dst port} and call the TCP sub-dissector lookup */
if (!from_server)
@@ -3569,7 +3564,6 @@ proto_reg_handoff_http(void)
{
dissector_handle_t ssdp_handle;
- data_handle = find_dissector("data");
media_handle = find_dissector_add_dependency("media", proto_http);
websocket_handle = find_dissector_add_dependency("websocket", proto_http);
http2_handle = find_dissector("http2");
diff --git a/epan/dissectors/packet-http2.c b/epan/dissectors/packet-http2.c
index 747e70356c..2f661ebc43 100644
--- a/epan/dissectors/packet-http2.c
+++ b/epan/dissectors/packet-http2.c
@@ -284,7 +284,6 @@ static wmem_map_t *http2_hdrcache_map = NULL;
/* Header name_length + name + value_length + value */
static char *http2_header_pstr = NULL;
-static dissector_handle_t data_handle;
static dissector_handle_t http2_handle;
#define FRAME_HEADER_LENGTH 9
@@ -2012,8 +2011,6 @@ static int http2_stats_tree_packet(stats_tree* st, packet_info* pinfo _U_, epan_
void
proto_reg_handoff_http2(void)
{
- data_handle = find_dissector("data");
-
dissector_add_for_decode_as("tcp.port", http2_handle);
heur_dissector_add("ssl", dissect_http2_heur_ssl, "HTTP2 over SSL", "http2_ssl", proto_http2, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-i2c.c b/epan/dissectors/packet-i2c.c
index dfe7193e6c..a8599e4f08 100644
--- a/epan/dissectors/packet-i2c.c
+++ b/epan/dissectors/packet-i2c.c
@@ -45,7 +45,6 @@ static int hf_i2c_addr = -1;
static gint ett_i2c = -1;
-static dissector_handle_t data_handle;
static dissector_table_t subdissector_table;
/* I2C packet flags. */
@@ -222,7 +221,7 @@ dissect_i2c(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
have a unique identifier to determine subdissector */
if (!dissector_try_uint(subdissector_table, 0, tvb, pinfo, tree))
{
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
}
return tvb_captured_length(tvb);
@@ -269,8 +268,6 @@ proto_reg_handoff_i2c(void)
{
dissector_handle_t i2c_handle;
- data_handle = find_dissector("data");
-
i2c_handle = create_dissector_handle(dissect_i2c, proto_i2c);
dissector_add_uint("wtap_encap", WTAP_ENCAP_I2C, i2c_handle);
register_capture_dissector("wtap_encap", WTAP_ENCAP_I2C, capture_i2c, proto_i2c);
diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c
index bd54dbbf8a..af46741f46 100644
--- a/epan/dissectors/packet-iax2.c
+++ b/epan/dissectors/packet-iax2.c
@@ -208,8 +208,6 @@ static const fragment_items iax2_fragment_items = {
"iax2 fragments"
};
-static dissector_handle_t data_handle;
-
/* data-call subdissectors, AST_DATAFORMAT_* */
static dissector_table_t iax2_dataformat_dissector_table;
/* voice/video call subdissectors, AST_FORMAT_* */
@@ -2178,7 +2176,7 @@ static void process_iax_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* codec dissector handled our data */
} else {
/* we don't know how to dissect our data: dissect it as data */
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
#ifdef DEBUG_DESEGMENT
@@ -3223,7 +3221,6 @@ proto_reg_handoff_iax2(void)
v110_handle = find_dissector("v110");
if (v110_handle)
dissector_add_uint("iax2.dataformat", AST_DATAFORMAT_V110, v110_handle);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-icap.c b/epan/dissectors/packet-icap.c
index 35d3a0a229..026b8718be 100644
--- a/epan/dissectors/packet-icap.c
+++ b/epan/dissectors/packet-icap.c
@@ -49,7 +49,6 @@ static int hf_icap_options = -1;
static gint ett_icap = -1;
-static dissector_handle_t data_handle;
static dissector_handle_t http_handle;
#define TCP_PORT_ICAP 1344
@@ -321,7 +320,6 @@ proto_reg_handoff_icap(void)
{
dissector_handle_t icap_handle;
- data_handle = find_dissector("data");
http_handle = find_dissector_add_dependency("http", proto_icap);
icap_handle = create_dissector_handle(dissect_icap, proto_icap);
diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c
index e12875566c..526c06e485 100644
--- a/epan/dissectors/packet-icmp.c
+++ b/epan/dissectors/packet-icmp.c
@@ -217,7 +217,6 @@ static expert_field ei_icmp_checksum = EI_INIT;
#define ICMP_MIP_CHALLENGE 24
static dissector_handle_t ip_handle;
-static dissector_handle_t data_handle;
static const value_string icmp_type_str[] = {
{ICMP_ECHOREPLY, "Echo (ping) reply"},
@@ -1508,8 +1507,7 @@ dissect_icmp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data)
* malformed packets as we try to access data that isn't there. */
if (tvb_captured_length_remaining(tvb, 8) < 8) {
if (tvb_captured_length_remaining(tvb, 8) > 0) {
- call_dissector(data_handle,
- tvb_new_subset_remaining
+ call_data_dissector(tvb_new_subset_remaining
(tvb, 8), pinfo, icmp_tree);
}
break;
@@ -1541,13 +1539,11 @@ dissect_icmp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data)
tvb, 8, 8,
&time_relative);
PROTO_ITEM_SET_GENERATED(ti);
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb,
+ call_data_dissector(tvb_new_subset_remaining(tvb,
8 + 8),
pinfo, icmp_tree);
} else {
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, 8),
+ call_data_dissector(tvb_new_subset_remaining(tvb, 8),
pinfo, icmp_tree);
}
break;
@@ -1564,8 +1560,7 @@ dissect_icmp(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data)
icmp_tree);
}
} else {
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, 8),
+ call_data_dissector(tvb_new_subset_remaining(tvb, 8),
pinfo, icmp_tree);
}
break;
@@ -2048,7 +2043,6 @@ void proto_reg_handoff_icmp(void)
*/
ip_handle = find_dissector_add_dependency("ip", proto_icmp);
icmp_handle = find_dissector("icmp");
- data_handle = find_dissector("data");
dissector_add_uint("ip.proto", IP_PROTO_ICMP, icmp_handle);
register_capture_dissector("ip.proto", IP_PROTO_ICMP, capture_icmp, proto_icmp);
diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c
index d60239dfa9..5d623e5385 100644
--- a/epan/dissectors/packet-icmpv6.c
+++ b/epan/dissectors/packet-icmpv6.c
@@ -562,7 +562,6 @@ static expert_field ei_icmpv6_rpl_p2p_dro_zero = EI_INIT;
static dissector_handle_t icmpv6_handle;
static dissector_handle_t ipv6_handle;
-static dissector_handle_t data_handle;
#define ICMP6_DST_UNREACH 1
#define ICMP6_PACKET_TOO_BIG 2
@@ -1185,7 +1184,7 @@ dissect_contained_icmpv6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
/* The contained packet is an IPv6 datagram; dissect it. */
offset += call_dissector(ipv6_handle, next_tvb, pinfo, tree);
} else
- offset += call_dissector(data_handle, next_tvb, pinfo, tree);
+ offset += call_data_dissector(next_tvb, pinfo, tree);
/* Restore the "we're inside an error packet" flag. */
pinfo->flags.in_error_pkt = save_in_error_pkt;
@@ -3634,7 +3633,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
}
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
- offset += call_dissector(data_handle, next_tvb, pinfo, icmp6_tree);
+ offset += call_data_dissector(next_tvb, pinfo, icmp6_tree);
}
}
@@ -5371,7 +5370,6 @@ proto_reg_handoff_icmpv6(void)
* Get a handle for the IPv6 dissector.
*/
ipv6_handle = find_dissector_add_dependency("ipv6", proto_icmpv6);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-idp.c b/epan/dissectors/packet-idp.c
index ad4129aa95..18ecf46679 100644
--- a/epan/dissectors/packet-idp.c
+++ b/epan/dissectors/packet-idp.c
@@ -46,8 +46,6 @@ static int hf_idp_ssocket = -1;
static gint ett_idp = -1;
-static dissector_handle_t data_handle;
-
static dissector_table_t idp_type_dissector_table;
/*
@@ -125,7 +123,7 @@ dissect_idp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (!dissector_try_uint(idp_type_dissector_table, type, next_tvb,
pinfo, tree))
{
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -209,8 +207,6 @@ proto_reg_handoff_idp(void)
idp_handle = create_dissector_handle(dissect_idp, proto_idp);
dissector_add_uint("ethertype", ETHERTYPE_XNS_IDP, idp_handle);
dissector_add_uint("chdlc.protocol", ETHERTYPE_XNS_IDP, idp_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index a260d1e773..1038d31d46 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -5179,7 +5179,6 @@ static dissector_handle_t ieee80211_handle;
static dissector_handle_t llc_handle;
static dissector_handle_t ipx_handle;
static dissector_handle_t eth_withoutfcs_handle;
-static dissector_handle_t data_handle;
static int wlan_tap = -1;
@@ -16232,7 +16231,7 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
/* check protocol activation */
if (!proto_is_protocol_enabled(find_protocol_by_id(proto_wlan_mgt))) {
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return;
}
@@ -17894,7 +17893,7 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
PROTO_ITEM_SET_GENERATED(item);
}
next_tvb = tvb_new_subset (tvb, hdr_len, len, reported_len);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
goto end_of_wlan;
}
}
@@ -18156,7 +18155,7 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
if ((!is_centrino) && (wlan_ignore_wep == WLAN_IGNORE_WEP_NO)) {
/* Some wireless drivers (such as Centrino) WEP payload already decrypted */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
goto end_of_wlan;
}
} else {
@@ -18277,7 +18276,7 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
/* Just show this as an incomplete fragment. */
col_set_str(pinfo->cinfo, COL_INFO, "Fragmented IEEE 802.11 frame");
next_tvb = tvb_new_subset (tvb, hdr_len, len, reported_len);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
pinfo->fragmented = save_fragmented;
goto end_of_wlan;
}
@@ -27387,7 +27386,6 @@ proto_reg_handoff_ieee80211(void)
llc_handle = find_dissector_add_dependency("llc", proto_wlan);
ipx_handle = find_dissector_add_dependency("ipx", proto_wlan);
eth_withoutfcs_handle = find_dissector_add_dependency("eth_withoutfcs", proto_wlan);
- data_handle = find_dissector("data");
ieee80211_handle = find_dissector("wlan");
dissector_add_uint("wtap_encap", WTAP_ENCAP_IEEE_802_11, ieee80211_handle);
diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c
index 5fa408bede..c14181f6e7 100644
--- a/epan/dissectors/packet-ieee802154.c
+++ b/epan/dissectors/packet-ieee802154.c
@@ -365,7 +365,6 @@ static int ieee802_15_4_short_address_type = -1;
* - the PANID table is for stateful dissectors only (ie: Decode-As)
* - otherwise, data dissectors fall back to the heuristic dissectors.
*/
-static dissector_handle_t data_handle;
static dissector_table_t panid_dissector_table;
static heur_dissector_list_t ieee802154_beacon_subdissector_list;
static heur_dissector_list_t ieee802154_heur_subdissector_list;
@@ -1409,27 +1408,27 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
case DECRYPT_VERSION_UNSUPPORTED:
/* We don't support decryption with that version of the protocol */
expert_add_info_format(pinfo, proto_root, &ei_ieee802154_decrypt_error, "We don't support decryption with protocol version %u", packet->version);
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
goto dissect_ieee802154_fcs;
case DECRYPT_PACKET_TOO_SMALL:
expert_add_info_format(pinfo, proto_root, &ei_ieee802154_decrypt_error, "Packet was too small to include the CRC and MIC");
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
goto dissect_ieee802154_fcs;
case DECRYPT_PACKET_NO_EXT_SRC_ADDR:
expert_add_info_format(pinfo, proto_root, &ei_ieee802154_decrypt_error, "No extended source address - can't decrypt");
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
goto dissect_ieee802154_fcs;
case DECRYPT_PACKET_NO_KEY:
expert_add_info_format(pinfo, proto_root, &ei_ieee802154_decrypt_error, "No encryption key set - can't decrypt");
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
goto dissect_ieee802154_fcs;
case DECRYPT_PACKET_DECRYPT_FAILED:
expert_add_info_format(pinfo, proto_root, &ei_ieee802154_decrypt_error, "Decrypt failed");
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
goto dissect_ieee802154_fcs;
case DECRYPT_PACKET_MIC_CHECK_FAILED:
@@ -1439,7 +1438,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
* probably didn't decrypt the packet right (eg: wrong key).
*/
if (IEEE802154_IS_ENCRYPTED(packet->security_level)) {
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
goto dissect_ieee802154_fcs;
}
break;
@@ -1484,7 +1483,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
case IEEE802154_FCF_BEACON:
if (!dissector_try_heuristic(ieee802154_beacon_subdissector_list, payload_tvb, pinfo, tree, &hdtbl_entry, packet)) {
/* Could not subdissect, call the data dissector instead. */
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
}
break;
@@ -1495,7 +1494,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
case IEEE802154_FCF_DATA:
/* Sanity-check. */
if ((!fcs_ok && ieee802154_fcs_ok) || !tvb_reported_length(payload_tvb)) {
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
break;
}
/* Try the PANID dissector table for stateful dissection. */
@@ -1514,7 +1513,7 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
/* Fall-through to dump undissectable payloads. */
default:
/* Could not subdissect, call the data dissector instead. */
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
} /* switch */
}
CATCH_ALL {
@@ -2045,7 +2044,7 @@ dissect_ieee802154_assoc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
/* Call the data dissector for any leftover bytes. */
if (tvb_reported_length(tvb) > 1) {
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, 1), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, 1), pinfo, tree);
}
} /* dissect_ieee802154_assoc_req */
@@ -2109,7 +2108,7 @@ dissect_ieee802154_assoc_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
/* Call the data dissector for any leftover bytes. */
if (tvb_captured_length(tvb) > offset) {
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
}
} /* dissect_ieee802154_assoc_rsp */
@@ -2162,7 +2161,7 @@ dissect_ieee802154_disassoc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Call the data dissector for any leftover bytes. */
if (tvb_captured_length(tvb) > 1) {
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, 1), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, 1), pinfo, tree);
}
} /* dissect_ieee802154_disassoc */
@@ -2235,7 +2234,7 @@ dissect_ieee802154_realign(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Call the data dissector for any leftover bytes. */
if (tvb_captured_length(tvb) > offset) {
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
}
} /* dissect_ieee802154_realign */
@@ -2275,7 +2274,7 @@ dissect_ieee802154_gtsreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
/* Call the data dissector for any leftover bytes. */
if (tvb_reported_length(tvb) > 1) {
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, 1), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, 1), pinfo, tree);
}
} /* dissect_ieee802154_gtsreq */
@@ -2385,7 +2384,7 @@ dissect_ieee802154_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* TODO add support for these commands, for now
* if anything remains other than the FCS, dump it */
if (tvb_captured_length_remaining(tvb, 0) > 2) {
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
return;
@@ -3600,7 +3599,6 @@ void proto_reg_handoff_ieee802154(void)
ieee802154_handle = find_dissector(IEEE802154_PROTOABBREV_WPAN);
ieee802154_nonask_phy_handle = find_dissector("wpan-nonask-phy");
ieee802154_nofcs_handle = find_dissector("wpan_nofcs");
- data_handle = find_dissector("data");
dissector_add_uint("wtap_encap", WTAP_ENCAP_IEEE802_15_4, ieee802154_handle);
dissector_add_uint("wtap_encap", WTAP_ENCAP_IEEE802_15_4_NONASK_PHY, ieee802154_nonask_phy_handle);
diff --git a/epan/dissectors/packet-ieee802a.c b/epan/dissectors/packet-ieee802a.c
index 56bcf94785..bd72ea365a 100644
--- a/epan/dissectors/packet-ieee802a.c
+++ b/epan/dissectors/packet-ieee802a.c
@@ -37,8 +37,6 @@ static int hf_ieee802a_pid = -1;
static gint ett_ieee802a = -1;
-static dissector_handle_t data_handle;
-
/*
* Hash table for translating OUIs to a dissector table/field info pair;
* the dissector table maps PID values to dissectors, and the field
@@ -134,7 +132,7 @@ dissect_ieee802a(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
if ((subdissector_table == NULL) ||
/* do lookup with the subdissector table */
(!dissector_try_uint(subdissector_table, pid, next_tvb, pinfo, tree))) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -173,8 +171,6 @@ proto_reg_handoff_ieee802a(void)
{
dissector_handle_t ieee802a_handle;
- data_handle = find_dissector("data");
-
ieee802a_handle = create_dissector_handle(dissect_ieee802a,
proto_ieee802a);
dissector_add_uint("ethertype", ETHERTYPE_IEEE802_OUI_EXTENDED,
diff --git a/epan/dissectors/packet-ifcp.c b/epan/dissectors/packet-ifcp.c
index c6b42d48fb..1d519927d3 100644
--- a/epan/dissectors/packet-ifcp.c
+++ b/epan/dissectors/packet-ifcp.c
@@ -142,7 +142,6 @@ static int ett_ifcp_frame_len = -1;
static gboolean ifcp_desegment = TRUE;
static dissector_handle_t ifcp_handle = NULL;
-static dissector_handle_t data_handle = NULL;
static dissector_handle_t fc_handle = NULL;
@@ -443,8 +442,8 @@ dissect_ifcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, voi
if(fc_handle){
call_dissector_with_data(fc_handle, next_tvb, pinfo, parent_tree, &fc_data);
- } else if(data_handle){
- call_dissector(data_handle, next_tvb, pinfo, parent_tree);
+ } else {
+ call_data_dissector(next_tvb, pinfo, parent_tree);
}
return tvb_captured_length(tvb);
@@ -613,7 +612,6 @@ proto_reg_handoff_ifcp (void)
ifcp_handle = create_dissector_handle(dissect_ifcp_handle, proto_ifcp);
dissector_add_for_decode_as("tcp.port", ifcp_handle);
- data_handle = find_dissector("data");
fc_handle = find_dissector_add_dependency("fc_ifcp", proto_ifcp);
}
diff --git a/epan/dissectors/packet-inap.c b/epan/dissectors/packet-inap.c
index 58eea988df..948d6c591f 100644
--- a/epan/dissectors/packet-inap.c
+++ b/epan/dissectors/packet-inap.c
@@ -1032,7 +1032,6 @@ static int hf_inap_InvokeId_present = -1; /* InvokeId_present */
static range_t *global_ssn_range;
static dissector_handle_t inap_handle;
-static dissector_handle_t data_handle;
/* Global variables */
static guint32 opcode=0;
@@ -1295,7 +1294,7 @@ static gint ett_inap_T_problem_01 = -1;
static gint ett_inap_InvokeId = -1;
/*--- End of included file: packet-inap-ett.c ---*/
-#line 87 "./asn1/inap/packet-inap-template.c"
+#line 86 "./asn1/inap/packet-inap-template.c"
static expert_field ei_inap_unknown_invokeData = EI_INIT;
static expert_field ei_inap_unknown_returnResultData = EI_INIT;
@@ -1425,7 +1424,7 @@ static const value_string inap_err_code_string_vals[] = {
/*--- End of included file: packet-inap-table.c ---*/
-#line 93 "./asn1/inap/packet-inap-template.c"
+#line 92 "./asn1/inap/packet-inap-template.c"
const value_string inap_general_problem_strings[] = {
{0,"General Problem Unrecognized Component"},
@@ -1523,7 +1522,7 @@ dissect_inap_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
if (obj_id){
offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, ext_tree, NULL);
}else{
- call_dissector(data_handle, tvb, actx->pinfo, ext_tree);
+ call_data_dissector(tvb, actx->pinfo, ext_tree);
offset = tvb_reported_length_remaining(tvb,offset);
}
@@ -9011,7 +9010,7 @@ static int dissect_PAR_taskRefused_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_
/*--- End of included file: packet-inap-fn.c ---*/
-#line 107 "./asn1/inap/packet-inap-template.c"
+#line 106 "./asn1/inap/packet-inap-template.c"
/*
TC-Invokable OPERATION ::=
{activateServiceFiltering | activityTest | analysedInformation |
@@ -9361,7 +9360,7 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,a
/*--- End of included file: packet-inap-table2.c ---*/
-#line 128 "./asn1/inap/packet-inap-template.c"
+#line 127 "./asn1/inap/packet-inap-template.c"
static guint8 inap_pdu_type = 0;
@@ -9416,7 +9415,6 @@ void proto_reg_handoff_inap(void) {
if (!inap_prefs_initialized) {
inap_prefs_initialized = TRUE;
inap_handle = find_dissector("inap");
- data_handle = find_dissector("data");
oid_add_from_string("Core-INAP-CS1-Codes","0.4.0.1.1.0.3.0");
oid_add_from_string("iso(1) identified-organization(3) icd-ecma(12) member-company(2) 1107 oen(3) inap(3) extensions(2)","1.3.12.2.1107.3.3.2");
oid_add_from_string("alcatel(1006)","1.3.12.2.1006.64");
@@ -11691,7 +11689,7 @@ void proto_register_inap(void) {
"InvokeId_present", HFILL }},
/*--- End of included file: packet-inap-hfarr.c ---*/
-#line 213 "./asn1/inap/packet-inap-template.c"
+#line 211 "./asn1/inap/packet-inap-template.c"
};
@@ -11947,7 +11945,7 @@ void proto_register_inap(void) {
&ett_inap_InvokeId,
/*--- End of included file: packet-inap-ettarr.c ---*/
-#line 228 "./asn1/inap/packet-inap-template.c"
+#line 226 "./asn1/inap/packet-inap-template.c"
};
static ei_register_info ei[] = {
diff --git a/epan/dissectors/packet-infiniband.c b/epan/dissectors/packet-infiniband.c
index 9edcdc7623..961a610ca5 100644
--- a/epan/dissectors/packet-infiniband.c
+++ b/epan/dissectors/packet-infiniband.c
@@ -107,7 +107,6 @@ static dissector_handle_t ib_link_handle;
/* Subdissectors Declarations */
static dissector_handle_t ipv6_handle;
-static dissector_handle_t data_handle;
static dissector_handle_t eth_handle;
static dissector_table_t ethertype_dissector_table;
@@ -2030,7 +2029,7 @@ dissect_infiniband_link(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
if (operand > 1) {
proto_item_set_text(operand_item, "%s", "Reserved");
- call_dissector(data_handle, tvb, pinfo, link_tree);
+ call_data_dissector(tvb, pinfo, link_tree);
} else {
proto_tree_add_item(link_tree, hf_infiniband_link_fctbs, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
@@ -2520,7 +2519,7 @@ static void parse_PAYLOAD(proto_tree *parentTree,
if (!dissector_found) {
/* No sub-dissector found.
Label rest of packet as "Data" */
- call_dissector(data_handle, next_tvb, pinfo, top_tree);
+ call_data_dissector(next_tvb, pinfo, top_tree);
}
@@ -2616,7 +2615,7 @@ static void parse_RWH(proto_tree *ah_tree, tvbuff_t *tvb, gint *offset, packet_i
next_tvb = tvb_new_subset_length(tvb, *offset, reported_length);
if (!dissector_try_uint(ethertype_dissector_table, ether_type,
next_tvb, pinfo, top_tree))
- call_dissector(data_handle, next_tvb, pinfo, top_tree);
+ call_data_dissector(next_tvb, pinfo, top_tree);
*offset = tvb_reported_length(tvb) - 2;
/* Display the VCRC */
@@ -2664,7 +2663,7 @@ static gboolean parse_EoIB(proto_tree *tree, tvbuff_t *tvb, gint offset, packet_
if (seg_offset || ms) {
/* this is a fragment of an encapsulated Ethernet jumbo frame, parse as data */
- call_dissector(data_handle, encap_tvb, pinfo, top_tree);
+ call_data_dissector(encap_tvb, pinfo, top_tree);
} else {
/* non-fragmented frames can be fully parsed */
call_dissector(eth_handle, encap_tvb, pinfo, top_tree);
@@ -7440,7 +7439,6 @@ void proto_reg_handoff_infiniband(void)
dissector_handle_t roce_handle, rroce_handle;
ipv6_handle = find_dissector_add_dependency("ipv6", proto_infiniband);
- data_handle = find_dissector("data");
/*
* I haven't found an official spec for EoIB, but slide 10
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c
index aa0368b328..6bcabf9266 100644
--- a/epan/dissectors/packet-ip.c
+++ b/epan/dissectors/packet-ip.c
@@ -289,7 +289,6 @@ static heur_dissector_list_t heur_subdissector_list;
static dissector_table_t ip_dissector_table;
static dissector_handle_t ipv6_handle;
-static dissector_handle_t data_handle;
/* IP structs and definitions */
@@ -2460,7 +2459,7 @@ dissect_ip_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
ipfd_head->reassembled_in);
}
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo,
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo,
parent_tree);
pinfo->fragmented = save_fragmented;
return tvb_captured_length(tvb);
@@ -2480,7 +2479,7 @@ dissect_ip_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (%u)",
ipprotostr(iph->ip_p), iph->ip_p);
}
- call_dissector(data_handle,next_tvb, pinfo, parent_tree);
+ call_data_dissector(next_tvb, pinfo, parent_tree);
}
}
pinfo->fragmented = save_fragmented;
@@ -3179,7 +3178,6 @@ proto_reg_handoff_ip(void)
ip_handle = find_dissector("ip");
ipv6_handle = find_dissector("ipv6");
- data_handle = find_dissector("data");
ipv4_handle = create_dissector_handle(dissect_ip_v4, proto_ip);
dissector_add_uint("ethertype", ETHERTYPE_IP, ipv4_handle);
diff --git a/epan/dissectors/packet-ipmi-session.c b/epan/dissectors/packet-ipmi-session.c
index 0c984a2ca9..a62639e82c 100644
--- a/epan/dissectors/packet-ipmi-session.c
+++ b/epan/dissectors/packet-ipmi-session.c
@@ -53,7 +53,6 @@ static int hf_ipmi_session_msg_len_2b = -1;
static int hf_ipmi_session_trailer = -1;
static dissector_handle_t ipmi_handle;
-static dissector_handle_t data_handle;
#define IPMI_AUTH_NONE 0x00
#define IPMI_AUTH_MD2 0x01
@@ -233,7 +232,7 @@ dissect_ipmi_session(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
open packet in the capture we parse), we cannot even
decipher where a message starts. Just print them as data.
*/
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else if (authtype != IPMI_AUTH_RMCPP || payloadtype == IPMI_IPMI_MESSAGE) {
/* This is an IPMI message, either v1.5 or v2.0+. For now,
we don't need to distinguish these kinds. */
@@ -242,7 +241,7 @@ dissect_ipmi_session(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
/* All other RMCP+ payload types fall here: session open/close
requests, RAKP messages, SOL. We cannot parse them yet, thus
just output as data. */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
if (tree) {
@@ -317,7 +316,6 @@ proto_reg_handoff_ipmi_session(void)
ipmi_session_handle = create_dissector_handle(dissect_ipmi_session, proto_ipmi_session);
dissector_add_uint("rmcp.class", RMCP_CLASS_IPMI, ipmi_session_handle);
- data_handle = find_dissector("data");
ipmi_handle = find_dissector_add_dependency("ipmi", proto_ipmi_session);
}
diff --git a/epan/dissectors/packet-ipmi-trace.c b/epan/dissectors/packet-ipmi-trace.c
index cbe96a70f1..e52179f747 100644
--- a/epan/dissectors/packet-ipmi-trace.c
+++ b/epan/dissectors/packet-ipmi-trace.c
@@ -92,7 +92,6 @@ void proto_reg_handoff_ipmi_trace(void);
static int proto_ipmi_trace = -1;
-static dissector_handle_t data_dissector_handle;
static dissector_table_t proto_dissector_table;
static gint ett_ipmi_trace = -1;
@@ -283,7 +282,7 @@ dissect_ipmi_trace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
if (tvb_captured_length(tvb) < 11) {
/* TODO: add expert info */
- call_dissector(data_dissector_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -412,14 +411,13 @@ dissect_ipmi_trace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
if (!dissector_try_uint_new(proto_dissector_table,
data_type, next_tvb, pinfo, tree, TRUE, &arg)) {
- call_dissector(data_dissector_handle, next_tvb,
- pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
} else if (block_type == HPM2_CHN_STATE_NOTIFY
&& data_type == IPMI_PROTO_IPMB_1_0) {
dissect_ipmb_state_notify(next_tvb, tree);
} else {
- call_dissector(data_dissector_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -452,8 +450,6 @@ proto_reg_handoff_ipmi_trace(void)
ipmi_trace_handle = create_dissector_handle(dissect_ipmi_trace,
proto_ipmi_trace);
- data_dissector_handle = find_dissector("data");
-
dissector_add_uint("wtap_encap", WTAP_ENCAP_IPMI_TRACE, ipmi_trace_handle);
dissector_add_uint("ipmi.protocol", IPMI_PROTO_IPMB_1_0,
diff --git a/epan/dissectors/packet-ipmi.c b/epan/dissectors/packet-ipmi.c
index fc1822f6da..5991bfb08c 100644
--- a/epan/dissectors/packet-ipmi.c
+++ b/epan/dissectors/packet-ipmi.c
@@ -130,8 +130,6 @@ typedef struct {
/* Maximum nest level where it worth caching data */
#define MAX_NEST_LEVEL 3
-static dissector_handle_t data_dissector;
-
gint proto_ipmi = -1;
static gint proto_ipmb = -1;
static gint proto_kcs = -1;
@@ -472,7 +470,7 @@ dissect_ipmi_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (tvb_captured_length(tvb) < ctx->hdr_len + siglen + is_resp
+ !(ctx->flags & IPMI_D_NO_CKS)) {
/* don bother with anything */
- return call_dissector(data_dissector, tvb, pinfo, tree);
+ return call_data_dissector(tvb, pinfo, tree);
}
/* save nest level */
@@ -1810,8 +1808,6 @@ proto_register_ipmi(void)
register_dissector("kcs", dissect_kcs, proto_kcs);
register_dissector("tmode", dissect_tmode, proto_tmode);
- data_dissector = find_dissector("data");
-
m = prefs_register_protocol(proto_ipmi, NULL);
prefs_register_bool_preference(m, "fru_langcode_is_english", "FRU Language Code is English",
"FRU Language Code is English; strings are ASCII+LATIN1 (vs. Unicode)",
diff --git a/epan/dissectors/packet-ipos.c b/epan/dissectors/packet-ipos.c
index 6b74461aa0..9047bcc158 100644
--- a/epan/dissectors/packet-ipos.c
+++ b/epan/dissectors/packet-ipos.c
@@ -44,7 +44,6 @@ void proto_register_ipos(void);
static dissector_handle_t ipos_handle;
static dissector_handle_t redback_handle;
-static dissector_handle_t data_handle;
static int proto_ipos = -1;
static int hf_ipos_protocol = -1;
@@ -162,7 +161,6 @@ proto_reg_handoff_ipos(void)
{
ipos_handle = find_dissector("ipos");
redback_handle = find_dissector_add_dependency("redback", proto_ipos);
- data_handle = find_dissector("data");
/*dissector_add_uint("wtap_encap", WTAP_ENCAP_IPOS, ipos_handle); */
dissector_add_uint("sll.ltype", LINUX_SLL_P_IPOS_NETIPC, ipos_handle);
diff --git a/epan/dissectors/packet-ipp.c b/epan/dissectors/packet-ipp.c
index 779b362d26..4abacb8c51 100644
--- a/epan/dissectors/packet-ipp.c
+++ b/epan/dissectors/packet-ipp.c
@@ -55,8 +55,6 @@ static gint ett_ipp = -1;
static gint ett_ipp_as = -1;
static gint ett_ipp_attr = -1;
-static dissector_handle_t data_handle;
-
#define PRINT_JOB 0x0002
#define PRINT_URI 0x0003
#define VALIDATE_JOB 0x0004
@@ -254,8 +252,7 @@ dissect_ipp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
offset = parse_attributes(tvb, offset, ipp_tree);
if (tvb_offset_exists(tvb, offset)) {
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo,
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo,
ipp_tree);
}
return tvb_captured_length(tvb);
@@ -720,7 +717,6 @@ proto_reg_handoff_ipp(void)
ipp_handle = create_dissector_handle(dissect_ipp, proto_ipp);
http_dissector_add(631, ipp_handle);
dissector_add_string("media_type", "application/ipp", ipp_handle);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index 52e1961674..9562ba8dd2 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -519,8 +519,6 @@ static const fragment_items ipv6_frag_items = {
"IPv6 fragments"
};
-static dissector_handle_t data_handle;
-
static dissector_table_t ip_dissector_table;
static dissector_table_t ipv6_next_header_dissector_table;
@@ -2423,7 +2421,7 @@ again:
if (show_data) {
/* COL_INFO already set */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
else {
/* First fragment and not reassembling, not fragmented, or already reassembled. */
@@ -2431,7 +2429,7 @@ again:
if (!ip_try_dissect(try_heuristic_first, next_tvb, pinfo, tree, &iph)) {
/* Unknown protocol. */
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (%u)", ipprotostr(nxt), nxt);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
pinfo->fragmented = save_fragmented;
@@ -3558,7 +3556,6 @@ proto_reg_handoff_ipv6(void)
dissector_handle_t ipv6_hopopts_handle, ipv6_routing_handle,
ipv6_shim6_handle, ipv6_dstopts_handle;
- data_handle = find_dissector("data");
ipv6_handle = find_dissector("ipv6");
dissector_add_uint("ethertype", ETHERTYPE_IPv6, ipv6_handle);
dissector_add_uint("erf.types.type", ERF_TYPE_IPV6, ipv6_handle);
diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c
index 85eb2fff5b..4ebb8597a0 100644
--- a/epan/dissectors/packet-ipx.c
+++ b/epan/dissectors/packet-ipx.c
@@ -138,8 +138,6 @@ static int proto_ipxmsg = -1;
static int hf_msg_conn = -1;
static int hf_msg_sigchar = -1;
-static dissector_handle_t data_handle;
-
#define UDP_PORT_IPX 213 /* RFC 1234 */
#define IPX_HEADER_LEN 30 /* It's *always* 30 bytes */
@@ -444,7 +442,7 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
pinfo, tree, FALSE, ipxh))
return tvb_captured_length(tvb);
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
/* ================================================================= */
@@ -860,7 +858,7 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
return tvb_captured_length(tvb);
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -1631,7 +1629,6 @@ proto_reg_handoff_ipx(void)
register_capture_dissector("sll.ltype", LINUX_SLL_P_802_3, capture_ipx, proto_ipx);
register_capture_dissector("llc.dsap", SAP_NETWARE1, capture_ipx, proto_ipx);
register_capture_dissector("llc.dsap", SAP_NETWARE2, capture_ipx, proto_ipx);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-isdn.c b/epan/dissectors/packet-isdn.c
index b793c20230..ff19d3f5ca 100644
--- a/epan/dissectors/packet-isdn.c
+++ b/epan/dissectors/packet-isdn.c
@@ -53,7 +53,6 @@ static dissector_handle_t lapd_handle;
static dissector_handle_t dpnss_link_handle;
static dissector_handle_t ppp_hdlc_handle;
static dissector_handle_t v120_handle;
-static dissector_handle_t data_handle;
static const value_string channel_vals[] = {
{ 0, "D" },
@@ -199,7 +198,7 @@ dissect_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if (!try_circuit_dissector(CT_ISDN, pinfo->pseudo_header->isdn.channel,
pinfo->num, tvb, pinfo, tree, NULL))
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -242,7 +241,6 @@ proto_reg_handoff_isdn(void)
dpnss_link_handle = find_dissector("dpnss_link");
ppp_hdlc_handle = find_dissector("ppp_hdlc");
v120_handle = find_dissector("v120");
- data_handle = find_dissector("data");
isdn_handle = create_dissector_handle(dissect_isdn, proto_isdn);
diff --git a/epan/dissectors/packet-isi.c b/epan/dissectors/packet-isi.c
index 6e2b1519ab..93ae528f62 100644
--- a/epan/dissectors/packet-isi.c
+++ b/epan/dissectors/packet-isi.c
@@ -35,9 +35,6 @@
void proto_register_isi(void);
void proto_reg_handoff_isi(void);
-/* These are the handles of our subdissectors */
-static dissector_handle_t data_handle=NULL;
-
/* Dissector table for the isi resource */
static dissector_table_t isi_resource_dissector_table;
@@ -1827,7 +1824,7 @@ static int dissect_isi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
/* Call subdissector depending on the resource ID */
if (!dissector_try_uint(isi_resource_dissector_table, resource, content_tvb, pinfo, isi_tree))
- call_dissector(data_handle, content_tvb, pinfo, isi_tree);
+ call_data_dissector(content_tvb, pinfo, isi_tree);
return tvb_captured_length(tvb);
}
@@ -2139,7 +2136,6 @@ proto_reg_handoff_isi(void)
static gboolean initialized=FALSE;
if(!initialized) {
- data_handle = find_dissector("data");
dissector_add_uint("sll.ltype", LINUX_SLL_P_ISI, create_dissector_handle(dissect_isi, proto_isi));
heur_dissector_add("usb.bulk", dissect_usb_isi, "ISI bulk endpoint", "usb_bulk_isi", proto_isi, HEURISTIC_DISABLE);
diff --git a/epan/dissectors/packet-isl.c b/epan/dissectors/packet-isl.c
index e1bdeb8aef..ecddd03cb0 100644
--- a/epan/dissectors/packet-isl.c
+++ b/epan/dissectors/packet-isl.c
@@ -86,7 +86,6 @@ static gint ett_isl_dst = -1;
static dissector_handle_t eth_withfcs_handle;
static dissector_handle_t tr_handle;
-static dissector_handle_t data_handle;
gboolean
capture_isl(const guchar *pd, int offset, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header _U_)
@@ -310,7 +309,7 @@ dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int fcs_len)
default:
next_tvb = tvb_new_subset_remaining(payload_tvb, 12);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
}
@@ -411,7 +410,6 @@ proto_reg_handoff_isl(void)
*/
eth_withfcs_handle = find_dissector_add_dependency("eth_withfcs", proto_isl);
tr_handle = find_dissector_add_dependency("tr", proto_isl);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-itdm.c b/epan/dissectors/packet-itdm.c
index a465a03fac..81ca8172d0 100644
--- a/epan/dissectors/packet-itdm.c
+++ b/epan/dissectors/packet-itdm.c
@@ -68,8 +68,6 @@ static gint ett_itdm_ctl = -1;
static guint gbl_ItdmMPLSLabel = 0x99887;
static guint gbl_ItdmCTLFlowNo = 0;
-static dissector_handle_t data_handle;
-
/* I-TDM 125usec mode commands for data flows */
#define ITDM_CMD_NEW_CHAN 1
#define ITDM_CMD_CLOSE_CHAN 2
@@ -262,7 +260,7 @@ dissect_itdm_125usec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
static void
@@ -353,7 +351,7 @@ dissect_itdm_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
static int
@@ -467,7 +465,6 @@ proto_reg_handoff_itdm(void)
if (!Initialized) {
itdm_handle = create_dissector_handle( dissect_itdm, proto_itdm );
- data_handle = find_dissector("data");
Initialized=TRUE;
} else {
dissector_delete_uint("mpls.label", ItdmMPLSLabel, itdm_handle);
diff --git a/epan/dissectors/packet-iua.c b/epan/dissectors/packet-iua.c
index bbdc4f7173..8e3a6320f0 100644
--- a/epan/dissectors/packet-iua.c
+++ b/epan/dissectors/packet-iua.c
@@ -42,7 +42,6 @@ void proto_reg_handoff_iua(void);
static module_t *iua_module;
-static dissector_handle_t data_handle;
static dissector_table_t lapd_gsm_sapi_dissector_table;
/* Whether to use GSM SAPI vals or not */
@@ -431,7 +430,7 @@ dissect_protocol_data_parameter(tvbuff_t *parameter_tvb, proto_item *parameter_i
}
if(global_iua_gsm_sapis) {
if (!dissector_try_uint(lapd_gsm_sapi_dissector_table, sapi_val, protocol_data_tvb, pinfo, tree))
- call_dissector(data_handle, protocol_data_tvb, pinfo, tree);
+ call_data_dissector(protocol_data_tvb, pinfo, tree);
return;
}
@@ -994,8 +993,6 @@ proto_reg_handoff_iua(void)
dissector_add_uint("sctp.ppi", IUA_PAYLOAD_PROTOCOL_ID, iua_handle);
lapd_gsm_sapi_dissector_table = find_dissector_table("lapd.gsm.sapi");
- data_handle = find_dissector("data");
-
}
/*
diff --git a/epan/dissectors/packet-iuup.c b/epan/dissectors/packet-iuup.c
index f746fb525d..d771094b5d 100644
--- a/epan/dissectors/packet-iuup.c
+++ b/epan/dissectors/packet-iuup.c
@@ -157,7 +157,6 @@ static expert_field ei_iuup_pdu_type = EI_INIT;
static GHashTable* circuits = NULL;
-static dissector_handle_t data_handle = NULL;
static gboolean dissect_fields = FALSE;
static gboolean two_byte_pseudoheader = FALSE;
static guint global_dynamic_payload_type = 0;
@@ -829,7 +828,7 @@ static int find_iuup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
len--;
}
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -850,7 +849,6 @@ void proto_reg_handoff_iuup(void) {
if (!iuup_prefs_initialized) {
iuup_handle = find_dissector("iuup");
dissector_add_string("rtp_dyn_payload_type","VND.3GPP.IUFP", iuup_handle);
- data_handle = find_dissector("data");
iuup_prefs_initialized = TRUE;
} else {
if ( saved_dynamic_payload_type > 95 ) {
diff --git a/epan/dissectors/packet-iwarp-ddp-rdmap.c b/epan/dissectors/packet-iwarp-ddp-rdmap.c
index ec65dbb15e..1949df7e17 100644
--- a/epan/dissectors/packet-iwarp-ddp-rdmap.c
+++ b/epan/dissectors/packet-iwarp-ddp-rdmap.c
@@ -33,7 +33,6 @@
#include "packet-iwarp-ddp-rdmap.h"
void proto_register_iwarp_ddp_rdmap(void);
-void proto_reg_handoff_iwarp_ddp_rdmap(void);
/* DEFINES */
@@ -98,8 +97,6 @@ void proto_reg_handoff_iwarp_ddp_rdmap(void);
static gint proto_iwarp_ddp_rdmap = -1;
static gint ett_iwarp_ddp_rdmap = -1;
-static dissector_handle_t data_handle;
-
/*
* DDP: initialize the protocol and registered fields
*/
@@ -266,7 +263,7 @@ dissect_rdmap_payload(tvbuff_t *tvb, packet_info *pinfo,
if (!dissector_try_heuristic(rdmap_heur_subdissector_list,
tvb, pinfo, tree, &hdtbl_entry, info)) {
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
}
@@ -897,12 +894,6 @@ proto_register_iwarp_ddp_rdmap(void)
proto_iwarp_ddp_rdmap);
}
-void
-proto_reg_handoff_iwarp_ddp_rdmap(void)
-{
- data_handle = find_dissector("data");
-}
-
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissectors/packet-juniper.c b/epan/dissectors/packet-juniper.c
index 41b1b1be80..0625873181 100644
--- a/epan/dissectors/packet-juniper.c
+++ b/epan/dissectors/packet-juniper.c
@@ -382,7 +382,6 @@ static expert_field ei_juniper_no_magic = EI_INIT;
static gint ett_juniper = -1;
static dissector_handle_t ipv4_handle;
-static dissector_handle_t data_handle;
static dissector_table_t payload_table;
@@ -598,7 +597,7 @@ dissect_juniper_payload_proto(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
/* XXX - left in for posterity, dissection was never done */
/* case JUNIPER_PROTO_OAM: FIXME call OAM dissector without leading HEC byte */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -1084,7 +1083,7 @@ dissect_juniper_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16
/* could not figure what it is */
ti = proto_tree_add_uint_format_value(juniper_subtree, hf_juniper_payload_type, tvb, offset, 0, 0xFFFF, "Unknown");
proto_item_set_len(ti, tvb_reported_length_remaining(tvb, offset));
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
@@ -1437,7 +1436,6 @@ proto_reg_handoff_juniper(void)
dissector_handle_t juniper_svcs_handle;
ipv4_handle = find_dissector_add_dependency("ip", proto_juniper);
- data_handle = find_dissector("data");
juniper_atm2_handle = create_dissector_handle(dissect_juniper_atm2, proto_juniper);
juniper_atm1_handle = create_dissector_handle(dissect_juniper_atm1, proto_juniper);
diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c
index 15ae9aa580..9382446e6d 100644
--- a/epan/dissectors/packet-jxta.c
+++ b/epan/dissectors/packet-jxta.c
@@ -74,7 +74,6 @@ static int jxta_tap = -1;
static dissector_table_t media_type_dissector_table = NULL;
static dissector_handle_t media_handle = NULL;
-static dissector_handle_t data_handle = NULL;
static dissector_handle_t stream_jxta_handle = NULL;
static dissector_handle_t ssl_handle = NULL;
@@ -2111,7 +2110,7 @@ static int dissect_media( const gchar* fullmediatype, tvbuff_t * tvb, packet_inf
if(0 == dissected) {
/* display it as raw data */
- dissected = call_dissector(data_handle, tvb, pinfo, tree);
+ dissected = call_data_dissector(tvb, pinfo, tree);
}
return dissected;
@@ -2402,7 +2401,6 @@ void proto_reg_handoff_jxta(void)
media_type_dissector_table = find_dissector_table("media_type");
ssl_handle = find_dissector_add_dependency("ssl", proto_jxta);
- data_handle = find_dissector("data");
media_handle = find_dissector_add_dependency("media", proto_jxta);
init_done = TRUE;
diff --git a/epan/dissectors/packet-kismet.c b/epan/dissectors/packet-kismet.c
index 81153d0170..5f8534cbe1 100644
--- a/epan/dissectors/packet-kismet.c
+++ b/epan/dissectors/packet-kismet.c
@@ -45,8 +45,6 @@ static int hf_kismet_time = -1;
static gint ett_kismet = -1;
static gint ett_kismet_reqresp = -1;
-static dissector_handle_t data_handle;
-
#define TCP_PORT_KISMET 2501
static guint global_kismet_tcp_port = TCP_PORT_KISMET;
@@ -138,7 +136,7 @@ dissect_kismet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * da
/*
* Put the whole packet into the tree as data.
*/
- call_dissector(data_handle, tvb, pinfo, kismet_tree);
+ call_data_dissector(tvb, pinfo, kismet_tree);
return tvb_captured_length(tvb);
}
@@ -339,7 +337,6 @@ proto_reg_handoff_kismet(void)
if (!kismet_prefs_initialized) {
kismet_handle = create_dissector_handle(dissect_kismet, proto_kismet);
- data_handle = find_dissector("data");
kismet_prefs_initialized = TRUE;
} else {
dissector_delete_uint("tcp.port", tcp_port, kismet_handle);
diff --git a/epan/dissectors/packet-l2tp.c b/epan/dissectors/packet-l2tp.c
index 3d1209ec34..c80d929017 100644
--- a/epan/dissectors/packet-l2tp.c
+++ b/epan/dissectors/packet-l2tp.c
@@ -877,7 +877,6 @@ static dissector_handle_t ppp_lcp_options_handle;
static dissector_handle_t atm_oam_handle;
static dissector_handle_t llc_handle;
-static dissector_handle_t data_handle;
static dissector_handle_t l2tp_udp_handle;
static dissector_handle_t l2tp_ip_handle;
@@ -2440,7 +2439,7 @@ process_l2tpv3_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (!dissector_try_uint_new(pw_type_table, pw_type, next_tvb, pinfo, tree, FALSE, GUINT_TO_POINTER(oam_cell)))
{
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -3484,7 +3483,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);
- data_handle = find_dissector("data");
atm_oam_llc_handle = create_dissector_handle( dissect_atm_oam_llc, proto_l2tp );
dissector_add_uint("l2tp.pw_type", L2TPv3_PROTOCOL_AAL5, atm_oam_llc_handle);
diff --git a/epan/dissectors/packet-lanforge.c b/epan/dissectors/packet-lanforge.c
index 7641376d13..2dbc958f2e 100644
--- a/epan/dissectors/packet-lanforge.c
+++ b/epan/dissectors/packet-lanforge.c
@@ -59,9 +59,6 @@ static int hf_lanforge_timestamp = -1;
/* Initialize the subtree pointer */
static gint ett_lanforge = -1;
-/* data dissector handle */
-static dissector_handle_t data_handle;
-
/* entry point */
static gboolean dissect_lanforge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
@@ -148,7 +145,7 @@ static gboolean dissect_lanforge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
proto_tree_add_time(lanforge_tree, hf_lanforge_timestamp, tvb, offset - 8, 8, &tstamp);
if(tvb_reported_length_remaining(tvb, offset) > 0) /* random data */
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo,
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo,
lanforge_tree);
}
@@ -282,9 +279,6 @@ void proto_reg_handoff_lanforge(void)
/* Register as a heuristic UDP dissector */
heur_dissector_add("udp", dissect_lanforge, "LANforge over UDP", "lanforge_udp", proto_lanforge, HEURISTIC_ENABLE);
heur_dissector_add("tcp", dissect_lanforge, "LANforge over TCP", "lanforge_tcp", proto_lanforge, HEURISTIC_ENABLE);
-
- /* Find data dissector handle */
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c
index a10c82cb4d..cfb5f8cd5f 100644
--- a/epan/dissectors/packet-lapd.c
+++ b/epan/dissectors/packet-lapd.c
@@ -92,8 +92,6 @@ static dissector_table_t lapd_gsm_sapi_dissector_table;
/* Whether to use GSM SAPI vals or not */
static gboolean global_lapd_gsm_sapis = FALSE;
-static dissector_handle_t data_handle;
-
/*
* Bits in the address field.
*/
@@ -574,14 +572,14 @@ dissect_lapd_full(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
if(global_lapd_gsm_sapis){
if (!dissector_try_uint(lapd_gsm_sapi_dissector_table, sapi,
next_tvb, pinfo, tree))
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}else{
if (!dissector_try_uint(lapd_sapi_dissector_table, sapi,
next_tvb, pinfo, tree))
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
} else
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
static gboolean
@@ -768,8 +766,6 @@ proto_reg_handoff_lapd(void)
register_dissector("lapd-bitstream", dissect_lapd_bitstream, proto_lapd);
lapd_bitstream_handle = find_dissector("lapd-bitstream");
- data_handle = find_dissector("data");
-
init = TRUE;
} else {
diff --git a/epan/dissectors/packet-lapdm.c b/epan/dissectors/packet-lapdm.c
index e80a50c55b..fbff9c4ab6 100644
--- a/epan/dissectors/packet-lapdm.c
+++ b/epan/dissectors/packet-lapdm.c
@@ -57,7 +57,6 @@
#include <epan/reassemble.h>
void proto_register_lapdm(void);
-void proto_reg_handoff_lapdm(void);
static int proto_lapdm = -1;
static int hf_lapdm_address = -1;
@@ -108,8 +107,6 @@ static reassembly_table lapdm_reassembly_table;
static dissector_table_t lapdm_sapi_dissector_table;
-static dissector_handle_t data_handle;
-
static gboolean reassemble_lapdm = TRUE;
/*
@@ -324,7 +321,7 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
if (fd_m && pinfo->num == fd_m->reassembled_in) {
if (!dissector_try_uint(lapdm_sapi_dissector_table, sapi,
reassembled, pinfo, tree))
- call_dissector(data_handle, reassembled, pinfo, tree);
+ call_data_dissector(reassembled, pinfo, tree);
}
else {
col_append_str(pinfo->cinfo, COL_INFO, " (Fragment)");
@@ -342,7 +339,7 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
*/
if (!dissector_try_uint(lapdm_sapi_dissector_table, sapi,
payload, pinfo, tree))
- call_dissector(data_handle,payload, pinfo, tree);
+ call_data_dissector(payload, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -503,12 +500,6 @@ proto_register_lapdm(void)
register_cleanup_routine (lapdm_defragment_cleanup);
}
-void
-proto_reg_handoff_lapdm(void)
-{
- data_handle = find_dissector("data");
-}
-
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissectors/packet-lapsat.c b/epan/dissectors/packet-lapsat.c
index 0710ef9128..108f414f73 100644
--- a/epan/dissectors/packet-lapsat.c
+++ b/epan/dissectors/packet-lapsat.c
@@ -35,8 +35,8 @@
#include <epan/packet.h>
#include <epan/reassemble.h>
+
void proto_register_lapsat(void);
-void proto_reg_handoff_lapsat(void);
static int proto_lapsat = -1;
@@ -44,8 +44,6 @@ static reassembly_table lapsat_reassembly_table;
static dissector_table_t lapsat_sapi_dissector_table;
-static dissector_handle_t data_handle;
-
static gint ett_lapsat = -1;
static gint ett_lapsat_address = -1;
static gint ett_lapsat_control = -1;
@@ -558,7 +556,7 @@ dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dissec
/* Yes, so handoff to upper layers */
if (!dissector_try_uint(lapsat_sapi_dissector_table, sapi,
reassembled, pinfo, tree))
- call_dissector(data_handle, reassembled, pinfo, tree);
+ call_data_dissector(reassembled, pinfo, tree);
} else {
/* No, just add infos */
col_append_str(pinfo->cinfo, COL_INFO, " (Fragment)");
@@ -572,7 +570,7 @@ dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dissec
* Whole frame
*/
if (!dissector_try_uint(lapsat_sapi_dissector_table, sapi, payload, pinfo, tree))
- call_dissector(data_handle, payload, pinfo, tree);
+ call_data_dissector(payload, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -771,11 +769,6 @@ proto_register_lapsat(void)
register_cleanup_routine (lapsat_defragment_cleanup);
}
-void
-proto_reg_handoff_lapsat(void)
-{
- data_handle = find_dissector("data");
-}
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
diff --git a/epan/dissectors/packet-lat.c b/epan/dissectors/packet-lat.c
index d77accf213..5c3aae4795 100644
--- a/epan/dissectors/packet-lat.c
+++ b/epan/dissectors/packet-lat.c
@@ -77,8 +77,6 @@ static int hf_lat_unknown_command_data = -1;
static gint ett_lat = -1;
-static dissector_handle_t data_handle;
-
/* LAT commands. */
#define LAT_CCMD_RUN 0
#define LAT_CCMD_START 1
@@ -529,7 +527,6 @@ proto_reg_handoff_lat(void)
{
dissector_handle_t lat_handle;
- data_handle = find_dissector("data");
lat_handle = create_dissector_handle(dissect_lat, proto_lat);
dissector_add_uint("ethertype", ETHERTYPE_LAT, lat_handle);
}
diff --git a/epan/dissectors/packet-lbmc.c b/epan/dissectors/packet-lbmc.c
index b8c94837ae..d3b303a777 100644
--- a/epan/dissectors/packet-lbmc.c
+++ b/epan/dissectors/packet-lbmc.c
@@ -4562,7 +4562,6 @@ static gboolean lbmc_use_heuristic_subdissectors = TRUE;
static gboolean lbmc_reassemble_fragments = FALSE;
static gboolean lbmc_dissect_lbmpdm = FALSE;
static heur_dissector_list_t lbmc_heuristic_subdissector_list;
-static dissector_handle_t lbmc_data_dissector_handle;
/*----------------------------------------------------------------------------*/
/* Handles of all types. */
@@ -11487,13 +11486,13 @@ int lbmc_dissect_lbmc_packet(tvbuff_t * tvb, int offset, packet_info * pinfo, pr
}
else
{
- call_dissector(lbmc_data_dissector_handle, data_tvb, pinfo, subtree);
+ call_data_dissector(data_tvb, pinfo, subtree);
}
}
}
else
{
- call_dissector(lbmc_data_dissector_handle, data_tvb, pinfo, subtree);
+ call_data_dissector(data_tvb, pinfo, subtree);
}
}
if (msgprop_tvb != NULL)
@@ -14221,7 +14220,6 @@ void proto_register_lbmc(void)
/* The registration hand-off routine */
void proto_reg_handoff_lbmc(void)
{
- lbmc_data_dissector_handle = find_dissector("data");
lbmc_uim_tap_handle = register_tap("lbm_uim");
lbmc_stream_tap_handle = register_tap("lbm_stream");
}
diff --git a/epan/dissectors/packet-lisp.c b/epan/dissectors/packet-lisp.c
index 2ecde37a2a..7ac5bf292c 100644
--- a/epan/dissectors/packet-lisp.c
+++ b/epan/dissectors/packet-lisp.c
@@ -421,7 +421,6 @@ static dissector_handle_t lisp_handle;
static dissector_handle_t ipv4_handle;
static dissector_handle_t ipv6_handle;
-static dissector_handle_t data_handle;
static gboolean encapsulated = FALSE;
static gboolean ddt_originated = FALSE;
@@ -2193,7 +2192,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field,
"Unexpected Source EID AFI (%d), cannot decode", src_eid_afi);
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
+ call_data_dissector(next_tvb, pinfo, lisp_tree);
return;
}
@@ -2226,7 +2225,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field,
"Unexpected ITR-RLOC-AFI (%d), cannot decode", itr_afi);
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
+ call_data_dissector(next_tvb, pinfo, lisp_tree);
return;
}
}
@@ -2248,7 +2247,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field,
"Unexpected EID prefix AFI (%d), cannot decode", prefix_afi);
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
+ call_data_dissector(next_tvb, pinfo, lisp_tree);
return;
}
@@ -2308,7 +2307,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
+ call_data_dissector(next_tvb, pinfo, lisp_tree);
}
@@ -2387,7 +2386,7 @@ dissect_lisp_map_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
+ call_data_dissector(next_tvb, pinfo, lisp_tree);
}
@@ -2500,7 +2499,7 @@ dissect_lisp_map_register(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tr
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
+ call_data_dissector(next_tvb, pinfo, lisp_tree);
}
@@ -2621,7 +2620,7 @@ dissect_lisp_map_notify(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
+ call_data_dissector(next_tvb, pinfo, lisp_tree);
}
/*
@@ -2685,7 +2684,7 @@ dissect_lisp_map_referral(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tr
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
+ call_data_dissector(next_tvb, pinfo, lisp_tree);
}
@@ -2787,7 +2786,7 @@ dissect_lisp_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
expert_add_info_format(pinfo, lisp_tree, &ei_lisp_unexpected_field,
"Unexpected EID prefix AFI (%d), cannot decode", prefix_afi);
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
+ call_data_dissector(next_tvb, pinfo, lisp_tree);
return;
}
@@ -2826,7 +2825,7 @@ dissect_lisp_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
+ call_data_dissector(next_tvb, pinfo, lisp_tree);
}
@@ -2869,7 +2868,7 @@ dissect_lisp_ecm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree
call_dissector(ipv6_handle, next_tvb, pinfo, tree);
break;
default:
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
encapsulated = FALSE;
@@ -2948,7 +2947,7 @@ dissect_lisp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
dissect_lisp_ecm(tvb, pinfo, tree, lisp_tree);
break;
default:
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
@@ -3627,7 +3626,6 @@ proto_reg_handoff_lisp(void)
dissector_add_uint("udp.port", LISP_CONTROL_PORT, lisp_handle);
ipv4_handle = find_dissector_add_dependency("ip", proto_lisp);
ipv6_handle = find_dissector_add_dependency("ipv6", proto_lisp);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-llc.c b/epan/dissectors/packet-llc.c
index 0a5365dee1..79c6c593d7 100644
--- a/epan/dissectors/packet-llc.c
+++ b/epan/dissectors/packet-llc.c
@@ -101,7 +101,6 @@ 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 data_handle;
/*
* Group/Individual bit, in the DSAP.
@@ -462,8 +461,7 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
*/
if (!dissector_try_uint(dsap_subdissector_table,
dsap, next_tvb, pinfo, tree)) {
- call_dissector(data_handle, next_tvb,
- pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
} else if ((control & (XDLC_U_MODIFIER_MASK|XDLC_U))
== (XDLC_XID|XDLC_U)) {
@@ -482,13 +480,11 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if (!dissector_try_uint(
xid_subdissector_table, dsap, next_tvb,
pinfo, tree)) {
- call_dissector(data_handle,
- next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
} else {
- call_dissector(data_handle, next_tvb, pinfo,
- tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
}
@@ -532,7 +528,7 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
next_tvb = tvb_new_subset_remaining(tvb, offset+5);
if(!dissector_try_uint(hpteam_subdissector_table,etype, next_tvb, pinfo, tree))
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
case OUI_ENCAP_ETHER:
@@ -553,11 +549,10 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
next_tvb = tvb_new_subset_remaining(tvb, offset+5);
if (!dissector_try_uint(ethertype_subdissector_table,
etype, next_tvb, pinfo, tree))
- call_dissector(data_handle, next_tvb, pinfo,
- tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else {
next_tvb = tvb_new_subset_remaining(tvb, offset+5);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
break;
@@ -615,7 +610,7 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
default:
next_tvb = tvb_new_subset_remaining(tvb, offset+5);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
break;
@@ -651,11 +646,10 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
next_tvb = tvb_new_subset_remaining(tvb, offset+5+mesh_header_len);
if (!dissector_try_uint(ethertype_subdissector_table,
etype, next_tvb, pinfo, tree))
- call_dissector(data_handle, next_tvb, pinfo,
- tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else {
next_tvb = tvb_new_subset_remaining(tvb, offset+5);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
break;
@@ -691,7 +685,7 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
break;
}
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
}
@@ -878,7 +872,6 @@ proto_reg_handoff_llc(void)
tr_handle = find_dissector_add_dependency("tr", proto_llc);
turbo_handle = find_dissector_add_dependency("turbocell", proto_llc);
mesh_handle = find_dissector_add_dependency("mesh", proto_llc);
- data_handle = find_dissector("data");
/*
* Get the Ethertype dissector table.
diff --git a/epan/dissectors/packet-lon.c b/epan/dissectors/packet-lon.c
index 69f00af0a5..013b2ad7c1 100644
--- a/epan/dissectors/packet-lon.c
+++ b/epan/dissectors/packet-lon.c
@@ -186,8 +186,6 @@ static expert_field ei_lon_tpdu_spdu_type_unknown = EI_INIT;
static expert_field ei_lon_tpdu_authpdu_type_unknown = EI_INIT;
static expert_field ei_lon_tpdu_apdu_dest_type = EI_INIT;
-static dissector_handle_t data_handle;
-
static gint dissect_apdu(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
gint offset);
@@ -498,7 +496,7 @@ dissect_apdu(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
next_tvb = tvb_new_subset_remaining(tvb, offset);
- return offset - old_offset + call_dissector(data_handle, next_tvb, pinfo, tree);
+ return offset - old_offset + call_data_dissector(next_tvb, pinfo, tree);
}
void
@@ -762,7 +760,6 @@ proto_reg_handoff_lon(void)
dissector_handle_t lon_handle;
lon_handle = create_dissector_handle(dissect_lon, proto_lon);
- data_handle = find_dissector("data");
dissector_add_uint("cnip.protocol", 0, lon_handle);
}
diff --git a/epan/dissectors/packet-loop.c b/epan/dissectors/packet-loop.c
index a61d5ca4b0..0136dd3e76 100644
--- a/epan/dissectors/packet-loop.c
+++ b/epan/dissectors/packet-loop.c
@@ -41,8 +41,6 @@ static int hf_loop_forwarding_address = -1;
static gint ett_loop = -1;
-static dissector_handle_t data_handle;
-
#define FUNC_REPLY 1
#define FUNC_FORWARD_DATA 2
@@ -116,7 +114,7 @@ dissect_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if (tvb_reported_length_remaining(tvb, offset) > 0)
{
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -168,8 +166,6 @@ proto_reg_handoff_loop(void)
loop_handle = create_dissector_handle(dissect_loop, proto_loop);
dissector_add_uint("ethertype", ETHERTYPE_LOOP, loop_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-lpd.c b/epan/dissectors/packet-lpd.c
index 8046917c49..c20cfb1151 100644
--- a/epan/dissectors/packet-lpd.c
+++ b/epan/dissectors/packet-lpd.c
@@ -43,8 +43,6 @@ enum lpr_type { request, response, unknown };
static gint find_printer_string(tvbuff_t *tvb, int offset);
-static dissector_handle_t data_handle;
-
/* This information comes from the LPRng HOWTO, which also describes
RFC 1179. http://www.astart.com/lprng/LPRng-HOWTO.html */
static const value_string lpd_client_code[] = {
@@ -122,7 +120,7 @@ dissect_lpd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_tree_add_item(lpd_tree, hf_lpd_printer_option, tvb, 1, printer_len, ENC_ASCII|ENC_NA);
}
else {
- call_dissector(data_handle,tvb, pinfo, lpd_tree);
+ call_data_dissector(tvb, pinfo, lpd_tree);
}
}
else if (lpr_packet_type == response) {
@@ -130,11 +128,11 @@ dissect_lpd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_tree_add_item(lpd_tree, hf_lpd_response_code, tvb, 0, 1, ENC_BIG_ENDIAN);
}
else {
- call_dissector(data_handle,tvb, pinfo, lpd_tree);
+ call_data_dissector(tvb, pinfo, lpd_tree);
}
}
else {
- call_dissector(data_handle,tvb, pinfo, lpd_tree);
+ call_data_dissector(tvb, pinfo, lpd_tree);
}
return tvb_captured_length(tvb);
@@ -201,7 +199,6 @@ proto_reg_handoff_lpd(void)
lpd_handle = create_dissector_handle(dissect_lpd, proto_lpd);
dissector_add_uint("tcp.port", TCP_PORT_PRINTER, lpd_handle);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-lwapp.c b/epan/dissectors/packet-lwapp.c
index 7e3c70fc97..09007fde95 100644
--- a/epan/dissectors/packet-lwapp.c
+++ b/epan/dissectors/packet-lwapp.c
@@ -63,7 +63,6 @@ static gint hf_lwapp_control_length = -1;
static dissector_handle_t eth_withoutfcs_handle;
static dissector_handle_t wlan_handle;
static dissector_handle_t wlan_bsfc_handle;
-static dissector_handle_t data_handle;
/* Set by preferences */
static gboolean swap_frame_control;
@@ -301,7 +300,7 @@ dissect_control(tvbuff_t *tvb, packet_info *pinfo,
/* Dissect rest of packet as data */
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
} /* dissect_control */
@@ -546,7 +545,6 @@ proto_reg_handoff_lwapp(void)
eth_withoutfcs_handle = find_dissector_add_dependency("eth_withoutfcs", proto_lwapp);
wlan_handle = find_dissector_add_dependency("wlan_withoutfcs", proto_lwapp);
wlan_bsfc_handle = find_dissector_add_dependency("wlan_bsfc", proto_lwapp);
- data_handle = find_dissector("data");
/* This dissector assumes lwapp packets in an 802.3 frame */
lwapp_l3_handle = create_dissector_handle(dissect_lwapp_l3, proto_lwapp_l3);
diff --git a/epan/dissectors/packet-lwm.c b/epan/dissectors/packet-lwm.c
index cb7eeb2dcb..220a6c31a8 100644
--- a/epan/dissectors/packet-lwm.c
+++ b/epan/dissectors/packet-lwm.c
@@ -95,9 +95,6 @@
void proto_register_lwm(void);
void proto_reg_handoff_lwm(void);
-/* Dissector handles */
-static dissector_handle_t data_handle;
-
/* User string with the decryption key. */
static const gchar *lwmes_key_str = NULL;
static gboolean lwmes_key_valid;
@@ -455,7 +452,7 @@ static int dissect_lwm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
tvb_reported_length(new_tvb) - LWM_MIC_LEN);
expert_add_info(pinfo, lwm_tree, &ei_lwm_decryption_failed);
tvb_set_reported_length(new_tvb, tvb_reported_length(new_tvb) - LWM_MIC_LEN);
- call_dissector(data_handle, new_tvb, pinfo, lwm_tree);
+ call_data_dissector(new_tvb, pinfo, lwm_tree);
}
text_dec = &text[payload_offset];
@@ -479,7 +476,7 @@ static int dissect_lwm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
if(vmic == lwm_mic)
{
decrypted_tvb = tvb_new_real_data(text,length, length);
- call_dissector(data_handle, decrypted_tvb, pinfo, lwm_tree);
+ call_data_dissector(decrypted_tvb, pinfo, lwm_tree);
/* XXX - needed?
tvb_set_free_cb(decrypted_tvb, g_free);
add_new_data_source(pinfo, decrypted_tvb, "Decrypted LWmesh Payload"); */
@@ -492,7 +489,7 @@ static int dissect_lwm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
"Encrypted data (%i byte(s)) MIC FAILURE",
tvb_reported_length(new_tvb) - LWM_MIC_LEN);
tvb_set_reported_length(new_tvb, tvb_reported_length(new_tvb) - LWM_MIC_LEN);
- call_dissector(data_handle, new_tvb, pinfo, lwm_tree);
+ call_data_dissector(new_tvb, pinfo, lwm_tree);
}
}
else
@@ -503,7 +500,7 @@ static int dissect_lwm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
expert_add_info(pinfo, lwm_tree, &ei_lwm_no_decryption_key);
tvb_set_reported_length(new_tvb, tvb_reported_length(new_tvb) - LWM_MIC_LEN);
- call_dissector(data_handle, new_tvb, pinfo, lwm_tree);
+ call_data_dissector(new_tvb, pinfo, lwm_tree);
}
#else /* ! HAVE_LIBGCRYPT */
col_add_fstr(pinfo->cinfo, COL_INFO,
@@ -512,7 +509,7 @@ static int dissect_lwm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
expert_add_info(pinfo, lwm_tree, &ei_lwm_no_decryption_key);
tvb_set_reported_length(new_tvb, tvb_reported_length(new_tvb) - LWM_MIC_LEN);
- call_dissector(data_handle, new_tvb, pinfo, lwm_tree);
+ call_data_dissector(new_tvb, pinfo, lwm_tree);
#endif /* ! HAVE_LIBGCRYPT */
}
/*stack command endpoint 0 and not secured*/
@@ -558,7 +555,7 @@ static int dissect_lwm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
default:
/*Unknown command*/
expert_add_info_format(pinfo, lwm_cmd_tree, &ei_lwm_mal_error, "Unknown command");
- call_dissector(data_handle, new_tvb, pinfo, lwm_cmd_tree);
+ call_data_dissector(new_tvb, pinfo, lwm_cmd_tree);
return tvb_captured_length(tvb);
}
@@ -573,12 +570,12 @@ static int dissect_lwm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
"Size is %i byte(s), instead of %i bytes", tvb_reported_length(new_tvb), len);
new_tvb = tvb_new_subset_remaining(new_tvb, len);
- call_dissector(data_handle, new_tvb, pinfo, lwm_tree);
+ call_data_dissector(new_tvb, pinfo, lwm_tree);
}
}
else{
/*unknown data*/
- call_dissector(data_handle, new_tvb, pinfo, lwm_tree);
+ call_data_dissector(new_tvb, pinfo, lwm_tree);
}
return tvb_captured_length(tvb);
} /* dissect_lwm */
@@ -930,8 +927,6 @@ void proto_reg_handoff_lwm(void)
GByteArray *bytes;
gboolean res;
- data_handle = find_dissector("data");
-
/* Convert key to raw bytes */
bytes = g_byte_array_new();
res = hex_str_to_bytes(lwmes_key_str, bytes, FALSE);
diff --git a/epan/dissectors/packet-m3ua.c b/epan/dissectors/packet-m3ua.c
index ea1e356fcb..adbe11b4a0 100644
--- a/epan/dissectors/packet-m3ua.c
+++ b/epan/dissectors/packet-m3ua.c
@@ -310,7 +310,7 @@ static gint ett_q708_opc = -1;
static gint ett_q708_dpc = -1;
static module_t *m3ua_module;
-static dissector_handle_t mtp3_handle, data_handle;
+static dissector_handle_t mtp3_handle;
static dissector_table_t si_dissector_table;
/* stuff for supporting multiple versions */
@@ -1255,7 +1255,7 @@ dissect_protocol_data_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, pro
payload_tvb = tvb_new_subset_length(parameter_tvb, DATA_ULP_OFFSET, ulp_length);
if (!dissector_try_uint(si_dissector_table, tvb_get_guint8(parameter_tvb, DATA_SI_OFFSET), payload_tvb, pinfo, tree))
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
mtp3_standard = m3ua_pref_mtp3_standard;
}
@@ -2154,7 +2154,6 @@ proto_reg_handoff_m3ua(void)
* Get a handle for the MTP3 dissector.
*/
mtp3_handle = find_dissector_add_dependency("mtp3", proto_m3ua);
- data_handle = find_dissector("data");
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-macsec.c b/epan/dissectors/packet-macsec.c
index ca2e13ea7f..18b9280dee 100644
--- a/epan/dissectors/packet-macsec.c
+++ b/epan/dissectors/packet-macsec.c
@@ -38,8 +38,6 @@ void proto_reg_handoff_macsec(void);
#define TCI_AN_MASK 0x03
-static dissector_handle_t data_handle;
-
static int proto_macsec = -1;
static int hf_macsec_TCI = -1;
static int hf_macsec_TCI_V = -1;
@@ -131,7 +129,7 @@ static int dissect_macsec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
sectag_offset + 12, 2, ENC_BIG_ENDIAN);
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
proto_tree_add_item(macsec_tree, hf_macsec_ICV, tvb, icv_offset,
icv_length, ENC_NA);
@@ -192,7 +190,6 @@ void
proto_reg_handoff_macsec(void)
{
dissector_handle_t macsec_handle;
- data_handle = find_dissector("data");
macsec_handle = create_dissector_handle(dissect_macsec, proto_macsec);
dissector_add_uint("ethertype", ETHERTYPE_MACSEC, macsec_handle);
}
diff --git a/epan/dissectors/packet-mactelnet.c b/epan/dissectors/packet-mactelnet.c
index 78df49fdf7..262885c4dd 100644
--- a/epan/dissectors/packet-mactelnet.c
+++ b/epan/dissectors/packet-mactelnet.c
@@ -67,8 +67,6 @@ static const guint32 control_packet = 0x563412FF;
static gint ett_mactelnet = -1;
static gint ett_mactelnet_control = -1;
-static dissector_handle_t data_handle;
-
/* Packet types */
static const value_string packettypenames[] = {
{ 0, "Start session" },
@@ -263,13 +261,13 @@ dissect_mactelnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
} else {
/* Data packet, let wireshark handle it */
tvbuff_t *next_client = tvb_new_subset_remaining(tvb, offset);
- return call_dissector(data_handle, next_client, pinfo, mactelnet_tree);
+ return call_data_dissector(next_client, pinfo, mactelnet_tree);
}
}
} else if ((type == 4) || (type == 5)) {
/* Data packet, let wireshark handle it */
tvbuff_t *next_client = tvb_new_subset_remaining(tvb, offset);
- return call_dissector(data_handle, next_client, pinfo, mactelnet_tree);
+ return call_data_dissector(next_client, pinfo, mactelnet_tree);
}
@@ -400,7 +398,6 @@ proto_reg_handoff_mactelnet(void)
if (!initialized) {
mactelnet_handle = create_dissector_handle(dissect_mactelnet, proto_mactelnet);
- data_handle = find_dissector("data");
initialized = TRUE;
} else {
dissector_delete_uint("udp.port", current_port, mactelnet_handle);
diff --git a/epan/dissectors/packet-mdshdr.c b/epan/dissectors/packet-mdshdr.c
index 9272d5670a..9ba5a62e1b 100644
--- a/epan/dissectors/packet-mdshdr.c
+++ b/epan/dissectors/packet-mdshdr.c
@@ -97,7 +97,7 @@ static gint ett_mdshdr = -1;
static gint ett_mdshdr_hdr = -1;
static gint ett_mdshdr_trlr = -1;
-static dissector_handle_t data_handle, fc_dissector_handle;
+static dissector_handle_t fc_dissector_handle;
static gboolean decode_if_zero_etype = FALSE;
@@ -242,7 +242,7 @@ dissect_mdshdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
call_dissector_with_data(fc_dissector_handle, next_tvb, pinfo, tree, &fc_data);
}
else {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -322,7 +322,6 @@ proto_reg_handoff_mdshdr(void)
*/
mdshdr_handle = create_dissector_handle(dissect_mdshdr, proto_mdshdr);
dissector_add_uint("ethertype", ETHERTYPE_FCFT, mdshdr_handle);
- data_handle = find_dissector("data");
fc_dissector_handle = find_dissector_add_dependency("fc", proto_mdshdr);
mdshdr_prefs_initialized = TRUE;
}
diff --git a/epan/dissectors/packet-mime-encap.c b/epan/dissectors/packet-mime-encap.c
index a598f9457b..ea6b009a1f 100644
--- a/epan/dissectors/packet-mime-encap.c
+++ b/epan/dissectors/packet-mime-encap.c
@@ -31,7 +31,6 @@ void proto_reg_handoff_mime_encap(void);
static int proto_mime_encap = -1;
static heur_dissector_list_t heur_subdissector_list;
-static dissector_handle_t data_handle;
static int
dissect_mime_encap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -46,7 +45,7 @@ dissect_mime_encap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
if (!dissector_try_heuristic(heur_subdissector_list, tvb, pinfo, tree, &hdtbl_entry, NULL)) {
proto_item_append_text(item, " (Unhandled)");
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -65,7 +64,6 @@ proto_reg_handoff_mime_encap(void)
{
dissector_handle_t mime_encap_handle;
- data_handle = find_dissector("data");
mime_encap_handle = find_dissector("mime_dlt");
dissector_add_uint("wtap_encap", WTAP_ENCAP_MIME, mime_encap_handle);
}
diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c
index a0922c40a0..a03be52cc9 100644
--- a/epan/dissectors/packet-mp2t.c
+++ b/epan/dissectors/packet-mp2t.c
@@ -55,7 +55,6 @@ static dissector_handle_t mp2t_handle;
static dissector_handle_t docsis_handle;
static dissector_handle_t mpeg_pes_handle;
static dissector_handle_t mpeg_sect_handle;
-static dissector_handle_t data_handle;
static heur_dissector_list_t heur_subdissector_list;
@@ -453,7 +452,7 @@ mp2t_dissect_packet(tvbuff_t *tvb, enum pid_payload_type pload_type,
if (handle)
call_dissector(handle, tvb, pinfo, tree);
else
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
static guint
@@ -1563,7 +1562,6 @@ proto_reg_handoff_mp2t(void)
docsis_handle = find_dissector("docsis");
mpeg_pes_handle = find_dissector("mpeg-pes");
mpeg_sect_handle = find_dissector("mpeg_sect");
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-mpeg-dsmcc.c b/epan/dissectors/packet-mpeg-dsmcc.c
index 24ca5d0da2..1c8f9c13d0 100644
--- a/epan/dissectors/packet-mpeg-dsmcc.c
+++ b/epan/dissectors/packet-mpeg-dsmcc.c
@@ -62,7 +62,6 @@ void proto_reg_handoff_dsmcc(void);
static int proto_dsmcc = -1;
-static dissector_handle_t data_handle;
static gboolean dsmcc_sect_check_crc = FALSE;
/* NOTE: Please add values numerically according to 13818-6 so it is easier to
@@ -281,7 +280,7 @@ dissect_dsmcc_adaptation_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
offset, 2, ENC_BIG_ENDIAN);
offset += 2;
sub_tvb = tvb_new_subset_length(tvb, offset, ca_len);
- call_dissector(data_handle, sub_tvb, pinfo, tree);
+ call_data_dissector(sub_tvb, pinfo, tree);
} else if (2 == type) {
sub_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_dsmcc_adaptation_header, NULL, "Adaptation Header");
proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_type, tvb,
@@ -532,7 +531,7 @@ dissect_dsmcc_ddb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += 2;
sub_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, sub_tvb, pinfo, top_tree);
+ call_data_dissector(sub_tvb, pinfo, top_tree);
}
@@ -1232,8 +1231,6 @@ proto_reg_handoff_dsmcc(void)
dissector_add_uint("mpeg_sect.tid", DSMCC_TID_PRIVATE, dsmcc_ts_handle);
dissector_add_uint("tcp.port", DSMCC_TCP_PORT, dsmcc_tcp_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-mpls-y1711.c b/epan/dissectors/packet-mpls-y1711.c
index 15b230f6ce..0937890f4d 100644
--- a/epan/dissectors/packet-mpls-y1711.c
+++ b/epan/dissectors/packet-mpls-y1711.c
@@ -72,7 +72,6 @@ static expert_field ei_mpls_y1711_padding_not_zero = EI_INIT;
static expert_field ei_mpls_y1711_unknown_pdu = EI_INIT;
static dissector_handle_t mpls_y1711_handle;
-static dissector_handle_t data_handle;
static const value_string y1711_function_type_vals[] = {
{0x00, "Reserved" },
@@ -147,7 +146,7 @@ dissect_mpls_y1711(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
*/
proto_tree_add_expert(tree, pinfo, &ei_mpls_y1711_minimum_payload, tvb, offset, -1);
data_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, data_tvb, pinfo, tree);
+ call_data_dissector(data_tvb, pinfo, tree);
return tvb_reported_length(tvb);
}
@@ -408,8 +407,6 @@ proto_reg_handoff_mpls_y1711(void)
dissector_add_uint("mpls.label",
MPLS_LABEL_OAM_ALERT /* 14 */,
mpls_y1711_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-mpls.c b/epan/dissectors/packet-mpls.c
index f51b82a8f2..d5f9895c98 100644
--- a/epan/dissectors/packet-mpls.c
+++ b/epan/dissectors/packet-mpls.c
@@ -92,7 +92,6 @@ const value_string special_labels[] = {
static dissector_table_t pw_ach_subdissector_table;
-static dissector_handle_t dissector_data;
static dissector_handle_t dissector_ipv6;
static dissector_handle_t dissector_ip;
static dissector_handle_t dissector_pw_ach;
@@ -289,7 +288,7 @@ dissect_pw_ach(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
if (!dissector_try_uint(pw_ach_subdissector_table, channel_type, next_tvb, pinfo, tree))
{
- call_dissector(dissector_data, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
if (channel_type == ACH_TYPE_BFD_CV)
@@ -356,7 +355,7 @@ dissect_pw_mcw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
tvb, 2, 2, ENC_BIG_ENDIAN);
}
next_tvb = tvb_new_subset_remaining(tvb, 4);
- call_dissector(dissector_data, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -479,7 +478,7 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
call_dissector(dissector_pw_eth_heuristic, next_tvb, pinfo, tree);
break;
default:
- call_dissector(dissector_data, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
return tvb_captured_length(tvb);
@@ -650,7 +649,6 @@ proto_reg_handoff_mpls(void)
mpls_pwcw_handle = create_dissector_handle( dissect_pw_mcw, proto_pw_mcw );
dissector_add_uint( "mpls.label", MPLS_LABEL_INVALID, mpls_pwcw_handle );
- dissector_data = find_dissector("data");
dissector_ipv6 = find_dissector_add_dependency("ipv6", proto_pw_mcw );
dissector_ip = find_dissector_add_dependency("ip", proto_pw_mcw );
dissector_pw_eth_heuristic = find_dissector_add_dependency("pw_eth_heuristic", proto_pw_mcw);
diff --git a/epan/dissectors/packet-mq.c b/epan/dissectors/packet-mq.c
index 69f1aebf62..612a45d9d8 100644
--- a/epan/dissectors/packet-mq.c
+++ b/epan/dissectors/packet-mq.c
@@ -951,7 +951,6 @@ static gint ett_mq_structid = -1;
static dissector_handle_t mq_handle;
static dissector_handle_t mq_spx_handle;
-static dissector_handle_t data_handle;
static dissector_handle_t mqpcf_handle;
static heur_dissector_list_t mq_heur_subdissector_list;
@@ -3763,13 +3762,13 @@ static void dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
next_tvb = tvb_new_subset_remaining(tvb, offset);
if (!dissector_try_heuristic(mq_heur_subdissector_list, next_tvb, pinfo, mqroot_tree, &hdtbl_entry, p_mq_parm))
- call_dissector(data_handle, next_tvb, pinfo, mqroot_tree);
+ call_data_dissector(next_tvb, pinfo, mqroot_tree);
}
else
{
tvbuff_t *next_tvb;
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, mqroot_tree);
+ call_data_dissector(next_tvb, pinfo, mqroot_tree);
}
}
offset = tvb_reported_length(tvb);
@@ -3786,7 +3785,7 @@ static void dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* This is a MQ segment continuation (if MQ reassembly is not enabled) */
col_append_str(pinfo->cinfo, COL_INFO, " [Unreassembled MQ]");
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
}
}
}
@@ -3798,7 +3797,7 @@ static void dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree_add_item(tree, proto_mq, tvb, offset, -1, ENC_NA);
}
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
}
}
}
@@ -4790,7 +4789,6 @@ void proto_reg_handoff_mq(void)
heur_dissector_add("http", dissect_mq_heur_nontcp, "WebSphere MQ over HTTP", "mq_http", proto_mq, HEURISTIC_ENABLE);
heur_dissector_add("ssl", dissect_mq_heur_ssl, "WebSphere MQ over SSL", "mq_ssl", proto_mq, HEURISTIC_ENABLE);
dissector_add_uint("spx.socket", MQ_SOCKET_SPX, mq_spx_handle);
- data_handle = find_dissector("data");
mqpcf_handle = find_dissector("mqpcf");
}
diff --git a/epan/dissectors/packet-mstp.c b/epan/dissectors/packet-mstp.c
index eafdd2a260..2deefc6819 100644
--- a/epan/dissectors/packet-mstp.c
+++ b/epan/dissectors/packet-mstp.c
@@ -70,7 +70,6 @@ bacnet_mstp_frame_type_name[] = {
{0, NULL }
};
-static dissector_handle_t data_handle;
static dissector_table_t subdissector_table;
static int proto_mstp = -1;
@@ -289,7 +288,7 @@ dissect_mstp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (!(dissector_try_uint(subdissector_table, (vendorid<<16) + mstp_frame_type,
next_tvb, pinfo, tree))) {
/* Unknown function - dissect the payload as data */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
#if defined(BACNET_MSTP_CHECKSUM_VALIDATE)
/* 16-bit checksum - calculate to validate */
@@ -480,7 +479,6 @@ proto_reg_handoff_mstp(void)
dissector_add_uint("wtap_encap", WTAP_ENCAP_BACNET_MS_TP_WITH_PHDR, mstp_handle);
bacnet_handle = find_dissector("bacnet");
- data_handle = find_dissector("data");
dissector_add_uint("mstp.vendor_frame_type", (0/*VendorID ASHRAE*/ << 16) + MSTP_BACNET_DATA_EXPECTING_REPLY, bacnet_handle);
dissector_add_uint("mstp.vendor_frame_type", (0/*VendorID ASHRAE*/ << 16) + MSTP_BACNET_DATA_NOT_EXPECTING_REPLY, bacnet_handle);
diff --git a/epan/dissectors/packet-mtp3.c b/epan/dissectors/packet-mtp3.c
index 87ee9657cd..83fab4466a 100644
--- a/epan/dissectors/packet-mtp3.c
+++ b/epan/dissectors/packet-mtp3.c
@@ -228,8 +228,6 @@ const value_string mtp3_network_indicator_vals[] = {
{ 0, NULL }
};
-static dissector_handle_t data_handle;
-
/*
* helper routine to format a point code in structured form
@@ -645,7 +643,7 @@ dissect_mtp3_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_INFO, "DATA ");
if (!dissector_try_uint(mtp3_sio_dissector_table, service_indicator, payload_tvb, pinfo, tree))
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
}
static guint
@@ -1107,8 +1105,6 @@ proto_reg_handoff_mtp3(void)
{
dissector_add_uint("wtap_encap", WTAP_ENCAP_MTP3, mtp3_handle);
dissector_add_string("tali.opcode", "mtp3", mtp3_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-multipart.c b/epan/dissectors/packet-multipart.c
index aa9da5975d..ff09f4515f 100644
--- a/epan/dissectors/packet-multipart.c
+++ b/epan/dissectors/packet-multipart.c
@@ -146,7 +146,6 @@ static gint hf_header_array[] = {
static dissector_table_t media_type_dissector_table;
/* Data and media dissector handles */
-static dissector_handle_t data_handle;
static dissector_handle_t media_handle;
static dissector_handle_t gssapi_handle;
@@ -899,7 +898,7 @@ process_body_part(proto_tree *tree, tvbuff_t *tvb, multipart_info_t *m_info,
}
parameters = NULL; /* Shares same memory as content_type_str */
} else {
- call_dissector(data_handle, tmp_tvb, pinfo, subtree);
+ call_data_dissector(tmp_tvb, pinfo, subtree);
}
proto_item_set_len(ti, boundary_start - start);
if (*last_boundary == TRUE) {
@@ -934,7 +933,7 @@ static int dissect_multipart(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
* We can't get the required multipart information
*/
proto_tree_add_expert(tree, pinfo, &ei_multipart_no_required_parameter, tvb, 0, -1);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_reported_length(tvb);
}
/* Clean up the memory if an exception is thrown */
@@ -963,7 +962,7 @@ static int dissect_multipart(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
*/
header_start = process_preamble(subtree, tvb, m_info, &last_boundary);
if (header_start == -1) {
- call_dissector(data_handle, tvb, pinfo, subtree);
+ call_data_dissector(tvb, pinfo, subtree);
/* Clean up the dynamically allocated memory */
cleanup_multipart_info(m_info);
return tvb_reported_length(tvb);
@@ -1197,7 +1196,6 @@ proto_reg_handoff_multipart(void)
* When we cannot display the data, call the data dissector.
* When there is no dissector for the given media, call the media dissector.
*/
- data_handle = find_dissector("data");
media_handle = find_dissector_add_dependency("media", proto_multipart);
gssapi_handle = find_dissector_add_dependency("gssapi", proto_multipart);
diff --git a/epan/dissectors/packet-nbipx.c b/epan/dissectors/packet-nbipx.c
index 5a5b51a777..aef502ec3e 100644
--- a/epan/dissectors/packet-nbipx.c
+++ b/epan/dissectors/packet-nbipx.c
@@ -67,8 +67,6 @@ static void dissect_conn_control(tvbuff_t *tvb, int offset, proto_tree *tree);
static heur_dissector_list_t netbios_heur_subdissector_list;
-static dissector_handle_t data_handle;
-
/* There is no RFC or public specification of Netware or Microsoft
* NetBIOS over IPX packets. I have had to decode the protocol myself,
* so there are holes and perhaps errors in this code. (gram)
@@ -275,7 +273,7 @@ dissect_netbios_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
if (!dissector_try_heuristic(netbios_heur_subdissector_list,
tvb, pinfo, tree, &hdtbl_entry, NULL))
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
static int
@@ -660,7 +658,6 @@ proto_reg_handoff_nbipx(void)
nbipx_handle = create_dissector_handle(dissect_nbipx, proto_nbipx);
dissector_add_uint("ipx.socket", IPX_SOCKET_NETBIOS, nbipx_handle);
netbios_heur_subdissector_list = find_heur_dissector_list("netbios");
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-nbt.c b/epan/dissectors/packet-nbt.c
index c3ec5f83bb..ef3d7beb3a 100644
--- a/epan/dissectors/packet-nbt.c
+++ b/epan/dissectors/packet-nbt.c
@@ -1097,8 +1097,6 @@ dissect_nbns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
static heur_dissector_list_t netbios_heur_subdissector_list;
-static dissector_handle_t data_handle;
-
static void
dissect_netbios_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
@@ -1110,7 +1108,7 @@ dissect_netbios_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
if (!dissector_try_heuristic(netbios_heur_subdissector_list,
tvb, pinfo, tree, &hdtbl_entry, NULL))
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
/* NetBIOS datagram packet, from RFC 1002, page 32 */
@@ -2097,7 +2095,6 @@ proto_reg_handoff_nbt(void)
dissector_add_uint("tcp.port", TCP_PORT_CIFS, nbss_handle);
netbios_heur_subdissector_list = find_heur_dissector_list("netbios");
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-ncp.c b/epan/dissectors/packet-ncp.c
index 40d50b9720..8e7d913f65 100644
--- a/epan/dissectors/packet-ncp.c
+++ b/epan/dissectors/packet-ncp.c
@@ -115,8 +115,6 @@ dissector_handle_t nds_data_handle;
/* desegmentation of NCP over TCP */
static gboolean ncp_desegment = TRUE;
-static dissector_handle_t data_handle;
-
#define TCP_PORT_NCP 524
#define UDP_PORT_NCP 524
@@ -1238,8 +1236,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* Display the rest of the packet as data.
*/
if (tvb_offset_exists(tvb, commhdr + 10)) {
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, commhdr + 10),
+ call_data_dissector(tvb_new_subset_remaining(tvb, commhdr + 10),
pinfo, ncp_tree);
}
break;
@@ -1272,8 +1269,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (length_remaining > data_len)
length_remaining = data_len;
if (data_len != 0) {
- call_dissector(data_handle,
- tvb_new_subset(tvb, offset,
+ call_data_dissector(tvb_new_subset(tvb, offset,
length_remaining, data_len),
pinfo, ncp_tree);
}
@@ -1582,8 +1578,6 @@ proto_reg_handoff_ncp(void)
dissector_add_uint("udp.port", UDP_PORT_NCP, ncp_handle);
dissector_add_uint("ipx.packet_type", IPX_PACKET_TYPE_NCP, ncp_handle);
dissector_add_uint("ipx.socket", IPX_SOCKET_NCP, ncp_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c
index 9b8a070883..63f135dd81 100644
--- a/epan/dissectors/packet-ndps.c
+++ b/epan/dissectors/packet-ndps.c
@@ -4002,8 +4002,6 @@ static const fragment_items ndps_frag_items = {
"segments"
};
-static dissector_handle_t ndps_data_handle;
-
/* NDPS packets come in request/reply pairs. The request packets tell the
* Function and Program numbers. The response, unfortunately, only
* identifies itself via the Exchange ID; you have to know what type of NDPS
@@ -4408,7 +4406,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, spx_info *spx_i
{
/* This is a fragment packet */
next_tvb = tvb_new_subset_remaining (tvb, 0);
- call_dissector(ndps_data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
else
{
@@ -9522,7 +9520,6 @@ proto_reg_handoff_ndps(void)
dissector_add_uint("tcp.port", TCP_PORT_ENS, ndps_tcp_handle);
dissector_add_uint("tcp.port", TCP_PORT_RMS, ndps_tcp_handle);
dissector_add_uint("tcp.port", TCP_PORT_NOTIFY_LISTENER, ndps_tcp_handle);
- ndps_data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-netanalyzer.c b/epan/dissectors/packet-netanalyzer.c
index cb515276d4..d5ba327c71 100644
--- a/epan/dissectors/packet-netanalyzer.c
+++ b/epan/dissectors/packet-netanalyzer.c
@@ -110,7 +110,6 @@ static const value_string gpio_edge_vals[] = {
static dissector_handle_t eth_dissector_handle;
-static dissector_handle_t data_dissector_handle;
static gint proto_netanalyzer = -1;
@@ -341,7 +340,7 @@ dissect_netanalyzer_transparent(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
transparent_payload_tree = proto_tree_add_subtree(tree, tvb, 4, tvb_captured_length(tvb)-4,
ett_netanalyzer_transparent, NULL, "Raw packet data");
next_tvb = tvb_new_subset_remaining(tvb, 4);
- call_dissector(data_dissector_handle, next_tvb, pinfo, transparent_payload_tree);
+ call_data_dissector(next_tvb, pinfo, transparent_payload_tree);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "netANALYZER");
col_set_str(pinfo->cinfo, COL_INFO, "Frame captured in transparent mode");
@@ -462,7 +461,6 @@ void proto_reg_handoff_netanalyzer(void)
dissector_handle_t netana_handle_transparent;
eth_dissector_handle = find_dissector_add_dependency("eth_withfcs", proto_netanalyzer);
- data_dissector_handle = find_dissector("data");
netana_handle = create_dissector_handle(dissect_netanalyzer, proto_netanalyzer);
netana_handle_transparent = create_dissector_handle(dissect_netanalyzer_transparent, proto_netanalyzer);
diff --git a/epan/dissectors/packet-netbios.c b/epan/dissectors/packet-netbios.c
index 7da3f3470b..5dc1b97ee4 100644
--- a/epan/dissectors/packet-netbios.c
+++ b/epan/dissectors/packet-netbios.c
@@ -154,8 +154,6 @@ static const fragment_items netbios_frag_items = {
"fragments"
};
-static dissector_handle_t data_handle;
-
/* The strings for the station type, used by get_netbios_name function;
many of them came from the file "NetBIOS.txt" in the Zip archive at
@@ -1076,7 +1074,7 @@ dissect_netbios_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
if (!dissector_try_heuristic(netbios_heur_subdissector_list,
tvb, pinfo, tree, &hdtbl_entry, NULL))
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
static int
@@ -1233,8 +1231,7 @@ dissect_netbios(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
dissect_netbios_payload(next_tvb, pinfo, tree);
else {
next_tvb = tvb_new_subset_remaining (tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo,
- tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
break;
}
@@ -1491,7 +1488,6 @@ proto_reg_handoff_netbios(void)
proto_netbios);
dissector_add_uint("llc.dsap", SAP_NETBIOS, netbios_handle);
register_capture_dissector("llc.dsap", SAP_NETBIOS, capture_netbios, proto_netbios);
- data_handle = find_dissector("data");
}
diff --git a/epan/dissectors/packet-netlink.c b/epan/dissectors/packet-netlink.c
index eb09d266b8..bd6d451dc4 100644
--- a/epan/dissectors/packet-netlink.c
+++ b/epan/dissectors/packet-netlink.c
@@ -168,7 +168,6 @@ static gint ett_netlink_msg = -1;
static gint ett_netlink_hdr_flags = -1;
static dissector_table_t netlink_dissector_table;
-static dissector_handle_t data_handle;
static const int *netlink_header_get_flags[] = {
@@ -345,7 +344,7 @@ dissect_netlink(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *_data
next_tvb = tvb_new_subset_length(tvb, offset, pkt_len-16);
if (!dissector_try_uint_new(netlink_dissector_table, protocol, next_tvb, pinfo, fh_msg, TRUE, &data))
- call_dissector(data_handle, next_tvb, pinfo, fh_msg);
+ call_data_dissector(next_tvb, pinfo, fh_msg);
} else if (pkt_len != 16) {
/* XXX, expert info */
@@ -422,8 +421,6 @@ proto_register_netlink(void)
void
proto_reg_handoff_netlink(void)
{
- data_handle = find_dissector("data");
-
dissector_add_uint("wtap_encap", WTAP_ENCAP_NETLINK, netlink_handle);
}
diff --git a/epan/dissectors/packet-netrom.c b/epan/dissectors/packet-netrom.c
index 79a8426486..41ede31a67 100644
--- a/epan/dissectors/packet-netrom.c
+++ b/epan/dissectors/packet-netrom.c
@@ -72,7 +72,6 @@ void proto_reg_handoff_netrom(void);
/* Dissector handles */
static dissector_handle_t ip_handle;
-static dissector_handle_t data_handle;
/* Initialize the protocol and registered fields */
static int proto_netrom = -1;
@@ -438,12 +437,12 @@ dissect_netrom_proto(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if ( cct_index == NETROM_PROTO_IP && cct_id == NETROM_PROTO_IP )
call_dissector( ip_handle , next_tvb, pinfo, tree );
else
- call_dissector( data_handle , next_tvb, pinfo, tree );
+ call_data_dissector(next_tvb, pinfo, tree );
break;
case NETROM_INFO :
default :
- call_dissector( data_handle , next_tvb, pinfo, tree );
+ call_data_dissector(next_tvb, pinfo, tree );
break;
}
}
@@ -472,7 +471,7 @@ dissect_netrom_routing(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
next_tvb = tvb_new_subset_remaining(tvb, 7);
- call_dissector( data_handle , next_tvb, pinfo, tree );
+ call_data_dissector(next_tvb, pinfo, tree );
}
/* Code to actually dissect the packets */
@@ -620,8 +619,6 @@ proto_reg_handoff_netrom(void)
register_capture_dissector("ax25.pid", AX25_P_NETROM, capture_netrom, proto_netrom);
ip_handle = find_dissector_add_dependency( "ip", proto_netrom );
- data_handle = find_dissector( "data" );
-
}
/*
diff --git a/epan/dissectors/packet-nettl.c b/epan/dissectors/packet-nettl.c
index 75d74a8fcf..f9871a7ed6 100644
--- a/epan/dissectors/packet-nettl.c
+++ b/epan/dissectors/packet-nettl.c
@@ -51,7 +51,6 @@ static dissector_handle_t lapb_handle;
static dissector_handle_t x25_handle;
static dissector_handle_t sctp_handle;
static dissector_handle_t raw_ip_handle;
-static dissector_handle_t data_handle;
static dissector_table_t ip_proto_dissector_table;
static dissector_table_t tcp_subdissector_table;
@@ -243,7 +242,7 @@ dissect_nettl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
case WTAP_ENCAP_NETTL_RAW_IP:
if ( (pinfo->pseudo_header->nettl.kind & NETTL_HDR_PDU_MASK) == 0 )
/* not actually a data packet (PDU) trace record */
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
else if (pinfo->pseudo_header->nettl.subsys == NETTL_SUBSYS_NS_LS_SCTP )
call_dissector(sctp_handle, tvb, pinfo, tree);
else
@@ -252,12 +251,12 @@ dissect_nettl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
case WTAP_ENCAP_NETTL_RAW_ICMP:
if (!dissector_try_uint(ip_proto_dissector_table,
IP_PROTO_ICMP, tvb, pinfo, tree))
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
case WTAP_ENCAP_NETTL_RAW_ICMPV6:
if (!dissector_try_uint(ip_proto_dissector_table,
IP_PROTO_ICMPV6, tvb, pinfo, tree))
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
case WTAP_ENCAP_NETTL_X25:
if (pinfo->pseudo_header->nettl.kind == NETTL_HDR_PDUIN)
@@ -272,14 +271,14 @@ dissect_nettl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
case WTAP_ENCAP_NETTL_RAW_TELNET:
if (!dissector_try_uint(tcp_subdissector_table,
TCP_PORT_TELNET, tvb, pinfo, tree))
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
default:
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
col_add_fstr(pinfo->cinfo, COL_INFO, "Unsupported nettl subsytem: %d (%s)",
pinfo->pseudo_header->nettl.subsys,
val_to_str_ext_const(pinfo->pseudo_header->nettl.subsys, &subsystem_ext, "Unknown"));
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -349,7 +348,6 @@ proto_reg_handoff_nettl(void)
x25_handle = find_dissector_add_dependency("x.25", proto_nettl);
sctp_handle = find_dissector_add_dependency("sctp", proto_nettl);
raw_ip_handle = find_dissector_add_dependency("raw_ip", proto_nettl);
- data_handle = find_dissector("data");
ip_proto_dissector_table = find_dissector_table("ip.proto");
tcp_subdissector_table = find_dissector_table("tcp.port");
diff --git a/epan/dissectors/packet-nflog.c b/epan/dissectors/packet-nflog.c
index 589973ab50..046667e537 100644
--- a/epan/dissectors/packet-nflog.c
+++ b/epan/dissectors/packet-nflog.c
@@ -120,7 +120,6 @@ 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_handle_t data_handle;
static int
dissect_nflog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -246,7 +245,7 @@ dissect_nflog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
call_dissector(ip6_handle, next_tvb, pinfo, tree);
break;
default:
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
}
@@ -299,7 +298,6 @@ proto_reg_handoff_nflog(void)
ip_handle = find_dissector_add_dependency("ip", hfi_nflog->id);
ip6_handle = find_dissector_add_dependency("ipv6", hfi_nflog->id);
- data_handle = find_dissector("data");
nflog_handle = find_dissector("nflog");
dissector_add_uint("wtap_encap", WTAP_ENCAP_NFLOG, nflog_handle);
diff --git a/epan/dissectors/packet-nhrp.c b/epan/dissectors/packet-nhrp.c
index d3f971e2e5..941707834d 100644
--- a/epan/dissectors/packet-nhrp.c
+++ b/epan/dissectors/packet-nhrp.c
@@ -264,8 +264,6 @@ static dissector_table_t osinl_incl_subdissector_table;
static dissector_table_t osinl_excl_subdissector_table;
static dissector_table_t ethertype_subdissector_table;
-static dissector_handle_t data_handle;
-
typedef struct _e_nhrp {
guint16 ar_afn;
guint16 ar_pro_type;
@@ -796,8 +794,7 @@ static void dissect_nhrp_mand(tvbuff_t *tvb,
hdr->ar_pro_type, sub_tvb, pinfo, ind_tree);
}
if (!dissected) {
- call_dissector(data_handle, sub_tvb, pinfo,
- ind_tree);
+ call_data_dissector(sub_tvb, pinfo, ind_tree);
}
}
pinfo->flags.in_error_pkt = save_in_error_pkt;
@@ -1386,8 +1383,6 @@ proto_reg_handoff_nhrp(void)
{
dissector_handle_t nhrp_handle;
- data_handle = find_dissector("data");
-
osinl_incl_subdissector_table = find_dissector_table("osinl.incl");
osinl_excl_subdissector_table = find_dissector_table("osinl.excl");
ethertype_subdissector_table = find_dissector_table("ethertype");
diff --git a/epan/dissectors/packet-null.c b/epan/dissectors/packet-null.c
index 277bc20255..e2d3b31579 100644
--- a/epan/dissectors/packet-null.c
+++ b/epan/dissectors/packet-null.c
@@ -63,7 +63,6 @@ static const value_string family_vals[] = {
};
static dissector_handle_t ppp_hdlc_handle;
-static dissector_handle_t data_handle;
static gboolean
capture_null( const guchar *pd, int offset _U_, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header _U_ )
@@ -444,7 +443,7 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
next_tvb = tvb_new_subset_remaining(tvb, 4);
if (!dissector_try_uint(ethertype_dissector_table,
(guint16) null_header, next_tvb, pinfo, tree))
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else {
/* populate a tree in the second pane with the status of the link
layer (ie none) */
@@ -458,7 +457,7 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if (!dissector_try_uint(null_dissector_table, null_header,
next_tvb, pinfo, tree)) {
/* No sub-dissector found. Label rest of packet as "Data" */
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
}
@@ -497,7 +496,7 @@ dissect_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
if (!dissector_try_uint(null_dissector_table, loop_family,
next_tvb, pinfo, tree)) {
/* No sub-dissector found. Label rest of packet as "Data" */
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -539,7 +538,6 @@ proto_reg_handoff_null(void)
* the "I don't know what this is" dissector.
*/
ppp_hdlc_handle = find_dissector_add_dependency("ppp_hdlc", proto_null);
- data_handle = find_dissector("data");
ethertype_dissector_table = find_dissector_table("ethertype");
diff --git a/epan/dissectors/packet-ocfs2.c b/epan/dissectors/packet-ocfs2.c
index a0540bf9e9..22f196555b 100644
--- a/epan/dissectors/packet-ocfs2.c
+++ b/epan/dissectors/packet-ocfs2.c
@@ -132,8 +132,6 @@ static int hf_dlm_pad32 = -1;
static int hf_dlm_flags = -1;
static int hf_dlm_payload = -1;
-static dissector_handle_t data_handle;
-
#define O2NM_MAX_NAME_LEN 64
#define O2NM_NODE_MAP_IN_BYTES 32
@@ -1137,7 +1135,7 @@ static int dissect_ocfs2_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
}
} else {
next_tvb = tvb_new_subset_length(tvb, offset, len);
- call_dissector( data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_reported_length(tvb);
@@ -1658,9 +1656,6 @@ void proto_reg_handoff_ocfs2(void)
ocfs2_handle = create_dissector_handle(dissect_ocfs2, proto_ocfs2);
dissector_add_for_decode_as("tcp.port", ocfs2_handle);
-
- /* Find dissector for data packet */
- data_handle = find_dissector("data");
}
diff --git a/epan/dissectors/packet-osi.c b/epan/dissectors/packet-osi.c
index 9c00ddea41..5f829c3314 100644
--- a/epan/dissectors/packet-osi.c
+++ b/epan/dissectors/packet-osi.c
@@ -449,7 +449,7 @@ const value_string nlpid_vals[] = {
static dissector_table_t osinl_incl_subdissector_table;
static dissector_table_t osinl_excl_subdissector_table;
-static dissector_handle_t data_handle, ppp_handle;
+static dissector_handle_t ppp_handle;
/* Dissect OSI over TCP over TPKT */
static int
@@ -506,17 +506,17 @@ static int dissect_osi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
case NLPID_ISO9542X25_ESIS:
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ESIS (X.25)");
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
case NLPID_ISO10747_IDRP:
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IDRP");
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
default:
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ISO");
col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown ISO protocol (%02x)", nlpid);
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
return tvb_captured_length(tvb);
@@ -547,7 +547,6 @@ proto_reg_handoff_osi(void)
dissector_add_uint("juniper.proto", JUNIPER_PROTO_CLNP, osi_juniper_handle);
dissector_add_uint("juniper.proto", JUNIPER_PROTO_MPLS_CLNP, osi_juniper_handle);
- data_handle = find_dissector("data");
ppp_handle = find_dissector("ppp");
diff --git a/epan/dissectors/packet-ositp.c b/epan/dissectors/packet-ositp.c
index 344e26b8c7..248d553390 100644
--- a/epan/dissectors/packet-ositp.c
+++ b/epan/dissectors/packet-ositp.c
@@ -148,7 +148,6 @@ 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 data_handle;
/*
* ISO8073 OSI COTP definition
@@ -882,8 +881,7 @@ static int ositp_decode_DR(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
expert_add_info_format(pinfo, ti, &ei_cotp_disconnect_request, "Disconnect Request(DR): 0x%x -> 0x%x", src_ref, dst_ref);
/* User data */
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo,
- tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
offset += tvb_captured_length_remaining(tvb, offset);
/* we dissected all of the containing PDU */
@@ -1193,7 +1191,7 @@ static int ositp_decode_DT(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
*subdissector_found = TRUE;
} else {
/* Fill in other Dissectors using inactive subset here */
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
} else {
/*
@@ -1207,7 +1205,7 @@ static int ositp_decode_DT(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
tree, &hdtbl_entry, NULL)) {
*subdissector_found = TRUE;
} else {
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
}
@@ -1412,7 +1410,7 @@ static int ositp_decode_ED(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
* in an ED packet?
*/
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
offset += tvb_captured_length_remaining(tvb, offset);
/* we dissected all of the containing PDU */
@@ -1607,11 +1605,11 @@ static int ositp_decode_CR_CC(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
tree, &hdtbl_entry, NULL)) {
*subdissector_found = TRUE;
} else {
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
else
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector( next_tvb, pinfo, tree);
offset += tvb_captured_length_remaining(tvb, offset);
/* we dissected all of the containing PDU */
@@ -2079,11 +2077,11 @@ static int ositp_decode_UD(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
pinfo, tree, &hdtbl_entry, NULL)) {
*subdissector_found = TRUE;
} else {
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
- /*call_dissector(data_handle,next_tvb, pinfo, tree); */
+ /*call_data_dissector(next_tvb, pinfo, tree); */
offset += tvb_captured_length_remaining(tvb, offset);
/* we dissected all of the containing PDU */
@@ -2127,7 +2125,7 @@ static gint dissect_ositp_internal(tvbuff_t *tvb, packet_info *pinfo,
if ((li = tvb_get_guint8(tvb, offset + P_LI)) == 0) {
col_append_str(pinfo->cinfo, COL_INFO, "Length indicator is zero");
if (!first_tpdu)
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset),
+ call_data_dissector( tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return found_ositp;
}
@@ -2183,7 +2181,7 @@ static gint dissect_ositp_internal(tvbuff_t *tvb, packet_info *pinfo,
if (new_offset == -1) { /* incorrect TPDU */
if (!first_tpdu)
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset),
+ call_data_dissector( tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
break;
}
@@ -2469,7 +2467,6 @@ proto_reg_handoff_cotp(void)
ositp_handle = find_dissector("ositp");
dissector_add_uint("ip.proto", IP_PROTO_TP, ositp_handle);
- data_handle = find_dissector("data");
rdp_cr_handle = find_dissector("rdp_cr");
rdp_cc_handle = find_dissector("rdp_cc");
diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c
index d52f08fff4..2833bf8198 100644
--- a/epan/dissectors/packet-ospf.c
+++ b/epan/dissectors/packet-ospf.c
@@ -965,8 +965,6 @@ dissect_ospf_bitfield (proto_tree *parent_tree, tvbuff_t *tvb, int offset,
}
}
-static dissector_handle_t data_handle;
-
static void dissect_ospf_hello(tvbuff_t*, int, proto_tree*, guint8, guint16);
static void dissect_ospf_db_desc(tvbuff_t*, packet_info*, int, proto_tree*, guint8, guint16, guint8);
static void dissect_ospf_ls_req(tvbuff_t*, packet_info*, int, proto_tree*, guint8, guint16);
@@ -1269,8 +1267,7 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
break;
default:
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, ospf_header_length), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, ospf_header_length), pinfo, tree);
break;
}
@@ -3805,7 +3802,6 @@ proto_reg_handoff_ospf(void)
dissector_add_uint("ip.proto", IP_PROTO_OSPF, ospf_handle);
register_capture_dissector("ip.proto", IP_PROTO_OSPF, capture_ospf, proto_ospf);
register_capture_dissector("ipv6.nxt", IP_PROTO_OSPF, capture_ospf, proto_ospf);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-ossp.c b/epan/dissectors/packet-ossp.c
index 355add2658..3f40f0fac6 100644
--- a/epan/dissectors/packet-ossp.c
+++ b/epan/dissectors/packet-ossp.c
@@ -197,8 +197,6 @@ static expert_field ei_esmc_version_compliance = EI_INIT;
static expert_field ei_esmc_tlv_length_bad = EI_INIT;
static expert_field ei_esmc_reserved_not_zero = EI_INIT;
-static dissector_handle_t dh_data;
-
static void
dissect_esmc_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *treex);
@@ -538,7 +536,7 @@ dissect_esmc_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *treex)
{
proto_tree* tree_b;
tree_b = proto_item_add_subtree(item_b, ett_esmc);
- call_dissector(dh_data, tvb_next, pinfo, tree_b);
+ call_data_dissector(tvb_next, pinfo, tree_b);
}
}
}
@@ -694,8 +692,6 @@ proto_reg_handoff_ossp(void)
ossp_handle = create_dissector_handle(dissect_ossp_pdu, proto_ossp);
dissector_add_uint("slow.subtype", OSSP_SUBTYPE, ossp_handle);
-
- dh_data = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-p_mul.c b/epan/dissectors/packet-p_mul.c
index 6061e4b610..3f83ce2867 100644
--- a/epan/dissectors/packet-p_mul.c
+++ b/epan/dissectors/packet-p_mul.c
@@ -177,8 +177,6 @@ static expert_field ei_analysis_retrans_no = EI_INIT;
static dissector_handle_t p_mul_handle = NULL;
-static dissector_handle_t data_handle = NULL;
-
typedef struct _p_mul_id_key {
guint32 id;
guint16 seq;
@@ -786,7 +784,7 @@ static void dissect_reassembled_data (tvbuff_t *tvb, packet_info *pinfo, proto_t
dissect_cdt (tvb, pinfo, tree);
break;
default:
- call_dissector (data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -1637,7 +1635,6 @@ void proto_reg_handoff_p_mul (void)
if (!p_mul_prefs_initialized) {
p_mul_prefs_initialized = TRUE;
- data_handle = find_dissector ("data");
dissector_add_uint ("s5066sis.ctl.appid", S5066_CLIENT_S4406_ANNEX_E_TMI_1_P_MUL, p_mul_handle);
} else {
dissector_delete_uint_range ("udp.port", p_mul_port_range, p_mul_handle);
diff --git a/epan/dissectors/packet-packetlogger.c b/epan/dissectors/packet-packetlogger.c
index 8acd90e82b..fda23a74b9 100644
--- a/epan/dissectors/packet-packetlogger.c
+++ b/epan/dissectors/packet-packetlogger.c
@@ -46,8 +46,6 @@ static gint ett_packetlogger = -1;
static dissector_handle_t packetlogger_handle;
static dissector_table_t hci_h1_table;
-static dissector_handle_t data_handle;
-
#define PKT_HCI_COMMAND 0x00
#define PKT_HCI_EVENT 0x01
#define PKT_SENT_ACL_DATA 0x02
@@ -132,7 +130,7 @@ static int dissect_packetlogger(tvbuff_t *tvb, packet_info *pinfo,
col_add_fstr (pinfo->cinfo, COL_INFO, "%s", val_to_str(pl_type, type_vals, "Unknown 0x%02x"));
if (!dissector_try_uint_new(hci_h1_table, bthci.channel,
next_tvb, pinfo, tree, TRUE, bluetooth_data)) {
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
} else {
/* PacketLogger data */
@@ -144,7 +142,7 @@ static int dissect_packetlogger(tvbuff_t *tvb, packet_info *pinfo,
col_add_fstr (pinfo->cinfo, COL_INFO, "%s", tvb_format_stringzpad_wsp (next_tvb, 0, len));
break;
default:
- call_dissector (data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
col_add_fstr (pinfo->cinfo, COL_INFO, "Unknown 0x%02x", pl_type);
break;
}
@@ -177,7 +175,6 @@ void proto_register_packetlogger (void)
void proto_reg_handoff_packetlogger (void)
{
hci_h1_table = find_dissector_table("hci_h1.type");
- data_handle = find_dissector("data");
dissector_add_uint ("bluetooth.encap", WTAP_ENCAP_PACKETLOGGER, packetlogger_handle);
}
diff --git a/epan/dissectors/packet-pcli.c b/epan/dissectors/packet-pcli.c
index 51a6011afa..c015aaf9a5 100644
--- a/epan/dissectors/packet-pcli.c
+++ b/epan/dissectors/packet-pcli.c
@@ -97,8 +97,6 @@ static int ett_pcli = -1;
static gboolean pcli_summary_in_tree = TRUE;
-static dissector_handle_t data_handle;
-
static dissector_table_t pcli_subdissector_table;
static proto_tree *
@@ -142,7 +140,7 @@ dissect_pcli_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
* have a unique identifier to determine subdissector
*/
if (!dissector_try_uint(pcli_subdissector_table, 0, next_tvb, pinfo, tree)) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -289,7 +287,6 @@ proto_reg_handoff_pcli(void)
pcli_handle8 = create_dissector_handle(dissect_pcli8, proto_pcli8);
pcli_handle12 = create_dissector_handle(dissect_pcli12, proto_pcli12);
pcli_handle20 = create_dissector_handle(dissect_pcli20, proto_pcli20);
- data_handle = find_dissector("data");
pcli_initialized = TRUE;
}
diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c
index e9dc58d885..fe6ea69806 100644
--- a/epan/dissectors/packet-pdcp-lte.c
+++ b/epan/dissectors/packet-pdcp-lte.c
@@ -435,7 +435,6 @@ static const value_string ciphering_algorithm_vals[] = {
static dissector_handle_t ip_handle;
static dissector_handle_t ipv6_handle;
static dissector_handle_t rohc_handle;
-static dissector_handle_t data_handle;
#define SEQUENCE_ANALYSIS_RLC_ONLY 1
@@ -2219,7 +2218,7 @@ static int dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
call_dissector_only(ipv6_handle, ip_payload_tvb, pinfo, pdcp_tree, NULL);
break;
default:
- call_dissector_only(data_handle, ip_payload_tvb, pinfo, pdcp_tree, NULL);
+ call_data_dissector(ip_payload_tvb, pinfo, pdcp_tree);
break;
}
@@ -2784,7 +2783,6 @@ void proto_reg_handoff_pdcp_lte(void)
ip_handle = find_dissector_add_dependency("ip", proto_pdcp_lte);
ipv6_handle = find_dissector_add_dependency("ipv6", proto_pdcp_lte);
rohc_handle = find_dissector_add_dependency("rohc", proto_pdcp_lte);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-pflog.c b/epan/dissectors/packet-pflog.c
index 21bc61b941..9fe5d83de9 100644
--- a/epan/dissectors/packet-pflog.c
+++ b/epan/dissectors/packet-pflog.c
@@ -44,7 +44,7 @@ void proto_reg_handoff_pflog(void);
void proto_register_old_pflog(void);
void proto_reg_handoff_old_pflog(void);
-static dissector_handle_t data_handle, ip_handle, ipv6_handle;
+static dissector_handle_t ip_handle, ipv6_handle;
/* header fields */
static int proto_pflog = -1;
@@ -299,7 +299,7 @@ dissect_pflog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
break;
default:
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
@@ -416,7 +416,6 @@ proto_reg_handoff_pflog(void)
ip_handle = find_dissector_add_dependency("ip", proto_pflog);
ipv6_handle = find_dissector_add_dependency("ipv6", proto_pflog);
- data_handle = find_dissector("data");
pflog_handle = create_dissector_handle(dissect_pflog, proto_pflog);
dissector_add_uint("wtap_encap", WTAP_ENCAP_PFLOG, pflog_handle);
@@ -482,7 +481,7 @@ dissect_old_pflog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
break;
default:
- offset += call_dissector(data_handle, next_tvb, pinfo, tree);
+ offset += call_data_dissector(next_tvb, pinfo, tree);
break;
}
@@ -533,7 +532,6 @@ proto_reg_handoff_old_pflog(void)
ip_handle = find_dissector("ip");
ipv6_handle = find_dissector("ipv6");
- data_handle = find_dissector("data");
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-pgm.c b/epan/dissectors/packet-pgm.c
index d46689df20..cfb4cabd56 100644
--- a/epan/dissectors/packet-pgm.c
+++ b/epan/dissectors/packet-pgm.c
@@ -246,7 +246,6 @@ static expert_field ei_address_format_invalid = EI_INIT;
static dissector_table_t subdissector_table;
static heur_dissector_list_t heur_subdissector_list;
-static dissector_handle_t data_handle;
static const char *
@@ -795,7 +794,7 @@ decode_pgm_ports(tvbuff_t *tvb, int offset, packet_info *pinfo,
return;
/* Oh, well, we don't know this; dissect it as data. */
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
/*
@@ -1451,7 +1450,6 @@ proto_reg_handoff_pgm(void)
pgm_handle = create_dissector_handle(dissect_pgm, proto_pgm);
dissector_add_for_decode_as("udp.port", pgm_handle);
dissector_add_uint("ip.proto", IP_PROTO_PGM, pgm_handle);
- data_handle = find_dissector("data");
initialized = TRUE;
} else {
if (old_udp_encap_ucast_port != 0) {
diff --git a/epan/dissectors/packet-pktgen.c b/epan/dissectors/packet-pktgen.c
index beeda2b4d6..6f478c841b 100644
--- a/epan/dissectors/packet-pktgen.c
+++ b/epan/dissectors/packet-pktgen.c
@@ -50,9 +50,6 @@ static int hf_pktgen_timestamp = -1;
/* Initialize the subtree pointer */
static gint ett_pktgen = -1;
-/* data dissector handle */
-static dissector_handle_t data_handle;
-
/* entry point */
static gboolean dissect_pktgen(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
@@ -111,7 +108,7 @@ static gboolean dissect_pktgen(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
proto_tree_add_time(pktgen_tree, hf_pktgen_timestamp, tvb, offset - 8, 8, &tstamp);
if (tvb_reported_length_remaining(tvb, offset)) /* random data */
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo,
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo,
pktgen_tree);
}
@@ -188,9 +185,6 @@ void proto_reg_handoff_pktgen(void)
{
/* Register as a heuristic UDP dissector */
heur_dissector_add("udp", dissect_pktgen, "Linux Kernel Packet Generator over UDP", "pktgen_udp", proto_pktgen, HEURISTIC_ENABLE);
-
- /* Find data dissector handle */
- data_handle = find_dissector("data");
}
diff --git a/epan/dissectors/packet-pop.c b/epan/dissectors/packet-pop.c
index eb457be21f..c8978c3162 100644
--- a/epan/dissectors/packet-pop.c
+++ b/epan/dissectors/packet-pop.c
@@ -72,7 +72,6 @@ static gint ett_pop_data_fragment = -1;
static gint ett_pop_data_fragments = -1;
static dissector_handle_t pop_handle;
-static dissector_handle_t data_handle;
static dissector_handle_t imf_handle;
static dissector_handle_t ssl_handle;
@@ -244,7 +243,7 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
/*
* Put the whole packet into the tree as data.
*/
- call_dissector(data_handle,tvb, pinfo, pop_tree);
+ call_data_dissector(tvb, pinfo, pop_tree);
}
return tvb_captured_length(tvb);
@@ -472,7 +471,6 @@ proto_reg_handoff_pop(void)
pop_handle = find_dissector("pop");
dissector_add_uint("tcp.port", TCP_PORT_POP, pop_handle);
ssl_dissector_add(TCP_PORT_SSL_POP, pop_handle);
- data_handle = find_dissector("data");
/* find the IMF dissector */
imf_handle = find_dissector_add_dependency("imf", proto_pop);
diff --git a/epan/dissectors/packet-ppcap.c b/epan/dissectors/packet-ppcap.c
index d736449089..c5398a820f 100644
--- a/epan/dissectors/packet-ppcap.c
+++ b/epan/dissectors/packet-ppcap.c
@@ -42,7 +42,6 @@ static dissector_handle_t sip_handle; /* SIP handle */
static dissector_handle_t sccp_handle; /* SCCP handle */
static dissector_handle_t sgsap_handle; /* SGSAP handle */
static dissector_handle_t gtpv2_handle; /* GTPv2 handle */
-static dissector_handle_t data_handle; /* DATA handle */
static dissector_table_t sccp_ssn_dissector_table;
@@ -576,7 +575,7 @@ dissect_ppcap_payload_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree * ppcap
call_dissector(gtpv2_handle, next_tvb, pinfo, tree); /* calling the GTPv2 handle */
break;
default:
- call_dissector(data_handle, next_tvb, pinfo, tree); /* calling the DATA handle */
+ call_data_dissector(next_tvb, pinfo, tree); /* calling the DATA handle */
break;
}
@@ -698,7 +697,6 @@ void proto_reg_handoff_ppcap(void)
sccp_handle = find_dissector_add_dependency("sccp", proto_ppcap); /* calling the protocol SCCP */
sgsap_handle = find_dissector_add_dependency("sgsap", proto_ppcap); /* calling the protocol SGSAP */
gtpv2_handle = find_dissector_add_dependency("gtpv2", proto_ppcap); /* calling the protocol GTPv2 */
- data_handle = find_dissector("data"); /* calling the protocol DATA */
sccp_ssn_dissector_table = find_dissector_table("sccp.ssn");
diff --git a/epan/dissectors/packet-ppi.c b/epan/dissectors/packet-ppi.c
index 9dba8bc99b..d2f5cbf69a 100644
--- a/epan/dissectors/packet-ppi.c
+++ b/epan/dissectors/packet-ppi.c
@@ -341,7 +341,6 @@ static expert_field ei_ppi_invalid_length = EI_INIT;
static dissector_handle_t ppi_handle;
-static dissector_handle_t data_handle;
static dissector_handle_t ieee80211_radio_handle;
static dissector_handle_t pcap_pktdata_handle;
static dissector_handle_t ppi_gps_handle, ppi_vector_handle, ppi_sensor_handle, ppi_antenna_handle;
@@ -1102,7 +1101,7 @@ dissect_ppi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
next_tvb = tvb_new_subset_remaining(tvb, offset);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "IEEE 802.11n");
col_set_str(pinfo->cinfo, COL_INFO, "Unreassembled A-MPDU data");
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -1498,7 +1497,6 @@ proto_register_ppi(void)
void
proto_reg_handoff_ppi(void)
{
- data_handle = find_dissector("data");
ieee80211_radio_handle = find_dissector_add_dependency("wlan_radio", proto_ppi);
pcap_pktdata_handle = find_dissector_add_dependency("pcap_pktdata", proto_ppi);
ppi_gps_handle = find_dissector_add_dependency("ppi_gps", proto_ppi);
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index 6c796dbdf3..e9f5b864b3 100644
--- a/epan/dissectors/packet-ppp.c
+++ b/epan/dissectors/packet-ppp.c
@@ -446,7 +446,6 @@ static expert_field ei_iphc_crtp_seq_nonzero = EI_INIT;
static dissector_table_t ppp_subdissector_table;
static dissector_handle_t chdlc_handle;
-static dissector_handle_t data_handle;
static dissector_handle_t eth_withfcs_handle;
static dissector_handle_t eth_withoutfcs_handle;
@@ -4234,7 +4233,7 @@ dissect_cp(tvbuff_t *tvb, int proto_id, int proto_subtree_index,
next_tvb = tvb_new_subset_length(tvb, offset, length);
if (!dissector_try_uint(ppp_subdissector_table, protocol, next_tvb,
pinfo, fh_tree)) {
- call_dissector(data_handle, next_tvb, pinfo, fh_tree);
+ call_data_dissector(next_tvb, pinfo, fh_tree);
}
/* Restore the "we're inside an error packet" flag. */
@@ -4347,7 +4346,7 @@ dissect_ppp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
col_add_fstr(pinfo->cinfo, COL_INFO, "PPP %s (0x%04x)",
val_to_str_ext_const(ppp_prot, &ppp_vals_ext, "Unknown"),
ppp_prot);
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -4444,7 +4443,7 @@ dissect_vsnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "0x%04x", PPP_IP);
col_add_fstr(pinfo->cinfo, COL_INFO, "PPP %s (0x%04x)",
val_to_str_ext_const(PPP_IP, &ppp_vals_ext, "Unknown"), PPP_IP);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -4571,7 +4570,7 @@ dissect_bcp_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
break;
default:
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
}
@@ -4810,7 +4809,7 @@ dissect_pppmux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
if (!dissector_try_uint(ppp_subdissector_table, pid, next_tvb, pinfo,
info_tree)) {
- call_dissector(data_handle, next_tvb, pinfo, info_tree);
+ call_data_dissector(next_tvb, pinfo, info_tree);
}
offset += length;
length_remaining -= length;
@@ -4969,7 +4968,7 @@ dissect_iphc_crtp_fh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
if (!dissector_try_uint(ppp_subdissector_table, PPP_IP, next_tvb, pinfo,
info_tree)) {
- call_dissector_only(data_handle, next_tvb, pinfo, info_tree, NULL);
+ call_data_dissector(next_tvb, pinfo, info_tree);
}
return tvb_captured_length(tvb);
}
@@ -5457,7 +5456,7 @@ dissect_ppp_raw_hdlc( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
ppp_tvb = remove_escape_chars(tvb, pinfo, offset,length);
if (ppp_tvb != NULL) {
add_new_data_source(pinfo, ppp_tvb, "PPP Fragment");
- call_dissector(data_handle, ppp_tvb, pinfo, tree);
+ call_data_dissector(ppp_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -5473,7 +5472,7 @@ dissect_ppp_raw_hdlc( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
ppp_tvb = remove_escape_chars(tvb, pinfo, 0, length - 1);
if (ppp_tvb != NULL) {
add_new_data_source(pinfo, ppp_tvb, "PPP Fragment");
- call_dissector(data_handle, ppp_tvb, pinfo, tree);
+ call_data_dissector(ppp_tvb, pinfo, tree);
}
}
}
@@ -5495,7 +5494,7 @@ dissect_ppp_raw_hdlc( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
ppp_tvb = remove_escape_chars(tvb, pinfo, offset, length);
if (ppp_tvb != NULL) {
add_new_data_source(pinfo, ppp_tvb, "PPP Fragment");
- call_dissector(data_handle, ppp_tvb, pinfo, tree);
+ call_data_dissector(ppp_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -5965,7 +5964,6 @@ proto_reg_handoff_ppp(void)
* Get a handle for the CHDLC dissector.
*/
chdlc_handle = find_dissector_add_dependency("chdlc", proto_ppp);
- data_handle = find_dissector("data");
ppp_handle = find_dissector("ppp");
dissector_add_uint("fr.nlpid", NLPID_PPP, ppp_handle);
diff --git a/epan/dissectors/packet-pptp.c b/epan/dissectors/packet-pptp.c
index 75ce4b91c2..be6b0fe946 100644
--- a/epan/dissectors/packet-pptp.c
+++ b/epan/dissectors/packet-pptp.c
@@ -87,8 +87,6 @@ static gint ett_pptp = -1;
static expert_field ei_pptp_incorrect_magic_cookie = EI_INIT;
-static dissector_handle_t data_handle;
-
#define TCP_PORT_PPTP 1723
#define MAGIC_COOKIE 0x1A2B3C4D
@@ -215,7 +213,7 @@ static const value_string disc_resulttype_vals[] = {
static void
dissect_unknown(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- call_dissector(data_handle,tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
}
static void
@@ -964,7 +962,6 @@ proto_reg_handoff_pptp(void)
pptp_handle = create_dissector_handle(dissect_pptp, proto_pptp);
dissector_add_uint("tcp.port", TCP_PORT_PPTP, pptp_handle);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-pw-atm.c b/epan/dissectors/packet-pw-atm.c
index 39a3de9e1a..93e4ab7956 100644
--- a/epan/dissectors/packet-pw-atm.c
+++ b/epan/dissectors/packet-pw-atm.c
@@ -125,7 +125,6 @@ static dissector_handle_t dh_atm_truncated;
static dissector_handle_t dh_atm_untruncated;
static dissector_handle_t dh_atm_oam_cell;
static dissector_handle_t dh_padding;
-static dissector_handle_t dh_data;
#define PTI_IS_ADMIN(pti) ((pti) == 4 || (pti) == 5 || (pti) == 6) /*see atm_pt_vals[]*/
@@ -1615,7 +1614,7 @@ dissect_cell(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * data
tvbuff_t* tvb_d;
tree2 = proto_item_add_subtree(item, ett_cell);
tvb_d = tvb_new_subset(tvb, 0, dissect_size, -1);
- call_dissector(dh_data, tvb_d, pinfo, tree2);
+ call_data_dissector(tvb_d, pinfo, tree2);
item = proto_tree_add_int(tree2, hf_cell_payload_len, tvb, 0, 0, dissect_size);
PROTO_ITEM_SET_HIDDEN(item);
}
@@ -1965,7 +1964,6 @@ proto_reg_handoff_pw_atm_ata(void)
dh_atm_untruncated = find_dissector("atm_pw_untruncated");
dh_atm_oam_cell = find_dissector("atm_pw_oam_cell");
dh_padding = find_dissector("pw_padding");
- dh_data = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-pw-cesopsn.c b/epan/dissectors/packet-pw-cesopsn.c
index 8d347d25e2..085c24fca8 100644
--- a/epan/dissectors/packet-pw-cesopsn.c
+++ b/epan/dissectors/packet-pw-cesopsn.c
@@ -62,7 +62,6 @@ static expert_field ei_pref_cw_len = EI_INIT;
static expert_field ei_cw_lm = EI_INIT;
static expert_field ei_packet_size_too_small = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t pw_padding_handle;
const char pwc_longname_pw_cesopsn[] = "CESoPSN basic NxDS0 mode (no RTP support)";
@@ -346,7 +345,7 @@ void dissect_pw_cesopsn( tvbuff_t * tvb_original
"CESoPSN packet payload size must be multiple of 8");
}
tree2 = proto_item_add_subtree(item2, ett);
- call_dissector(data_handle, tvb, pinfo, tree2);
+ call_data_dissector(tvb, pinfo, tree2);
item2 = proto_tree_add_int(tree2, hf_payload_l, tvb, 0, 0
,(int)payload_size); /* allow filtering */
PROTO_ITEM_SET_HIDDEN(item2);
@@ -452,7 +451,6 @@ void proto_reg_handoff_pw_cesopsn(void)
{
dissector_handle_t pw_cesopsn_mpls_handle;
- data_handle = find_dissector("data");
pw_padding_handle = find_dissector_add_dependency("pw_padding", proto);
/* For Decode As */
diff --git a/epan/dissectors/packet-pw-common.c b/epan/dissectors/packet-pw-common.c
index e1b1a0e071..deb68fd7ed 100644
--- a/epan/dissectors/packet-pw-common.c
+++ b/epan/dissectors/packet-pw-common.c
@@ -87,7 +87,6 @@ void pwc_item_append_text_n_items(proto_item* item, const int n, const char * co
static gint proto_pw_padding = -1;
static gint ett = -1;
static int hf_padding_len = -1;
-static dissector_handle_t dh_data;
static
int dissect_pw_padding(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
@@ -100,7 +99,7 @@ int dissect_pw_padding(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, v
pwc_item_append_text_n_items(item,size,"byte");
tree_p = proto_item_add_subtree(item, ett);
- call_dissector(dh_data, tvb, pinfo, tree_p);
+ call_data_dissector(tvb, pinfo, tree_p);
item = proto_tree_add_int(tree_p, hf_padding_len, tvb, 0, 0, size);
PROTO_ITEM_SET_HIDDEN(item); /*allow filtering*/
@@ -124,11 +123,6 @@ void proto_register_pw_padding(void)
}
-void proto_reg_handoff_pw_padding(void)
-{
- dh_data = find_dissector("data");
-}
-
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissectors/packet-pw-satop.c b/epan/dissectors/packet-pw-satop.c
index db676a35c5..a66dc070a1 100644
--- a/epan/dissectors/packet-pw-satop.c
+++ b/epan/dissectors/packet-pw-satop.c
@@ -61,7 +61,6 @@ static expert_field ei_cw_frg = EI_INIT;
static expert_field ei_cw_bits03 = EI_INIT;
static expert_field ei_cw_packet_size_too_small = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t pw_padding_handle;
const char pwc_longname_pw_satop[] = "SAToP (no RTP support)";
@@ -358,7 +357,7 @@ void dissect_pw_satop(tvbuff_t * tvb_original
}
proto_item_append_text(item2, "%s", s);
tree3 = proto_item_add_subtree(item2, ett);
- call_dissector(data_handle, tvb, pinfo, tree3);
+ call_data_dissector(tvb, pinfo, tree3);
item2 = proto_tree_add_int(tree3, hf_payload_l, tvb, 0, 0
,(int)payload_size); /* allow filtering */
PROTO_ITEM_SET_HIDDEN(item2);
@@ -468,7 +467,6 @@ void proto_reg_handoff_pw_satop(void)
{
dissector_handle_t pw_satop_mpls_handle;
- data_handle = find_dissector("data");
pw_padding_handle = find_dissector_add_dependency("pw_padding", proto);
/* For Decode As */
diff --git a/epan/dissectors/packet-q931.c b/epan/dissectors/packet-q931.c
index 412b9608b3..69901a50c7 100644
--- a/epan/dissectors/packet-q931.c
+++ b/epan/dissectors/packet-q931.c
@@ -271,7 +271,6 @@ static gboolean q931_desegment = TRUE;
static dissector_handle_t h225_handle;
static dissector_handle_t q931_tpkt_handle;
static dissector_handle_t q931_tpkt_pdu_handle;
-static dissector_handle_t data_handle = NULL;
static heur_dissector_list_t q931_user_heur_subdissector_list;
@@ -2422,7 +2421,7 @@ dissect_q931_user_user_ie(tvbuff_t *tvb, packet_info *pinfo, int offset, int len
next_tvb = tvb_new_subset_length(tvb, offset, len);
proto_tree_add_uint_format_value(tree, hf_q931_user_information_len, tvb, offset, len, len, "%d octets", len);
if (!dissector_try_heuristic(q931_user_heur_subdissector_list, next_tvb, pinfo, tree, &hdtbl_entry, NULL)) {
- call_dissector_only(data_handle, next_tvb, pinfo, tree, NULL);
+ call_data_dissector(next_tvb, pinfo, tree);
}
break;
@@ -4012,8 +4011,6 @@ proto_reg_handoff_q931(void)
*/
h225_handle = find_dissector_add_dependency("h225", proto_q931);
- data_handle = find_dissector("data");
-
/*
* For H.323.
*/
diff --git a/epan/dissectors/packet-quake.c b/epan/dissectors/packet-quake.c
index 456d7a3aba..58c57d6994 100644
--- a/epan/dissectors/packet-quake.c
+++ b/epan/dissectors/packet-quake.c
@@ -76,7 +76,6 @@ static gint ett_quake_control_colors = -1;
static gint ett_quake_flags = -1;
static dissector_handle_t quake_handle;
-static dissector_handle_t data_handle;
/* I took these names directly out of the Q1 source. */
#define NET_HEADERSIZE 8
@@ -381,7 +380,7 @@ dissect_quake_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
(next_tvb, control_tree);
break;
default:
- call_dissector(data_handle,next_tvb, pinfo, control_tree);
+ call_data_dissector(next_tvb, pinfo, control_tree);
break;
}
}
@@ -436,7 +435,7 @@ dissect_quake(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
tvb, 4, 4, sequence);
next_tvb = tvb_new_subset_remaining(tvb, 8);
- call_dissector(data_handle,next_tvb, pinfo, quake_tree);
+ call_data_dissector(next_tvb, pinfo, quake_tree);
return tvb_captured_length(tvb);
}
@@ -607,7 +606,6 @@ proto_reg_handoff_quake(void)
if (!Initialized) {
quake_handle = create_dissector_handle(dissect_quake, proto_quake);
- data_handle = find_dissector("data");
Initialized=TRUE;
} else {
dissector_delete_uint("udp.port", ServerPort, quake_handle);
diff --git a/epan/dissectors/packet-quake2.c b/epan/dissectors/packet-quake2.c
index 62f7b4e4b5..bb061a9f94 100644
--- a/epan/dissectors/packet-quake2.c
+++ b/epan/dissectors/packet-quake2.c
@@ -79,8 +79,6 @@ static gint ett_quake2_game_clc_cmd_move_bitfield = -1;
static gint ett_quake2_game_clc_cmd_move_moves = -1;
-static dissector_handle_t data_handle;
-
#define PORT_MASTER 27910
static guint gbl_quake2ServerPort=PORT_MASTER;
@@ -543,7 +541,7 @@ dissect_quake2_server_commands(tvbuff_t *tvb, packet_info *pinfo,
default:
break;
}
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
@@ -856,7 +854,6 @@ proto_reg_handoff_quake2(void)
if (!Initialized) {
quake2_handle = create_dissector_handle(dissect_quake2,
proto_quake2);
- data_handle = find_dissector("data");
Initialized=TRUE;
} else {
dissector_delete_uint("udp.port", ServerPort, quake2_handle);
diff --git a/epan/dissectors/packet-quake3.c b/epan/dissectors/packet-quake3.c
index 5d5e6b8a6c..ed39a3c7ec 100644
--- a/epan/dissectors/packet-quake3.c
+++ b/epan/dissectors/packet-quake3.c
@@ -68,8 +68,6 @@ static gint ett_quake3_game_seq2 = -1;
static gint ett_quake3_game_clc = -1;
static gint ett_quake3_game_svc = -1;
-static dissector_handle_t data_handle;
-
#define QUAKE3_SERVER_PORT 27960
#define QUAKE3_MASTER_PORT 27950
static guint gbl_quake3_server_port=QUAKE3_SERVER_PORT;
@@ -332,7 +330,7 @@ dissect_quake3_client_commands(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree)
{
/* this shouldn't be too difficult */
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
@@ -342,7 +340,7 @@ dissect_quake3_server_commands(tvbuff_t *tvb, packet_info *pinfo,
{
/* It is totally forbidden to decode this any further,
I won't do it. */
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
@@ -590,7 +588,6 @@ proto_reg_handoff_quake3(void)
if (!initialized) {
quake3_handle = create_dissector_handle(dissect_quake3,
proto_quake3);
- data_handle = find_dissector("data");
initialized=TRUE;
} else {
for (i=0;i<4;i++)
diff --git a/epan/dissectors/packet-quakeworld.c b/epan/dissectors/packet-quakeworld.c
index 5045e0a009..d22e3d13d1 100644
--- a/epan/dissectors/packet-quakeworld.c
+++ b/epan/dissectors/packet-quakeworld.c
@@ -69,8 +69,6 @@ static gint ett_quakeworld_game_seq2 = -1;
static gint ett_quakeworld_game_clc = -1;
static gint ett_quakeworld_game_svc = -1;
-static dissector_handle_t data_handle;
-
/*
helper functions, they may ave to go somewhere else
they are mostly copied without change from
@@ -542,7 +540,7 @@ dissect_quakeworld_client_commands(tvbuff_t *tvb, packet_info *pinfo,
the information from my QWD specs:
http://www.planetquake.com/demospecs/qwd/
*/
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
@@ -554,7 +552,7 @@ dissect_quakeworld_server_commands(tvbuff_t *tvb, packet_info *pinfo,
the information from my QWD specs:
http://www.planetquake.com/demospecs/qwd/
*/
- call_dissector(data_handle,tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
}
@@ -823,7 +821,6 @@ proto_reg_handoff_quakeworld(void)
if (!Initialized) {
quakeworld_handle = create_dissector_handle(dissect_quakeworld,
proto_quakeworld);
- data_handle = find_dissector("data");
Initialized=TRUE;
} else {
dissector_delete_uint("udp.port", ServerPort, quakeworld_handle);
diff --git a/epan/dissectors/packet-raw.c b/epan/dissectors/packet-raw.c
index 60bb3a035b..08b5c7f109 100644
--- a/epan/dissectors/packet-raw.c
+++ b/epan/dissectors/packet-raw.c
@@ -41,7 +41,6 @@ static const char zeroes[10] = {0,0,0,0,0,0,0,0,0,0};
static dissector_handle_t raw_handle;
static dissector_handle_t ip_handle;
static dissector_handle_t ipv6_handle;
-static dissector_handle_t data_handle;
static dissector_handle_t ppp_hdlc_handle;
static gboolean
@@ -157,7 +156,7 @@ dissect_raw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
default:
/* None of the above. */
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
}
}
@@ -186,7 +185,6 @@ proto_reg_handoff_raw(void)
*/
ip_handle = find_dissector_add_dependency("ip", proto_raw);
ipv6_handle = find_dissector_add_dependency("ipv6", proto_raw);
- data_handle = find_dissector("data");
ppp_hdlc_handle = find_dissector_add_dependency("ppp_hdlc", proto_raw);
dissector_add_uint("wtap_encap", WTAP_ENCAP_RAW_IP, raw_handle);
register_capture_dissector("wtap_encap", WTAP_ENCAP_RAW_IP, capture_raw, proto_raw);
diff --git a/epan/dissectors/packet-redback.c b/epan/dissectors/packet-redback.c
index 4f5b5aa5b7..7c363a4d3b 100644
--- a/epan/dissectors/packet-redback.c
+++ b/epan/dissectors/packet-redback.c
@@ -47,7 +47,6 @@ static dissector_handle_t clnp_handle;
static dissector_handle_t arp_handle;
static dissector_handle_t ppp_handle;
static dissector_handle_t ppphdlc_handle;
-static dissector_handle_t data_handle;
static header_field_info *hfi_redback = NULL;
@@ -146,7 +145,7 @@ dissect_redback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
if(dissector_try_uint(osinl_excl_subdissector_table, nlpid, next_tvb, pinfo, tree))
break;
next_tvb = tvb_new_subset_remaining(tvb, dataoff);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
break;
case 0x06: {
@@ -238,7 +237,6 @@ proto_reg_handoff_redback(void)
ipv4_handle = find_dissector_add_dependency("ip", hfi_redback->id);
ipv6_handle = find_dissector_add_dependency("ipv6", hfi_redback->id);
- data_handle = find_dissector("data");
ethnofcs_handle = find_dissector_add_dependency("eth_withoutfcs", hfi_redback->id);
clnp_handle = find_dissector_add_dependency("clnp", hfi_redback->id);
arp_handle = find_dissector_add_dependency("arp", hfi_redback->id);
diff --git a/epan/dissectors/packet-reload.c b/epan/dissectors/packet-reload.c
index 3a6c2c7460..0ce7c0f6b8 100644
--- a/epan/dissectors/packet-reload.c
+++ b/epan/dissectors/packet-reload.c
@@ -324,7 +324,6 @@ static int hf_reload_joinans = -1;
static int hf_reload_leavereq = -1;
static int hf_reload_leavereq_leaving_peer_id = -1;
-static dissector_handle_t data_handle;
static dissector_handle_t xml_handle;
@@ -4151,7 +4150,7 @@ dissect_reload_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
}
save_fragmented = pinfo->fragmented;
pinfo->fragmented = TRUE;
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
pinfo->fragmented = save_fragmented;
return effective_length;
}
@@ -5937,8 +5936,6 @@ proto_register_reload(void)
void
proto_reg_handoff_reload(void)
{
-
- data_handle = find_dissector("data");
xml_handle = find_dissector_add_dependency("xml", proto_reload);
heur_dissector_add("udp", dissect_reload_heur, "RELOAD over UDP", "reload_udp", proto_reload, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-rfid-felica.c b/epan/dissectors/packet-rfid-felica.c
index 5c4d673579..5e72a7b683 100644
--- a/epan/dissectors/packet-rfid-felica.c
+++ b/epan/dissectors/packet-rfid-felica.c
@@ -36,7 +36,6 @@
#include <epan/packet.h>
void proto_register_felica(void);
-void proto_reg_handoff_felica(void);
static int proto_felica = -1;
@@ -217,8 +216,6 @@ static const value_string felica_sys_codes[] = {
{0x00, NULL}
};
-static dissector_handle_t data_handle=NULL;
-
/* Subtree handles: set by register_subtree_array */
static gint ett_felica = -1;
@@ -313,7 +310,7 @@ static int dissect_felica(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
proto_tree_add_item(felica_tree, hf_felica_nbr_of_blocks, tvb, 11, 1, ENC_BIG_ENDIAN);
}
rwe_resp_data_tvb = tvb_new_subset_remaining(tvb, 12);
- call_dissector(data_handle, rwe_resp_data_tvb, pinfo, tree);
+ call_data_dissector(rwe_resp_data_tvb, pinfo, tree);
break;
case CMD_WRITE_WO_ENCRYPTION:
@@ -549,12 +546,6 @@ proto_register_felica(void)
register_dissector("felica", dissect_felica, proto_felica);
}
-/* Handler registration */
-void
-proto_reg_handoff_felica(void)
-{
- data_handle = find_dissector("data");
-}
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissectors/packet-rmcp.c b/epan/dissectors/packet-rmcp.c
index 74387e8aa3..910c91765d 100644
--- a/epan/dissectors/packet-rmcp.c
+++ b/epan/dissectors/packet-rmcp.c
@@ -57,7 +57,6 @@ static gint ett_rmcp_typeclass = -1;
static gint ett_rsp = -1;
-static dissector_handle_t data_handle;
static dissector_table_t rmcp_dissector_table;
#define UDP_PORT_RMCP 623
@@ -142,7 +141,7 @@ dissect_rmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
if (!dissector_try_uint(rmcp_dissector_table, rmcp_class, next_tvb, pinfo,
tree)) {
- len = call_dissector(data_handle, next_tvb, pinfo, tree);
+ len = call_data_dissector(next_tvb, pinfo, tree);
if (len < tvb_reported_length(next_tvb)) {
proto_tree_add_item(tree, hf_rmcp_trailer, tvb, 4 + len, -1, ENC_NA);
}
@@ -255,8 +254,6 @@ proto_reg_handoff_rmcp(void)
{
dissector_handle_t rmcp_handle;
- data_handle = find_dissector("data");
-
rmcp_handle = create_dissector_handle(dissect_rmcp, proto_rmcp);
dissector_add_uint("udp.port", UDP_PORT_RMCP, rmcp_handle);
}
diff --git a/epan/dissectors/packet-rmp.c b/epan/dissectors/packet-rmp.c
index 90d3947b4a..d4d2ba8be1 100644
--- a/epan/dissectors/packet-rmp.c
+++ b/epan/dissectors/packet-rmp.c
@@ -30,8 +30,6 @@
void proto_register_rmp(void);
void proto_reg_handoff_rmp(void);
-static dissector_handle_t data_handle;
-
static int proto_rmp = -1;
static int hf_rmp_type = -1;
@@ -136,8 +134,7 @@ dissect_rmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_tree_add_item(rmp_tree,
hf_rmp_filename, tvb, 30, 1, ENC_ASCII|ENC_BIG_ENDIAN);
if(tvb_offset_exists(tvb, len+31))
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, len+31),
+ call_data_dissector(tvb_new_subset_remaining(tvb, len+31),
pinfo, tree);
break;
@@ -154,8 +151,7 @@ dissect_rmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_tree_add_item(rmp_tree,
hf_rmp_filename, tvb, 10, 1, ENC_ASCII|ENC_BIG_ENDIAN);
if(tvb_offset_exists(tvb, len+11))
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, len+11),
+ call_data_dissector(tvb_new_subset_remaining(tvb, len+11),
pinfo, tree);
break;
@@ -169,8 +165,7 @@ dissect_rmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_tree_add_item(rmp_tree,
hf_rmp_size, tvb, 8, 2, ENC_BIG_ENDIAN);
if(tvb_offset_exists(tvb, 10))
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, 10),
+ call_data_dissector(tvb_new_subset_remaining(tvb, 10),
pinfo, tree);
break;
@@ -181,7 +176,7 @@ dissect_rmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
hf_rmp_offset, tvb, 2, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(rmp_tree,
hf_rmp_sessionid, tvb, 6, 2, ENC_BIG_ENDIAN);
- call_dissector(data_handle, tvb_new_subset_remaining(tvb,
+ call_data_dissector(tvb_new_subset_remaining(tvb,
8), pinfo, rmp_tree);
break;
@@ -193,13 +188,11 @@ dissect_rmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_tree_add_item(rmp_tree,
hf_rmp_sessionid, tvb, 6, 2, ENC_BIG_ENDIAN);
if(tvb_offset_exists(tvb, 8))
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, 6),
+ call_data_dissector(tvb_new_subset_remaining(tvb, 6),
pinfo, tree);
break;
default:
- call_dissector(data_handle, tvb_new_subset_remaining(tvb,
- 1), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, 1), pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -257,8 +250,6 @@ proto_reg_handoff_rmp(void)
{
dissector_handle_t rmp_handle;
- data_handle = find_dissector("data");
-
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-rohc.c b/epan/dissectors/packet-rohc.c
index f67a9df6af..bcfcbc0434 100644
--- a/epan/dissectors/packet-rohc.c
+++ b/epan/dissectors/packet-rohc.c
@@ -178,7 +178,6 @@ static dissector_handle_t rohc_handle;
static dissector_handle_t ip_handle;
static dissector_handle_t ipv6_handle;
-static dissector_handle_t data_handle;
typedef struct _rohc_cid_context_t
{
@@ -2236,7 +2235,7 @@ start_over:
}
payload_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector_only(data_handle, payload_tvb, pinfo, rohc_tree, NULL);
+ call_data_dissector(payload_tvb, pinfo, rohc_tree);
return tvb_captured_length(tvb);
}
if((oct&0xff) == 0xf8){
@@ -2248,7 +2247,7 @@ start_over:
}
payload_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector_only(data_handle, payload_tvb, pinfo, rohc_tree, NULL);
+ call_data_dissector(payload_tvb, pinfo, rohc_tree);
return tvb_captured_length(tvb);
}
@@ -2304,7 +2303,7 @@ start_over:
call_dissector(ipv6_handle, next_tvb, pinfo, tree);
}
else {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
col_prepend_fstr(pinfo->cinfo, COL_PROTOCOL, "ROHC <");
col_append_str(pinfo->cinfo, COL_PROTOCOL, ">");
@@ -2340,7 +2339,7 @@ start_over:
}
payload_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector_only(data_handle, payload_tvb, pinfo, tree, NULL);
+ call_data_dissector(payload_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -2999,7 +2998,6 @@ proto_reg_handoff_rohc(void)
ip_handle = find_dissector_add_dependency("ip", proto_rohc);
ipv6_handle = find_dissector_add_dependency("ipv6", proto_rohc);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-rpcap.c b/epan/dissectors/packet-rpcap.c
index 26ff59a0e6..fc510cba76 100644
--- a/epan/dissectors/packet-rpcap.c
+++ b/epan/dissectors/packet-rpcap.c
@@ -216,7 +216,6 @@ static expert_field ei_no_more_data = EI_INIT;
static expert_field ei_caplen_too_big = EI_INIT;
static dissector_handle_t pcap_pktdata_handle;
-static dissector_handle_t data_handle;
/* User definable values */
static gboolean rpcap_desegment = TRUE;
@@ -900,7 +899,7 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree,
if (linktype == -1) {
proto_item_append_text (ti, ", Unknown link-layer type");
}
- call_dissector (data_handle, new_tvb, pinfo, top_tree);
+ call_data_dissector(new_tvb, pinfo, top_tree);
}
}
@@ -987,7 +986,7 @@ dissect_rpcap (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree, void* da
/* Yet unknown, dump as data */
proto_item_set_len (ti, 8);
new_tvb = tvb_new_subset_remaining (tvb, offset);
- call_dissector (data_handle, new_tvb, pinfo, top_tree);
+ call_data_dissector(new_tvb, pinfo, top_tree);
}
break;
}
@@ -1484,7 +1483,6 @@ proto_reg_handoff_rpcap (void)
if (!rpcap_prefs_initialized) {
pcap_pktdata_handle = find_dissector_add_dependency("pcap_pktdata", proto_rpcap);
- data_handle = find_dissector ("data");
rpcap_prefs_initialized = TRUE;
heur_dissector_add ("tcp", dissect_rpcap_heur_tcp, "RPCAP over TCP", "rpcap_tcp", proto_rpcap, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-rpcrdma.c b/epan/dissectors/packet-rpcrdma.c
index ca716972fc..f0b263d9cc 100644
--- a/epan/dissectors/packet-rpcrdma.c
+++ b/epan/dissectors/packet-rpcrdma.c
@@ -54,7 +54,6 @@ void proto_register_rpcordma(void);
static int proto_rpcordma = -1;
static dissector_handle_t ib_handler;
-static dissector_handle_t data_handler;
static dissector_handle_t rpc_handler;
static dissector_handle_t rpcordma_handler;
static int proto_ib = -1;
@@ -372,7 +371,7 @@ dissect_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
default:
next_tvb = tvb_new_subset_remaining(tvb, offset);
- return call_dissector(data_handler, next_tvb, pinfo, tree);
+ return call_data_dissector(next_tvb, pinfo, tree);
}
break;
}
@@ -592,7 +591,6 @@ proto_reg_handoff_rpcordma(void)
manual_addr_data[0] = wmem_alloc(wmem_epan_scope(), GID_SIZE);
manual_addr_data[1] = wmem_alloc(wmem_epan_scope(), GID_SIZE);
- data_handler = find_dissector("data");
rpc_handler = find_dissector_add_dependency("rpc", proto_rpcordma);
ib_handler = find_dissector_add_dependency("infiniband", proto_rpcordma);
proto_ib = dissector_handle_get_protocol_index(ib_handler);
diff --git a/epan/dissectors/packet-rpl.c b/epan/dissectors/packet-rpl.c
index eeda6619e2..584c020f03 100644
--- a/epan/dissectors/packet-rpl.c
+++ b/epan/dissectors/packet-rpl.c
@@ -92,8 +92,6 @@ static const value_string rpl_type_vals[] = {
{ 0x0, NULL }
};
-static dissector_handle_t data_handle;
-
static void
dissect_rpl_container(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
@@ -249,14 +247,12 @@ dissect_rpl_container(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
default:
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, 4), pinfo,
+ call_data_dissector(tvb_new_subset_remaining(tvb, 4), pinfo,
tree);
break;
}
if (tvb_reported_length(tvb) > offset)
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
}
static int
@@ -283,8 +279,7 @@ dissect_rpl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
dissect_rpl_container(next_tvb, pinfo, rpl_tree);
if (tvb_reported_length(tvb) > rpl_len)
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, rpl_len), pinfo,
+ call_data_dissector(tvb_new_subset_remaining(tvb, rpl_len), pinfo,
tree);
return tvb_captured_length(tvb);
@@ -410,7 +405,6 @@ proto_reg_handoff_rpl(void)
{
dissector_handle_t rpl_handle;
- data_handle = find_dissector("data");
rpl_handle = find_dissector("rpl");
dissector_add_uint("llc.dsap", SAP_RPL, rpl_handle);
}
diff --git a/epan/dissectors/packet-rtacser.c b/epan/dissectors/packet-rtacser.c
index f1e59e79ea..7b99337e6a 100644
--- a/epan/dissectors/packet-rtacser.c
+++ b/epan/dissectors/packet-rtacser.c
@@ -86,7 +86,6 @@ static gint ett_rtacser_cl = -1;
static dissector_handle_t rtacser_handle;
static dissector_table_t subdissector_table;
-static dissector_handle_t data_handle;
#define RTACSER_HEADER_LEN 12
@@ -217,7 +216,7 @@ dissect_rtacser_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Functionality for choosing subdissector is controlled through Decode As as CAN doesn't
have a unique identifier to determine subdissector */
if (!dissector_try_uint(subdissector_table, 0, payload_tvb, pinfo, tree)){
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
}
}
}
@@ -319,8 +318,6 @@ void
proto_reg_handoff_rtacser(void)
{
dissector_add_uint("wtap_encap", WTAP_ENCAP_RTAC_SERIAL, rtacser_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c
index 6780bbfbbb..d6087427d3 100644
--- a/epan/dissectors/packet-rtp.c
+++ b/epan/dissectors/packet-rtp.c
@@ -292,8 +292,6 @@ static const enum_val_t rtp_version0_types[] = {
};
static gint global_rtp_version0_type = 0;
-static dissector_handle_t data_handle;
-
/* Forward declaration we need below */
void proto_register_rtp(void);
void proto_reg_handoff_rtp(void);
@@ -1495,7 +1493,7 @@ process_rtp_payload(tvbuff_t *newtvb, packet_info *pinfo, proto_tree *tree,
if (p_conv_data->bta2dp_info->codec_dissector)
call_dissector_with_data(p_conv_data->bta2dp_info->codec_dissector, nexttvb, pinfo, tree, p_conv_data->bta2dp_info);
else
- call_dissector(data_handle, nexttvb, pinfo, tree);
+ call_data_dissector(nexttvb, pinfo, tree);
} else if (p_conv_data && p_conv_data->btvdp_info) {
tvbuff_t *nexttvb;
gint suboffset = 0;
@@ -1512,7 +1510,7 @@ process_rtp_payload(tvbuff_t *newtvb, packet_info *pinfo, proto_tree *tree,
if (p_conv_data->btvdp_info->codec_dissector)
call_dissector_with_data(p_conv_data->btvdp_info->codec_dissector, nexttvb, pinfo, tree, p_conv_data->btvdp_info);
else
- call_dissector(data_handle, nexttvb, pinfo, tree);
+ call_data_dissector(nexttvb, pinfo, tree);
}
/* if we don't found, it is static OR could be set static from the preferences */
@@ -2288,8 +2286,7 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
* item.
*/
proto_tree_add_expert(rtp_tree, pinfo, &ei_rtp_padding_missing, tvb, 0, 0);
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset),
pinfo, rtp_tree);
return tvb_captured_length(tvb);
}
@@ -3746,7 +3743,6 @@ proto_reg_handoff_rtp(void)
rtcp_handle = find_dissector_add_dependency("rtcp", proto_rtp);
- data_handle = find_dissector("data");
stun_handle = find_dissector_add_dependency("stun-udp", proto_rtp);
classicstun_handle = find_dissector_add_dependency("classicstun", proto_rtp);
classicstun_heur_handle = find_dissector_add_dependency("classicstun-heur", proto_rtp);
diff --git a/epan/dissectors/packet-rudp.c b/epan/dissectors/packet-rudp.c
index b6dd6d8ef7..2f0b12109f 100644
--- a/epan/dissectors/packet-rudp.c
+++ b/epan/dissectors/packet-rudp.c
@@ -80,8 +80,6 @@ static gint ett_rudp = -1;
static gint ett_rudp_flags = -1;
static dissector_handle_t sm_handle = NULL;
-static dissector_handle_t data_handle = NULL;
-
static int
dissect_rudp(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree, void* data _U_)
@@ -125,7 +123,7 @@ dissect_rudp(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree, void* dat
* in live captures */
if (hlen > 6) {
next_tvb = tvb_new_subset_length(tvb, 6, hlen-6);
- call_dissector(data_handle, next_tvb, pinfo, rudp_tree);
+ call_data_dissector(next_tvb, pinfo, rudp_tree);
}
next_tvb = tvb_new_subset_remaining(tvb, hlen);
@@ -248,7 +246,6 @@ proto_reg_handoff_rudp(void) {
rudp_handle = create_dissector_handle(dissect_rudp, proto_rudp);
dissector_add_for_decode_as("udp.port", rudp_handle);
sm_handle = find_dissector_add_dependency("sm", proto_rudp);
- data_handle = find_dissector("data");
initialized = TRUE;
} else {
if (saved_udp_port != 0) {
diff --git a/epan/dissectors/packet-s5066sis.c b/epan/dissectors/packet-s5066sis.c
index 1ec097017c..65fe8e65bf 100644
--- a/epan/dissectors/packet-s5066sis.c
+++ b/epan/dissectors/packet-s5066sis.c
@@ -79,7 +79,6 @@ static guint dissect_s5066_26(tvbuff_t *tvb, guint offset, proto_tree *tree, gui
static guint dissect_s5066_27(tvbuff_t *tvb, guint offset, proto_tree *tree, guint *client_app_id);
static gint proto_s5066 = -1;
-static dissector_handle_t data_handle;
static dissector_table_t s5066sis_dissector_table;
@@ -1053,7 +1052,7 @@ dissect_s5066_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
next_tvb = tvb_new_subset(tvb, offset, MIN(available_length, reported_length), reported_length);
if(dissector_try_uint(s5066sis_dissector_table, client_app_id, next_tvb, pinfo, tree) == 0) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -1460,7 +1459,6 @@ proto_reg_handoff_s5066(void)
if (!Initialized) {
s5066_tcp_handle = create_dissector_handle(dissect_s5066_tcp, proto_s5066);
- data_handle = find_dissector("data");
Initialized = TRUE;
} else {
dissector_delete_uint("tcp.port", saved_s5066_port, s5066_tcp_handle);
diff --git a/epan/dissectors/packet-scop.c b/epan/dissectors/packet-scop.c
index 8456393a89..11d62beca5 100644
--- a/epan/dissectors/packet-scop.c
+++ b/epan/dissectors/packet-scop.c
@@ -121,7 +121,6 @@ static guint32 gPREF_scop_port = SCOP_DEFAULT_PORT;
static guint32 gPREF_scop_port_secured = SCOP_DEFAULT_PORT_SECURED;
/* Dissector handle */
-static dissector_handle_t data_handle;
static dissector_handle_t ieee802154_handle;
/*FUNCTION:------------------------------------------------------
@@ -199,7 +198,7 @@ dissect_scop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
/* Nothing yet defined for the gateway. Fall-Through. */
default:
/* Unknown Service Type. */
- call_dissector(data_handle, tvb_new_subset_remaining(next_tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(next_tvb, offset), pinfo, tree);
break;
}
@@ -288,7 +287,7 @@ dissect_scop_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (offset < tvb_reported_length(tvb)) {
tvbuff_t *payload_tvb = tvb_new_subset_remaining(tvb, offset);
proto_tree *root = proto_tree_get_root(tree);
- call_dissector(data_handle, payload_tvb, pinfo, root);
+ call_data_dissector(payload_tvb, pinfo, root);
}
} /* dissect_scop_zip() */
@@ -404,7 +403,6 @@ void proto_reg_handoff_scop(void)
scop_udp_handle = find_dissector("scop.udp");
scop_tcp_handle = find_dissector("scop.tcp");
ieee802154_handle = find_dissector_add_dependency("wpan_nofcs", proto_scop);
- data_handle = find_dissector("data");
inited = TRUE;
} else {
dissector_delete_uint("udp.port", lastPort, scop_udp_handle);
diff --git a/epan/dissectors/packet-scsi.c b/epan/dissectors/packet-scsi.c
index 9de31ac54c..3851c5da93 100644
--- a/epan/dissectors/packet-scsi.c
+++ b/epan/dissectors/packet-scsi.c
@@ -96,7 +96,6 @@
#include "packet-scsi-smc.h"
void proto_register_scsi(void);
-void proto_reg_handoff_scsi(void);
static int proto_scsi = -1;
static int hf_scsi_inq_control_vendor_specific = -1;
@@ -2812,8 +2811,6 @@ typedef struct _cmdset_t {
static cmdset_t *get_cmdset_data(itlq_nexus_t *itlq, itl_nexus_t *itl);
-static dissector_handle_t data_handle;
-
static void
dissect_naa_designator(proto_tree *tree, tvbuff_t *tvb, guint offset, guint len)
{
@@ -6238,7 +6235,7 @@ dissect_scsi_cdb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
spc[opcode].func(tvb, pinfo, scsi_tree, offset+1,
TRUE, TRUE, 0, cdata);
} else {
- call_dissector(data_handle, tvb, pinfo, scsi_tree);
+ call_data_dissector(tvb, pinfo, scsi_tree);
}
pinfo->current_proto = old_proto;
@@ -6337,7 +6334,7 @@ dissect_scsi_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* dissect the data.
*/
if ( !itlq->first_exchange_frame ) {
- call_dissector(data_handle, tvb, pinfo, scsi_tree);
+ call_data_dissector(tvb, pinfo, scsi_tree);
goto end_of_payload;
}
@@ -6346,7 +6343,7 @@ dissect_scsi_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
*/
if (!scsi_defragment) {
if (relative_offset) {
- call_dissector(data_handle, tvb, pinfo, scsi_tree);
+ call_data_dissector(tvb, pinfo, scsi_tree);
goto end_of_payload;
} else {
goto dissect_the_payload;
@@ -6358,7 +6355,7 @@ dissect_scsi_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
*/
if (tvb_captured_length_remaining(tvb, offset) != tvb_reported_length_remaining(tvb, offset)) {
if (relative_offset) {
- call_dissector(data_handle, tvb, pinfo, scsi_tree);
+ call_data_dissector(tvb, pinfo, scsi_tree);
goto end_of_payload;
} else {
goto dissect_the_payload;
@@ -6441,7 +6438,7 @@ dissect_the_payload:
spc[opcode].func(next_tvb, pinfo, scsi_tree, offset,
isreq, FALSE, payload_len, cdata);
} else { /* don't know this CDB */
- call_dissector(data_handle, next_tvb, pinfo, scsi_tree);
+ call_data_dissector(next_tvb, pinfo, scsi_tree);
}
}
@@ -7774,16 +7771,10 @@ proto_register_scsi(void)
register_cleanup_routine(scsi_defragment_cleanup);
register_srt_table(proto_scsi, NULL, 1, scsistat_packet, scsistat_init, scsistat_param);
-}
-void
-proto_reg_handoff_scsi(void)
-{
scsi_tap = register_tap("scsi");
- data_handle = find_dissector("data");
}
-
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c
index 553f87cac4..80428abb1f 100644
--- a/epan/dissectors/packet-sctp.c
+++ b/epan/dissectors/packet-sctp.c
@@ -312,8 +312,6 @@ static expert_field ei_sctp_tsn_retransmitted = EI_INIT;
static expert_field ei_sctp_sack_chunk_gap_block_malformed = EI_INIT;
static expert_field ei_sctp_sack_chunk_number_tsns_gap_acked_100 = EI_INIT;
-static dissector_handle_t data_handle;
-
WS_DLL_PUBLIC_DEF const value_string chunk_type_values[] = {
{ SCTP_DATA_CHUNK_ID, "DATA" },
{ SCTP_INIT_CHUNK_ID, "INIT" },
@@ -2516,7 +2514,7 @@ dissect_payload(tvbuff_t *payload_tvb, packet_info *pinfo, proto_tree *tree, gui
}
}
/* Oh, well, we don't know this; dissect it as data. */
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
return TRUE;
}
@@ -5053,7 +5051,6 @@ proto_reg_handoff_sctp(void)
{
dissector_handle_t sctp_handle;
- data_handle = find_dissector("data");
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);
diff --git a/epan/dissectors/packet-sdlc.c b/epan/dissectors/packet-sdlc.c
index aa67910ca7..101c0cadf9 100644
--- a/epan/dissectors/packet-sdlc.c
+++ b/epan/dissectors/packet-sdlc.c
@@ -51,7 +51,6 @@ static gint ett_sdlc = -1;
static gint ett_sdlc_control = -1;
static dissector_handle_t sna_handle;
-static dissector_handle_t data_handle;
static const xdlc_cf_items sdlc_cf_items = {
&hf_sdlc_n_r,
@@ -128,7 +127,7 @@ dissect_sdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
/* call the SNA dissector */
call_dissector(sna_handle, next_tvb, pinfo, tree);
} else
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -201,7 +200,6 @@ proto_reg_handoff_sdlc(void)
* Get handle for the SNA dissector.
*/
sna_handle = find_dissector_add_dependency("sna", proto_sdlc);
- data_handle = find_dissector("data");
sdlc_handle = create_dissector_handle(dissect_sdlc, proto_sdlc);
dissector_add_uint("wtap_encap", WTAP_ENCAP_SDLC, sdlc_handle);
diff --git a/epan/dissectors/packet-ses.c b/epan/dissectors/packet-ses.c
index c597bc3574..e9d6c22785 100644
--- a/epan/dissectors/packet-ses.c
+++ b/epan/dissectors/packet-ses.c
@@ -336,9 +336,6 @@ static gboolean ses_desegment = TRUE;
static guint ses_pres_ctx_id = 0;
static gboolean ses_rtse_reassemble = FALSE;
-/* find the dissector for data */
-static dissector_handle_t data_handle;
-
static void
call_pres_dissector(tvbuff_t *tvb, int offset, guint16 param_len,
packet_info *pinfo, proto_tree *tree,
@@ -1031,7 +1028,7 @@ dissect_spdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
if (has_user_information && next_tvb) {
if (!pres_handle) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else {
/* Pass the session pdu to the presentation dissector */
call_dissector_with_data(pres_handle, next_tvb, pinfo, tree, &session);
@@ -1912,9 +1909,6 @@ proto_register_ses(void)
void
proto_reg_handoff_ses(void)
{
- /* find data dissector */
- data_handle = find_dissector("data");
-
/* define sub dissector */
pres_handle = find_dissector_add_dependency("pres", proto_ses);
diff --git a/epan/dissectors/packet-sflow.c b/epan/dissectors/packet-sflow.c
index 68ccf465bd..f9a0047200 100644
--- a/epan/dissectors/packet-sflow.c
+++ b/epan/dissectors/packet-sflow.c
@@ -633,7 +633,6 @@ static gint ett_sflow_lag_port_state_flags = -1;
static expert_field ei_sflow_invalid_address_type = EI_INIT;
static dissector_table_t header_subdissector_table;
-static dissector_handle_t data_handle;
void proto_reg_handoff_sflow_245(void);
@@ -719,7 +718,7 @@ dissect_sflow_245_sampled_header(tvbuff_t *tvb, packet_info *pinfo,
if ((global_dissect_samp_headers == FALSE) ||
!dissector_try_uint(header_subdissector_table, header_proto, next_tvb, pinfo, sflow_245_header_tree))
{
- call_dissector(data_handle, next_tvb, pinfo, sflow_245_header_tree);
+ call_data_dissector(next_tvb, pinfo, sflow_245_header_tree);
}
}
@@ -3687,7 +3686,6 @@ proto_reg_handoff_sflow_245(void) {
if (!sflow_245_prefs_initialized) {
sflow_handle = create_dissector_handle(dissect_sflow_245, proto_sflow);
- data_handle = find_dissector("data");
sflow_245_prefs_initialized = TRUE;
} else {
dissector_delete_uint_range("udp.port", sflow_ports, sflow_handle);
diff --git a/epan/dissectors/packet-sita.c b/epan/dissectors/packet-sita.c
index 14d067c898..69bdc6f6ba 100644
--- a/epan/dissectors/packet-sita.c
+++ b/epan/dissectors/packet-sita.c
@@ -34,7 +34,6 @@ void proto_register_sita(void);
void proto_reg_handoff_sita(void);
static dissector_table_t sita_dissector_table;
-static dissector_handle_t data_handle;
static gint ett_sita = -1;
static gint ett_sita_flags = -1;
static gint ett_sita_signals = -1;
@@ -197,7 +196,7 @@ dissect_sita(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
and give them the details then */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
col_add_fstr(pinfo->cinfo, COL_INFO, "IOP protocol number: %u", pinfo->pseudo_header->sita.sita_proto);
- call_dissector(data_handle, tvb, pinfo, tree); /* call the generic (hex display) decoder instead */
+ call_data_dissector(tvb, pinfo, tree); /* call the generic (hex display) decoder instead */
}
return tvb_captured_length(tvb);
}
@@ -396,7 +395,6 @@ proto_reg_handoff_sita(void)
uts_handle = find_dissector("uts");
ipars_handle = find_dissector("ipars");
sita_handle = find_dissector("sita");
- data_handle = find_dissector("data");
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-sll.c b/epan/dissectors/packet-sll.c
index 76463a3787..a3e75a4c3e 100644
--- a/epan/dissectors/packet-sll.c
+++ b/epan/dissectors/packet-sll.c
@@ -141,7 +141,6 @@ static gint ett_sll = -1;
static dissector_table_t sll_linux_dissector_table;
static dissector_table_t gre_dissector_table;
-static dissector_handle_t data_handle;
static void sll_prompt(packet_info *pinfo, gchar* result)
{
@@ -271,7 +270,7 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
if(!dissector_try_uint(sll_linux_dissector_table, protocol,
next_tvb, pinfo, tree)) {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
} else {
switch (hatype) {
@@ -352,7 +351,6 @@ proto_reg_handoff_sll(void)
* Get handles for the IPX and LLC dissectors.
*/
gre_dissector_table = find_dissector_table("gre.proto");
- data_handle = find_dissector("data");
ethertype_handle = find_dissector_add_dependency("ethertype", proto_sll);
netlink_handle = find_dissector_add_dependency("netlink", proto_sll);
diff --git a/epan/dissectors/packet-slowprotocols.c b/epan/dissectors/packet-slowprotocols.c
index d154bdb61b..c2f4b94951 100644
--- a/epan/dissectors/packet-slowprotocols.c
+++ b/epan/dissectors/packet-slowprotocols.c
@@ -56,8 +56,6 @@ static int hf_slow_subtype = -1;
static gint ett_slow = -1;
-static dissector_handle_t dh_data;
-
/*
* Name: dissect_slow_protocols
*
@@ -99,7 +97,7 @@ dissect_slow_protocols(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
next_tvb = tvb_new_subset_remaining(tvb, 1);
if (!dissector_try_uint_new(slow_protocols_dissector_table, subtype,
next_tvb, pinfo, tree, TRUE, NULL))
- call_dissector(dh_data, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -147,8 +145,6 @@ proto_reg_handoff_slow_protocols(void)
slow_protocols_handle = create_dissector_handle(dissect_slow_protocols, proto_slow);
dissector_add_uint("ethertype", ETHERTYPE_SLOW_PROTOCOLS, slow_protocols_handle);
-
- dh_data = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-smb-direct.c b/epan/dissectors/packet-smb-direct.c
index 2c8f88476c..6ca65b7688 100644
--- a/epan/dissectors/packet-smb-direct.c
+++ b/epan/dissectors/packet-smb-direct.c
@@ -102,7 +102,6 @@ enum SMB_DIRECT_HDR_TYPE {
#define SMB_DIRECT_RESPONSE_REQUESTED 0x0001
static heur_dissector_list_t smb_direct_heur_subdissector_list;
-static dissector_handle_t data_handle;
static gboolean smb_direct_reassemble = TRUE;
static reassembly_table smb_direct_reassembly_table;
@@ -198,7 +197,7 @@ dissect_payload:
pinfo->fragmented = FALSE;
if (!dissector_try_heuristic(smb_direct_heur_subdissector_list,
payload_tvb, pinfo, tree, &hdtbl_entry, NULL)) {
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
}
done:
pinfo->fragmented = save_fragmented;
@@ -700,7 +699,6 @@ void proto_register_smb_direct(void)
void
proto_reg_handoff_smb_direct(void)
{
- data_handle = find_dissector("data");
heur_dissector_add("iwarp_ddp_rdmap",
dissect_smb_direct_iwarp_heur,
"SMB Direct over iWARP", "smb_direct_iwarp",
diff --git a/epan/dissectors/packet-smb-mailslot.c b/epan/dissectors/packet-smb-mailslot.c
index b402edc20b..2f5a346e15 100644
--- a/epan/dissectors/packet-smb-mailslot.c
+++ b/epan/dissectors/packet-smb-mailslot.c
@@ -45,7 +45,6 @@ static int ett_smb_msp = -1;
static dissector_handle_t mailslot_browse_handle;
static dissector_handle_t mailslot_lanman_handle;
static dissector_handle_t netlogon_handle;
-static dissector_handle_t data_handle;
#define MAILSLOT_UNKNOWN 0
#define MAILSLOT_BROWSE 1
@@ -206,7 +205,7 @@ dissect_mailslot_smb(tvbuff_t *mshdr_tvb, tvbuff_t *setup_tvb,
* but indicate that we successfully dissected the mailslot
* stuff.
*/
- call_dissector(data_handle ,tvb, pinfo, parent_tree);
+ call_data_dissector(tvb, pinfo, parent_tree);
break;
}
return TRUE;
@@ -255,7 +254,6 @@ proto_reg_handoff_smb_mailslot(void)
mailslot_browse_handle = find_dissector_add_dependency("mailslot_browse", proto_smb_msp);
mailslot_lanman_handle = find_dissector_add_dependency("mailslot_lanman", proto_smb_msp);
netlogon_handle = find_dissector_add_dependency("smb_netlogon", proto_smb_msp);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-smb-pipe.c b/epan/dissectors/packet-smb-pipe.c
index d63ed79149..00ddd244f6 100644
--- a/epan/dissectors/packet-smb-pipe.c
+++ b/epan/dissectors/packet-smb-pipe.c
@@ -44,7 +44,6 @@ XXX Fixme : shouldn't show [malformed frame] for long packets
void proto_register_pipe_lanman(void);
void proto_register_smb_pipe(void);
-void proto_reg_handoff_smb_pipe(void);
static int proto_smb_pipe = -1;
static int hf_smb_pipe_function = -1;
@@ -202,8 +201,6 @@ static gint ett_lanman_server = -1;
static expert_field ei_smb_pipe_bogus_netwkstauserlogon = EI_INIT;
static expert_field ei_smb_pipe_bad_type = EI_INIT;
-static dissector_handle_t data_handle;
-
/*
* See
*
@@ -3434,7 +3431,7 @@ clean_up_and_exit:
pinfo->desegment_len = 0;
if (!result)
- call_dissector(data_handle, d_tvb, pinfo, parent_tree);
+ call_data_dissector(d_tvb, pinfo, parent_tree);
pinfo->fragmented = save_fragmented;
return TRUE;
@@ -3926,13 +3923,6 @@ proto_register_smb_pipe(void)
register_cleanup_routine(smb_dcerpc_reassembly_cleanup);
}
-void
-proto_reg_handoff_smb_pipe(void)
-{
- data_handle = find_dissector("data");
-}
-
-
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c
index 41a058b598..a2dbc2a1bb 100644
--- a/epan/dissectors/packet-smb2.c
+++ b/epan/dissectors/packet-smb2.c
@@ -495,7 +495,6 @@ static int smb2_eo_tap = -1;
static dissector_handle_t gssapi_handle = NULL;
static dissector_handle_t ntlmssp_handle = NULL;
static dissector_handle_t rsvd_handle = NULL;
-static dissector_handle_t data_handle = NULL;
static heur_dissector_list_t smb2_pipe_subdissector_list;
@@ -4811,7 +4810,7 @@ clean_up_and_exit:
pinfo->desegment_len = 0;
if (!result) {
- call_dissector(data_handle, tvb, pinfo, top_tree);
+ call_data_dissector(tvb, pinfo, top_tree);
}
pinfo->fragmented = save_fragmented;
@@ -9686,7 +9685,6 @@ proto_reg_handoff_smb2(void)
gssapi_handle = find_dissector_add_dependency("gssapi", proto_smb2);
ntlmssp_handle = find_dissector_add_dependency("ntlmssp", proto_smb2);
rsvd_handle = find_dissector_add_dependency("rsvd", proto_smb2);
- data_handle = find_dissector("data");
heur_dissector_add("netbios", dissect_smb2_heur, "SMB2 over Netbios", "smb2_netbios", proto_smb2, HEURISTIC_ENABLE);
heur_dissector_add("smb_direct", dissect_smb2_heur, "SMB2 over SMB Direct", "smb2_smb_direct", proto_smb2, HEURISTIC_ENABLE);
}
diff --git a/epan/dissectors/packet-sna.c b/epan/dissectors/packet-sna.c
index 5800896cc3..8369b5d9fb 100644
--- a/epan/dissectors/packet-sna.c
+++ b/epan/dissectors/packet-sna.c
@@ -303,8 +303,6 @@ 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 data_handle;
-
static int sna_address_type = -1;
/* Defragment fragmented SNA BIUs*/
@@ -945,8 +943,7 @@ dissect_optional_0e(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(tree, hf_sna_reserved, tvb, 12, 8, ENC_NA);
if (tvb_offset_exists(tvb, offset))
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, 4), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, 4), pinfo, tree);
if (bits & 0x40) {
col_set_str(pinfo->cinfo, COL_INFO, "HPR Idle Message");
@@ -960,8 +957,7 @@ dissect_optional_0f(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree_add_item(tree, hf_sna_nlp_opti_0f_bits, tvb, 2, 2, ENC_BIG_ENDIAN);
if (tvb_offset_exists(tvb, 4))
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, 4), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, 4), pinfo, tree);
}
static void
@@ -970,8 +966,7 @@ dissect_optional_10(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(tree, hf_sna_reserved, tvb, 2, 2, ENC_NA);
proto_tree_add_item(tree, hf_sna_nlp_opti_10_tcid, tvb, 4, 8, ENC_NA);
if (tvb_offset_exists(tvb, 12))
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, 12), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, 12), pinfo, tree);
}
static void
@@ -1009,8 +1004,7 @@ dissect_optional_14(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if ((type != 0x83) || (len <= 16)) {
/* Invalid */
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
return;
}
sub_tree = proto_tree_add_subtree(tree, tvb, offset, len,
@@ -1044,8 +1038,7 @@ dissect_optional_14(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if ((type != 0x85) || ( len < 4)) {
/* Invalid */
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
return;
}
sub_tree = proto_tree_add_subtree(tree, tvb, offset, len,
@@ -1072,8 +1065,7 @@ dissect_optional_14(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_control(tvb, offset, sublen, sub_tree, 1, LT);
} else {
/* Invalid */
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
return;
}
/* No padding here */
@@ -1120,12 +1112,10 @@ dissect_optional_22(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb, 16, 4, ENC_BIG_ENDIAN);
if (tvb_offset_exists(tvb, 20))
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, 20), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, 20), pinfo, tree);
} else {
if (tvb_offset_exists(tvb, 12))
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, 12), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, 12), pinfo, tree);
}
}
@@ -1146,9 +1136,7 @@ dissect_optional(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Prevent loop for invalid crap in packet */
if (len == 0) {
- if (tree)
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, tree);
return;
}
@@ -1200,8 +1188,7 @@ dissect_optional(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
len << 2, -1), pinfo, sub_tree);
break;
default:
- call_dissector(data_handle,
- tvb_new_subset(tvb, offset,
+ call_data_dissector(tvb_new_subset(tvb, offset,
len << 2, -1), pinfo, sub_tree);
}
offset += (len << 2);
@@ -1293,8 +1280,7 @@ dissect_nlp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
indx ++;
if (tvb_offset_exists(tvb, indx))
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, indx),
+ call_data_dissector(tvb_new_subset_remaining(tvb, indx),
pinfo, parent_tree);
return;
}
@@ -1348,8 +1334,7 @@ dissect_nlp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (tvb_get_guint8(tvb, indx+subindx+1) == 5)
dissect_control(tvb, indx + subindx, counter+2, nlp_tree, 1, LT);
else
- call_dissector(data_handle,
- tvb_new_subset(tvb, indx + subindx, counter+2,
+ call_data_dissector(tvb_new_subset(tvb, indx + subindx, counter+2,
-1), pinfo, nlp_tree);
subindx += (counter+2);
@@ -1364,8 +1349,7 @@ dissect_nlp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (((thdr_8 & 0x20) == 0) && thdr_dlf) {
col_set_str(pinfo->cinfo, COL_INFO, "HPR Fragment");
if (tvb_offset_exists(tvb, indx)) {
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, indx), pinfo,
+ call_data_dissector(tvb_new_subset_remaining(tvb, indx), pinfo,
parent_tree);
}
return;
@@ -1383,8 +1367,7 @@ dissect_nlp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
dissect_gds(tvb_new_subset_remaining(tvb, indx),
pinfo, tree, parent_tree);
} else
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, indx),
+ call_data_dissector(tvb_new_subset_remaining(tvb, indx),
pinfo, parent_tree);
}
}
@@ -1567,8 +1550,7 @@ dissect_xid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
break;
default:
/* external standards organizations */
- call_dissector(data_handle,
- tvb_new_subset(tvb, 6, len-6, -1),
+ call_data_dissector(tvb_new_subset(tvb, 6, len-6, -1),
pinfo, tree);
}
}
@@ -1577,8 +1559,7 @@ dissect_xid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
len = 6;
if (tvb_offset_exists(tvb, len))
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, len), pinfo, parent_tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, len), pinfo, parent_tree);
}
/* --------------------------------------------------------------------
@@ -2117,8 +2098,7 @@ dissect_fid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
th_header_len = dissect_fidf(tvb, th_tree);
break;
default:
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, 1), pinfo, parent_tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, 1), pinfo, parent_tree);
return;
}
@@ -2156,8 +2136,7 @@ dissect_fid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
return;
}
- call_dissector(data_handle,
- tvb_new_subset_remaining(rh_tvb, rh_offset),
+ call_data_dissector(tvb_new_subset_remaining(rh_tvb, rh_offset),
pinfo, parent_tree);
}
}
@@ -2436,8 +2415,7 @@ dissect_gds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
} while(cont);
if (tvb_offset_exists(tvb, offset))
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, parent_tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, parent_tree);
}
/* --------------------------------------------------------------------
@@ -3522,8 +3500,6 @@ proto_reg_handoff_sna(void)
dissector_add_uint("llc.xid_dsap", SAP_SNA3, sna_xid_handle);
/* RFC 2043 */
dissector_add_uint("ppp.protocol", PPP_SNA, sna_handle);
- data_handle = find_dissector("data");
-
}
/*
diff --git a/epan/dissectors/packet-sndcp.c b/epan/dissectors/packet-sndcp.c
index 718796ea92..717caa9048 100644
--- a/epan/dissectors/packet-sndcp.c
+++ b/epan/dissectors/packet-sndcp.c
@@ -96,7 +96,6 @@ static const fragment_items npdu_frag_items = {
/* dissectors for the data portion of this protocol
*/
-static dissector_handle_t data_handle;
static dissector_handle_t ip_handle;
/* reassembly of N-PDU
@@ -310,7 +309,7 @@ dissect_sndcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
call_dissector(ip_handle, next_tvb, pinfo, tree);
}
else {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
else {
@@ -586,7 +585,6 @@ proto_reg_handoff_sndcp(void)
/* Find IP and data handle for upper layer dissectors
*/
ip_handle = find_dissector_add_dependency("ip", proto_sndcp);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-socketcan.c b/epan/dissectors/packet-socketcan.c
index 4de41512ae..059696e779 100644
--- a/epan/dissectors/packet-socketcan.c
+++ b/epan/dissectors/packet-socketcan.c
@@ -58,8 +58,6 @@ static gint ett_can = -1;
static int proto_can = -1;
-static dissector_handle_t data_handle;
-
#define LINUX_CAN_STD 0
#define LINUX_CAN_EXT 1
#define LINUX_CAN_RTR 2
@@ -154,7 +152,7 @@ dissect_socketcan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
have a unique identifier to determine subdissector */
if (!dissector_try_uint_new(subdissector_table, 0, next_tvb, pinfo, tree, FALSE, &can_id))
{
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -252,8 +250,6 @@ proto_reg_handoff_socketcan(void)
can_handle = create_dissector_handle(dissect_socketcan, proto_can);
dissector_add_uint("wtap_encap", WTAP_ENCAP_SOCKETCAN, can_handle);
dissector_add_uint("sll.ltype", LINUX_SLL_P_CAN, can_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-spdy.c b/epan/dissectors/packet-spdy.c
index ac7e47a2c7..44ad165661 100644
--- a/epan/dissectors/packet-spdy.c
+++ b/epan/dissectors/packet-spdy.c
@@ -238,7 +238,6 @@ static expert_field ei_spdy_invalid_go_away = EI_INIT;
static expert_field ei_spdy_invalid_frame_type = EI_INIT;
static expert_field ei_spdy_reassembly_info = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t media_handle;
static dissector_handle_t spdy_handle;
static dissector_table_t media_type_subdissector_table;
@@ -873,7 +872,7 @@ static int dissect_spdy_data_payload(tvbuff_t *tvb,
if (spdy_decompress_body) {
proto_item_append_text(e_ti, " [Error: Decompression failed]");
}
- call_dissector(data_handle, data_tvb, pinfo, e_tree);
+ call_data_dissector(data_tvb, pinfo, e_tree);
goto body_dissected;
}
@@ -929,7 +928,7 @@ static int dissect_spdy_data_payload(tvbuff_t *tvb,
call_dissector_with_data(media_handle, next_tvb, pinfo, spdy_tree, media_str);
} else {
/* Call the default data dissector */
- call_dissector(data_handle, next_tvb, pinfo, spdy_tree);
+ call_data_dissector(next_tvb, pinfo, spdy_tree);
}
body_dissected:
@@ -1946,7 +1945,6 @@ void proto_reg_handoff_spdy(void) {
/* Use "0" to avoid overwriting HTTPS port and still offer support over SSL */
ssl_dissector_add(0, spdy_handle);
- data_handle = find_dissector("data");
media_handle = find_dissector_add_dependency("media", proto_spdy);
port_subdissector_table = find_dissector_table("http.port");
media_type_subdissector_table = find_dissector_table("media_type");
diff --git a/epan/dissectors/packet-spp.c b/epan/dissectors/packet-spp.c
index 415b0cd867..cd6b6a40e9 100644
--- a/epan/dissectors/packet-spp.c
+++ b/epan/dissectors/packet-spp.c
@@ -46,8 +46,6 @@ static int hf_spp_all_nr = -1;
static gint ett_spp = -1;
static gint ett_spp_connctrl = -1;
-static dissector_handle_t data_handle;
-
static dissector_table_t spp_socket_dissector_table;
/*
@@ -179,7 +177,7 @@ dissect_spp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
next_tvb, pinfo, tree))
return tvb_captured_length(tvb);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -273,8 +271,6 @@ proto_reg_handoff_spp(void)
spp_handle = create_dissector_handle(dissect_spp, proto_spp);
dissector_add_uint("idp.packet_type", IDP_PACKET_TYPE_SPP, spp_handle);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-stt.c b/epan/dissectors/packet-stt.c
index 2d124bce05..04311a531d 100644
--- a/epan/dissectors/packet-stt.c
+++ b/epan/dissectors/packet-stt.c
@@ -139,7 +139,6 @@ static expert_field ei_stt_l4_offset = EI_INIT;
static expert_field ei_stt_mss = EI_INIT;
static dissector_handle_t eth_handle;
-static dissector_handle_t data_handle;
/* From Table G-2 of IEEE standard 802.1Q-2005 */
static const value_string pri_vals[] = {
@@ -573,7 +572,7 @@ dissect_stt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (!is_seg) {
call_dissector(eth_handle, next_tvb, pinfo, tree);
} else {
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
pinfo->fragmented = frag_save;
@@ -992,7 +991,6 @@ proto_reg_handoff_stt(void)
* captures attached to bug 10282.
*/
eth_handle = find_dissector_add_dependency("eth_withoutfcs", proto_stt);
- data_handle = find_dissector("data");
heur_dissector_add("ip", dissect_stt_heur, "Stateless Transport Tunneling over IP", "stt_ip", proto_stt, HEURISTIC_ENABLE);
}
diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c
index 1a076b81ce..b1c5a63b74 100644
--- a/epan/dissectors/packet-sua.c
+++ b/epan/dissectors/packet-sua.c
@@ -374,7 +374,6 @@ static guint16 sua_ri;
static gchar *sua_source_gt;
static gchar *sua_destination_gt;
-static dissector_handle_t data_handle;
static dissector_handle_t sua_info_str_handle;
static dissector_table_t sua_parameter_table;
static dissector_table_t sccp_ssn_dissector_table;
@@ -2267,7 +2266,7 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t
return;
}
/* No sub-dissection occurred, treat it as raw data */
- call_dissector(data_handle, data_tvb, pinfo, tree);
+ call_data_dissector(data_tvb, pinfo, tree);
}
}
}
@@ -2485,7 +2484,6 @@ proto_reg_handoff_sua(void)
dissector_add_uint("sctp.ppi", SUA_PAYLOAD_PROTOCOL_ID, sua_handle);
dissector_add_uint("sctp.port", SCTP_PORT_SUA, sua_handle);
- data_handle = find_dissector("data");
sccp_ssn_dissector_table = find_dissector_table("sccp.ssn");
}
diff --git a/epan/dissectors/packet-tali.c b/epan/dissectors/packet-tali.c
index b4fba11441..97cbec2444 100644
--- a/epan/dissectors/packet-tali.c
+++ b/epan/dissectors/packet-tali.c
@@ -80,8 +80,6 @@ static header_field_info hfi_tali_length_indicator TALI_HFI_INIT = {
static dissector_table_t tali_dissector_table;
-static dissector_handle_t data_handle;
-
/* Desegment TALI messages */
static gboolean tali_desegment = TRUE;
@@ -128,7 +126,7 @@ dissect_tali_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
if (length > 0) {
payload_tvb = tvb_new_subset_remaining(tvb, TALI_HEADER_LENGTH);
if (payload_tvb != NULL && !dissector_try_string(tali_dissector_table, opcode, payload_tvb, pinfo, tree, NULL)) {
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
}
}
@@ -224,8 +222,6 @@ void
proto_reg_handoff_tali(void)
{
heur_dissector_add("tcp", dissect_tali_heur, "Tali over TCP", "tali_tcp", hfi_tali->id, HEURISTIC_ENABLE);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-tdmoe.c b/epan/dissectors/packet-tdmoe.c
index 5bfb1adec4..9d5bb9406f 100644
--- a/epan/dissectors/packet-tdmoe.c
+++ b/epan/dissectors/packet-tdmoe.c
@@ -50,7 +50,6 @@ static gint ett_tdmoe = -1;
static gint ett_tdmoe_flags = -1;
static dissector_handle_t lapd_handle;
-static dissector_handle_t data_handle;
static gint pref_tdmoe_d_channel = 24;
@@ -119,7 +118,7 @@ dissect_tdmoe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
if (chan == pref_tdmoe_d_channel) {
call_dissector(lapd_handle, next_client, pinfo, tree);
} else {
- call_dissector(data_handle, next_client, pinfo, tree);
+ call_data_dissector(next_client, pinfo, tree);
}
}
return 1;
@@ -180,7 +179,6 @@ proto_reg_handoff_tdmoe(void)
dissector_add_uint("ethertype", ETHERTYPE_TDMOE, tdmoe_handle);
lapd_handle = find_dissector_add_dependency("lapd-bitstream", proto_tdmoe);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-tdmop.c b/epan/dissectors/packet-tdmop.c
index 04033d5443..4204c3c14b 100644
--- a/epan/dissectors/packet-tdmop.c
+++ b/epan/dissectors/packet-tdmop.c
@@ -57,7 +57,6 @@ static int hf_tdmop_payload = -1;
static int hf_tdmop_Compression_mask = -1;
static dissector_handle_t lapd_handle = NULL;
-static dissector_handle_t data_handle = NULL;
static gint pref_tdmop_d_channel = 16;
static guint32 pref_tdmop_mask = 0xFFFFFFFFUL;
@@ -184,7 +183,7 @@ static int dissect_tdmop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
}
} else
{
- call_dissector(data_handle, cdata, pinfo, subtree);
+ call_data_dissector(cdata, pinfo, subtree);
}
offset += 4;
}
@@ -359,7 +358,6 @@ void proto_reg_handoff_tdmop(void)
dissector_add_uint("ethertype", pref_tdmop_ethertype, tdmop_handle);
}
lapd_handle = find_dissector_add_dependency("lapd-bitstream", proto_tdmop);
- data_handle = find_dissector("data");
current_tdmop_ethertype = pref_tdmop_ethertype;
current_tdmop_udpport = pref_tdmop_udpport;
init = TRUE;
diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c
index 13617f4429..55ac36a8b3 100644
--- a/epan/dissectors/packet-tds.c
+++ b/epan/dissectors/packet-tds.c
@@ -860,7 +860,6 @@ static gboolean tds_defragment = TRUE;
static dissector_handle_t tds_tcp_handle;
static dissector_handle_t ntlmssp_handle;
static dissector_handle_t gssapi_handle;
-static dissector_handle_t data_handle;
typedef struct {
gint tds7_version;
@@ -3945,7 +3944,7 @@ dissect_netlib_buffer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
} else {
next_tvb = tvb_new_subset_remaining (tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tds_tree);
+ call_data_dissector(next_tvb, pinfo, tds_tree);
}
pinfo->fragmented = save_fragmented;
}
@@ -5640,7 +5639,6 @@ proto_reg_handoff_tds(void)
ntlmssp_handle = find_dissector_add_dependency("ntlmssp", proto_tds);
gssapi_handle = find_dissector_add_dependency("gssapi", proto_tds);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-tetra.c b/epan/dissectors/packet-tetra.c
index b31116b41a..e92d9dd1e4 100644
--- a/epan/dissectors/packet-tetra.c
+++ b/epan/dissectors/packet-tetra.c
@@ -54,9 +54,6 @@ void proto_reg_handoff_tetra(void);
/* Wireshark ID of the tetra protocol */
static int proto_tetra = -1;
-/* These are the handles of our subdissectors */
-static dissector_handle_t data_handle = NULL;
-
static dissector_handle_t tetra_handle;
static int global_tetra_port = 7074;
@@ -683,7 +680,7 @@ static int hf_tetra_proprietary_element_owner_extension = -1; /* BIT_STRING */
static int hf_tetra_simplex_duplex_selection_06 = -1; /* T_simplex_duplex_selection_05 */
/*--- End of included file: packet-tetra-hf.c ---*/
-#line 82 "./asn1/tetra/packet-tetra-template.c"
+#line 79 "./asn1/tetra/packet-tetra-template.c"
/* Initialize the subtree pointers */
/* These are the ids of the subtrees that we may be creating */
@@ -968,7 +965,7 @@ static gint ett_tetra_Type2 = -1;
static gint ett_tetra_Modify_type = -1;
/*--- End of included file: packet-tetra-ett.c ---*/
-#line 92 "./asn1/tetra/packet-tetra-template.c"
+#line 89 "./asn1/tetra/packet-tetra-template.c"
static expert_field ei_tetra_channels_incorrect = EI_INIT;
@@ -8814,7 +8811,7 @@ static int dissect_MAC_ACCESS_DEFINE_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _
/*--- End of included file: packet-tetra-fn.c ---*/
-#line 96 "./asn1/tetra/packet-tetra-template.c"
+#line 93 "./asn1/tetra/packet-tetra-template.c"
static const value_string channeltypenames[] = {
{ 0, "Reserved" },
@@ -9274,7 +9271,6 @@ void proto_reg_handoff_tetra(void)
static gboolean initialized=FALSE;
if (!initialized) {
- data_handle = find_dissector("data");
tetra_handle = create_dissector_handle(dissect_tetra, proto_tetra);
dissector_add_uint("udp.port", global_tetra_port, tetra_handle);
}
@@ -11717,7 +11713,7 @@ void proto_register_tetra (void)
"T_simplex_duplex_selection_05", HFILL }},
/*--- End of included file: packet-tetra-hfarr.c ---*/
-#line 626 "./asn1/tetra/packet-tetra-template.c"
+#line 622 "./asn1/tetra/packet-tetra-template.c"
};
/* List of subtrees */
@@ -12002,7 +11998,7 @@ void proto_register_tetra (void)
&ett_tetra_Modify_type,
/*--- End of included file: packet-tetra-ettarr.c ---*/
-#line 636 "./asn1/tetra/packet-tetra-template.c"
+#line 632 "./asn1/tetra/packet-tetra-template.c"
};
static ei_register_info ei[] = {
diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c
index ebe3a4695b..fcaa58401f 100644
--- a/epan/dissectors/packet-tftp.c
+++ b/epan/dissectors/packet-tftp.c
@@ -85,7 +85,6 @@ static gint ett_tftp_option = -1;
static expert_field ei_tftp_blocksize_range = EI_INIT;
static dissector_handle_t tftp_handle;
-static dissector_handle_t data_handle;
#define UDP_PORT_TFTP_RANGE "69"
@@ -340,7 +339,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
/* Show data in tree */
if (bytes > 0) {
data_tvb = tvb_new_subset(tvb, offset, -1, bytes);
- call_dissector(data_handle, data_tvb, pinfo, tree);
+ call_data_dissector(data_tvb, pinfo, tree);
}
/* If Export Object tap is listening, need to accumulate blocks info list
@@ -703,7 +702,6 @@ proto_reg_handoff_tftp(void)
if (!tftp_initialized) {
tftp_handle = find_dissector("tftp");
- data_handle = find_dissector("data");
heur_dissector_add("stun", dissect_embeddedtftp_heur, "TFTP over TURN", "tftp_stun", proto_tftp, HEURISTIC_ENABLE);
tftp_initialized = TRUE;
} else {
diff --git a/epan/dissectors/packet-tipc.c b/epan/dissectors/packet-tipc.c
index cfe55bde1b..16076f53da 100644
--- a/epan/dissectors/packet-tipc.c
+++ b/epan/dissectors/packet-tipc.c
@@ -44,7 +44,6 @@ void proto_register_tipc(void);
static int proto_tipc = -1;
/* dissector handles */
-static dissector_handle_t data_handle;
static dissector_handle_t ip_handle;
static int hf_tipc_msg_fragments = -1;
@@ -1479,14 +1478,14 @@ dissect_tipc_v2_internal_msg(tvbuff_t *tipc_tvb, proto_tree *tipc_tree, packet_i
dissect_tipc(new_tvb, pinfo, top_tree, NULL);
} else { /* make a new subset */
data_tvb = tvb_new_subset(tipc_tvb, offset, len, reported_len);
- call_dissector(data_handle, data_tvb, pinfo, top_tree);
+ call_data_dissector(data_tvb, pinfo, top_tree);
}
pinfo->fragmented = save_fragmented;
} else {
/* don't reassemble is set in the "preferences" */
data_tvb = tvb_new_subset(tipc_tvb, offset, len, reported_len);
- call_dissector(data_handle, data_tvb, pinfo, top_tree);
+ call_data_dissector(data_tvb, pinfo, top_tree);
}
break;
@@ -1669,7 +1668,7 @@ call_tipc_v2_data_subdissectors(tvbuff_t *data_tvb, packet_info *pinfo, guint32
/* dissection of TIPC data is not set in preferences or no subdissector found */
- call_dissector(data_handle, data_tvb, pinfo, top_tree);
+ call_data_dissector(data_tvb, pinfo, top_tree);
}
@@ -3102,7 +3101,6 @@ proto_reg_handoff_tipc(void)
if (!inited) {
tipc_tcp_handle = create_dissector_handle(dissect_tipc_tcp, proto_tipc);
ip_handle = find_dissector("ip");
- data_handle = find_dissector("data");
dissector_add_uint("ethertype", ETHERTYPE_TIPC, tipc_handle);
diff --git a/epan/dissectors/packet-tns.c b/epan/dissectors/packet-tns.c
index 70ab9bfef7..0d3a82c404 100644
--- a/epan/dissectors/packet-tns.c
+++ b/epan/dissectors/packet-tns.c
@@ -157,8 +157,6 @@ static gint ett_tns_ntp_flag = -1;
static gint ett_tns_conn_flag = -1;
static gint ett_sql = -1;
-static dissector_handle_t data_handle;
-
#define TCP_PORT_TNS 1521
static const value_string tns_type_vals[] = {
@@ -297,8 +295,7 @@ static void dissect_tns_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
col_append_str(pinfo->cinfo, COL_INFO, ", Data");
}
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, data_tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, data_tree);
return;
}
@@ -881,8 +878,7 @@ dissect_tns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
dissect_tns_data(tvb,offset,pinfo,tree,tns_tree);
break;
default:
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo,
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo,
tns_tree);
break;
}
@@ -1236,7 +1232,6 @@ proto_reg_handoff_tns(void)
tns_handle = create_dissector_handle(dissect_tns, proto_tns);
dissector_add_uint("tcp.port", TCP_PORT_TNS, tns_handle);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-tr.c b/epan/dissectors/packet-tr.c
index 807c285542..6946ec506c 100644
--- a/epan/dissectors/packet-tr.c
+++ b/epan/dissectors/packet-tr.c
@@ -128,7 +128,6 @@ static const value_string direction_vals[] = {
static dissector_handle_t trmac_handle;
static dissector_handle_t llc_handle;
-static dissector_handle_t data_handle;
static const char* tr_conv_get_filter_type(conv_item_t* conv, conv_filter_type_e filter)
{
@@ -624,7 +623,7 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
break;
default:
/* non-MAC, non-LLC, i.e., "Reserved" */
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
}
@@ -807,7 +806,6 @@ proto_reg_handoff_tr(void)
*/
trmac_handle = find_dissector_add_dependency("trmac", proto_tr);
llc_handle = find_dissector_add_dependency("llc", proto_tr);
- data_handle = find_dissector("data");
tr_handle = find_dissector("tr");
dissector_add_uint("wtap_encap", WTAP_ENCAP_TOKEN_RING, tr_handle);
diff --git a/epan/dissectors/packet-turbocell.c b/epan/dissectors/packet-turbocell.c
index 1cf6824e7b..ad81e939ef 100644
--- a/epan/dissectors/packet-turbocell.c
+++ b/epan/dissectors/packet-turbocell.c
@@ -80,8 +80,6 @@ static gint ett_msdu_aggregation_subframe_tree = -1;
/* The ethernet dissector we hand off to */
static dissector_handle_t eth_handle;
-static dissector_handle_t data_handle;
-
static const value_string turbocell_type_values[] = {
{ TURBOCELL_TYPE_BEACON_NON_POLLING, "Beacon (Non-Polling Base Station)" },
{ TURBOCELL_TYPE_BEACON_NORMAL, "Beacon (Normal Base Station)" },
@@ -178,7 +176,7 @@ dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
/*Couldn't make sense of the apparently random data in the end*/
next_tvb = tvb_new_subset_remaining(tvb, 0x34 + 8*i);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else {
@@ -222,7 +220,7 @@ dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
if (remaining_length > 2) {
next_tvb = tvb_new_subset_remaining(next_tvb, msdu_offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
}
@@ -340,7 +338,6 @@ void proto_register_turbocell(void)
void proto_reg_handoff_turbocell(void)
{
eth_handle = find_dissector_add_dependency("eth_withoutfcs", proto_turbocell);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-turnchannel.c b/epan/dissectors/packet-turnchannel.c
index 9d7b661f23..4ff189905b 100644
--- a/epan/dissectors/packet-turnchannel.c
+++ b/epan/dissectors/packet-turnchannel.c
@@ -40,9 +40,6 @@ void proto_reg_handoff_turnchannel(void);
/* heuristic subdissectors */
static heur_dissector_list_t heur_subdissector_list;
-/* data dissector handle */
-static dissector_handle_t data_handle;
-
/* Initialize the protocol and registered fields */
static int proto_turnchannel = -1;
@@ -112,7 +109,7 @@ dissect_turnchannel_message(tvbuff_t *tvb, packet_info *pinfo,
if (!dissector_try_heuristic(heur_subdissector_list,
next_tvb, pinfo, tree, &hdtbl_entry, NULL)) {
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -214,8 +211,6 @@ proto_reg_handoff_turnchannel(void)
/* TURN negotiation is handled through STUN2 dissector (packet-stun.c),
so only it should be able to determine if a packet is a TURN packet */
heur_dissector_add("stun", dissect_turnchannel_heur, "TURN Channel over STUN", "turnchannel_stun", proto_turnchannel, HEURISTIC_ENABLE);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-tzsp.c b/epan/dissectors/packet-tzsp.c
index 848fa319f4..278dd59bed 100644
--- a/epan/dissectors/packet-tzsp.c
+++ b/epan/dissectors/packet-tzsp.c
@@ -109,7 +109,6 @@ static dissector_handle_t raw_ip_handle;
static dissector_handle_t ieee_802_11_handle;
static dissector_handle_t ieee_802_11_prism_handle;
static dissector_handle_t ieee_802_11_avs_handle;
-static dissector_handle_t data_handle;
/* ************************************************************************* */
/* WLAN radio header fields */
@@ -379,7 +378,7 @@ dissect_tzsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
col_add_fstr(pinfo->cinfo, COL_INFO, "TZSP_ENCAP = %u",
encapsulation);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
}
@@ -562,7 +561,6 @@ proto_reg_handoff_tzsp(void)
ieee_802_11_handle = find_dissector_add_dependency("wlan", proto_tzsp);
ieee_802_11_prism_handle = find_dissector_add_dependency("prism", proto_tzsp);
ieee_802_11_avs_handle = find_dissector_add_dependency("wlancap", proto_tzsp);
- data_handle = find_dissector("data");
/* Register this protocol as an encapsulation type. */
dissector_add_uint("wtap_encap", WTAP_ENCAP_TZSP, tzsp_handle);
diff --git a/epan/dissectors/packet-ua.c b/epan/dissectors/packet-ua.c
index fc295a86fe..1ba74b264d 100644
--- a/epan/dissectors/packet-ua.c
+++ b/epan/dissectors/packet-ua.c
@@ -47,7 +47,6 @@ static gboolean setup_conversations_enabled = TRUE;
static dissector_handle_t noe_handle;
static dissector_handle_t ua3g_handle;
-static dissector_handle_t data_handle;
static void uadecode(e_ua_direction direction,
proto_tree *tree,
@@ -149,8 +148,7 @@ static void uadecode(e_ua_direction direction,
/* add text to the frame "INFO" column */
col_append_fstr(pinfo->cinfo, COL_INFO, " - UA3G Message ERR: Opcode (0x%02x) Unknown", tvb_get_guint8(tvb, (offset + 2)));
- call_dissector(data_handle,
- tvb_new_subset_length(tvb, offset, length),
+ call_data_dissector(tvb_new_subset_length(tvb, offset, length),
pinfo,
tree);
break;
@@ -308,7 +306,6 @@ void proto_reg_handoff_ua_msg(void)
#endif
noe_handle = find_dissector_add_dependency("noe", proto_ua_msg);
ua3g_handle = find_dissector_add_dependency("ua3g", proto_ua_msg);
- data_handle = find_dissector("data");
}
diff --git a/epan/dissectors/packet-udld.c b/epan/dissectors/packet-udld.c
index 2ba0b15148..b694d0d3a6 100644
--- a/epan/dissectors/packet-udld.c
+++ b/epan/dissectors/packet-udld.c
@@ -62,8 +62,6 @@ static gint ett_udld = -1;
static gint ett_udld_flags = -1;
static gint ett_udld_tlv = -1;
-static dissector_handle_t data_handle;
-
#define TYPE_DEVICE_ID 0x0001
#define TYPE_PORT_ID 0x0002
#define TYPE_ECHO 0x0003
@@ -226,7 +224,7 @@ dissect_udld(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
}
}
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, udld_tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, udld_tree);
return tvb_captured_length(tvb);
}
@@ -304,7 +302,6 @@ proto_reg_handoff_udld(void)
{
dissector_handle_t udld_handle;
- data_handle = find_dissector("data");
udld_handle = create_dissector_handle(dissect_udld, proto_udld);
dissector_add_uint("llc.cisco_pid", 0x0111, udld_handle);
dissector_add_uint("chdlc.protocol", 0x0111, udld_handle);
diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c
index 5b6967e13a..1b170f817b 100644
--- a/epan/dissectors/packet-udp.c
+++ b/epan/dissectors/packet-udp.c
@@ -171,7 +171,6 @@ static gboolean udplite_check_checksum = FALSE;
static dissector_table_t udp_dissector_table;
static heur_dissector_list_t heur_subdissector_list;
-static dissector_handle_t data_handle;
static guint32 udp_stream_count;
/* Determine if there is a sub-dissector and call it. This has been */
@@ -598,7 +597,7 @@ decode_udp_ports(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
}
- call_dissector(data_handle,next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
int
@@ -1233,7 +1232,6 @@ proto_reg_handoff_udp(void)
register_capture_dissector("ipv6.nxt", IP_PROTO_UDP, capture_udp, hfi_udp->id);
register_capture_dissector("ipv6.nxt", IP_PROTO_UDPLITE, capture_udp, hfi_udplite->id);
- data_handle = find_dissector("data");
udp_tap = register_tap("udp");
udp_follow_tap = register_tap("udp_follow");
}
diff --git a/epan/dissectors/packet-udt.c b/epan/dissectors/packet-udt.c
index c43ad31de2..0ff459269d 100644
--- a/epan/dissectors/packet-udt.c
+++ b/epan/dissectors/packet-udt.c
@@ -106,7 +106,6 @@ static gint ett_udt = -1;
static expert_field ei_udt_nak_seqno = EI_INIT;
static dissector_handle_t udt_handle;
-static dissector_handle_t data_handle;
static int
dissect_udt(tvbuff_t *tvb, packet_info* pinfo, proto_tree *parent_tree,
@@ -258,7 +257,7 @@ dissect_udt(tvbuff_t *tvb, packet_info* pinfo, proto_tree *parent_tree,
}
next_tvb = tvb_new_subset_remaining(tvb, 16);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_reported_length(tvb);
@@ -450,7 +449,6 @@ void proto_register_udt(void)
void proto_reg_handoff_udt(void)
{
- data_handle = find_dissector("data");
udt_handle = create_dissector_handle(dissect_udt, proto_udt);
heur_dissector_add("udp", dissect_udt_heur, "UDT over UDP", "udt_udp", proto_udt, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-uma.c b/epan/dissectors/packet-uma.c
index 271a123303..a5233cabc8 100644
--- a/epan/dissectors/packet-uma.c
+++ b/epan/dissectors/packet-uma.c
@@ -74,7 +74,6 @@ static gboolean uma_desegment = TRUE;
static dissector_handle_t uma_tcp_handle;
static dissector_handle_t uma_udp_handle;
-static dissector_handle_t data_handle;
static dissector_table_t bssap_pdu_type_table;
static dissector_handle_t rtcp_handle;
static dissector_handle_t llc_handle;
@@ -1078,8 +1077,8 @@ dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_protocol_discriminator, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_Message, tvb, ie_offset, ie_len, ENC_NA);
l3_tvb = tvb_new_subset_length(tvb, ie_offset, ie_len );
- if (!dissector_try_uint(bssap_pdu_type_table,BSSAP_PDU_TYPE_DTAP, l3_tvb, pinfo, urr_ie_tree))
- call_dissector(data_handle, l3_tvb, pinfo, urr_ie_tree);
+ if (!dissector_try_uint(bssap_pdu_type_table,BSSAP_PDU_TYPE_DTAP, l3_tvb, pinfo, urr_ie_tree))
+ call_data_dissector(l3_tvb, pinfo, urr_ie_tree);
break;
case 27:
/* 11.2.27 Channel Mode
@@ -1122,8 +1121,8 @@ dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
proto_tree_add_item(urr_ie_tree, hf_uma_urr_L3_Message, tvb, ie_offset, ie_len, ENC_NA);
/* XXX the dissector to call should depend on the RAT type ??? */
l3_tvb = tvb_new_subset_length(tvb, ie_offset, ie_len );
- if (!dissector_try_uint(bssap_pdu_type_table,BSSAP_PDU_TYPE_DTAP, l3_tvb, pinfo, urr_ie_tree))
- call_dissector(data_handle, l3_tvb, pinfo, urr_ie_tree);
+ if (!dissector_try_uint(bssap_pdu_type_table,BSSAP_PDU_TYPE_DTAP, l3_tvb, pinfo, urr_ie_tree))
+ call_data_dissector(l3_tvb, pinfo, urr_ie_tree);
break;
case 33:
/* 11.2.33 UL Quality Indication */
@@ -1250,14 +1249,13 @@ dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
*/
proto_tree_add_item(urr_ie_tree, hf_uma_urr_LLC_PDU, tvb, ie_offset, ie_len, ENC_NA);
llc_tvb = tvb_new_subset_length(tvb, ie_offset, ie_len );
- if (llc_handle) {
+ if (llc_handle) {
col_append_str(pinfo->cinfo, COL_PROTOCOL, "/");
col_set_fence(pinfo->cinfo, COL_PROTOCOL);
call_dissector(llc_handle, llc_tvb, pinfo, urr_ie_tree);
- }else{
- if (data_handle)
- call_dissector(data_handle, llc_tvb, pinfo, urr_ie_tree);
- }
+ }else{
+ call_data_dissector(llc_tvb, pinfo, urr_ie_tree);
+ }
break;
case 58: /* 11.2.58 Location Black List indicator */
proto_tree_add_item(urr_ie_tree, hf_uma_urr_LBLI, tvb, ie_offset, 1, ENC_BIG_ENDIAN);
@@ -1765,7 +1763,6 @@ proto_reg_handoff_uma(void)
uma_tcp_handle = find_dissector("umatcp");
uma_udp_handle = find_dissector("umaudp");
dissector_add_for_decode_as("udp.port", uma_udp_handle);
- data_handle = find_dissector("data");
rtcp_handle = find_dissector_add_dependency("rtcp", proto_uma);
llc_handle = find_dissector_add_dependency("llcgprs", proto_uma);
bssap_pdu_type_table = find_dissector_table("bssap.pdu_type");
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c
index ef13887081..55484b4b17 100644
--- a/epan/dissectors/packet-usb.c
+++ b/epan/dissectors/packet-usb.c
@@ -270,8 +270,6 @@ static const int *usb_usbpcap_info_fields[] = {
static int usb_tap = -1;
static gboolean try_heuristics = TRUE;
-static dissector_handle_t data_handle;
-
static dissector_table_t usb_bulk_dissector_table;
static dissector_table_t usb_control_dissector_table;
static dissector_table_t usb_interrupt_dissector_table;
@@ -3003,7 +3001,7 @@ try_dissect_next_protocol(proto_tree *tree, tvbuff_t *next_tvb, packet_info *pin
* XXX - is there something we can still do here?
*/
if (tvb_reported_length(next_tvb) > 0)
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_captured_length(next_tvb);
}
@@ -5300,8 +5298,6 @@ proto_reg_handoff_usb(void)
dissector_handle_t win32_usb_handle;
dissector_handle_t freebsd_usb_handle;
- data_handle = find_dissector("data");
-
linux_usb_handle = create_dissector_handle(dissect_linux_usb, proto_usb);
linux_usb_mmapped_handle = create_dissector_handle(dissect_linux_usb_mmapped,
proto_usb);
diff --git a/epan/dissectors/packet-usbip.c b/epan/dissectors/packet-usbip.c
index 410f0b7897..002e3760f3 100644
--- a/epan/dissectors/packet-usbip.c
+++ b/epan/dissectors/packet-usbip.c
@@ -96,10 +96,6 @@ static gint ett_usbip = -1;
static gint ett_usbip_dev = -1;
static gint ett_usbip_intf = -1;
-/* dissectors for the data portion of this protocol
- */
-static dissector_handle_t data_handle;
-
enum usb_device_speed {
USB_SPEED_UNKNOWN = 0, /* enumerating */
USB_SPEED_LOW, /* usb 1.0 */
@@ -1077,7 +1073,6 @@ proto_reg_handoff_usbip(void)
usbip_handle = create_dissector_handle(dissect_usbip, proto_usbip);
dissector_add_for_decode_as("tcp.port", usbip_handle);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-user_encap.c b/epan/dissectors/packet-user_encap.c
index 46534c356d..034e91a53d 100644
--- a/epan/dissectors/packet-user_encap.c
+++ b/epan/dissectors/packet-user_encap.c
@@ -79,7 +79,6 @@ static expert_field ei_user_encap_not_handled = EI_INIT;
static user_encap_t* encaps = NULL;
static guint num_encaps = 0;
static uat_t* encaps_uat;
-static dissector_handle_t data_handle;
static gint exported_pdu_tap = -1;
@@ -134,7 +133,7 @@ static int dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, voi
proto_item_set_text(item,"%s",msg);
expert_add_info_format(pinfo, item, &ei_user_encap_not_handled, "%s", msg);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
if (encap->payload_proto == NULL) {
@@ -146,7 +145,7 @@ static int dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, voi
proto_item_set_text(item,"%s",msg);
expert_add_info_format(pinfo, item, &ei_user_encap_not_handled, "%s", msg);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -225,7 +224,6 @@ void proto_reg_handoff_user_encap(void)
guint i;
user_encap_handle = find_dissector("user_dlt");
- data_handle = find_dissector("data");
user2_encap.encap = WTAP_ENCAP_USER2;
user2_encap.payload_proto_name = g_strdup("pktap");
diff --git a/epan/dissectors/packet-v120.c b/epan/dissectors/packet-v120.c
index 9d0a4468ca..4a954539c6 100644
--- a/epan/dissectors/packet-v120.c
+++ b/epan/dissectors/packet-v120.c
@@ -27,7 +27,6 @@
#include <epan/xdlc.h>
void proto_register_v120(void);
-void proto_reg_handoff_v120(void);
static int proto_v120 = -1;
static int hf_v120_address = -1;
@@ -70,8 +69,6 @@ static gint ett_v120_address = -1;
static gint ett_v120_control = -1;
static gint ett_v120_header = -1;
-static dissector_handle_t data_handle;
-
static const true_false_string tfs_response_command = { "Response", "Command" };
static const true_false_string tfs_segmentation_no_segmentation = { "Segmentation", "No segmentation" };
@@ -166,7 +163,7 @@ dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
v120len += dissect_v120_header(tvb, v120len, v120_tree);
proto_item_set_len(ti, v120len);
next_tvb = tvb_new_subset_remaining(tvb, v120len);
- call_dissector(data_handle,next_tvb, pinfo, v120_tree);
+ call_data_dissector(next_tvb, pinfo, v120_tree);
return tvb_captured_length(tvb);
}
@@ -333,12 +330,6 @@ proto_register_v120(void)
register_dissector("v120", dissect_v120, proto_v120);
}
-void
-proto_reg_handoff_v120(void)
-{
- data_handle = find_dissector("data");
-}
-
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissectors/packet-vines.c b/epan/dissectors/packet-vines.c
index 914e0b3b37..ed36c1a7df 100644
--- a/epan/dissectors/packet-vines.c
+++ b/epan/dissectors/packet-vines.c
@@ -317,7 +317,6 @@ capture_vines(const guchar *pd _U_, int offset _U_, int len _U_, capture_packet_
}
static dissector_handle_t vines_ip_handle;
-static dissector_handle_t data_handle;
/* Control flags */
#define VINES_FRP_FIRST_FRAGMENT 0x01
@@ -465,7 +464,7 @@ dissect_vines_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
next_tvb = tvb_new_subset_remaining(tvb, 1);
if (!dissector_try_uint(vines_llc_dissector_table, ptype,
next_tvb, pinfo, tree))
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -613,7 +612,7 @@ dissect_vines_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
next_tvb = tvb_new_subset_remaining(tvb, offset);
if (!dissector_try_uint(vines_ip_dissector_table, vip_proto,
next_tvb, pinfo, tree))
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -709,7 +708,6 @@ proto_reg_handoff_vines_ip(void)
dissector_add_uint("arcnet.protocol_id", ARCNET_PROTO_BANYAN,
vines_ip_handle);
dissector_add_uint("vines_llc.ptype", VINES_LLC_IP, vines_ip_handle);
- data_handle = find_dissector("data");
}
static int
@@ -905,7 +903,7 @@ dissect_vines_ipc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
if (viph.vipc_pkttype != PKTTYPE_DATA ||
!dissector_try_heuristic(vines_ipc_heur_subdissector_list,
next_tvb, pinfo, tree, &hdtbl_entry, NULL))
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -1078,7 +1076,7 @@ dissect_vines_spp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
if (viph.vspp_pkttype != PKTTYPE_DATA ||
!dissector_try_heuristic(vines_spp_heur_subdissector_list,
next_tvb, pinfo, tree, &hdtbl_entry, NULL))
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
diff --git a/epan/dissectors/packet-wai.c b/epan/dissectors/packet-wai.c
index b8918d7960..43d3e63a6b 100644
--- a/epan/dissectors/packet-wai.c
+++ b/epan/dissectors/packet-wai.c
@@ -159,8 +159,6 @@ static gint ett_wai_parameter = -1;
static gint ett_wai_fragment = -1;
static gint ett_wai_fragments = -1;
-static dissector_handle_t data_handle;
-
static const value_string wai_type_names [] = {
{ 1, "WAI protocol package"},
{ 0, NULL }
@@ -934,7 +932,7 @@ Figure 18 from [ref:1]
next_tvb = tvb_new_subset_remaining(tvb, WAI_DATA_OFFSET);
- /* Replace INFO column if message is fragmented and call data_handle */
+ /* Replace INFO column if message is fragmented and call data dissector */
if (flags) {
col_add_fstr(pinfo->cinfo, COL_INFO,
"Fragment (%d) of message, data not dissected", fragment_num);
@@ -943,7 +941,7 @@ Figure 18 from [ref:1]
"Reassembled WAI", frag_msg, &wai_frag_items,
NULL, wai_tree);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
} else {
/* If this is the last fragment of fragmented message, then reassamble and dissect
otherwise only dissect */
@@ -1380,7 +1378,6 @@ proto_register_wai(void)
void
proto_reg_handoff_wai(void)
{
- data_handle = find_dissector("data");
dissector_add_uint("ethertype", ETHERTYPE_WAI, wai_handle);
}
diff --git a/epan/dissectors/packet-websocket.c b/epan/dissectors/packet-websocket.c
index d8bf15ea21..7cd332b583 100644
--- a/epan/dissectors/packet-websocket.c
+++ b/epan/dissectors/packet-websocket.c
@@ -42,7 +42,6 @@
void proto_register_websocket(void);
void proto_reg_handoff_websocket(void);
-static dissector_handle_t data_handle;
static dissector_handle_t text_lines_handle;
static dissector_handle_t json_handle;
static dissector_handle_t sip_handle;
@@ -234,7 +233,7 @@ dissect_websocket_data_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
break;
case WS_BINARY: /* Binary */
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
break;
default: /* Unknown */
@@ -556,7 +555,6 @@ proto_register_websocket(void)
void
proto_reg_handoff_websocket(void)
{
- data_handle = find_dissector("data");
text_lines_handle = find_dissector_add_dependency("data-text-lines", proto_websocket);
json_handle = find_dissector_add_dependency("json", proto_websocket);
sip_handle = find_dissector_add_dependency("sip", proto_websocket);
diff --git a/epan/dissectors/packet-wsmp.c b/epan/dissectors/packet-wsmp.c
index 18975569b5..8a06357e7e 100644
--- a/epan/dissectors/packet-wsmp.c
+++ b/epan/dissectors/packet-wsmp.c
@@ -47,8 +47,6 @@ static const value_string wsmp_elemenid_names[] = {
};
-static dissector_handle_t data_handle;
-
/* Initialize the protocol and registered fields */
static int proto_wsmp = -1;
static int hf_wsmp_version = -1;
@@ -194,7 +192,7 @@ dissect_wsmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
*/
if (psid == 0xbff0)
{
- call_dissector(data_handle, wsmdata_tvb, pinfo, wsmdata_tree);
+ call_data_dissector(wsmdata_tvb, pinfo, wsmdata_tree);
}
return tvb_captured_length(tvb);
}
@@ -258,8 +256,6 @@ proto_reg_handoff_wsmp(void)
wsmp_handle = create_dissector_handle(dissect_wsmp, proto_wsmp);
dissector_add_uint("ethertype", ETHERTYPE_WSMP, wsmp_handle);
- data_handle = find_dissector("data");
- return;
}
/*
diff --git a/epan/dissectors/packet-x25.c b/epan/dissectors/packet-x25.c
index 0ff3443579..fc8924f737 100644
--- a/epan/dissectors/packet-x25.c
+++ b/epan/dissectors/packet-x25.c
@@ -523,7 +523,6 @@ static dissector_handle_t ip_handle;
static dissector_handle_t clnp_handle;
static dissector_handle_t ositp_handle;
static dissector_handle_t qllc_handle;
-static dissector_handle_t data_handle;
/* Preferences */
static gboolean payload_is_qllc_sna = FALSE;
@@ -1991,7 +1990,7 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
/* All else failed; dissect it as raw data */
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
/*
@@ -2411,7 +2410,6 @@ proto_reg_handoff_x25(void)
clnp_handle = find_dissector_add_dependency("clnp", proto_x25);
ositp_handle = find_dissector_add_dependency("ositp", proto_x25);
qllc_handle = find_dissector_add_dependency("qllc", proto_x25);
- data_handle = find_dissector("data");
x25_handle = find_dissector("x.25");
dissector_add_uint("llc.dsap", SAP_X25, x25_handle);
diff --git a/epan/dissectors/packet-xip-serval.c b/epan/dissectors/packet-xip-serval.c
index 54953b4cbe..acf852c066 100644
--- a/epan/dissectors/packet-xip-serval.c
+++ b/epan/dissectors/packet-xip-serval.c
@@ -32,7 +32,6 @@
void proto_register_xip_serval(void);
void proto_reg_handoff_xip_serval(void);
-static dissector_handle_t data_handle;
static dissector_handle_t tcp_handle;
static dissector_handle_t udp_handle;
@@ -259,7 +258,7 @@ display_xip_serval(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (protocol) {
case XIP_SERVAL_PROTO_DATA:
next_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
break;
case IP_PROTO_TCP: {
/* Get the Data Offset field of the TCP header, which is
@@ -413,7 +412,6 @@ proto_register_xip_serval(void)
void
proto_reg_handoff_xip_serval(void)
{
- data_handle = find_dissector("data");
tcp_handle = find_dissector_add_dependency("tcp", proto_xip_serval);
udp_handle = find_dissector_add_dependency("udp", proto_xip_serval);
}
diff --git a/epan/dissectors/packet-xip.c b/epan/dissectors/packet-xip.c
index f7fb208abc..8483c66a48 100644
--- a/epan/dissectors/packet-xip.c
+++ b/epan/dissectors/packet-xip.c
@@ -43,7 +43,6 @@ void proto_register_xip(void);
void proto_reg_handoff_xip(void);
/* Next dissector handles. */
-static dissector_handle_t data_handle;
static dissector_handle_t xip_serval_handle;
static gint proto_xip = -1;
@@ -484,7 +483,7 @@ dissect_xip_next_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
switch (next_header) {
case XIA_NEXT_HEADER_DATA:
next_tvb = tvb_new_subset_remaining(tvb, offset);
- return call_dissector(data_handle, next_tvb, pinfo, tree);
+ return call_data_dissector(next_tvb, pinfo, tree);
default:
expert_add_info_format(pinfo, next_ti, &ei_xip_next_header,
"Unrecognized next header type: 0x%02x", next_header);
@@ -699,7 +698,6 @@ proto_reg_handoff_xip(void)
dissector_add_uint("ethertype", ETHERTYPE_XIP, xip_handle);
xip_serval_handle = find_dissector_add_dependency("xipserval", proto_xip);
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/dissectors/packet-zbee-aps.c b/epan/dissectors/packet-zbee-aps.c
index 12365b5200..53f3fe8429 100644
--- a/epan/dissectors/packet-zbee-aps.c
+++ b/epan/dissectors/packet-zbee-aps.c
@@ -65,7 +65,6 @@ static guint zbee_apf_transaction_len (tvbuff_t *tvb, guint offset, guint8
static void proto_init_zbee_aps(void);
static void proto_cleanup_zbee_aps(void);
-void proto_reg_handoff_zbee_aps(void);
void proto_register_zbee_aps(void);
/********************
@@ -169,9 +168,6 @@ static expert_field ei_zbee_aps_missing_payload = EI_INIT;
static dissector_handle_t zbee_aps_handle;
static dissector_handle_t zbee_apf_handle;
-/* Subdissector Handles. */
-static dissector_handle_t data_handle;
-
/* Dissector List. */
static dissector_table_t zbee_aps_dissector_table;
@@ -1028,7 +1024,7 @@ dissect_zbee_aps_no_endpt:
else {
/* The reassembly handler could not defragment the message. */
col_append_fstr(pinfo->cinfo, COL_INFO, " (fragment %d)", block_num);
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
}
@@ -1087,7 +1083,7 @@ dissect_zbee_aps_no_endpt:
}
if (payload_tvb) {
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -1202,7 +1198,7 @@ static void dissect_zbee_aps_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
proto_item_set_len(cmd_root, offset);
/* Dump the leftover to the data dissector. */
- call_dissector(data_handle, leftover_tvb, pinfo, root);
+ call_data_dissector(leftover_tvb, pinfo, root);
}
} /* dissect_zbee_aps_cmd */
@@ -1716,7 +1712,7 @@ dissect_app_end:
if (offset < tvb_captured_length(tvb)) {
/* There are bytes remaining! */
app_tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, app_tvb, pinfo, tree);
+ call_data_dissector(app_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -2148,16 +2144,6 @@ void proto_register_zbee_aps(void)
} /* proto_register_zbee_aps */
/**
- *Registers the zigbee APS dissector with Wireshark.
- *
-*/
-void proto_reg_handoff_zbee_aps(void)
-{
- /* Find the other dissectors we need. */
- data_handle = find_dissector("data");
-} /* proto_reg_handoff_zbee_aps */
-
-/**
*Initializes the APS dissectors prior to beginning protocol
*
*/
diff --git a/epan/dissectors/packet-zbee-nwk-gp.c b/epan/dissectors/packet-zbee-nwk-gp.c
index a0704b2101..28940d55d1 100644
--- a/epan/dissectors/packet-zbee-nwk-gp.c
+++ b/epan/dissectors/packet-zbee-nwk-gp.c
@@ -297,7 +297,6 @@ static gint ett_zbee_nwk_fcf = -1;
static gint ett_zbee_nwk_fcf_ext = -1;
/* Common. */
-static dissector_handle_t data_handle;
static GSList *zbee_gp_keyring = NULL;
static guint num_uat_key_records = 0;
@@ -1090,7 +1089,7 @@ dissect_zbee_nwk_gp_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
proto_item_set_len(cmd_root, offset);
/* Dump the tail. */
- call_dissector(data_handle, leftover_tvb, pinfo, root);
+ call_data_dissector(leftover_tvb, pinfo, root);
}
return offset;
} /* dissect_zbee_nwk_gp_cmd */
@@ -1309,7 +1308,7 @@ dissect_zbee_nwk_gp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
} else {
g_free(dec_buffer);
payload_tvb = tvb_new_subset(tvb, offset - packet.payload_len - packet.mic_size, packet.payload_len, -1);
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
}
}
return tvb_captured_length(tvb);
@@ -1696,8 +1695,6 @@ proto_register_zbee_nwk_gp(void)
void
proto_reg_handoff_zbee_nwk_gp(void)
{
- /* Find the other dissectors we need. */
- data_handle = find_dissector("data");
/* Register our dissector with IEEE 802.15.4. */
dissector_add_for_decode_as(IEEE802154_PROTOABBREV_WPAN_PANID, find_dissector(ZBEE_PROTOABBREV_NWK_GP));
heur_dissector_add(IEEE802154_PROTOABBREV_WPAN, dissect_zbee_nwk_heur_gp, "ZigBee Green Power over IEEE 802.15.4", "zbee_nwk_gp_wlan", proto_zbee_nwk_gp, HEURISTIC_ENABLE);
diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c
index 586c9ee36a..439b81bde5 100644
--- a/epan/dissectors/packet-zbee-nwk.c
+++ b/epan/dissectors/packet-zbee-nwk.c
@@ -180,7 +180,6 @@ static gint ett_zbee_nwk_cmd_ed_to_rsp_prnt_info = -1;
static expert_field ei_zbee_nwk_missing_payload = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t aps_handle;
static dissector_handle_t zbee_gp_handle;
@@ -689,7 +688,7 @@ dissect_zbee_nwk_full(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
}
else {
/* Invalid type. */
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
@@ -825,7 +824,7 @@ static void dissect_zbee_nwk_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
proto_item_set_len(cmd_root, offset);
/* Dump the leftover to the data dissector. */
- call_dissector(data_handle, leftover_tvb, pinfo, root);
+ call_data_dissector(leftover_tvb, pinfo, root);
}
} /* dissect_zbee_nwk_cmd */
@@ -1444,7 +1443,7 @@ static int dissect_zbee_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
proto_item_set_len(beacon_root, offset);
/* Dump the leftover to the data dissector. */
- call_dissector(data_handle, leftover_tvb, pinfo, root);
+ call_data_dissector(leftover_tvb, pinfo, root);
}
return tvb_captured_length(tvb);
@@ -1534,7 +1533,7 @@ static int dissect_zbip_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
proto_item_set_len(beacon_root, offset);
/* Dump the leftover to the data dissector. */
- call_dissector(data_handle, leftover_tvb, pinfo, root);
+ call_data_dissector(leftover_tvb, pinfo, root);
}
return tvb_captured_length(tvb);
} /* dissect_zbip_beacon */
@@ -1966,7 +1965,6 @@ void proto_register_zbee_nwk(void)
void proto_reg_handoff_zbee_nwk(void)
{
/* Find the other dissectors we need. */
- data_handle = find_dissector("data");
aps_handle = find_dissector_add_dependency(ZBEE_PROTOABBREV_APS, proto_zbee_nwk);
zbee_gp_handle = find_dissector_add_dependency(ZBEE_PROTOABBREV_NWK_GP, proto_zbee_nwk);
@@ -1975,9 +1973,6 @@ void proto_reg_handoff_zbee_nwk(void)
heur_dissector_add(IEEE802154_PROTOABBREV_WPAN_BEACON, dissect_zbee_beacon_heur, "ZigBee Beacon", "zbee_wlan_beacon", proto_zbee_beacon, HEURISTIC_ENABLE);
heur_dissector_add(IEEE802154_PROTOABBREV_WPAN_BEACON, dissect_zbip_beacon_heur, "ZigBee IP Beacon", "zbip_wlan_beacon", proto_zbip_beacon, HEURISTIC_ENABLE);
heur_dissector_add(IEEE802154_PROTOABBREV_WPAN, dissect_zbee_nwk_heur, "ZigBee Network Layer over IEEE 802.15.4", "zbee_nwk_wlan", proto_zbee_nwk, HEURISTIC_ENABLE);
-
- /* Handoff the ZigBee security dissector code. */
- zbee_security_handoff();
} /* proto_reg_handoff_zbee */
static void free_keyring_key(gpointer key)
diff --git a/epan/dissectors/packet-zbee-security.c b/epan/dissectors/packet-zbee-security.c
index ff92c4fcd2..00f9bbbaf2 100644
--- a/epan/dissectors/packet-zbee-security.c
+++ b/epan/dissectors/packet-zbee-security.c
@@ -73,8 +73,6 @@ static expert_field ei_zbee_sec_encrypted_payload = EI_INIT;
static expert_field ei_zbee_sec_encrypted_payload_sliced = EI_INIT;
static expert_field ei_zbee_sec_extended_source_unknown = EI_INIT;
-static dissector_handle_t data_handle;
-
static const value_string zbee_sec_key_names[] = {
{ ZBEE_SEC_KEY_LINK, "Link Key" },
{ ZBEE_SEC_KEY_NWK, "Network Key" },
@@ -423,24 +421,6 @@ zbee_security_parse_key(const gchar *key_str, guint8 *key_buf, gboolean byte_ord
/*FUNCTION:------------------------------------------------------
* NAME
- * zbee_security_handoff
- * DESCRIPTION
- * Hands off the security dissector.
- * PARAMETERS
- * none
- * RETURNS
- * tvbuff_t *
- *---------------------------------------------------------------
- */
-void
-zbee_security_handoff(void)
-{
- /* Lookup the data dissector. */
- data_handle = find_dissector("data");
-} /* zbee_security_handoff */
-
-/*FUNCTION:------------------------------------------------------
- * NAME
* dissect_zbee_secure
* DESCRIPTION
* Dissects and decrypts secured ZigBee frames.
@@ -662,7 +642,7 @@ dissect_zbee_secure(tvbuff_t *tvb, packet_info *pinfo, proto_tree* tree, guint o
/* Create a buffer for the undecrypted payload. */
payload_tvb = tvb_new_subset_length(tvb, offset, payload_len);
/* Dump the payload to the data dissector. */
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
/* Couldn't decrypt, so return NULL. */
return NULL;
}
@@ -783,7 +763,7 @@ dissect_zbee_secure(tvbuff_t *tvb, packet_info *pinfo, proto_tree* tree, guint o
/* Create a buffer for the undecrypted payload. */
payload_tvb = tvb_new_subset_length(tvb, offset, payload_len);
/* Dump the payload to the data dissector. */
- call_dissector(data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
/* Couldn't decrypt, so return NULL. */
return NULL;
} /* dissect_zbee_secure */
diff --git a/epan/dissectors/packet-zbee-security.h b/epan/dissectors/packet-zbee-security.h
index 9818392806..f1ed6dd8a3 100644
--- a/epan/dissectors/packet-zbee-security.h
+++ b/epan/dissectors/packet-zbee-security.h
@@ -74,7 +74,6 @@ typedef struct{
/* Init routine for the Security dissectors. */
extern void zbee_security_register (module_t *module, int proto);
-extern void zbee_security_handoff (void);
/* Security Dissector Routine. */
extern tvbuff_t *dissect_zbee_secure(tvbuff_t *, packet_info *, proto_tree *, guint);
diff --git a/epan/dissectors/packet-zbee-zcl.c b/epan/dissectors/packet-zbee-zcl.c
index d356805cd3..1590fe094a 100644
--- a/epan/dissectors/packet-zbee-zcl.c
+++ b/epan/dissectors/packet-zbee-zcl.c
@@ -137,8 +137,6 @@ static gint ett_zbee_zcl = -1;
static gint ett_zbee_zcl_fcf = -1;
static gint ett_zbee_zcl_attr[ZBEE_ZCL_NUM_ATTR_ETT];
static gint ett_zbee_zcl_array_elements[ZBEE_ZCL_NUM_ARRAY_ELEM_ETT];
-/* Dissector Handles. */
-static dissector_handle_t data_handle;
/* Dissector List. */
static dissector_table_t zbee_zcl_dissector_table;
@@ -1962,7 +1960,7 @@ static void zcl_dump_data(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto
if (length > 0) {
remainder = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, remainder, pinfo, root);
+ call_data_dissector(remainder, pinfo, root);
}
return;
@@ -2280,9 +2278,6 @@ void proto_reg_handoff_zbee_zcl(void)
{
dissector_handle_t zbee_zcl_handle;
- /* Find the dissectors we need. */
- data_handle = find_dissector("data");
-
/* Register our dissector for the appropriate profiles. */
zbee_zcl_handle = find_dissector(ZBEE_PROTOABBREV_ZCL);
dissector_add_uint("zbee.profile", ZBEE_PROFILE_IPM, zbee_zcl_handle);
diff --git a/epan/dissectors/packet-zbee-zdp.c b/epan/dissectors/packet-zbee-zdp.c
index f9aec9d84c..981c27d92f 100644
--- a/epan/dissectors/packet-zbee-zdp.c
+++ b/epan/dissectors/packet-zbee-zdp.c
@@ -218,9 +218,6 @@ static gint ett_zbee_zdp_bind_table = -1;
gint ett_zbee_zdp_table_entry = -1;
gint ett_zbee_zdp_descriptor_capability_field = -1;
-/* Data dissector handle. */
-static dissector_handle_t data_handle;
-
/**************************************
* Value Strings
**************************************
@@ -437,7 +434,7 @@ zdp_dump_excess(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tre
if (length > 0) {
excess = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, excess, pinfo, root);
+ call_data_dissector(excess, pinfo, root);
}
} /* zdp_dump_excess */
@@ -1261,7 +1258,7 @@ dissect_zbee_zdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
break;
default:
/* Invalid Cluster Identifier. */
- call_dissector(data_handle, zdp_tvb, pinfo, tree);
+ call_data_dissector(zdp_tvb, pinfo, tree);
break;
} /* switch */
@@ -1786,9 +1783,6 @@ void proto_reg_handoff_zbee_zdp(void)
{
dissector_handle_t zdp_handle;
- /* Find the other dissectors we need. */
- data_handle = find_dissector("data");
-
/* Register our dissector with the ZigBee application dissectors. */
zdp_handle = find_dissector("zbee_zdp");
dissector_add_uint("zbee.profile", ZBEE_ZDP_PROFILE, zdp_handle);
diff --git a/epan/dissectors/packet-ziop.c b/epan/dissectors/packet-ziop.c
index c4d7dbf3d2..601f629c1a 100644
--- a/epan/dissectors/packet-ziop.c
+++ b/epan/dissectors/packet-ziop.c
@@ -70,7 +70,6 @@ static gint ett_ziop = -1;
static expert_field ei_ziop_version = EI_INIT;
-static dissector_handle_t data_handle;
static dissector_handle_t ziop_tcp_handle;
@@ -148,7 +147,7 @@ dissect_ziop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data
giop_version_major,
giop_version_minor);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_reported_length(tvb);
}
@@ -333,8 +332,6 @@ proto_reg_handoff_ziop (void)
dissector_add_for_decode_as("udp.port", ziop_tcp_handle);
heur_dissector_add("tcp", dissect_ziop_heur, "ZIOP over TCP", "ziop_tcp", proto_ziop, HEURISTIC_ENABLE);
-
- data_handle = find_dissector("data");
}
/*
diff --git a/epan/packet.c b/epan/packet.c
index d347625a07..e06fec070d 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -2760,6 +2760,11 @@ call_dissector(dissector_handle_t handle, tvbuff_t *tvb,
return call_dissector_with_data(handle, tvb, pinfo, tree, NULL);
}
+int
+call_data_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+ return call_dissector_work(data_handle, tvb, pinfo, tree, TRUE, NULL);
+}
/*
* Call a heuristic dissector through a heur_dtbl_entry
diff --git a/epan/packet.h b/epan/packet.h
index b36ffd43b9..3492117816 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -545,6 +545,8 @@ WS_DLL_PUBLIC int call_dissector_with_data(dissector_handle_t handle, tvbuff_t *
WS_DLL_PUBLIC int call_dissector(dissector_handle_t handle, tvbuff_t *tvb,
packet_info *pinfo, proto_tree *tree);
+WS_DLL_PUBLIC int call_data_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+
/** Call a dissector through a handle but if no dissector was found
* just return 0 and do not call the "data" dissector instead.
*
diff --git a/plugins/docsis/packet-docsis.c b/plugins/docsis/packet-docsis.c
index 58b8a88cab..2f2057ac3b 100644
--- a/plugins/docsis/packet-docsis.c
+++ b/plugins/docsis/packet-docsis.c
@@ -114,7 +114,6 @@ static int hf_docsis_ehdr_bpup2_ver = -1;
static int hf_docsis_ehdr_bpup2_sid = -1;
static dissector_handle_t docsis_handle;
static dissector_handle_t eth_withoutfcs_handle;
-static dissector_handle_t data_handle;
static dissector_handle_t docsis_mgmt_handle;
#if 0
static dissector_table_t docsis_dissector_table;
@@ -586,7 +585,7 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* da
if (pdulen > 0)
{
mgt_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen);
- call_dissector (data_handle, mgt_tvb, pinfo, tree);
+ call_data_dissector(mgt_tvb, pinfo, tree);
}
if (concatlen > 0)
{
@@ -837,7 +836,6 @@ proto_reg_handoff_docsis (void)
{
docsis_handle = find_dissector ("docsis");
- data_handle = find_dissector ("data");
dissector_add_uint ("wtap_encap", WTAP_ENCAP_DOCSIS, docsis_handle);
docsis_mgmt_handle = find_dissector ("docsis_mgmt");
diff --git a/plugins/docsis/packet-macmgmt.c b/plugins/docsis/packet-macmgmt.c
index 90dc0b6e5d..b89a4c3304 100644
--- a/plugins/docsis/packet-macmgmt.c
+++ b/plugins/docsis/packet-macmgmt.c
@@ -87,7 +87,6 @@ static int hf_docsis_mgt_type = -1;
static int hf_docsis_mgt_rsvd = -1;
static dissector_table_t docsis_mgmt_dissector_table;
-static dissector_handle_t data_handle;
/* Initialize the subtree pointers */
static gint ett_docsis_mgmt = -1;
@@ -193,7 +192,7 @@ dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* d
payload_tvb = tvb_new_subset_length (tvb, 20, msg_len - 6);
if (!dissector_try_uint(docsis_mgmt_dissector_table, type, payload_tvb, pinfo, tree))
- call_dissector (data_handle, payload_tvb, pinfo, tree);
+ call_data_dissector(payload_tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -278,8 +277,6 @@ proto_reg_handoff_docsis_mgmt (void)
docsis_mgmt_handle = find_dissector ("docsis_mgmt");
dissector_add_uint ("docsis", 0x03, docsis_mgmt_handle);
#endif
-
- data_handle = find_dissector ("data");
}
/*
diff --git a/plugins/ethercat/packet-ethercat-frame.c b/plugins/ethercat/packet-ethercat-frame.c
index dd71c17cf6..0d9eb5f677 100644
--- a/plugins/ethercat/packet-ethercat-frame.c
+++ b/plugins/ethercat/packet-ethercat-frame.c
@@ -38,7 +38,6 @@ void proto_reg_handoff_ethercat_frame(void);
static int proto_ethercat_frame = -1;
static dissector_table_t ethercat_frame_dissector_table;
-static dissector_handle_t ethercat_frame_data_handle;
/* Define the tree for the EtherCAT frame */
static int ett_ethercat_frame = -1;
@@ -97,7 +96,7 @@ static int dissect_ethercat_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree
col_add_fstr (pinfo->cinfo, COL_PROTOCOL, "0x%04x", hdr.v.protocol);
/* No sub dissector wanted to handle this payload, decode it as general
data instead. */
- call_dissector (ethercat_frame_data_handle, next_tvb, pinfo, tree);
+ call_data_dissector(next_tvb, pinfo, tree);
}
return tvb_captured_length(tvb);
}
@@ -151,7 +150,6 @@ void proto_reg_handoff_ethercat_frame(void)
dissector_add_uint("ethertype", ETHERTYPE_ECATF, ethercat_frame_handle);
dissector_add_uint("udp.port", ETHERTYPE_ECATF, ethercat_frame_handle);
dissector_add_uint("tcp.port", ETHERTYPE_ECATF, ethercat_frame_handle);
- ethercat_frame_data_handle = find_dissector("data");
}
/*
diff --git a/plugins/irda/packet-ircomm.c b/plugins/irda/packet-ircomm.c
index 7458f19e25..e9d79c122c 100644
--- a/plugins/irda/packet-ircomm.c
+++ b/plugins/irda/packet-ircomm.c
@@ -123,7 +123,6 @@ static gint ett_ircomm_ctrl = -1;
#define MAX_PARAMETERS 32
static gint ett_param[MAX_IAP_ENTRIES * MAX_PARAMETERS];
-static dissector_handle_t data_handle;
static dissector_handle_t ircomm_raw_handle;
static dissector_handle_t ircomm_cooked_handle;
@@ -191,10 +190,10 @@ static int dissect_cooked_ircomm(tvbuff_t* tvb, packet_info* pinfo, proto_tree*
proto_tree_add_item(ctrl_tree, hf_control_len, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- call_dissector(data_handle, tvb_new_subset_length(tvb, offset, clen), pinfo, ctrl_tree);
+ call_data_dissector(tvb_new_subset_length(tvb, offset, clen), pinfo, ctrl_tree);
offset += clen;
- call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, ircomm_tree);
+ call_data_dissector(tvb_new_subset_remaining(tvb, offset), pinfo, ircomm_tree);
return len;
}
@@ -206,6 +205,8 @@ static int dissect_cooked_ircomm(tvbuff_t* tvb, packet_info* pinfo, proto_tree*
static int dissect_raw_ircomm(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data _U_)
{
guint len = tvb_reported_length(tvb);
+ proto_item* ti;
+ proto_tree* ircomm_tree;
if (len == 0)
return 0;
@@ -215,14 +216,11 @@ static int dissect_raw_ircomm(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tre
col_add_fstr(pinfo->cinfo, COL_INFO, "User Data: %d byte%s", len, (len > 1)? "s": "");
- if (tree)
- {
- /* create display subtree for the protocol */
- proto_item* ti = proto_tree_add_item(tree, proto_ircomm, tvb, 0, -1, ENC_NA);
- proto_tree* ircomm_tree = proto_item_add_subtree(ti, ett_ircomm);
+ /* create display subtree for the protocol */
+ ti = proto_tree_add_item(tree, proto_ircomm, tvb, 0, -1, ENC_NA);
+ ircomm_tree = proto_item_add_subtree(ti, ett_ircomm);
- call_dissector(data_handle, tvb, pinfo, ircomm_tree);
- }
+ call_data_dissector(tvb, pinfo, ircomm_tree);
return len;
}
@@ -420,7 +418,6 @@ void proto_register_ircomm(void)
void
proto_reg_handoff_ircomm(void) {
- data_handle = find_dissector("data");
ircomm_raw_handle = find_dissector("ircomm_raw");
ircomm_cooked_handle = find_dissector("ircomm_cooked");
}
diff --git a/plugins/irda/packet-irda.c b/plugins/irda/packet-irda.c
index 322b739ba0..f9c46d33da 100644
--- a/plugins/irda/packet-irda.c
+++ b/plugins/irda/packet-irda.c
@@ -139,8 +139,6 @@
void proto_reg_handoff_irda(void);
void proto_register_irda(void);
-static dissector_handle_t data_handle;
-
/* Initialize the protocol and registered fields */
static int proto_irlap = -1;
static int hf_lap_a = -1;
@@ -645,7 +643,7 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r
/* If any bytes remain, send it to the generic data dissector */
tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, tvb, pinfo, root);
+ call_data_dissector(tvb, pinfo, root);
}
@@ -895,7 +893,7 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
/* If any bytes remain, send it to the generic data dissector */
tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, tvb, pinfo, root);
+ call_data_dissector(tvb, pinfo, root);
}
@@ -1007,7 +1005,7 @@ static void dissect_appl_proto(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro
call_dissector_with_data(lmp_conv->dissector, tvb, pinfo, root, GUINT_TO_POINTER(pdu_type));
}
else
- call_dissector(data_handle, tvb, pinfo, root);
+ call_data_dissector(tvb, pinfo, root);
}
@@ -1159,7 +1157,7 @@ static void dissect_irlmp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, g
else
{
if ((dlsap == LSAP_IAS) || (slsap == LSAP_IAS))
- call_dissector(data_handle, tvb, pinfo, root);
+ call_data_dissector(tvb, pinfo, root);
else
switch (opcode)
{
@@ -1173,7 +1171,7 @@ static void dissect_irlmp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, g
break;
default:
- call_dissector(data_handle, tvb, pinfo, root);
+ call_data_dissector(tvb, pinfo, root);
}
}
}
@@ -1828,7 +1826,7 @@ static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
if (tvb_reported_length_remaining(tvb, offset) > 0)
{
tvb = tvb_new_subset_remaining(tvb, offset);
- call_dissector(data_handle, tvb, pinfo, root);
+ call_data_dissector(tvb, pinfo, root);
}
}
@@ -2248,7 +2246,6 @@ void proto_reg_handoff_irda(void)
irda_handle = find_dissector("irda");
dissector_add_uint("wtap_encap", WTAP_ENCAP_IRDA, irda_handle);
dissector_add_uint("sll.ltype", LINUX_SLL_P_IRDA_LAP, irda_handle);
- data_handle = find_dissector("data");
}
/*
diff --git a/plugins/irda/packet-sir.c b/plugins/irda/packet-sir.c
index 526db940c7..98ee323390 100644
--- a/plugins/irda/packet-sir.c
+++ b/plugins/irda/packet-sir.c
@@ -47,7 +47,6 @@ void proto_reg_handoff_irsir(void);
void proto_register_irsir(void);
/** Protocol handles. */
-static dissector_handle_t data_handle;
static dissector_handle_t irda_handle;
/** Protocol fields. */
@@ -181,10 +180,7 @@ proto_reg_handoff_irsir(void)
{
dissector_add_uint("tcp.port", TCP_PORT_SIR, find_dissector("sir"));
- data_handle = find_dissector("data");
irda_handle = find_dissector("irda");
- if (irda_handle == NULL)
- irda_handle = data_handle;
}
diff --git a/plugins/profinet/packet-pn-rt.c b/plugins/profinet/packet-pn-rt.c
index ac0acb9e10..8757a1a9ff 100644
--- a/plugins/profinet/packet-pn-rt.c
+++ b/plugins/profinet/packet-pn-rt.c
@@ -330,7 +330,6 @@ dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
static reassembly_table pdu_reassembly_table;
static GHashTable *reasembled_frag_table = NULL;
-static dissector_handle_t data_handle;
static dissector_table_t ethertype_subdissector_table;
static guint32 start_frag_OR_ID[16];
@@ -447,7 +446,7 @@ dissect_FRAG_PDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
type = tvb_get_ntohs(pdu_tvb, 0);
pdu_tvb = tvb_new_subset_remaining(pdu_tvb, 2);
if (!dissector_try_uint(ethertype_subdissector_table, type, pdu_tvb, pinfo, tree))
- call_dissector(data_handle, pdu_tvb, pinfo, tree);
+ call_data_dissector(pdu_tvb, pinfo, tree);
}
}
return TRUE;
@@ -1001,7 +1000,6 @@ proto_reg_handoff_pn_rt(void)
heur_dissector_add("pn_rt", dissect_CSF_SDU_heur, "PROFINET CSF_SDU IO", "pn_csf_sdu_pn_rt", proto_pn_rt, HEURISTIC_ENABLE);
heur_dissector_add("pn_rt", dissect_FRAG_PDU_heur, "PROFINET Frag PDU IO", "pn_frag_pn_rt", proto_pn_rt, HEURISTIC_ENABLE);
- data_handle = find_dissector("data");
ethertype_subdissector_table = find_dissector_table("ethertype");
}