Create call_data_dissector() to call data dissector.
authorMichael Mann <mmann78@netscape.net>
Sun, 20 Mar 2016 00:33:14 +0000 (20:33 -0400)
committerMichael Mann <mmann78@netscape.net>
Sun, 20 Mar 2016 17:38:03 +0000 (17:38 +0000)
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>
285 files changed:
debian/libwireshark0.symbols
epan/dissectors/asn1/cdt/cdt.cnf
epan/dissectors/asn1/cdt/packet-cdt-template.c
epan/dissectors/asn1/gsm_map/gsm_map.cnf
epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c
epan/dissectors/asn1/inap/inap.cnf
epan/dissectors/asn1/inap/packet-inap-template.c
epan/dissectors/asn1/tetra/packet-tetra-template.c
epan/dissectors/file-file.c
epan/dissectors/packet-3com-xns.c
epan/dissectors/packet-6lowpan.c
epan/dissectors/packet-9p.c
epan/dissectors/packet-adb_cs.c
epan/dissectors/packet-adwin.c
epan/dissectors/packet-aeron.c
epan/dissectors/packet-afp.c
epan/dissectors/packet-ansi_a.c
epan/dissectors/packet-ap1394.c
epan/dissectors/packet-arcnet.c
epan/dissectors/packet-aruba-erm.c
epan/dissectors/packet-aruba-papi.c
epan/dissectors/packet-asf.c
epan/dissectors/packet-atalk.c
epan/dissectors/packet-atm.c
epan/dissectors/packet-atmtcp.c
epan/dissectors/packet-ax25-nol3.c
epan/dissectors/packet-ax25.c
epan/dissectors/packet-bacnet.c
epan/dissectors/packet-bat.c
epan/dissectors/packet-batadv.c
epan/dissectors/packet-bctp.c
epan/dissectors/packet-bluetooth.c
epan/dissectors/packet-bssap.c
epan/dissectors/packet-bssgp.c
epan/dissectors/packet-btavctp.c
epan/dissectors/packet-btbnep.c
epan/dissectors/packet-bthcrp.c
epan/dissectors/packet-btrfcomm.c
epan/dissectors/packet-bvlc.c
epan/dissectors/packet-capwap.c
epan/dissectors/packet-cast.c
epan/dissectors/packet-cattp.c
epan/dissectors/packet-ccsds.c
epan/dissectors/packet-cdp.c
epan/dissectors/packet-cdt.c
epan/dissectors/packet-cfdp.c
epan/dissectors/packet-chdlc.c
epan/dissectors/packet-cisco-sm.c
epan/dissectors/packet-clnp.c
epan/dissectors/packet-cnip.c
epan/dissectors/packet-cosine.c
epan/dissectors/packet-dccp.c
epan/dissectors/packet-distcc.c
epan/dissectors/packet-dmx.c
epan/dissectors/packet-dsi.c
epan/dissectors/packet-dsr.c
epan/dissectors/packet-dtn.c
epan/dissectors/packet-dtpt.c
epan/dissectors/packet-dua.c
epan/dissectors/packet-eapol.c
epan/dissectors/packet-egd.c
epan/dissectors/packet-eiss.c
epan/dissectors/packet-enc.c
epan/dissectors/packet-enip.c
epan/dissectors/packet-epl.c
epan/dissectors/packet-erf.c
epan/dissectors/packet-eth.c
epan/dissectors/packet-ethertype.c
epan/dissectors/packet-fc.c
epan/dissectors/packet-fcct.c
epan/dissectors/packet-fcels.c
epan/dissectors/packet-fcfcs.c
epan/dissectors/packet-fcfzs.c
epan/dissectors/packet-fcip.c
epan/dissectors/packet-fcoe.c
epan/dissectors/packet-fcoib.c
epan/dissectors/packet-fcp.c
epan/dissectors/packet-fcsb3.c
epan/dissectors/packet-fcswils.c
epan/dissectors/packet-fddi.c
epan/dissectors/packet-fefd.c
epan/dissectors/packet-flexnet.c
epan/dissectors/packet-flexray.c
epan/dissectors/packet-flip.c
epan/dissectors/packet-fmtp.c
epan/dissectors/packet-frame.c
epan/dissectors/packet-geneve.c
epan/dissectors/packet-gfp.c
epan/dissectors/packet-giop.c
epan/dissectors/packet-gmr1_rach.c
epan/dissectors/packet-gmr1_rr.c
epan/dissectors/packet-gmrp.c
epan/dissectors/packet-gprs-llc.c
epan/dissectors/packet-gre.c
epan/dissectors/packet-gsm_a_dtap.c
epan/dissectors/packet-gsm_a_gm.c
epan/dissectors/packet-gsm_a_rr.c
epan/dissectors/packet-gsm_cbch.c
epan/dissectors/packet-gsm_map.c
epan/dissectors/packet-gsm_rlcmac.c
epan/dissectors/packet-gsm_um.c
epan/dissectors/packet-gtp.c
epan/dissectors/packet-gvrp.c
epan/dissectors/packet-h1.c
epan/dissectors/packet-hci_h1.c
epan/dissectors/packet-hci_h4.c
epan/dissectors/packet-hpext.c
epan/dissectors/packet-hsr.c
epan/dissectors/packet-hsrp.c
epan/dissectors/packet-http.c
epan/dissectors/packet-http2.c
epan/dissectors/packet-i2c.c
epan/dissectors/packet-iax2.c
epan/dissectors/packet-icap.c
epan/dissectors/packet-icmp.c
epan/dissectors/packet-icmpv6.c
epan/dissectors/packet-idp.c
epan/dissectors/packet-ieee80211.c
epan/dissectors/packet-ieee802154.c
epan/dissectors/packet-ieee802a.c
epan/dissectors/packet-ifcp.c
epan/dissectors/packet-inap.c
epan/dissectors/packet-infiniband.c
epan/dissectors/packet-ip.c
epan/dissectors/packet-ipmi-session.c
epan/dissectors/packet-ipmi-trace.c
epan/dissectors/packet-ipmi.c
epan/dissectors/packet-ipos.c
epan/dissectors/packet-ipp.c
epan/dissectors/packet-ipv6.c
epan/dissectors/packet-ipx.c
epan/dissectors/packet-isdn.c
epan/dissectors/packet-isi.c
epan/dissectors/packet-isl.c
epan/dissectors/packet-itdm.c
epan/dissectors/packet-iua.c
epan/dissectors/packet-iuup.c
epan/dissectors/packet-iwarp-ddp-rdmap.c
epan/dissectors/packet-juniper.c
epan/dissectors/packet-jxta.c
epan/dissectors/packet-kismet.c
epan/dissectors/packet-l2tp.c
epan/dissectors/packet-lanforge.c
epan/dissectors/packet-lapd.c
epan/dissectors/packet-lapdm.c
epan/dissectors/packet-lapsat.c
epan/dissectors/packet-lat.c
epan/dissectors/packet-lbmc.c
epan/dissectors/packet-lisp.c
epan/dissectors/packet-llc.c
epan/dissectors/packet-lon.c
epan/dissectors/packet-loop.c
epan/dissectors/packet-lpd.c
epan/dissectors/packet-lwapp.c
epan/dissectors/packet-lwm.c
epan/dissectors/packet-m3ua.c
epan/dissectors/packet-macsec.c
epan/dissectors/packet-mactelnet.c
epan/dissectors/packet-mdshdr.c
epan/dissectors/packet-mime-encap.c
epan/dissectors/packet-mp2t.c
epan/dissectors/packet-mpeg-dsmcc.c
epan/dissectors/packet-mpls-y1711.c
epan/dissectors/packet-mpls.c
epan/dissectors/packet-mq.c
epan/dissectors/packet-mstp.c
epan/dissectors/packet-mtp3.c
epan/dissectors/packet-multipart.c
epan/dissectors/packet-nbipx.c
epan/dissectors/packet-nbt.c
epan/dissectors/packet-ncp.c
epan/dissectors/packet-ndps.c
epan/dissectors/packet-netanalyzer.c
epan/dissectors/packet-netbios.c
epan/dissectors/packet-netlink.c
epan/dissectors/packet-netrom.c
epan/dissectors/packet-nettl.c
epan/dissectors/packet-nflog.c
epan/dissectors/packet-nhrp.c
epan/dissectors/packet-null.c
epan/dissectors/packet-ocfs2.c
epan/dissectors/packet-osi.c
epan/dissectors/packet-ositp.c
epan/dissectors/packet-ospf.c
epan/dissectors/packet-ossp.c
epan/dissectors/packet-p_mul.c
epan/dissectors/packet-packetlogger.c
epan/dissectors/packet-pcli.c
epan/dissectors/packet-pdcp-lte.c
epan/dissectors/packet-pflog.c
epan/dissectors/packet-pgm.c
epan/dissectors/packet-pktgen.c
epan/dissectors/packet-pop.c
epan/dissectors/packet-ppcap.c
epan/dissectors/packet-ppi.c
epan/dissectors/packet-ppp.c
epan/dissectors/packet-pptp.c
epan/dissectors/packet-pw-atm.c
epan/dissectors/packet-pw-cesopsn.c
epan/dissectors/packet-pw-common.c
epan/dissectors/packet-pw-satop.c
epan/dissectors/packet-q931.c
epan/dissectors/packet-quake.c
epan/dissectors/packet-quake2.c
epan/dissectors/packet-quake3.c
epan/dissectors/packet-quakeworld.c
epan/dissectors/packet-raw.c
epan/dissectors/packet-redback.c
epan/dissectors/packet-reload.c
epan/dissectors/packet-rfid-felica.c
epan/dissectors/packet-rmcp.c
epan/dissectors/packet-rmp.c
epan/dissectors/packet-rohc.c
epan/dissectors/packet-rpcap.c
epan/dissectors/packet-rpcrdma.c
epan/dissectors/packet-rpl.c
epan/dissectors/packet-rtacser.c
epan/dissectors/packet-rtp.c
epan/dissectors/packet-rudp.c
epan/dissectors/packet-s5066sis.c
epan/dissectors/packet-scop.c
epan/dissectors/packet-scsi.c
epan/dissectors/packet-sctp.c
epan/dissectors/packet-sdlc.c
epan/dissectors/packet-ses.c
epan/dissectors/packet-sflow.c
epan/dissectors/packet-sita.c
epan/dissectors/packet-sll.c
epan/dissectors/packet-slowprotocols.c
epan/dissectors/packet-smb-direct.c
epan/dissectors/packet-smb-mailslot.c
epan/dissectors/packet-smb-pipe.c
epan/dissectors/packet-smb2.c
epan/dissectors/packet-sna.c
epan/dissectors/packet-sndcp.c
epan/dissectors/packet-socketcan.c
epan/dissectors/packet-spdy.c
epan/dissectors/packet-spp.c
epan/dissectors/packet-stt.c
epan/dissectors/packet-sua.c
epan/dissectors/packet-tali.c
epan/dissectors/packet-tdmoe.c
epan/dissectors/packet-tdmop.c
epan/dissectors/packet-tds.c
epan/dissectors/packet-tetra.c
epan/dissectors/packet-tftp.c
epan/dissectors/packet-tipc.c
epan/dissectors/packet-tns.c
epan/dissectors/packet-tr.c
epan/dissectors/packet-turbocell.c
epan/dissectors/packet-turnchannel.c
epan/dissectors/packet-tzsp.c
epan/dissectors/packet-ua.c
epan/dissectors/packet-udld.c
epan/dissectors/packet-udp.c
epan/dissectors/packet-udt.c
epan/dissectors/packet-uma.c
epan/dissectors/packet-usb.c
epan/dissectors/packet-usbip.c
epan/dissectors/packet-user_encap.c
epan/dissectors/packet-v120.c
epan/dissectors/packet-vines.c
epan/dissectors/packet-wai.c
epan/dissectors/packet-websocket.c
epan/dissectors/packet-wsmp.c
epan/dissectors/packet-x25.c
epan/dissectors/packet-xip-serval.c
epan/dissectors/packet-xip.c
epan/dissectors/packet-zbee-aps.c
epan/dissectors/packet-zbee-nwk-gp.c
epan/dissectors/packet-zbee-nwk.c
epan/dissectors/packet-zbee-security.c
epan/dissectors/packet-zbee-security.h
epan/dissectors/packet-zbee-zcl.c
epan/dissectors/packet-zbee-zdp.c
epan/dissectors/packet-ziop.c
epan/packet.c
epan/packet.h
plugins/docsis/packet-docsis.c
plugins/docsis/packet-macmgmt.c
plugins/ethercat/packet-ethercat-frame.c
plugins/irda/packet-ircomm.c
plugins/irda/packet-irda.c
plugins/irda/packet-sir.c
plugins/profinet/packet-pn-rt.c

index 76f9a386d8b5c923ebdd2ce51fe2f47bd213979f..033ffa79bfc315939b03259003eaeac338735026 100644 (file)
@@ -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
index a3b8e0a7e2b7856ddc6f3f0cbce999de23ec96e7..299ee1e7b2524c66ed4269e486e2194dfcbb8e05 100644 (file)
@@ -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;
    }
 
index 355737d92643df529afc9c6e227e032061c1659d..ef2857ddcd0ce9916940804b07f537637e25d4df 100644 (file)
@@ -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");
 }
index e8b1cbb1bb6b053f367d8b21c80e311ffb47381f..5429d729035c4acc6fd61aa5836edd7b4251204c 100644 (file)
@@ -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);
   }
 
index 01dc00b359af9292e0b8d44fd37ce8d1f1236b11..1151f9876fd373f65e770d881665b1abce9ec83e 100644 (file)
@@ -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);
index 589796c1529d4e5d282b3de765cb034d17cf26e6..60ea294711ba0e5d213498c2dbe00cb7c6c9016b 100644 (file)
@@ -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);
   }
 
index d1fc40d8c397d98be8645c1c5babd15602aab91f..e0c8bf3cf58634f27d70a00fbf74fbf205224591 100644 (file)
@@ -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");
index 2b8dea218340054dab9a6940fcc8ae8020bb6edc..fbff4955260b24e4d7606f4948c16e3e7af5db24 100644 (file)
@@ -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);
        }
index 625a908e0c2e4d901e22790e8e197162a96f784f..57480575588053ab2de6d1a3242165182cbb04d0 100644 (file)
@@ -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
  *
index 62bd78a6aca7cbb6f9eb6ce9b55f3e99138bb7fd..617f5b3fc7cef194d1d99f8d942f9949afe5e7ed 100644 (file)
@@ -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");
 
index 512c2436865d911f7d1e91abe5f4061e004b0851..754b61fd8b0f4933868182f490816c3796da5873 100644 (file)
@@ -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 */
index b439cd06ad8902c505b56f80291296ea660bda46..97034e06992d65bd45ad9c872a1113361a62c135 100644 (file)
@@ -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);
index 124c249859b2a1a1a9121a2e2e0d97fffff032d4..5bac91b1b73e6f411fb650163ea460dae0259b23 100644 (file)
@@ -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);
index 236ef32599eb850a4d49436b57f8f9c5406fc3c2..033d1ff66e5e6fab4e3e69491536531acfa8dbd6 100644 (file)
@@ -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);
index 20a05657ac1b0ccdcc97933f875a551ea5258c0b..d89eb0fde393a60b3722588a58b599b1fdd5033a 100644 (file)
@@ -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");
 }
 
 /*
index bf8df16ba721299798670609c202232f25b89258..6a81665b86796e1f163bf39b6564bbe81d006271 100644 (file)
@@ -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);
 }
 
index e8673c07e662b5ce0ccc24b7be0c48ed1059d6ab..b0a60c7ee87504e2e8c5c3f7def14904daeba5bd 100644 (file)
@@ -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);
index f864af397e9b6514f9f2cecb3fdca14522773537..90939a2d8f1b1b6e925d98198770b97f89588557 100644 (file)
@@ -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);
index 9338a393b8c410eb61cd90a6b6c581e1fdcf95bf..fb1a0cec5ccc7e929a2ee183e7932e7cfd9b2e9a 100644 (file)
@@ -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");
 }
 
 /*
index b34d5054be585abb1d1cb4f6734d30c64279b09a..2a6c1f02b1d7910e7779bd31376f09e773258034 100644 (file)
@@ -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);
index 1155a84c18415d0a558205093ba1281397630091..9cd168143853b64262f49abdb3b02c8ef95b17d6 100644 (file)
@@ -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
index 986ae6d2dbad175ba5c18cb90ca5d12d512395d5..a94282369fca66add02f29ee5c2960c5111f614c 100644 (file)
@@ -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);
 }
index bd8d87d99a8c135ecff720952fd8640ea422ba7e..e6db3c2ad3fab57ed574f26f1897b8eaa1432ae1 100644 (file)
@@ -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");
 }
 
 /*
index 2a23ffcb2e47116142110ce1b40c796efe351557..574e54104f2175f282152ebcac228da2f6e53e1e 100644 (file)
@@ -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));
index e1ad0ddf259ec8d2487f247b9f5245dc4f9874e7..f143af42c199f5f8c660d26205a88c515b8a5cb1 100644 (file)
@@ -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);
index 5efb3b0090ce21d0c3eed5e202d1d2a2c356ec64..d825d72b538cd77536a5767fabb70714ebe1c01a 100644 (file)
@@ -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" );
-
 }
 
 /*
index 7eadce8e1d13d25b4abb82f994f0ca1e5c45f863..17483d62fcd3f9435771ed673d1857cf18a892f2 100644 (file)
@@ -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" );
-
 }
 
 /*
index 3095a9a0cfe3a62753d3f5f0cd0d4aeae788bce1..372f80383b85b7e7f6eb2f27935d5321de63f19e 100644 (file)
@@ -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");
 }
 
 /*
index 0dfdf8e31f6a1877dda4198f795776ed09b1d18a..bf9143922b3df130d3a093b52348168d2532198e 100644 (file)
@@ -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 {
index 758a9c7578b9b304664f7a2d06ce933188b3e1ed..7fc4c126ffc89a504d857a9ce2fead448e5dfa4b 100644 (file)
@@ -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");
index f3689f1ce900739af7020370844f6cfa71fa838b..fbaad0095411b58cc1a8cda639246c3d342eff4e 100644 (file)
@@ -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);
 }
 
index 773a2a5cd3e73124cedd4e7c19474c55796ceb19..12a6dbff55db8a2dd87388ce88dc4ec168e3f7dd 100644 (file)
@@ -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);
index 83ec8360d1c5ddabbc3c0e898bc02f6ee8dd9b3d..2f8b640858017d17cf649244678547dc69c951c0 100644 (file)
@@ -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);
index 494d1355a54bde4b8ecc9c2617c2da2c1dba770f..82c05ce0a5278661fdce0d270a326846dcccfb51 100644 (file)
@@ -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");
 }
index 288d337fb7aa36b027dbdcb1797c664a85374a7e..225adfd28bd7fa259e1418c2f0939ed771d10a40 100644 (file)
@@ -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);
index 3c2f9d77aa419e71bf3cbb697d4d8a020855bc3d..e2c59ecbfc7eeb6a6ac84857611d24431cb92be4 100644 (file)
@@ -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);
index f163b1162c1c7b32d32427cff71cb2bbef6a3a11..27caf65308ddc6bff3d6165f4532ad83244ffd3f 100644 (file)
@@ -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);
index 84fe745b7d1ccf669886b85ff9ef435cf4f13a3a..a36403769f83f1dba086e9dc23bbc5d5096123ca 100644 (file)
@@ -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);
         }
     }
 
index 51bbf0b613569a51b30fc6cd5e1ee9411ab3c972..626f6f855c059fd17045422217a94f5effafbfbe 100644 (file)
@@ -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
index 916d785d3a827d674619cdc33b17d8d82ff62906..e38549cd3157c1519038a8f729d236cf99f9de90 100644 (file)
@@ -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 {
index 04e4032f0057c21f6357086322ca1397821cf123..9875e33a04bfecbb397c704e0c768cc7ba0bba1a 100644 (file)
@@ -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);
 }
index fa32308338b9fbbe05c5003a3bab1bbf69062d6b..d10f9d08cf78b514679b512aa3e1e37d9d309de3 100644 (file)
@@ -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;
index 923555649c3c0e51bb67bb70abf9df3e73eb5fde..311457e83ca3fb0666d6af6c80ee174a546ab5fd 100644 (file)
@@ -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");
 }
 
 /*
index 9925cfa4aa8afccc7e854396b5f8d991c21af881..fb975fa89aa26e35aac314f48b6d6c09b1373f29 100644 (file)
@@ -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);
index 7117e04954001b5b3c1c86743088171a767747d0..fd22997a4bd24f67e3f926d0d15aae5db9d768be 100644 (file)
@@ -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"
 }
index bc26a27417fb61721d324b800cab29a5e79b0951..af727f003bbd014367f4b6cac2b1f92227510f47 100644 (file)
@@ -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");
 }
 
 /*
index 06392c31b10dd601158c4f54284f1d3392bb4ff6..ebc24d53f3fea92ba0072cfc222e7eaa9d917dac 100644 (file)
@@ -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);
index b0cf5a68d95fd453433d24586b0f6de0b0754fc8..b7c8e6f3bfd8508bfbccfe143398cf38f199ae6d 100644 (file)
@@ -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");
 }
 
 /*
index c090de07d35ac41b338de698625930b61309a239..99997180ad74e9daa99f478f150048cc46945908 100644 (file)
@@ -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 */
index ed959304e858b2605d08768f4960cb6b690b1bea..3b7c83964f85056c495c79351afdeacaa76414f0 100644 (file)
@@ -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);
index 13da1374de8a1072d8e4788a3e550847c0c04c73..9778656ad11f2670fe19bd94ff9d1a9f5dec447a 100644 (file)
@@ -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);
index ecc4610a4c7c6b0dd19d47482b5acd0ae2ed8cdc..4075dc827c60845a7aea9e4d11019e7fc5e284af 100644 (file)
@@ -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");
 }
 
index d28d839b5718e85494cb9d8fbb8f18cf19607fc7..88294b7098b36d8d5c2573ee94bd73bdefa8affe 100644 (file)
@@ -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 {
         /*
index e75f89284dc7f3727f7139f103e2486051fb25aa..0e6900a86f395f5601d7a6ab417a0299dd4cdf6c 100644 (file)
@@ -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");
 }
 
 /*
index b358a300183dc9b4cb39d53bb5eb44c10737b093..a682c3ec78fed93fb3e997b3527924485a141344 100644 (file)
@@ -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);
 }
index 56fbd0f0cf89f01a644030074fed888d65a30dfe..634d86627637fbc9e5902ec0a331ea88e5815821 100755 (executable)
@@ -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);
index bdc72a1a7ec975b10f726961d8e17e2f3dcd1293..e740e6c21551a1cb0ac4f94fa3a3a4dc3875347f 100644 (file)
@@ -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 {
index 79fff449875f16c299ce8da2d9d0f4952459aa48..37bd2718f94c1678ea1ef91ccc72b021ee702f66 100644 (file)
@@ -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);
index 8232a3c069921587029da78b0b3bb00ed8032444..d5620a2e0f00a63b66d48cf15654bb0d5838bb90 100644 (file)
@@ -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);
 }
index 0cab0ea846abdde793f24c1a891d1770d033821f..984c2fad75f77d214b4531f850ff1f30093abdb4 100644 (file)
@@ -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);
index 5a96c3a4845db5e66243b244eb62f658d0e77d24..4d1ee44635757ce9d1af0e92a5fcbb60c8e0db99 100644 (file)
@@ -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");
 }
 
 /*
index 9cbe3323b500745ab6b0169f0699489605b64bd4..57e888451907abe6fab65d50c948fce636c25a5b 100644 (file)
@@ -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");
 }
 
 /*
index fb4aef0f17d6825b00302759e64553591b47893a..61ed92e8496a9b27b6d5bc50a4a460205b43c03a 100644 (file)
@@ -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);
 
index 1b394c421c5f785b52b107cce60b801710abdcaf..47be693193009d8e1c46cffc71d5a9629b1d5705 100644 (file)
@@ -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);
 
index 2d9391b41c7cfa9802ea2174590be504d91206dd..2203fc643ac9ac92a009989fa80d1775b6bfb18e 100644 (file)
@@ -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);
 
index 1379cd0881ffdbf24e4bff564f8433313928223a..33807cbac1be6775675604b5e2390150b9de6d28 100644 (file)
@@ -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);
index 2475107a645682834c38f5236dc6a6eed3554c61..cb735f9d85c39e69b42853ff9a7871b01ded23c9 100644 (file)
@@ -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);
 
index 4b177417d59550c3f6597119d49a277dd6577026..8a88cebf4e7368732117b1c3754a495457c4c6ca 100644 (file)
 #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
  *
index 0dd06499a18d45fd591b8bed9c7579432b8addd2..5f372efff1de36f7fccbc7e96bb890d964062949 100644 (file)
@@ -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");
 }
 
 /*
index 4adeb16f972e75170a32092664d4030f39273190..5a5cc8526a7e8725f0a71f2dc5086a8447e1091b 100644 (file)
@@ -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");
 }
 
 /*
index acbde217f9b5080f867a1b576d538bb3b9cd1984..06d053adafe4a1115162d15bab1824f540c7c6c2 100644 (file)
@@ -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);
 }
 
index 614f3853e25ed5da2bf43af02f28864bdba9c8b7..f46094bbba5bc342cce765096115e63a9c77b108 100644 (file)
@@ -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");
 }
 
 /*
index 6c113b68e1a421fe1e89bdf6de04958114ebb8bb..6af7818ce8bcb65b191f0a651d883eeb47475306 100644 (file)
@@ -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");
 }
 
 /*
index 6e230da6299e7ee11ae6cc9694748adc0dcc84c0..4772a8c0517deba8cfa2f0dee83f84c4e3281808 100644 (file)
@@ -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);
 }
 
index 864d017d6f27454a7ab1a671bd1c27a8f19efdeb..08bb769d214c3b10c8d06b6a745e39fb86696f07 100644 (file)
@@ -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);
 }
 
index b48d6f5164bc30ace7eb646ea208295dbd484bab..de50bd33736572d090e927e5df6fadae02dda1e6 100644 (file)
@@ -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;
index 45b20d55a4ccb1ead7cb84e18c0ed4487ab42cd4..d54a73726d63ecfe053461748b62b8d4ed565d33 100644 (file)
@@ -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");
 }
 
 /*
index 0c58937e3ebff03566de71551184e2b214f24487..12c2f4823814c462731f561629fcd1766bd2ae31 100644 (file)
@@ -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");
 }
 
 /*
index 9f153171538b7681769fd53a2e620554c0c17a38..e66711523d8ab61fdbc07bf0470199bbe2994c00 100644 (file)
@@ -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);
 }
 
index 6230e8f8ae213774d44d6b173df720b8fa07860a..975d423776c4e52424a577bff8292bc6deed74b3 100644 (file)
@@ -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);
index a238340741b231acf6f84657edb30cbf167818f8..26982e63db0b3ed9ed3d0387ab994595d8b1df84 100644 (file)
@@ -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);
 }
index 5555a2d952563b449798611a42ce7878b7a8b239..02633ec16d5c85db8a979fae2fd6924b4190a925 100644 (file)
@@ -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" );
-
 }
 
 /*
index 98f22418d979320b5c2ca441452dea33aa3b5cd5..937fbfa4fe34787244c7a896f1734c72a1973461 100644 (file)
@@ -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");
 }
 
 /*
index 1e5fb1d68a9037c54f13bfa97118f004ff149c2b..869e8632d7731cf8443a14a84aa340f70fbf18f4 100644 (file)
@@ -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() */
 
 /*
index b1bbef29eae1c1c9051960523fa38cbab4ed8c5f..0f1aa764bcb0ed0aa2746474ff6782351266c0e0 100644 (file)
@@ -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");
 }
 
 /*
index 24419c9c3ea4698eecf7e464be889be50e57c4fc..483f6a326a9e6e1b1e8ffb0afbdee7fe0026b6a6 100644 (file)
@@ -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);
 }
 
index 39fe82249fd7795a065036e3a953ca7dd7c74f28..58461c4599af704bb18b4c0bd8fb00ae97371bc7 100644 (file)
@@ -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");
 }
 
 /*
index e7ffb9582c3c5b2072a71f58df0a9a9fab43ab1b..9eb79daf4cdcaace4673d3041010b390c606b576 100644 (file)
@@ -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);
 
index 752aa48dc8144c5116142feaf82adbba0f6c770a..b4515790e4621fcf034896237e0e0563f9e2fa2a 100644 (file)
@@ -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);
index 7f0dfcc0f7feec27216c3748ff748d449c18dfee..5e7dff7d35f7ed79a46872aabb745ecd97f92395 100644 (file)
@@ -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
  *
index bd06ef043931031ae6d7d7d6989c52a5adb8c1b1..fd47e47586d0be02f5fad4413a74b75ad19515de 100644 (file)
@@ -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
  *
index 60f20f30c0d417e9b476d4a7aac71068e298306c..092908e1b4ff4802886c9af02823e741862e277c 100644 (file)
@@ -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
  *
index 1ed653ba9013c3c9832a4bdf9534e38fd568a02a..d47f869f0a258443abcda1480b90f51c2d338bd1 100644 (file)
@@ -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);
 }
 
index 9953608df2627aad7013e432f079a9b4611a1234..7995ebd3ce6b88fb7a21d3a97450312a95cd9934 100644 (file)
@@ -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");
 }
 
 /*
index f0d6cdc13de9d6cc660f99c4c1ac6746cc5eef29..5a053fe70ab7d0e7478711d7f0945ca0f3352d08 100644 (file)
@@ -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);
 }
index f83a021b8730ad74196fd11440cc1e7f0d725285..fcb3ec842a3f7b781f094e711b109b05562023f9 100644 (file)
@@ -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);
 }
index cb08dd31cffdbd4a564eeabb4ea02f3ee2f7fe56..d1e543a6de47bc1b16d5b3060da056a31429184b 100644 (file)
@@ -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");
index fd8bd05d63a194703285c68cdfc725f5d7728fa7..925fc124d7ff05cd5971ff49db60535dd56e7251 100644 (file)
@@ -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);
 }
 
index acb302b1233e691accb784a9e1da2234a235789c..f2fe6b0ecc2e6e3e983ca442ebc2aa43adc23075 100644 (file)
@@ -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" );
index 36e29ef77560f70a93631e199abae5d0abe9bd73..16b4a8b1a4badbfb14211a39bcbddfe47701ed83 100644 (file)
@@ -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
index eca32c6d278752a9e110499de64083e07ba7c5ef..f8e77b433bc78c39b618fd60d6a94deb335c0c3e 100644 (file)
@@ -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);
 
index 418eb410a57a0407caba7e183581ea2dd35cecee..457e944d20cbb87fe18887c5dd6c8319b7432a46 100644 (file)
@@ -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");
index 75871d6f35f0452a506d4fe5d2afd9df3642543b..be8b75c1813516c201b6441630bae77de7b8b9ff 100644 (file)
@@ -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
index 43369049e370b801081a85025b8ceae760f702dd..5dd39fb3ad2f3cd51776fef868adaa637d77a5ed 100644 (file)
@@ -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");
 }
 
 /*
index 17dc9ad6912b1f66fcd61d41f02b8bb729934db4..36520be98e3e8ec66c87f1397c8af6e4084cdc5b 100644 (file)
@@ -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);
 }
 
index 7a68a1369333b4c56c8ed855eaa15f7746eeedef..3336b04c2956ead7cb2db8020e9e395e8b2d11ae 100644 (file)
@@ -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);
 }
index 2ae8b80a06323c73bf9cb9cb38f8585e214d1560..f8f7f104971f8fc68ec8574a0f622c60335c4133 100644 (file)
@@ -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);
 }
 
index f8e3a347f9587672b18ce1de43e403bfcf355482..d07bc87be78ce1a73324dcd07b44d1d2e44fe613 100644 (file)
@@ -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");
 }
 
 /*
index 387e5c76bf74f3651fd1b19e5b016cc18690cddd..d3680564c142a02f94f82fa1c66c7a6478dbc86d 100644 (file)
@@ -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);
index 9c56704b098a5b171687cca80f23a97a6d7e7ae0..ba44f06f8b0a59d3875821df262376da3005e018 100644 (file)
@@ -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");
index 747e70356cbe6a002295156a4a1d93e3234d81b3..2f661ebc430494c2c996ad52d19716dee97d4d0f 100644 (file)
@@ -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);
index dfe7193e6c6ef8be1b908ff32b29d8c0bd962456..a8599e4f080329e048e5010108adc5d379a05d70 100644 (file)
@@ -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);
index bd54dbbf8ab1f990406a20ee4b4d1cf406acb73f..af46741f466d5f0d6f7181996719229729ec0495 100644 (file)
@@ -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");
 }
 
 /*
index 35d3a0a229accf9d24258535e0fa1e4650d0e84d..026b8718bec9a46513828172e07ccc488aec5bae 100644 (file)
@@ -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);
index e12875566cca16808201c2a3145d2082e71463df..526c06e48594405b26ac0cad85b8b37e2657255b 100644 (file)
@@ -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);
index d60239dfa963187df68dfd24d90fa51af6908006..5d623e53854f5a8c91059e74f856b8711d5bb846 100644 (file)
@@ -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");
 }
 
 /*
index ad4129aa95abd01b223df198e3121608969d32d6..18ecf4667941c8d4dd75ea95373b5b479a04b29d 100644 (file)
@@ -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");
 }
 
 /*
index a260d1e7731b0553bad8dabeff57714dc516e14e..1038d31d46c342ff625c8c7b9a786f1ebe5a4c69 100644 (file)
@@ -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);
index 5fa408bedeae2d0e54275a543df8b350a30aeb90..c14181f6e775b9a9dc62d8be58f25c2c42106daa 100644 (file)
@@ -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);
index 56bcf947852947e857f2ce2f1e08bfef634f19ff..bd72ea365aeab8e814f2e39f0f6c9de23e5ce637 100644 (file)
@@ -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,
index c6b42d48fbd333f5a05790f5758fb0fc998da922..1d519927d3191e397ebc320295fd527e5027d53e 100644 (file)
@@ -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);
 }
 
index 58eea988df53441a273cb79e64491b43dfd4b40c..948d6c591f6ac6edae4234caacc20efd9950e336 100644 (file)
@@ -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[] = {
index 9edcdc7623c3b1b05fd2074fc2d0292c70bcb347..961a610ca5ef88424097125b947fccff3f2bf9f6 100644 (file)
@@ -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
index aa0368b3286826b4584ef85c7b158c772fbdaf55..6bcabf926622b401c87325ada2c30582f6c84fca 100644 (file)
@@ -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);
index 0c984a2ca99fe15f0c9a49b8bec28af67bcdcfb2..a62639e82c828dd56ba245d7163c5c91c2a2988b 100644 (file)
@@ -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);
 }
 
index cbe96a70f175d43fada8eefc0a1e3ecd727c42cb..e52179f74768ee4c76eeb555b20577fbfdface97 100644 (file)
@@ -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,
index fc1822f6da03fce1bbafedc394dea0eae43470b7..5991bfb08c9b27cdeaf860afcc4f1b9424ad7f56 100644 (file)
@@ -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)",
index 6b74461aa065f65de77e2c16ae689892342ab9f3..9047bcc158dd457ebe5868af1a4faab79851b0fb 100644 (file)
@@ -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);
index 779b362d2657129293df77644064aeb6c39dc4c1..4abacb8c513130dd50254f9e46958fc154dd38c2 100644 (file)
@@ -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");
 }
 
 /*
index 52e1961674eedc6474aef8b9fd0c1c1c2bcf0e8e..9562ba8dd28516eaf3d87501e26d701484ee2322 100644 (file)
@@ -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);
index 85eb2fff5bc0cad9687388c9461f92499a31ee04..4ebb8597a0bab6fef9039888c99cc04d1636add5 100644 (file)
@@ -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");
 }
 
 /*
index b793c20230ccb5512559e40d242e1709f1a1aeca..ff19d3f5ca10f448af45c7fe8825191811670ecf 100644 (file)
@@ -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);
 
index 6e2b1519ab6a50227f2aac915066a34f22aed97d..93ae528f6225f5a5498e17978dfae05913cfdbd7 100644 (file)
@@ -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);
index e1bdeb8aef2642c8d99dc39ef5a5a32524690709..ecddd03cb057930a571f30935ad8b351f2abd5f9 100644 (file)
@@ -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");
 }
 
 /*
index a465a03facd2c1356885609b22e1b507dafdeb6f..81ca8172d01e5a1ea9ac090a57e1c3eec02f129f 100644 (file)
@@ -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);
index bbdc4f71733b6e389c8f47b97f936a4d00411f4a..8e3a6320f0fc92feccef9f5d708a7c5bb77ddd63 100644 (file)
@@ -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");
-
 }
 
 /*
index f746fb525d7e68f56c78f35ee75c53f9d469327e..d771094b5ddb085c0b61fbee4320c1ae5e07fa99 100644 (file)
@@ -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 ) {
index ec65dbb15e79105d0792c53b0e31da5dd1940395..1949df7e178aac5235731bd30ce784c74e5f6192 100644 (file)
@@ -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
  *
index 41b1b1be80fb40de3168c2a1c0e34e9027c27f12..0625873181e792dd07e54f234eaf7a0ccca212d4 100644 (file)
@@ -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);
index 15ae9aa5808706cc6eccc9f218d5322da0a3ab40..9382446e6d214449a285834aa9bb48e645bd9771 100644 (file)
@@ -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;
index 81153d01701a28af60620c271b025d37f69a8eeb..5f8534cbe14e29585e654f9ec4756bacdfdc66b7 100644 (file)
@@ -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);
index 3d1209ec34931d812b5f40ebf0425fcfd076a403..c80d929017721f63a7a2ccf997bb6ac601c0d036 100644 (file)
@@ -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);
index 7641376d13ddf07b4490ee0dfd06e40244e993ce..2dbc958f2e9ec2c62ff51ae880c3ec11905d4834 100644 (file)
@@ -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");
 }
 
 /*
index a10c82cb4d5e5e3f85c044a8c1f41c1789202eea..cfb5f8cd5fa37bc59c0f3fc1ac4c63d66db99fae 100644 (file)
@@ -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 {
index e80a50c55b98ec20e5958f1932beab854bec630e..fbff9c4ab6cac71abf23b3f0ff754465fda3e1eb 100644 (file)
@@ -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
  *
index 0710ef91283263f90742201a8f4574e03f06115c..108f414f73ed244b8b3cdae5b6475a9760ad97a0 100644 (file)
@@ -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
index d77accf213ec4c310f77bb67473242b9b91e5eb8..5c3aae4795b4e7d3786b2d958ab217c958e13c4e 100644 (file)
@@ -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);
 }
index b8c94837ae708ae23c67b7b8ddec3abac45da6b8..d3b303a777ddb931159b7facc110081615c4ab23 100644 (file)
@@ -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");
 }
index 2ecde37a2a97c5d9623e30a934846adf7bdda1d1..7ac5bf292cb5e4bd75aef7a03c8645d219f26a0e 100644 (file)
@@ -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");
 }
 
 /*
index 0a5365dee195219de3fc7630aa73310514ecf15e..79c6c593d7a3576b0e3e857330ff3759b2470425 100644 (file)
@@ -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.
index 69f00af0a59bf141fbd4890be9172de0f31a2aa1..013b2ad7c1014138727e81a002e4cb557ec7d4ff 100644 (file)
@@ -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);
 }
index a61d5ca4b06c6b4e4229727987a0c84e3e3fa4c6..0136dd3e76c2bf62f7f80dd816783308ce924d28 100644 (file)
@@ -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");
 }
 
 /*
index 8046917c498731320140d9ecd65d9ffa41b40a57..c20cfb115155f72568c85990a90fc62391c02ece 100644 (file)
@@ -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");
 }
 
 /*
index 7e3c70fc974f7536cb938f0c27716286da839b55..09007fde95a0bbb0f67ba4becb366890a2d05f4c 100644 (file)
@@ -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);
index cb7eeb2dcb64edebf424513dc61d792a88a7a061..220a6c31a8d6ad18e4876b66e0388f4efa7557f7 100644 (file)
@@ -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);
index ea1e356fcbb085de1ff86b63a798648f7a0fdadf..adbe11b4a04ef6be02778331caae803c18478c0c 100644 (file)
@@ -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);
index ca2e13ea7f49aed8ab5e946cdb16afac04b80629..18b9280dee267ac26c435454d6b0b4b2be7038bf 100644 (file)
@@ -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);
 }
index 78df49fdf7ff4a0110d678bf5f62d751e88bc910..262885c4ddaeec629a400f6a5e94451044a236e4 100644 (file)
@@ -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);
index 9272d5670ae8056e4effc2c27ff77eb503b3d501..9ba5a62e1bf6ec4a98b3ddab726318f1a7e65af5 100644 (file)
@@ -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;
     }
index a598f9457bf0967b2964a7d5dcc92fa19b8cd975..ea6b009a1fd3f94c373d3f6524f1809946006324 100644 (file)
@@ -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);
 }
index a0922c40a0ed3ce8c0d4a686457286161d900c9c..a03be52cc946e143698775d6e645a031d08af0fd 100644 (file)
@@ -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");
 }
 
 /*
index 24ca5d0da2f598a5cb95eb621f5f4babd5770319..1c8f9c13d034a26ae898e957c9d729756827be59 100644 (file)
@@ -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");
 }
 
 /*
index 15b230f6ce91424081470771c6023a1ad356764e..0937890f4d571fcd1279c9e76602ed9573d23bd5 100644 (file)
@@ -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");
 }
 
 /*
index f51b82a8f2065bcfad2bfdd5ff7e4b4858f8ab5d..d5f9895c986fd61289950b7aa28a13c0faa4b0f6 100644 (file)
@@ -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);
index 69f1aebf62209483d3ee7fc4cb4f7bcf16a14dce..612a45d9d8e9c9b108472906479cb3d56e43462d 100644 (file)
@@ -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");
 }
 
index eafdd2a2600b440795c983eaf5b5b20952e93312..2deefc6819ccf763ce2db233a7b9e26b5e6ccbc5 100644 (file)
@@ -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);
index 87ee9657cd12596e62c9c869418a057cec205089..83fab4466a4c8c00eb55e69d1d0006afdb8af0a0 100644 (file)
@@ -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");
 }
 
 /*
index aa9da5975dc9dce6e1cc99b03a06f371c5419141..ff09f4515f7d26be43a448b61a3bcba70ad16611 100644 (file)
@@ -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);
 
index 5a5b51a77782080a2593fcdd95f9131c3ca36a78..aef502ec3eed689dbcc81b4d7f19e3a3838c587e 100644 (file)
@@ -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");
 }
 
 /*
index c3ec5f83bbf766747820a4d1545f3faa3a721712..ef3d7beb3a9431068516c62646c2897d3bb9c276 100644 (file)
@@ -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");
 }
 
 /*
index 40d50b972033ee946abb93f6714fb35fc2753ded..8e7d913f65eed625a181c91b1fe01b6c096320fa 100644 (file)
@@ -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");
 }
 
 /*
index 9b8a070883b5611a897680682ecee1591be06f8b..63f135dd8128f7b8aad2c9d3932b4390b1cf92a7 100644 (file)
@@ -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");
 }
 
 /*
index cb515276d45fcd14fbad7e561ae40142059ced79..d5ba327c71cd6e0d70eb912e3b8777a960bcccb4 100644 (file)
@@ -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);
index 7da3f3470b6c9c4361d4bb170669cbf45e024eb2..5dc1b97ee4835b5138f22a3d364f44b27a0f0af3 100644 (file)
@@ -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");
 }
 
 
index eb09d266b8530b66525bd65b8e3ec70a2c106303..bd6d451dc42cd135806a2f4745b27da25b8058a5 100644 (file)
@@ -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);
 }
 
index 79a8426486ef6a1908ed02ff9839a45c8ce7bd0b..41ede31a67fdc460950bbca4dae38a7ff0406f14 100644 (file)
@@ -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" );
-
 }
 
 /*
index 75d74a8fcffb28c86a713a562f1c7979c173c17f..f9871a7ed6a080fa88378b20a901f09cc2c04de1 100644 (file)
@@ -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");
 
index 589973ab5097e31b01aab75e7bb09982ae53b5ce..046667e537dc95ed4d55d84f610bcb4689a1b0f8 100644 (file)
@@ -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);
index d3f971e2e5ce5b662b9f66faf8c882836ac23cc1..941707834d1f06ca36fde2beaad96c37c30e27d3 100644 (file)
@@ -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");
index 277bc20255ae3022b742dd6ec9df683365dc6a85..e2d3b3157971e8474b79277c4a5311ed5a30a639 100644 (file)
@@ -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");
 
index a0540bf9e98019e31891eaeffd289acfd1aecde1..22f196555b737719ec2a89ab58a90058a1284583 100644 (file)
@@ -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");
 }
 
 
index 9c00ddea41f08d0eacbec36269c88330d9ace314..5f829c3314cca5bdc0bbcbea9f1e0d600a9b7e6c 100644 (file)
@@ -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");
 
 
index 344e26b8c7c131caccf603b1dd8fd5eacd88663e..248d553390c363f4af589c71015c661b63478edb 100644 (file)
@@ -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");
 
index d52f08fff4dd7c25ed91c8ccbfd3b38158e6b4d7..2833bf8198f8444340e0fac12ad8c23ba2fbf735 100644 (file)
@@ -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");
 }
 
 /*
index 355add2658a64b1cff422418199286af590737af..3f40f0fac6714f752e2219f53282f96c70fba975 100644 (file)
@@ -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");
 }
 
 /*
index 6061e4b6100da2804916859651773ac67cfe54af..3f83ce28679fb344277c1b8b2fad7a113be31c2f 100644 (file)
@@ -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);
index 8acd90e82bc6435b3b5c7591e60f6e476286cfb2..fda23a74b9c1090a151ed927e4d6f3553b2779bd 100644 (file)
@@ -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);
 }
 
index 51a6011afa56f7b5124763292a376fe1b761735d..c015aaf9a522161f55ea5d0d4865fe6379c4fc07 100644 (file)
@@ -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;
     }
 
index e9dc58d885fdd849c771de5fa80f2bc55f019cd5..fe6ea69806448823ab101136888a0501d234026d 100644 (file)
@@ -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");
 }
 
 /*
index 21bc61b94109212b5b1afea76288321ea2d1f725..9fe5d83de95aeea670bf2f73179afafe7810bb46 100644 (file)
@@ -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);
index d46689df208baed1755110a997a4c9b04c3e3015..cfb4cabd56b3040b721626879e224064d228ee79 100644 (file)
@@ -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) {
index beeda2b4d64fd3219e66e3d46b7c2c108ae30758..6f478c841b4e9ed2a7ee5f9d561528461970e9b6 100644 (file)
@@ -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");
 }
 
 
index eb457be21fb08f0f64dcc685d95456deb7a823ed..c8978c31622803f6c5002d43b8452b2989b250fa 100644 (file)
@@ -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);
index d7364490894679cc3411dad68b21b31726d62a65..c5398a820f3ccd9004ff3557ad18bbda088d47c0 100644 (file)
@@ -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");
 
index 9dba8bc99bf583267a40abe35696c540cabcb92f..d2f5cbf69a3d6671450169dfc6509e07e45c91fd 100644 (file)
@@ -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);
index 6c796dbdf30495eae19e8009f133164d16d0f7ca..e9f5b864b3aec718074129c8f416f9787bfafe14 100644 (file)
@@ -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);
index 75ce4b91c2ecba4750215a9a4d605fb221ddaac1..be6b0fe9466b89b9a98950b4294a5847830eaab1 100644 (file)
@@ -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");
 }
 
 /*
index 39a3de9e1a6fcd52f6b84e3ed3be070462eb460f..93e4ab7956fc924488ee8ba3278ec7a444d3acf4 100644 (file)
@@ -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");
 }
 
 /*
index 8d347d25e29f197bf187a4647711cb6a37e1a72b..085c24fca88e7be078187aa888f35563cd647f1a 100644 (file)
@@ -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 */
index e1b1a0e0711fea950b183d6062457f3657bee1b7..deb68fd7edd935d716ace9e7b565bdcb5137e296 100644 (file)
@@ -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
  *
index db676a35c54e725a61a64a2ee0fc93e054140e24..a66dc070a133b78d75c2dcfc968335eb45982dd6 100644 (file)
@@ -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 */
index 412b9608b3cc18a46d276f85558ebe554b82e65e..69901a50c7054f111216732709fd16b5c0a6a698 100644 (file)
@@ -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.
      */
index 456d7a3aba7024b048f9fcb0160464922eb7b1b5..58c57d69949438bea566384e4827ec82c087d216 100644 (file)
@@ -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);
index 62f7b4e4b51343155642772f118df550c4824026..bb061a9f94a817558474583c21c1d7dec7109bbc 100644 (file)
@@ -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);
index 5d5e6b8a6cd6d5f899051e5cf5bd91f1ebc6e204..ed39a3c7ec6382a69aed3086e2e2c502d7708d3a 100644 (file)
@@ -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++)
index 5045e0a009178bf8544f31ba8a674fb163067074..d22e3d13d1613167840ed0e75a8cb9c73a7a15eb 100644 (file)
@@ -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);
index 60bb3a035be021d8727f203fb869e5cae71d3511..08b5c7f109f36cc409a2a171508354241112ebd1 100644 (file)
@@ -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);
index 4f5b5aa5b7a51777245cec6223cacdca0fb5c634..7c363a4d3be082014829e9577278c7c7a898bfd4 100644 (file)
@@ -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);
index 3a6c2c7460a53e8ea5691347a44f65617659f568..0ce7c0f6b896dfc0d56e8a62d546b1a0acd98042 100644 (file)
@@ -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);
index 5c4d6735799cbf49b29bf361c55f11ad6907f365..5e72a7b683562a7ec23e676a24e6c53300c511ec 100644 (file)
@@ -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
 *
index 74387e8aa3f9d2dbe4e28196f0c72c1e96039fcb..910c91765dc1ee5c43a549ad53012ef0eba47585 100644 (file)
@@ -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);
 }
index 90d3947b4ae4b329ffa1abc1b3412115fbc82311..d4d2ba8be1e07e9d6dc10eac23e6b3958b6cbc0e 100644 (file)
@@ -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);
index f67a9df6af22ff7e6d410810157cead57c4223df..bcfcbc0434d9ddf7cc3bcb1ab6b2e8b8287fd4b5 100644 (file)
@@ -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");
 }
 
 /*
index 26ff59a0e605b7470112da5945aff30ff40bb96d..fc510cba767bf82a5dc8f3c7f3042762cabd3a28 100644 (file)
@@ -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);
index ca716972fc0ae3902127157f2108afedfabeaf08..f0b263d9ccc7f24f88863ffac268c060f4c0f243 100644 (file)
@@ -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);
index eeda6619e218e566a3fb5a42b9296c7fcc3dcc4b..584c020f0364b1e19cbc38bab52df8215f11725b 100644 (file)
@@ -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);
 }
index f1e59e79ea2931cdaeda345b163d9a0bcd1a1e21..7b99337e6a04c1fcfbe4c971880cf35d434d0fe2 100644 (file)
@@ -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");
 }
 
 /*
index 6780bbfbbb49d42f0a0823ca22c9abb9a0fa2f37..d6087427d3298b2d3f82d2b7c43a16521ac8aa20 100644 (file)
@@ -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);
index b6dd6d8ef76fa12851596a60339d7d5f539f61ba..2f0b12109f815951078d51b03d77d81426a5180c 100644 (file)
@@ -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) {
index 1ec097017cdd3fc03a916ade416fe5730fee0b4d..65fe8e65bfa8db4bb5132f0f415d991d779a3659 100644 (file)
@@ -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);
index 8456393a8929a6115a9e0e391900088513b5f872..11d62beca509dfac40dd44caf4def13ec7139255 100644 (file)
@@ -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);
index 9de31ac54ce071488991e91b04e07b1caa761bba..3851c5da93f49347680a975067fab8d276169f3f 100644 (file)
@@ -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
  *
index 553f87cac4316803147efd908346c197c82a669a..80428abb1f16c461bd7afc2708eb575b99b6a12a 100644 (file)
@@ -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);
index aa67910ca7817f236cea505a565455c264739dd4..101c0cadf9273f00a6b92e5e0cf2ae4399391bb5 100644 (file)
@@ -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);
index c597bc3574cc492317aa77bfdebbfb3080144849..e9d6c22785839f8903ca893c10d6f7fe5dde8c98 100644 (file)
@@ -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);
 
index 68ccf465bda292f7bf50a93837393c00ba30b79c..f9a00472001ac475f96002b8cf2389123b77f105 100644 (file)
@@ -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);
index 14d067c8989cad3b65994ba9f7cc7443fe0341f7..69bdc6f6ba9da14ebff45ef634876d09c2a28690 100644 (file)
@@ -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);
index 76463a378789e4c5b214a46ff26dd3b7f547b836..a3e75a4c3e5d81506f9efb7b77f5198358d125c2 100644 (file)
@@ -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);
 
index d154bdb61b7fed4f3737d5d1e772727837804758..c2f4b94951f70e02165e70e6e9fd2ae1f0e3a1d1 100644 (file)
@@ -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");
 }
 
 /*
index 2c8f88476c7f5bcb488c40fe16191846ca706988..6ca65b7688413ff3c154a217b23acec2b0616568 100644 (file)
@@ -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",
index b402edc20b3686225b5cf83f0c970794fbb0b37f..2f5a346e15e4458b28069aea67bf80065262041b 100644 (file)
@@ -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");
 }
 
 /*
index d63ed7914908bf7841c98edd79d7e9583a58d330..00ddd244f650c41e26877545d04ef917db219626 100644 (file)
@@ -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
  *
index 41a058b59843b405dae82f59063cfd1c53cc91a8..a2dbc2a1bb47edcac6a5eed928a9c7fb896890a3 100644 (file)
@@ -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);
 }
index 5800896cc3ec47de0729718d6d41d182288dfc49..8369b5d9fb6d1b685a8949f143cb1a5d1c2d7e68 100644 (file)
@@ -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");
-
 }
 
 /*
index 718796ea9229528d9849536c66902102918f0eeb..717caa90481f65c79e462e03d507cb2936926af7 100644 (file)
@@ -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");
 }
 
 /*
index 4de41512ae94b40586c2585565b1fac05ba8a68c..059696e779f7e26d672b7cbd4a36c2c977447eae 100644 (file)
@@ -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");
 }
 
 /*
index ac7e47a2c7bd403413761ff3b03c5ac4a196614d..44ad165661d2b4dde93475d2e28fdd0175014b80 100644 (file)
@@ -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");
index 415b0cd867139267a36b7a0e850558e2a69d760d..cd6b6a40e9afd0fb0e6be59f10ad5b476e56dc6c 100644 (file)
@@ -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");
 }
 
 /*
index 2d124bce0533b8cd46b298bf4a8931f38d2cf6ec..04311a531d6ed605cba97c2fee90c81ea41d18c4 100644 (file)
@@ -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);
 }
index 1a076b81ce5518abb7f5d6d0280871a7d093b986..b1c5a63b745525864f7f756d6a5bad21df6e6477 100644 (file)
@@ -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");
 
 }
index b4fba11441140d00030a4d80d3755789bbbacb73..97cbec244438e997a020a4b31b37cdf151e53446 100644 (file)
@@ -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");
 }
 
 /*
index 5bfb1adec4c30409a11efac0382e836cbad025ea..9d5bb9406f8eba796a8f3d9f248e9f2aa3c1d9d4 100644 (file)
@@ -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");
 }
 
 /*
index 04033d544377f56c8d3ddceeabc37de2bb6cbde1..4204c3c14b77b48d5ee8374fd13483d3c931bf1e 100644 (file)
@@ -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;
index 13617f4429c5a977ed29939f27059cbe8515b231..55ac36a8b3d3769ca504b459d2f56a78c02fb2c7 100644 (file)
@@ -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");
 }
 
 /*
index b31116b41a6aaeddb7ac290f46740c6887163142..e92d9dd1e4331c674723c2183575176ac34d6480 100644 (file)
@@ -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[] = {
index ebe3a4695b3c76df9e255f5e437d4fe6782e5068..fcaa58401f144b0b9b77041485d82964cf5e0c96 100644 (file)
@@ -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 {
index cfe55bde1b5768b40a96b0443bb7fc13a698dcb9..16076f53da6976ec873fd6cbef7913feef4b3c04 100644 (file)
@@ -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);
 
index 70ab9bfef7cefc97825c5dfc2cbe126a8b02d1d9..0d3a82c404bad44357fca9328094056f7b5a07d7 100644 (file)
@@ -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");
 }
 
 /*
index 807c28554261b7b49bd2d58a3e8cbb878e022fcf..6946ec506c7c71fccec5bd777a76610b219947fb 100644 (file)
@@ -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);
index 1cf6824e7b23df23c8b09bec3bf8dbf41a6c550b..ad81e939efd17faa382e67e589beb9dcfafd3730 100644 (file)
@@ -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");
 }
 
 /*
index 9d7b661f23fc582889f517f2fed81c35332a6ae3..4ff189905b87c32afbf5d74eaddcfc9b61208c41 100644 (file)
@@ -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");
 }
 
 /*
index 848fa319f408a28728a5bae29731f9f7fdabe589..278dd59bedcf4778f245503c453e6b70edab401c 100644 (file)
@@ -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);
index fc295a86fe0b2afe7abe4b3fffb928eacf825666..1ba74b264d7c665cdc3ad609d8bacb6fe3a1261e 100644 (file)
@@ -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");
 
 }
 
index 2ba0b15148c785fc292b53ad15f0c888757c65a2..b694d0d3a6df27f19f24484a0f81c998f6d52d8c 100644 (file)
@@ -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);
index 5b6967e13a5fce8f9fde12a23676868db3192722..1b170f817bd66df69290387de5d3451b8f613973 100644 (file)
@@ -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");
 }
index c43ad31de2670c04bf31cdbd2b9e155ea31c6f8f..0ff459269d0b4849f338382e9c5a0b9ffdd98392 100644 (file)
@@ -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);
index 271a12330348cb0313c4824beddd620da7528b4f..a5233cabc82b18804fbef5d490ef8996fb0f0940 100644 (file)
@@ -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");
index ef1388708135bf3621262ce892c02a0b460e5bcf..55484b4b17186bd9d29a93bf495d9f16b0b8aec0 100644 (file)
@@ -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);
index 410f0b789733662da63ce55ecdd7387b8f2d088d..002e3760f3dc3f7713ccc772094146e9d263c52f 100644 (file)
@@ -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");
 }
 
 /*
index 46534c356da07d4f429acda169d83bcf75612e0c..034e91a53d3efe70546c36f689ce415f38bfab00 100644 (file)
@@ -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");
index 9d0a4468ca6218b2bb47b49fc504973e6da56f87..4a954539c6c26d1fb5162db61758e6c31f6f4db1 100644 (file)
@@ -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
  *
index 914e0b3b379caafedd24df5449b7d32caf758183..ed36c1a7dfad1b9c87698c4e7b50245ebe9f29af 100644 (file)
@@ -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);
 }
index b8918d79602505d2676c20059303025b09572af6..43d3e63a6be96229582ee784fbd3cdb06800c14b 100644 (file)
@@ -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);
 }
 
index d8bf15ea2102127c02973cca24fc891b189dbee6..7cd332b5831ae5d86755ca142b3ab5ed9bf93ff8 100644 (file)
@@ -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);
index 18975569b5ff123d4512897635914faf47417bbc..8a06357e7ed2b69c7d993d8a9e39371b643108cb 100644 (file)
@@ -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;
 }
 
 /*
index 0ff3443579b5d528000c45d508183400d50c3ea8..fc8924f7371d282514fcec35162a74f1f94f0359 100644 (file)
@@ -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);
index 54953b4cbe5bdfbba4a55cef792b65888b1c77f4..acf852c0662a7749e2e76c5596dd6efbdd8bcba1 100644 (file)
@@ -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);
 }
index f7fb208abcef6faa4de9f546a074ca5e72bca865..8483c66a48c0ad7cac3eb4e4699b73f3dc58fde2 100644 (file)
@@ -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");
 }
 
 /*
index 12365b520044a698947b035be58599bc94184b40..53f3fe8429bfb83bae7358beca4de23481955472 100644 (file)
@@ -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);
@@ -2147,16 +2143,6 @@ void proto_register_zbee_aps(void)
     zbee_apf_handle = register_dissector("zbee_apf", dissect_zbee_apf, proto_zbee_apf);
 } /* 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
  *
index a0704b21017d428cbdf2ae23ba3f2cd1b1f255f9..28940d55d1428af18a0676816069978cbf2ba7c1 100644 (file)
@@ -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);
index 586c9ee36a5977c2041b647459989d69aade8911..439b81bde5da72e419a6843af36a7dd270910c32 100644 (file)
@@ -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)
index ff92c4fcd2d5b33e8cd60fb8cb428852e44d151e..00f9bbbaf26ee6fa421c8938bd6bafe99d97e1d9 100644 (file)
@@ -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" },
@@ -421,24 +419,6 @@ zbee_security_parse_key(const gchar *key_str, guint8 *key_buf, gboolean byte_ord
     return TRUE;
 } /* zbee_security_parse_key */
 
-/*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
@@ -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 */
index 98183928061635fc8d414df914ba170cf967d358..f1ed6dd8a3b662a3f7426d14f530d9d501b56941 100644 (file)
@@ -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);
index d356805cd39a94a6fc0c957df042fc7ab6ec21ce..1590fe094a6a77b59cc783c79cb751d6bef4e86e 100644 (file)
@@ -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);
index f9aec9d84c5b68eb3c3845f672654aad8fe988b1..981c27d92f1409ef8a677f044e112540256419cd 100644 (file)
@@ -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);
index c4d7dbf3d2b8e70cb30b08b4ad302ff9c35356b8..601f629c1a70b7a24930c7b08d3afe955cfa689f 100644 (file)
@@ -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");
 }
 
 /*
index d347625a072abc742c7bf2224f359cda3125a8be..e06fec070d7de73bfaeab55284ab9b5454c87c8a 100644 (file)
@@ -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
index b36ffd43b922520b5cc4140cc08c1b7ac7344d37..34921178166f13788a2eb8ed4b31ad694c7a51d0 100644 (file)
@@ -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.
  *
index 58b8a88caba823f193dae6b83a122583cad79416..2f2057ac3b1ebd1c240f17ace864c9bde558031b 100644 (file)
@@ -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");
index 90dc0b6e5de7e99072658b8e9cf7a7cc608c5845..b89a4c33042aa504e5a2e63bab4cfa4330c2b459 100644 (file)
@@ -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");
 }
 
 /*
index dd71c17cf6751b9748567bfbfa9db3abe3bd05b7..0d9eb5f6774f8cd90b3907ff8476a51db5339e7d 100644 (file)
@@ -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");
 }
 
 /*
index 7458f19e250b7e288f8e3cca7df24ae5b0b1a44d..e9d79c122c50198b45e6fbc94b9c9dcf8e4c73ec 100644 (file)
@@ -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");
 }
index 322b739ba0f740f8996916f8c7ce62582cfc45e5..f9c46d33da3eb195982f06930a7d4d00a2d2a013 100644 (file)
 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");
 }
 
 /*
index 526db940c74ecfdc4eeb145e72d09101b86fa255..98ee3233906018ca4f556fc9e806eb3bd7675374 100644 (file)
@@ -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;
 }
 
 
index ac0acb9e101bcc7a7fb570c2f4060931502e8651..8757a1a9ffe3789b817d7312173b17005ad8a4fc 100644 (file)
@@ -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");
 }