Moved from using dissect_data to using call_dissector()
authorhagbard <hagbard@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 26 Nov 2001 01:03:35 +0000 (01:03 +0000)
committerhagbard <hagbard@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 26 Nov 2001 01:03:35 +0000 (01:03 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4266 f5534014-38df-0310-8fa8-9805f1628bb7

packet-atalk.c
packet-atm.c
packet-bacapp.c
packet-bvlc.c
packet-fddi.c
packet-fr.c

index 98a91c767c26f5060bc3b9c5cd30d771e3671468..28cadc24734c76b20dda89fd2aedd099e6e676ef 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-atalk.c
  * Routines for Appletalk packet disassembly (DDP, currently).
  *
- * $Id: packet-atalk.c,v 1.55 2001/06/18 02:17:44 guy Exp $
+ * $Id: packet-atalk.c,v 1.56 2001/11/26 01:03:35 hagbard Exp $
  *
  * Simon Wilkinson <sxw@dcs.ed.ac.uk>
  *
@@ -85,6 +85,8 @@ static gint ett_pstring = -1;
 
 static dissector_table_t ddp_dissector_table;
 
+static dissector_handle_t data_handle;
+
 /*
  * P = Padding, H = Hops, L = Len
  *
@@ -418,7 +420,7 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
   new_tvb = tvb_new_subset(tvb, DDP_HEADER_SIZE, -1, -1);
 
   if (!dissector_try_port(ddp_dissector_table, ddp.type, new_tvb, pinfo, tree))
-    dissect_data(new_tvb, 0, pinfo, tree);
+    call_dissector(data_handle,new_tvb, pinfo, tree);
 }
 
 void
@@ -566,4 +568,5 @@ proto_reg_handoff_atalk(void)
   dissector_add("ddp.type", DDP_NBP, dissect_nbp, proto_nbp);
   dissector_add("ddp.type", DDP_RTMPREQ, dissect_rtmp_request, proto_rtmp);
   dissector_add("ddp.type", DDP_RTMPDATA, dissect_rtmp_data, proto_rtmp);
+  data_handle = find_dissector("data");
 }
index 0304a30613ba3c535dbfe14f0ddc0665282618cd..b71862b2937f06c992e1865efe4745664f69553f 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-atm.c
  * Routines for ATM packet disassembly
  *
- * $Id: packet-atm.c,v 1.36 2001/06/18 02:17:44 guy Exp $
+ * $Id: packet-atm.c,v 1.37 2001/11/26 01:03:35 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -59,6 +59,7 @@ static dissector_handle_t llc_handle;
 static dissector_handle_t sscop_handle;
 static dissector_handle_t lane_handle;
 static dissector_handle_t ilmi_handle;
+static dissector_handle_t data_handle;
 
 /*
  * See
@@ -413,7 +414,7 @@ dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   default:
     /* Dump it as raw data. */
     next_tvb           = tvb_new_subset(tvb, 0, -1, -1);
-    dissect_data(next_tvb, 0, pinfo, tree);
+    call_dissector(data_handle,next_tvb, pinfo, tree);
     break;
   }
 }
@@ -744,7 +745,7 @@ dissect_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     default:
       if (tree) {
         /* Dump it as raw data. */
-        dissect_data(tvb, 0, pinfo, tree);
+        call_dissector(data_handle,tvb, pinfo, tree);
         break;
       }
     }
@@ -753,7 +754,7 @@ dissect_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   default:
     if (tree) {
       /* Dump it as raw data.  (Is this a single cell?) */
-      dissect_data(tvb, 0, pinfo, tree);
+      call_dissector(data_handle,tvb, pinfo, tree);
     }
     break;
   }
@@ -807,6 +808,7 @@ proto_reg_handoff_atm(void)
        sscop_handle = find_dissector("sscop");
        lane_handle = find_dissector("lane");
        ilmi_handle = find_dissector("ilmi");
+       data_handle = find_dissector("data");
 
        dissector_add("wtap_encap", WTAP_ENCAP_ATM_SNIFFER, dissect_atm,
            proto_atm);
index 44dc7efb446a8a876e6f838b0ef3af8260be7a82..6b3feb35c92d234f206ae28378ec00a7932d0ed2 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for BACnet (APDU) dissection
  * Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
  *
- * $Id: packet-bacapp.c,v 1.4 2001/06/18 02:17:44 guy Exp $
+ * $Id: packet-bacapp.c,v 1.5 2001/11/26 01:03:35 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -69,6 +69,8 @@ static int hf_bacapp_type = -1;
 
 static gint ett_bacapp = -1;
 
+static dissector_handle_t data_handle;
+
 static void
 dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
@@ -101,7 +103,7 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        }
        next_tvb = tvb_new_subset(tvb,offset,-1,-1);
-       dissect_data(next_tvb, 0, pinfo, tree);
+       call_dissector(data_handle,next_tvb, pinfo, tree);
 }
 
 
@@ -126,4 +128,5 @@ void
 proto_reg_handoff_bacapp(void)
 {
        dissector_add("bacnet_control_net", 0, dissect_bacapp, proto_bacapp);
+       data_handle = find_dissector("data");
 }
index 5dd638f463de2e3e5485ed938501801d6169c2cd..6201724095ab64becfec6f095d2259db998d4633 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for BACnet/IP (BVLL, BVLC) dissection
  * Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
  *
- * $Id: packet-bvlc.c,v 1.4 2001/06/18 02:17:45 guy Exp $
+ * $Id: packet-bvlc.c,v 1.5 2001/11/26 01:03:35 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -67,7 +67,7 @@ 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;
 
@@ -293,7 +293,7 @@ dissect_bvlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        if (!dissector_try_port(bvlc_dissector_table, 
        bvlc_function, next_tvb, pinfo, tree)) {
                /* Unknown function - dissect the paylod as data */
-               dissect_data(next_tvb, 0, pinfo, tree);
+               call_dissector(data_handle,next_tvb, pinfo, tree);
        }
 }
 
@@ -396,6 +396,7 @@ void
 proto_reg_handoff_bvlc(void)
 {
        dissector_add("udp.port", 0xBAC0, dissect_bvlc, proto_bvlc); /* added proto_bvlc */
+       data_handle = find_dissector("data");
 }
 /* Taken from add-135a (BACnet-IP-standard paper):
  *
index ff55c4f6be8414134b5e43a63d450d7bf41c644f..b62b370ea2b9147e8a8c2d93f1bc15d7f8b4ec1f 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Laurent Deniel <deniel@worldnet.fr>
  *
- * $Id: packet-fddi.c,v 1.52 2001/11/20 21:59:12 guy Exp $
+ * $Id: packet-fddi.c,v 1.53 2001/11/26 01:03:35 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -126,6 +126,7 @@ static const value_string mac_subtype_vals[] = {
 #define FDDI_P_SHOST           7
 
 static dissector_handle_t llc_handle;
+static dissector_handle_t data_handle;
 
 static void
 swap_mac_addr(u_char *swapped_addr, const u_char *orig_addr)
@@ -369,7 +370,7 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
       return;
       
     default :
-      dissect_data(next_tvb, 0, pinfo, tree);
+      call_dissector(data_handle,next_tvb, pinfo, tree);
       return;
 
   } /* fc */
@@ -455,6 +456,7 @@ proto_reg_handoff_fddi(void)
         * Get a handle for the LLC dissector.
         */
        llc_handle = find_dissector("llc");
+       data_handle = find_dissector("data");
 
        dissector_add("wtap_encap", WTAP_ENCAP_FDDI,
            dissect_fddi_not_bitswapped, proto_fddi);
index d79628f6b1138fa75c4a4a69df08551c808a7c0b..115ad78bc077b7d41e441c5de28b8c5c709d939d 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright 2001, Paul Ionescu        <paul@acorp.ro>
  *
- * $Id: packet-fr.c,v 1.18 2001/06/18 02:17:46 guy Exp $
+ * $Id: packet-fr.c,v 1.19 2001/11/26 01:03:35 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -92,6 +92,8 @@ static gint hf_fr_pid   = -1;
 static gint hf_fr_snaptype = -1;
 static gint hf_fr_chdlctype = -1;
 
+static dissector_handle_t data_handle;
+
 static const true_false_string cmd_string = {
                 "Command",
                 "Response"
@@ -349,7 +351,7 @@ static void dissect_fr_nlpid(tvbuff_t *tvb, int offset, packet_info *pinfo,
        next_tvb = tvb_new_subset(tvb,offset,-1,-1);
        if (!dissector_try_port(fr_subdissector_table,fr_nlpid,
                                next_tvb, pinfo, tree))
-               dissect_data(next_tvb, 0, pinfo, tree);
+               call_dissector(data_handle,next_tvb, pinfo, tree);
        break;
   }
 }
@@ -357,12 +359,12 @@ static void dissect_fr_nlpid(tvbuff_t *tvb, int offset, packet_info *pinfo,
 static void dissect_lapf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
        proto_tree_add_text(tree, tvb, 0, 0, "Frame relay lapf not yet implemented");
-       dissect_data(tvb_new_subset(tvb,0,-1,-1),0,pinfo,tree);
+       call_dissector(data_handle,tvb_new_subset(tvb,0,-1,-1),pinfo,tree);
 }
 static void dissect_fr_xid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
        proto_tree_add_text(tree, tvb, 0, 0, "Frame relay xid not yet implemented");
-       dissect_data(tvb_new_subset(tvb,0,-1,-1),0,pinfo,tree);
+       call_dissector(data_handle,tvb_new_subset(tvb,0,-1,-1),pinfo,tree);
 }
  
 /* Register the protocol with Ethereal */
@@ -426,4 +428,5 @@ void proto_reg_handoff_fr(void)
 {
   dissector_add("wtap_encap", WTAP_ENCAP_FRELAY, dissect_fr, proto_fr);
   dissector_add("gre.proto", GRE_FR, dissect_fr, proto_fr);
+  data_handle = find_dissector("data");
 }