Moved from using dissect_data to using call_dissector()
authorhagbard <hagbard@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 25 Nov 2001 22:51:14 +0000 (22:51 +0000)
committerhagbard <hagbard@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 25 Nov 2001 22:51:14 +0000 (22:51 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4264 f5534014-38df-0310-8fa8-9805f1628bb7

12 files changed:
packet-gre.c
packet-h1.c
packet-icmpv6.c
packet-ipx.c
packet-isl.c
packet-lapd.c
packet-llc.c
packet-lpd.c
packet-osi.c
packet-pgm.c
packet-pop.c
packet-ppp.c

index 584a1954910e706a511f38c95eb13ff16f50f129..8d3f5f3abf46a992fa60e0cbe19a606434621b70 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for the Generic Routing Encapsulation (GRE) protocol
  * Brad Robel-Forrest <brad.robel-forrest@watchguard.com>
  *
- * $Id: packet-gre.c,v 1.45 2001/10/23 19:02:59 guy Exp $
+ * $Id: packet-gre.c,v 1.46 2001/11/25 22:51:13 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -58,6 +58,7 @@ static gint ett_gre_flags = -1;
 static gint ett_gre_wccp2_redirect_header = -1;
 
 static dissector_table_t gre_dissector_table;
+static dissector_handle_t data_handle;
 
 /* bit positions for flags in header */
 #define GH_B_C         0x8000
@@ -274,7 +275,7 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   }
   next_tvb = tvb_new_subset(tvb, offset, -1, -1);
   if (!dissector_try_port(gre_dissector_table, type, next_tvb, pinfo, tree))
-    dissect_data(next_tvb, 0, pinfo, gre_tree);
+    call_dissector(data_handle,next_tvb, pinfo, gre_tree);
 }
 
 static void
@@ -381,4 +382,5 @@ void
 proto_reg_handoff_gre(void)
 {
        dissector_add("ip.proto", IP_PROTO_GRE, dissect_gre, proto_gre);
+       data_handle = find_dissector("data");
 }
index d03a333660808299aaf8c568a4a72ff43374ee08..18835afbbbe8dcb658d2bbf3b3c6af84c800e30c 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for Sinec H1 packet disassembly
  * Gerrit Gehnen <G.Gehnen@atrie.de>
  *
- * $Id: packet-h1.c,v 1.20 2001/06/18 02:17:46 guy Exp $
+ * $Id: packet-h1.c,v 1.21 2001/11/25 22:51:13 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -54,6 +54,8 @@ static int hf_h1_response_value = -1;
 static int hf_h1_empty_len = -1;
 static int hf_h1_empty = -1;
 
+static dissector_handle_t data_handle;
+
 #define EMPTY_BLOCK    0xFF
 #define OPCODE_BLOCK   0x01
 #define REQUEST_BLOCK  0x03
@@ -245,7 +247,7 @@ static gboolean dissect_h1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        position += tvb_get_guint8(tvb,offset + position + 1);  /* Goto next section */
     }                  /* ..while */
   next_tvb = tvb_new_subset(tvb, offset+tvb_get_guint8(tvb,offset+2), -1, -1);
-  dissect_data(next_tvb, 0, pinfo, tree);
+  call_dissector(data_handle,next_tvb, pinfo, tree);
 
   return TRUE;
 }
@@ -318,4 +320,5 @@ void
 proto_reg_handoff_h1(void)
 {
   heur_dissector_add("cotp_is", dissect_h1, proto_h1);
+  data_handle = find_dissector("data");
 }
index 23e736705d4028897bda711f9f013303d94bbfe6..a4689481bfd27744ceb07cad6e2c1cf11776c539 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-icmpv6.c
  * Routines for ICMPv6 packet disassembly
  *
- * $Id: packet-icmpv6.c,v 1.53 2001/10/01 08:29:34 guy Exp $
+ * $Id: packet-icmpv6.c,v 1.54 2001/11/25 22:51:13 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -82,6 +82,7 @@ static gint ett_nodeinfo_nodebitmap = -1;
 static gint ett_nodeinfo_nodedns = -1;
 
 static dissector_handle_t ipv6_handle;
+static dissector_handle_t data_handle;
 
 static const value_string names_nodeinfo_qtype[] = {
     { NI_QTYPE_NOOP,           "NOOP" },
@@ -173,7 +174,7 @@ dissect_contained_icmpv6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
        pinfo->src = save_src;
        pinfo->dst = save_dst;
     } else
-       dissect_data(next_tvb, 0, pinfo, tree);
+       call_dissector(data_handle,next_tvb, pinfo, tree);
 }
 
 static void
@@ -796,7 +797,7 @@ dissect_nodeinfo(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
 nodata:;
 
     /* the rest of data */
-    dissect_data(tvb_new_subset(tvb, offset + off, -1, -1), 0, pinfo, tree);
+    call_dissector(data_handle,tvb_new_subset(tvb, offset + off, -1, -1), pinfo, tree);
 }
 
 static void
@@ -844,7 +845,7 @@ dissect_rrenum(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
     proto_tree_add_text(tree, tvb,
        offset + offsetof(struct icmp6_router_renum, rr_maxdelay), 2,
        "Max delay: 0x%04x", pntohs(&rr->rr_maxdelay));
-    dissect_data(tvb_new_subset(tvb, offset + sizeof(*rr), -1, -1), 0, pinfo, tree);   /*XXX*/
+    call_dissector(data_handle,tvb_new_subset(tvb, offset + sizeof(*rr), -1, -1), pinfo, tree);        /*XXX*/
 
     if (rr->rr_code == ICMP6_ROUTER_RENUMBERING_COMMAND) {
        off = offset + sizeof(*rr);
@@ -1251,7 +1252,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                offset + offsetof(struct icmp6_hdr, icmp6_seq), 2,
                "Sequence: 0x%04x", (guint16)ntohs(dp->icmp6_seq));
            next_tvb = tvb_new_subset(tvb, offset + sizeof(*dp), -1, -1);
-           dissect_data(next_tvb, 0, pinfo, icmp6_tree);
+           call_dissector(data_handle,next_tvb, pinfo, icmp6_tree);
            break;
        case ICMP6_MEMBERSHIP_QUERY:
        case ICMP6_MEMBERSHIP_REPORT:
@@ -1408,7 +1409,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            break;
        default:
            next_tvb = tvb_new_subset(tvb, offset + sizeof(*dp), -1, -1);
-           dissect_data(next_tvb, 0, pinfo, tree);
+           call_dissector(data_handle,next_tvb, pinfo, tree);
            break;
        }
     }
@@ -1459,4 +1460,5 @@ proto_reg_handoff_icmpv6(void)
    * Get a handle for the IPv6 dissector.
    */
   ipv6_handle = find_dissector("ipv6");
+  data_handle = find_dissector("data");
 }
index c09afe1c8926122a3e14e4ab50f876ddf76b3a76..e697f4d88ef7b3c9faed30547665eee0ccf390b2 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for NetWare's IPX
  * Gilbert Ramirez <gram@alumni.rice.edu>
  *
- * $Id: packet-ipx.c,v 1.94 2001/11/25 01:28:00 guy Exp $
+ * $Id: packet-ipx.c,v 1.95 2001/11/25 22:51:13 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -99,6 +99,8 @@ static int proto_ipxmsg = -1;
 static int hf_msg_conn = -1;
 static int hf_msg_sigchar = -1;
 
+static dissector_handle_t data_handle;
+
 static void
 dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
 
@@ -280,7 +282,7 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        if (dissector_try_port(ipx_socket_dissector_table, ipx_ssocket,
            next_tvb, pinfo, tree))
                return;
-       dissect_data(next_tvb, 0, pinfo, tree);
+       call_dissector(data_handle,next_tvb, pinfo, tree);
 }
 
 
@@ -363,7 +365,7 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                proto_tree_add_item(spx_tree, hf_spx_all_nr, tvb, 10, 2, FALSE);
 
                next_tvb = tvb_new_subset(tvb, SPX_HEADER_LEN, -1, -1);
-               dissect_data(next_tvb, 0, pinfo, tree);
+               call_dissector(data_handle,next_tvb, pinfo, tree);
        }
 }
 
@@ -994,4 +996,5 @@ proto_reg_handoff_ipx(void)
            proto_ipxrip);
        dissector_add("ipx.socket", IPX_SOCKET_IPX_MESSAGE, dissect_ipxmsg,
            proto_ipxmsg);
+       data_handle = find_dissector("data");
 }
index 71ea4c806786819c8469e6ff8302fe1ee9a57d4a..1258968b06d9ba1c30345cab9acc42bffaa0f762 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-isl.c
  * Routines for Cisco ISL Ethernet header disassembly
  *
- * $Id: packet-isl.c,v 1.27 2001/11/20 22:29:04 guy Exp $
+ * $Id: packet-isl.c,v 1.28 2001/11/25 22:51:13 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -83,6 +83,7 @@ static gint ett_isl = -1;
 
 static dissector_handle_t eth_handle;
 static dissector_handle_t tr_handle;
+static dissector_handle_t data_handle;
 
 void
 capture_isl(const u_char *pd, int offset, int len, packet_counts *ld)
@@ -259,7 +260,7 @@ dissect_isl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
   default:
     next_tvb = tvb_new_subset(tvb, ISL_HEADER_SIZE, -1, -1);
-    dissect_data(next_tvb, 0, pinfo, tree);
+    call_dissector(data_handle,next_tvb, pinfo, tree);
     break;
   }
 }
@@ -344,4 +345,5 @@ proto_reg_handoff_isl(void)
    */
   eth_handle = find_dissector("eth");
   tr_handle = find_dissector("tr");
+  data_handle = find_dissector("data");
 }
index 3cc725b94e6d0f03657db7358cc441bf3eb315fc..fea72a6be03f06e24687a06bfe73ab9ae8e89e0f 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for LAPD frame disassembly
  * Gilbert Ramirez <gram@alumni.rice.edu>
  *
- * $Id: packet-lapd.c,v 1.24 2001/11/13 23:55:30 gram Exp $
+ * $Id: packet-lapd.c,v 1.25 2001/11/25 22:51:13 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -59,6 +59,7 @@ static gint ett_lapd_address = -1;
 static gint ett_lapd_control = -1;
 
 static dissector_handle_t q931_handle;
+static dissector_handle_t data_handle;
 
 /*
  * Bits in the address field.
@@ -150,11 +151,11 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        break;
 
                default:
-                       dissect_data(next_tvb, 0, pinfo, tree);
+                       call_dissector(data_handle,next_tvb, pinfo, tree);
                        break;
                }
        } else
-               dissect_data(next_tvb, 0, pinfo, tree);
+               call_dissector(data_handle,next_tvb, pinfo, tree);
 }
 
 void
@@ -208,6 +209,7 @@ proto_reg_handoff_lapd(void)
         * Get handle for the Q.931 dissector.
         */
        q931_handle = find_dissector("q931");
+       data_handle = find_dissector("data");
 
        dissector_add("wtap_encap", WTAP_ENCAP_LAPD, dissect_lapd, proto_lapd);
 }
index 33df7f5ad1afe9b7e107ec9991a40006f3d7da72..0058f7ede01667a18d8425f049d62cdd697b9f68 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for IEEE 802.2 LLC layer
  * Gilbert Ramirez <gram@alumni.rice.edu>
  *
- * $Id: packet-llc.c,v 1.89 2001/11/20 21:59:13 guy Exp $
+ * $Id: packet-llc.c,v 1.90 2001/11/25 22:51:13 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -65,6 +65,7 @@ static dissector_handle_t bpdu_handle;
 static dissector_handle_t eth_handle;
 static dissector_handle_t fddi_handle;
 static dissector_handle_t tr_handle;
+static dissector_handle_t data_handle;
 
 typedef void (capture_func_t)(const u_char *, int, int, packet_counts *);
 
@@ -348,10 +349,10 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        /* do lookup with the subdissector table */
                        if (!dissector_try_port(subdissector_table, dsap,
                            next_tvb, pinfo, tree)) {
-                               dissect_data(next_tvb, 0, pinfo, tree);
+                               call_dissector(data_handle,next_tvb, pinfo, tree);
                        }
                } else {
-                       dissect_data(next_tvb, 0, pinfo, tree);
+                       call_dissector(data_handle,next_tvb, pinfo, tree);
                }
        }
 }
@@ -397,7 +398,7 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
                            pinfo, tree, snap_tree, hf_type, -1);
                } else {
                        next_tvb = tvb_new_subset(tvb, offset+5, -1, -1);
-                       dissect_data(next_tvb, 0, pinfo, tree);
+                       call_dissector(data_handle,next_tvb, pinfo, tree);
                }
                break;
 
@@ -453,7 +454,7 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
 
                default:
                        next_tvb = tvb_new_subset(tvb, offset+5, -1, -1);
-                       dissect_data(next_tvb, 0, pinfo, tree);
+                       call_dissector(data_handle,next_tvb, pinfo, tree);
                        break;
                }
                break;
@@ -474,9 +475,9 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
                        /* for future reference, 0x0102 is Cisco DRIP */
                        if (!dissector_try_port(cisco_subdissector_table,
                            etype, next_tvb, pinfo, tree))
-                               dissect_data(next_tvb, 0, pinfo, tree);
+                               call_dissector(data_handle,next_tvb, pinfo, tree);
                } else
-                       dissect_data(next_tvb, 0, pinfo, tree);
+                       call_dissector(data_handle,next_tvb, pinfo, tree);
                break;
 
        case OUI_CABLE_BPDU:    /* DOCSIS cable modem spanning tree BPDU */
@@ -494,7 +495,7 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
                            etype);
                }
                next_tvb = tvb_new_subset(tvb, offset+5, -1, -1);
-               dissect_data(next_tvb, 0, pinfo, tree);
+               call_dissector(data_handle,next_tvb, pinfo, tree);
                break;
        }
 }
@@ -566,6 +567,7 @@ proto_reg_handoff_llc(void)
        eth_handle = find_dissector("eth");
        fddi_handle = find_dissector("fddi");
        tr_handle = find_dissector("tr");
+       data_handle = find_dissector("data");
 
        dissector_add("wtap_encap", WTAP_ENCAP_ATM_RFC1483, dissect_llc,
            proto_llc);
index 7c2a5532aaab4e3f23a608b9450427848eb77673..f3cc388515f4906205e5b8edf77d5756146349de 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for LPR and LPRng packet disassembly
  * Gilbert Ramirez <gram@alumni.rice.edu>
  *
- * $Id: packet-lpd.c,v 1.29 2001/11/13 23:55:30 gram Exp $
+ * $Id: packet-lpd.c,v 1.30 2001/11/25 22:51:13 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -49,6 +49,8 @@ enum lpr_type { request, response, unknown };
 
 static gint find_printer_string(tvbuff_t *tvb, int offset);
 
+static dissector_handle_t data_handle;
+
 static void
 dissect_lpd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
@@ -132,7 +134,7 @@ dissect_lpd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                         tvb_format_text(tvb, 1, printer_len));
                        }
                        else {
-                               dissect_data(tvb, 0, pinfo, tree);
+                               call_dissector(data_handle,tvb, pinfo, tree);
                        }
                }
                else if (lpr_packet_type == response) {
@@ -141,11 +143,11 @@ dissect_lpd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                        "Response: %s", lpd_server_code[code]);
                        }
                        else {
-                               dissect_data(tvb, 0, pinfo, tree);
+                               call_dissector(data_handle,tvb, pinfo, tree);
                        }
                }
                else {
-                       dissect_data(tvb, 0, pinfo, tree);
+                       call_dissector(data_handle,tvb, pinfo, tree);
                }
        }
 }
@@ -193,4 +195,5 @@ void
 proto_reg_handoff_lpd(void)
 {
   dissector_add("tcp.port", TCP_PORT_PRINTER, &dissect_lpd, proto_lpd);
+  data_handle = find_dissector("data");
 }
index 1cbf57bc7627aca0a368929789f8704ef21ec567..7bfd86afea476960d416c24cdecda90983476bc8 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for ISO/OSI network and transport protocol packet disassembly
  * Main entrance point and common functions
  *
- * $Id: packet-osi.c,v 1.46 2001/09/14 07:10:05 guy Exp $
+ * $Id: packet-osi.c,v 1.47 2001/11/25 22:51:13 hagbard Exp $
  * Laurent Deniel <deniel@worldnet.fr>
  * Ralf Schneider <Ralf.Schneider@t-online.de>
  *
@@ -126,6 +126,7 @@ const value_string nlpid_vals[] = {
 };
 
 dissector_table_t osinl_subdissector_table;
+static dissector_handle_t data_handle;
 
 static void dissect_osi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 
 {
@@ -147,13 +148,13 @@ static void dissect_osi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       if (check_col(pinfo->fd, COL_PROTOCOL)) {
        col_set_str(pinfo->fd, COL_PROTOCOL, "ESIS (X.25)");
       }
-      dissect_data(tvb, 0, pinfo, tree);
+      call_dissector(data_handle,tvb, pinfo, tree);
       break;
     case NLPID_ISO10747_IDRP:
       if (check_col(pinfo->fd, COL_PROTOCOL)) {
         col_set_str(pinfo->fd, COL_PROTOCOL, "IDRP");
       }
-      dissect_data(tvb, 0, pinfo, tree);
+      call_dissector(data_handle,tvb, pinfo, tree);
       break;
     default:
       if (check_col(pinfo->fd, COL_PROTOCOL)) {
@@ -162,7 +163,7 @@ static void dissect_osi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       if (check_col(pinfo->fd, COL_INFO)) {
        col_add_fstr(pinfo->fd, COL_INFO, "Unknown ISO protocol (%02x)", nlpid);
       }
-      dissect_data(tvb, 0, pinfo, tree);
+      call_dissector(data_handle,tvb, pinfo, tree);
       break;
   }
 } /* dissect_osi */
@@ -182,4 +183,5 @@ proto_reg_handoff_osi(void)
        dissector_add("llc.dsap", SAP_OSINL, dissect_osi, -1);
         dissector_add("ppp.protocol", PPP_OSI, dissect_osi, -1);
        dissector_add("null.type", BSD_AF_ISO, dissect_osi, -1);
+       data_handle = find_dissector("data");
 }
index 130169916e54f5a7e1e1da4f4dc5b3cd9809de04..b5501b0180cca783883450341ae93f0137ae502f 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-pgm.c
  * Routines for pgm packet disassembly
  *
- * $Id: packet-pgm.c,v 1.8 2001/11/21 02:01:05 guy Exp $
+ * $Id: packet-pgm.c,v 1.9 2001/11/25 22:51:14 hagbard Exp $
  * 
  * Copyright (c) 2000 by Talarian Corp
  *
@@ -147,6 +147,7 @@ static int hf_pgm_opt_ccfeedbk_acker = -1;
 
 static dissector_table_t subdissector_table;
 static heur_dissector_list_t heur_subdissector_list;
+static dissector_handle_t data_handle;
 
 /*
  * As of the time this comment was typed
@@ -568,7 +569,7 @@ decode_pgm_ports(tvbuff_t *tvb, int offset, packet_info *pinfo,
     return;
 
   /* Oh, well, we don't know this; dissect it as data. */
-  dissect_data(next_tvb, 0, pinfo, tree);
+  call_dissector(data_handle,next_tvb, pinfo, tree);
 
 }
 int 
@@ -1114,7 +1115,8 @@ proto_reg_handoff_pgm(void)
   dissector_add("udp.port", udp_encap_mcast_port, dissect_pgm, proto_pgm);
 
   dissector_add("ip.proto", IP_PROTO_PGM, dissect_pgm, proto_pgm);
-
+  
+  data_handle = find_dissector("data");
 }
 void
 proto_rereg_pgm(void)
index 1ca93ecb7e83f330c42d0483afc67b9dd4621c7d..6ff7ef3ee0090a10f2fa551e1ad0ff8f9b419b22 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for pop packet dissection
  * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
  *
- * $Id: packet-pop.c,v 1.25 2001/06/18 02:17:50 guy Exp $
+ * $Id: packet-pop.c,v 1.26 2001/11/25 22:51:14 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -50,6 +50,8 @@ static int hf_pop_request = -1;
 
 static gint ett_pop = -1;
 
+static dissector_handle_t data_handle;
+
 #define TCP_PORT_POP                   110
 
 static gboolean response_is_continuation(const u_char *data);
@@ -113,7 +115,7 @@ dissect_pop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        /*
                         * Put the whole packet into the tree as data.
                         */
-                       dissect_data(tvb, 0, pinfo, pop_tree);
+                       call_dissector(data_handle,tvb, pinfo, pop_tree);
                        return;
                }
 
@@ -223,4 +225,5 @@ void
 proto_reg_handoff_pop(void)
 {
   dissector_add("tcp.port", TCP_PORT_POP, dissect_pop, proto_pop);
+  data_handle = find_dissector("data");
 }
index 9e376a73d31e5685d95815f6dcac86981c9c75a2..9534f057da7dfd7bec757fd46379fe0b7778150b 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-ppp.c
  * Routines for ppp packet disassembly
  *
- * $Id: packet-ppp.c,v 1.76 2001/11/21 02:01:04 guy Exp $
+ * $Id: packet-ppp.c,v 1.77 2001/11/25 22:51:14 hagbard Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -116,6 +116,7 @@ static gint ett_chap_message                = -1;
 
 static dissector_table_t subdissector_table;
 static dissector_handle_t chdlc_handle;
+static dissector_handle_t data_handle;
 
 /* options */
 static gint ppp_fcs_decode = 0; /* 0 = No FCS, 1 = 16 bit FCS, 2 = 32 bit FCS */
@@ -1640,7 +1641,7 @@ dissect_ppp_common( tvbuff_t *tvb, int offset, packet_info *pinfo,
     if (check_col(pinfo->fd, COL_INFO))
       col_add_fstr(pinfo->fd, COL_INFO, "PPP %s (0x%04x)",
                   val_to_str(ppp_prot, ppp_vals, "Unknown"), ppp_prot);
-    dissect_data(next_tvb, 0, pinfo, tree);
+    call_dissector(data_handle,next_tvb, pinfo, tree);
   }
 }
 
@@ -2106,6 +2107,7 @@ proto_reg_handoff_ppp(void)
    * Get a handle for the CHDLC dissector.
    */
   chdlc_handle = find_dissector("chdlc");
+  data_handle = find_dissector("data");
 
   dissector_add("wtap_encap", WTAP_ENCAP_PPP, dissect_ppp_hdlc, proto_ppp);
   dissector_add("wtap_encap", WTAP_ENCAP_PPP_WITH_PHDR, dissect_ppp_hdlc, proto_ppp);