diff options
-rw-r--r-- | packet-bacnet.c | 8 | ||||
-rw-r--r-- | packet-bpdu.c | 6 | ||||
-rw-r--r-- | packet-cdp.c | 7 | ||||
-rw-r--r-- | packet-chdlc.c | 9 | ||||
-rw-r--r-- | packet-clnp.c | 29 | ||||
-rw-r--r-- | packet-dsi.c | 9 | ||||
-rw-r--r-- | packet-eap.c | 7 | ||||
-rw-r--r-- | packet-eapol.c | 7 | ||||
-rw-r--r-- | packet-ethertype.c | 11 | ||||
-rw-r--r-- | packet-giop.c | 7 | ||||
-rw-r--r-- | packet-gmrp.c | 23 | ||||
-rw-r--r-- | packet-gvrp.c | 23 | ||||
-rw-r--r-- | packet-http.c | 7 | ||||
-rw-r--r-- | packet-icap.c | 5 | ||||
-rw-r--r-- | packet-ieee80211.c | 6 | ||||
-rw-r--r-- | packet-ip.c | 12 | ||||
-rw-r--r-- | packet-ipp.c | 7 | ||||
-rw-r--r-- | packet-ipsec.c | 11 | ||||
-rw-r--r-- | packet-ipv6.c | 9 | ||||
-rw-r--r-- | packet-isis-hello.c | 11 | ||||
-rw-r--r-- | packet-isis-lsp.c | 11 | ||||
-rw-r--r-- | packet-isis-snp.c | 13 | ||||
-rw-r--r-- | packet-netbios.c | 9 | ||||
-rw-r--r-- | packet-null.c | 7 | ||||
-rw-r--r-- | packet-ospf.c | 7 | ||||
-rw-r--r-- | packet-pptp.c | 9 | ||||
-rw-r--r-- | packet-rpc.c | 7 | ||||
-rw-r--r-- | packet-rtp.c | 6 | ||||
-rw-r--r-- | packet-smb-mailslot.c | 12 | ||||
-rw-r--r-- | packet-smb-pipe.c | 12 | ||||
-rw-r--r-- | packet-sna.c | 9 | ||||
-rw-r--r-- | packet-snmp.c | 9 | ||||
-rw-r--r-- | packet-tcp.c | 8 | ||||
-rw-r--r-- | packet-tns.c | 9 | ||||
-rw-r--r-- | packet-tr.c | 6 | ||||
-rw-r--r-- | packet-udp.c | 6 | ||||
-rw-r--r-- | packet-vines.c | 8 | ||||
-rw-r--r-- | packet-x11.c | 9 |
38 files changed, 253 insertions, 118 deletions
diff --git a/packet-bacnet.c b/packet-bacnet.c index a583bdba66..d4b4f47abc 100644 --- a/packet-bacnet.c +++ b/packet-bacnet.c @@ -2,7 +2,7 @@ * Routines for BACnet (NPDU) dissection * Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund * - * $Id: packet-bacnet.c,v 1.4 2001/06/18 02:17:44 guy Exp $ + * $Id: packet-bacnet.c,v 1.5 2001/11/26 04:52:49 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -50,6 +50,7 @@ #include "packet.h" static dissector_table_t bacnet_dissector_table; +static dissector_handle_t data_handle; static const char* bacnet_mesgtyp_name (guint8 bacnet_mesgtyp){ @@ -355,7 +356,7 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb, offset, 2, FALSE); offset += 2; /* attention: doesnt work here because of if(tree) */ - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); } /* Performance Index (in I-Could-Be-Router-To-Network) */ if (bacnet_mesgtyp == BAC_NET_ICB_R) { @@ -427,7 +428,7 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (!dissector_try_port(bacnet_dissector_table, bacnet_control_net, next_tvb, pinfo, tree)) { /* Unknown function - dissect the payload as data */ - dissect_data(next_tvb, 0, pinfo, tree); + call_dissector(data_handle,next_tvb, pinfo, tree); } } @@ -602,4 +603,5 @@ proto_reg_handoff_bacnet(void) dissector_add("bvlc.function", 0x09, dissect_bacnet, proto_bacnet); dissector_add("bvlc.function", 0x0a, dissect_bacnet, proto_bacnet); dissector_add("bvlc.function", 0x0b, dissect_bacnet, proto_bacnet); + data_handle = find_dissector("data"); } diff --git a/packet-bpdu.c b/packet-bpdu.c index 22de38aaa4..fbbbc39a8a 100644 --- a/packet-bpdu.c +++ b/packet-bpdu.c @@ -1,7 +1,7 @@ /* packet-bpdu.c * Routines for BPDU (Spanning Tree Protocol) disassembly * - * $Id: packet-bpdu.c,v 1.27 2001/07/23 18:21:30 guy Exp $ + * $Id: packet-bpdu.c,v 1.28 2001/11/26 04:52:49 hagbard Exp $ * * Copyright 1999 Christophe Tronche <ch.tronche@computer.org> * @@ -78,6 +78,7 @@ static gint ett_bpdu = -1; static dissector_handle_t gvrp_handle; static dissector_handle_t gmrp_handle; +static dissector_handle_t data_handle; static void dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -213,7 +214,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { bpdu_type == 0x80 ? "Topology Change Notification" : "Unknown"); if (bpdu_type != 0) { - dissect_data(tvb, BPDU_TYPE + 1, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, BPDU_TYPE + 1,-1,tvb_reported_length_remaining(tvb,BPDU_TYPE + 1)), pinfo, tree); return; } @@ -346,6 +347,7 @@ proto_reg_handoff_bpdu(void) * Get handle for the GMRP dissector. */ gmrp_handle = find_dissector("gmrp"); + data_handle = find_dissector("data"); dissector_add("llc.dsap", SAP_BPDU, dissect_bpdu, proto_bpdu); dissector_add("ppp.protocol", PPP_BPDU, dissect_bpdu, proto_bpdu); diff --git a/packet-cdp.c b/packet-cdp.c index 6e516566bc..e435c12041 100644 --- a/packet-cdp.c +++ b/packet-cdp.c @@ -2,7 +2,7 @@ * Routines for the disassembly of the "Cisco Discovery Protocol" * (c) Copyright Hannes R. Boehm <hannes@boehm.org> * - * $Id: packet-cdp.c,v 1.39 2001/08/28 08:28:14 guy Exp $ + * $Id: packet-cdp.c,v 1.40 2001/11/26 04:52:49 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -61,6 +61,8 @@ static gint ett_cdp_tlv = -1; static gint ett_cdp_address = -1; static gint ett_cdp_capabilities = -1; +static dissector_handle_t data_handle; + static int dissect_address_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree); static void @@ -355,7 +357,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += length; } } - dissect_data(tvb, offset, pinfo, cdp_tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, cdp_tree); } } @@ -578,6 +580,7 @@ proto_register_cdp(void) void proto_reg_handoff_cdp(void) { + data_handle = find_dissector("data"); dissector_add("llc.cisco_pid", 0x2000, dissect_cdp, proto_cdp); dissector_add("chdlctype", 0x2000, dissect_cdp, proto_cdp); } diff --git a/packet-chdlc.c b/packet-chdlc.c index 5989980f90..8017145559 100644 --- a/packet-chdlc.c +++ b/packet-chdlc.c @@ -1,7 +1,7 @@ /* packet-chdlc.c * Routines for Cisco HDLC packet disassembly * - * $Id: packet-chdlc.c,v 1.5 2001/11/20 21:59:12 guy Exp $ + * $Id: packet-chdlc.c,v 1.6 2001/11/26 04:52:49 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -57,6 +57,8 @@ static int hf_slarp_yoursequence = -1; static gint ett_slarp = -1; +static dissector_handle_t data_handle; + /* * Protocol types for the Cisco HDLC format. * @@ -133,7 +135,7 @@ chdlctype(guint16 chdlctype, tvbuff_t *tvb, int offset_after_chdlctype, if (!dissector_try_port(subdissector_table, chdlctype, next_tvb, pinfo, tree)) { if (check_col(pinfo->fd, COL_PROTOCOL)) col_add_fstr(pinfo->fd, COL_PROTOCOL, "0x%04x", chdlctype); - dissect_data(next_tvb, 0, pinfo, tree); + call_dissector(data_handle,next_tvb, pinfo, tree); } } @@ -195,6 +197,7 @@ proto_register_chdlc(void) void proto_reg_handoff_chdlc(void) { + data_handle = find_dissector("data"); dissector_add("wtap_encap", WTAP_ENCAP_CHDLC, dissect_chdlc, proto_chdlc); } @@ -271,7 +274,7 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_add_fstr(pinfo->fd, COL_INFO, "Unknown packet type 0x%08X", code); if (tree) { proto_tree_add_uint(slarp_tree, hf_slarp_ptype, tvb, 0, 4, code); - dissect_data(tvb, 4, pinfo, slarp_tree); + call_dissector(data_handle,tvb_new_subset(tvb, 4,-1,tvb_reported_length_remaining(tvb,4)), pinfo, slarp_tree); } break; } diff --git a/packet-clnp.c b/packet-clnp.c index 4902571d88..7342631699 100644 --- a/packet-clnp.c +++ b/packet-clnp.c @@ -1,7 +1,7 @@ /* packet-clnp.c * Routines for ISO/OSI network and transport protocol packet disassembly * - * $Id: packet-clnp.c,v 1.39 2001/11/21 21:37:25 guy Exp $ + * $Id: packet-clnp.c,v 1.40 2001/11/26 04:52:49 hagbard Exp $ * Laurent Deniel <deniel@worldnet.fr> * Ralf Schneider <Ralf.Schneider@t-online.de> * @@ -77,6 +77,8 @@ static int hf_clnp_segment_multiple_tails = -1; static int hf_clnp_segment_too_long_segment = -1; static int hf_clnp_segment_error = -1; +static dissector_handle_t data_handle; + /* * ISO 8473 OSI CLNP definition (see RFC994) * @@ -714,7 +716,7 @@ static int osi_decode_DR(tvbuff_t *tvb, int offset, offset += li + 1; /* User data */ - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); offset += tvb_length_remaining(tvb, offset); /* we dissected all of the containing PDU */ @@ -848,10 +850,10 @@ static int osi_decode_DT(tvbuff_t *tvb, int offset, *subdissector_found = TRUE; } else { /* Fill in other Dissectors using inactive subset here */ - 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); offset += tvb_length_remaining(tvb, offset); /* we dissected all of the containing PDU */ @@ -956,7 +958,7 @@ static int osi_decode_ED(tvbuff_t *tvb, int offset, offset += li; next_tvb = tvb_new_subset(tvb, offset, -1, -1); - dissect_data(next_tvb, 0, pinfo, tree); + call_dissector(data_handle,next_tvb, pinfo, tree); offset += tvb_length_remaining(tvb, offset); /* we dissected all of the containing PDU */ @@ -1085,7 +1087,7 @@ static int osi_decode_CC(tvbuff_t *tvb, int offset, offset += li; /* User data */ - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); offset += tvb_length_remaining(tvb, offset); /* we dissected all of the containing PDU */ @@ -1433,7 +1435,7 @@ static int osi_decode_UD(tvbuff_t *tvb, int offset, offset += li; next_tvb = tvb_new_subset(tvb, offset, -1, -1); - dissect_data(next_tvb, 0, pinfo, tree); + call_dissector(data_handle,next_tvb, pinfo, tree); offset += tvb_length_remaining(tvb, offset); /* we dissected all of the containing PDU */ @@ -1479,7 +1481,7 @@ static gboolean dissect_ositp_internal(tvbuff_t *tvb, packet_info *pinfo, if (check_col(pinfo->fd, COL_INFO)) col_append_str(pinfo->fd, COL_INFO, "Length indicator is zero"); if (!first_tpdu) - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return found_ositp; } @@ -1533,7 +1535,7 @@ static gboolean dissect_ositp_internal(tvbuff_t *tvb, packet_info *pinfo, if (new_offset == -1) { /* incorrect TPDU */ if (!first_tpdu) - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); break; } @@ -1554,7 +1556,7 @@ static gboolean dissect_ositp_internal(tvbuff_t *tvb, packet_info *pinfo, static void dissect_ositp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { if (!dissect_ositp_internal(tvb, pinfo, tree, FALSE)) - dissect_data(tvb, 0, pinfo, tree); + call_dissector(data_handle,tvb, pinfo, tree); } @@ -1620,7 +1622,7 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* return if version not known */ cnf_vers = tvb_get_guint8(tvb, P_CLNP_VERS); if (cnf_vers != ISO8473_V1) { - dissect_data(tvb, 0, pinfo, tree); + call_dissector(data_handle,tvb, pinfo, tree); return; } @@ -1959,7 +1961,7 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* As we haven't reassembled anything, we haven't changed "pi", so we don't have to restore it. */ - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } @@ -2051,7 +2053,7 @@ static void dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "%s NPDU %s", pdu_type_string, flag_string); - dissect_data(next_tvb, 0, pinfo, tree); + call_dissector(data_handle,next_tvb, pinfo, tree); } /* dissect_clnp */ @@ -2195,6 +2197,7 @@ void proto_register_cltp(void) void proto_reg_handoff_clnp(void) { + data_handle = find_dissector("data"); dissector_add("osinl", NLPID_ISO8473_CLNP, dissect_clnp, proto_clnp); dissector_add("osinl", NLPID_NULL, dissect_clnp, diff --git a/packet-dsi.c b/packet-dsi.c index 2ef73a826e..7ef81a6dc5 100644 --- a/packet-dsi.c +++ b/packet-dsi.c @@ -2,7 +2,7 @@ * Routines for dsi packet dissection * Copyright 2001, Randy McEoin <rmceoin@pe.com> * - * $Id: packet-dsi.c,v 1.3 2001/09/03 10:33:05 guy Exp $ + * $Id: packet-dsi.c,v 1.4 2001/11/26 04:52:49 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -75,6 +75,8 @@ static int hf_dsi_reserved = -1; static gint ett_dsi = -1; +static dissector_handle_t data_handle; + #define TCP_PORT_DSI 548 /* DSI flags */ @@ -383,7 +385,7 @@ dissect_dsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_uint(dsi_tree, hf_dsi_requestid, tvb, 0, 0, dsi_requestid); - dissect_data(tvb, 0, pinfo, dsi_tree); + call_dissector(data_handle,tvb, pinfo, dsi_tree); }else { proto_tree_add_uint(dsi_tree, hf_dsi_flags, tvb, @@ -399,7 +401,7 @@ dissect_dsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "Length: %d bytes", dsi_length); proto_tree_add_uint(dsi_tree, hf_dsi_reserved, tvb, offset+12, 4, dsi_reserved); - dissect_data(tvb, 16, pinfo, dsi_tree); + call_dissector(data_handle,tvb_new_subset(tvb, 16,-1,tvb_reported_length_remaining(tvb,16)), pinfo, dsi_tree); } } @@ -486,5 +488,6 @@ proto_register_dsi(void) void proto_reg_handoff_dsi(void) { + data_handle = find_dissector("data"); dissector_add("tcp.port", TCP_PORT_DSI, dissect_dsi, proto_dsi); } diff --git a/packet-eap.c b/packet-eap.c index 176671fd22..0f89eba724 100644 --- a/packet-eap.c +++ b/packet-eap.c @@ -1,7 +1,7 @@ /* packet-eap.c * Routines for EAP Extensible Authentication Protocol header disassembly * - * $Id: packet-eap.c,v 1.1 2001/11/06 20:30:39 guy Exp $ + * $Id: packet-eap.c,v 1.2 2001/11/26 04:52:49 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -50,6 +50,8 @@ static int hf_eap_type = -1; static gint ett_eap = -1; +static dissector_handle_t data_handle; + typedef struct _e_eap { guint8 eap_code; guint8 eap_id; @@ -118,7 +120,7 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) eap_type); } if (len > 5) - dissect_data(tvb, 5, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, 5,-1,tvb_reported_length_remaining(tvb,5)), pinfo, tree); } } @@ -152,5 +154,6 @@ proto_register_eap(void) void proto_reg_handoff_eap(void) { + data_handle = find_dissector("data"); dissector_add("ppp.protocol", PPP_EAP, dissect_eap, proto_eap); } diff --git a/packet-eapol.c b/packet-eapol.c index 3e6a1b8e0c..de6bbae858 100644 --- a/packet-eapol.c +++ b/packet-eapol.c @@ -1,7 +1,7 @@ /* packet-eapol.c * Routines for EAPOL 802.1X authentication header disassembly * - * $Id: packet-eapol.c,v 1.1 2001/11/06 20:30:39 guy Exp $ + * $Id: packet-eapol.c,v 1.2 2001/11/26 04:52:49 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -48,6 +48,8 @@ static int hf_eapol_len = -1; static gint ett_eapol = -1; +static dissector_handle_t data_handle; + typedef struct _e_eapol { guint8 eapol_ver; @@ -106,7 +108,7 @@ dissect_eapol(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (eapolh.eapol_type == 0 && next_tvb != NULL) dissect_eap(next_tvb, pinfo, eapol_tree); else - dissect_data(tvb, 4, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, 4,-1,tvb_reported_length_remaining(tvb,4)), pinfo, tree); } void @@ -135,5 +137,6 @@ proto_register_eapol(void) void proto_reg_handoff_eapol(void) { + data_handle = find_dissector("data"); dissector_add("ethertype", ETHERTYPE_EAPOL, dissect_eapol, proto_eapol); } diff --git a/packet-ethertype.c b/packet-ethertype.c index 42b5860ab0..c3adeb3a29 100644 --- a/packet-ethertype.c +++ b/packet-ethertype.c @@ -1,7 +1,7 @@ /* ethertype.c * Routines for calling the right protocol for the ethertype. * - * $Id: packet-ethertype.c,v 1.21 2001/11/20 21:59:12 guy Exp $ + * $Id: packet-ethertype.c,v 1.22 2001/11/26 04:52:49 hagbard Exp $ * * Gilbert Ramirez <gram@alumni.rice.edu> * @@ -43,6 +43,8 @@ static dissector_table_t ethertype_dissector_table; +static dissector_handle_t data_handle; + const value_string etype_vals[] = { {ETHERTYPE_IP, "IP" }, {ETHERTYPE_IPv6, "IPv6" }, @@ -177,7 +179,7 @@ ethertype(guint16 etype, tvbuff_t *tvb, int offset_after_etype, if (!dissector_found) { /* No sub-dissector found. Label rest of packet as "Data" */ - dissect_data(next_tvb, 0, pinfo, tree); + call_dissector(data_handle,next_tvb, pinfo, tree); /* Label protocol */ switch (etype) { @@ -263,3 +265,8 @@ proto_register_ethertype(void) /* subdissector code */ ethertype_dissector_table = register_dissector_table("ethertype"); } + +void +proto_reg_handoff_ethertype(void){ + data_handle = find_dissector("data"); +} diff --git a/packet-giop.c b/packet-giop.c index 0f55306a7b..e4d76ef8ee 100644 --- a/packet-giop.c +++ b/packet-giop.c @@ -9,7 +9,7 @@ * Frank Singleton <frank.singleton@ericsson.com> * Trevor Shepherd <eustrsd@am1.ericsson.se> * - * $Id: packet-giop.c,v 1.48 2001/08/28 07:19:47 guy Exp $ + * $Id: packet-giop.c,v 1.49 2001/11/26 04:52:49 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -465,7 +465,7 @@ static gint ett_giop_fragment = -1; static gint ett_giop_scl = -1; /* ServiceContextList */ static gint ett_giop_ior = -1; /* IOR */ - +static dissector_handle_t data_handle; /* GIOP endianess */ static const value_string giop_endianess_vals[] = { @@ -3896,7 +3896,7 @@ gboolean dissect_giop (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { header.GIOP_version.major, header.GIOP_version.minor); } - dissect_data (payload_tvb, 0, pinfo, tree); + call_dissector(data_handle,payload_tvb, pinfo, tree); return TRUE; } @@ -4290,6 +4290,7 @@ proto_register_giop (void) void proto_reg_handoff_giop (void) { + data_handle = find_dissector("data"); heur_dissector_add("tcp", dissect_giop, proto_giop); } diff --git a/packet-gmrp.c b/packet-gmrp.c index 5b5fad3133..d4794fc2b7 100644 --- a/packet-gmrp.c +++ b/packet-gmrp.c @@ -65,6 +65,8 @@ static gint ett_gmrp = -1; static gint ett_gmrp_attribute_list = -1; static gint ett_gmrp_attribute = -1;*/ +static dissector_handle_t data_handle; + /* Constant definitions */ #define GARP_DEFAULT_PROTOCOL_ID 0x0001 #define GARP_END_OF_MARK 0x00 @@ -157,7 +159,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_text(gmrp_tree, tvb, GARP_PROTOCOL_ID, sizeof(guint16), " (Warning: this version of Ethereal only knows about protocol id = 1)"); - dissect_data(tvb, GARP_PROTOCOL_ID + sizeof(guint16), pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, GARP_PROTOCOL_ID + sizeof(guint16), -1,tvb_reported_length_remaining(tvb,GARP_PROTOCOL_ID + sizeof(guint16))),pinfo, tree); return; } @@ -187,7 +189,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } } @@ -204,7 +206,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* GMRP supports Group Membership and Service Requirement as attribute types */ if ( (octet != GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP) && (octet != GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT) ) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } @@ -237,7 +239,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } } @@ -268,7 +270,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case GMRP_EVENT_LEAVEALL: if (octet != GMRP_LENGTH_LEAVEALL) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } break; @@ -280,7 +282,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case GMRP_EVENT_EMPTY: if ( (octet != GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL) && (octet != GMRP_SERVICE_REQUIREMENT_NON_LEAVEALL) ) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree); return; } @@ -307,14 +309,14 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } break; default: - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } } @@ -384,3 +386,8 @@ proto_register_gmrp(void) register_dissector("gmrp", dissect_gmrp, proto_gmrp); } + +void +proto_reg_handoff_gmrp(void){ + data_handle = find_dissector("data"); +} diff --git a/packet-gvrp.c b/packet-gvrp.c index 470f557795..302200fdb4 100644 --- a/packet-gvrp.c +++ b/packet-gvrp.c @@ -2,7 +2,7 @@ * Routines for GVRP (GARP VLAN Registration Protocol) dissection * Copyright 2000, Kevin Shi <techishi@ms22.hinet.net> * - * $Id: packet-gvrp.c,v 1.6 2001/06/18 02:17:46 guy Exp $ + * $Id: packet-gvrp.c,v 1.7 2001/11/26 04:52:49 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -63,6 +63,8 @@ static gint ett_gvrp = -1; static gint ett_gvrp_attribute_list = -1; static gint ett_gvrp_attribute = -1;*/ +static dissector_handle_t data_handle; + /* Constant definitions */ #define GARP_DEFAULT_PROTOCOL_ID 0x0001 #define GARP_END_OF_MARK 0x00 @@ -143,7 +145,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_text(gvrp_tree, tvb, GARP_PROTOCOL_ID, sizeof(guint16), " (Warning: this version of Ethereal only knows about protocol id = 1)"); - dissect_data(tvb, GARP_PROTOCOL_ID + sizeof(guint16), pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, GARP_PROTOCOL_ID + sizeof(guint16), -1,tvb_reported_length_remaining(tvb,GARP_PROTOCOL_ID + sizeof(guint16))), pinfo, tree); return; } @@ -173,7 +175,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree); return; } } @@ -190,7 +192,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* GVRP only supports one attribute type. */ if (octet != GVRP_ATTRIBUTE_TYPE) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } @@ -223,7 +225,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } } @@ -254,7 +256,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case GVRP_EVENT_LEAVEALL: if (octet != GVRP_LENGTH_LEAVEALL) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree); return; } break; @@ -266,7 +268,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case GVRP_EVENT_EMPTY: if (octet != GVRP_LENGTH_NON_LEAVEALL) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree); return; } @@ -279,7 +281,7 @@ dissect_gvrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; default: - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree); return; } } @@ -342,3 +344,8 @@ proto_register_gvrp(void) register_dissector("gvrp", dissect_gvrp, proto_gvrp); } + +void +proto_reg_handoff_gvrp(void){ + data_handle = find_dissector("data"); +} diff --git a/packet-http.c b/packet-http.c index 38c686613e..ac2d5dc388 100644 --- a/packet-http.c +++ b/packet-http.c @@ -3,7 +3,7 @@ * * Guy Harris <guy@alum.mit.edu> * - * $Id: packet-http.c,v 1.40 2001/11/18 02:28:15 hagbard Exp $ + * $Id: packet-http.c,v 1.41 2001/11/26 04:52:50 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -58,6 +58,8 @@ static int hf_http_request = -1; static gint ett_http = -1; +static dissector_handle_t data_handle; + #define TCP_PORT_HTTP 80 #define TCP_PORT_PROXY_HTTP 3128 #define TCP_PORT_PROXY_ADMIN_HTTP 3132 @@ -281,7 +283,7 @@ dissect_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (ti != NULL) proto_item_set_len(ti, offset); } else - dissect_data(tvb, offset, pinfo, http_tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, http_tree); } } @@ -446,6 +448,7 @@ http_dissector_add(guint32 port, dissector_t dissector, int proto) void proto_reg_handoff_http(void) { + data_handle = find_dissector("data"); dissector_add("tcp.port", TCP_PORT_HTTP, dissect_http, proto_http); dissector_add("tcp.port", TCP_ALT_PORT_HTTP, dissect_http, proto_http); dissector_add("tcp.port", TCP_PORT_PROXY_HTTP, dissect_http, diff --git a/packet-icap.c b/packet-icap.c index c7fbc56449..225794b617 100644 --- a/packet-icap.c +++ b/packet-icap.c @@ -56,6 +56,8 @@ static int hf_icap_other = -1; static gint ett_icap = -1; +static dissector_handle_t data_handle; + #define TCP_PORT_ICAP 1344 static int is_icap_message(const u_char *data, int linelen, icap_type_t *type); static void @@ -224,7 +226,7 @@ is_icap_header: datalen = tvb_length_remaining(tvb, offset); if (datalen > 0) { - dissect_data(tvb, offset, pinfo, icap_tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1, tvb_reported_length_remaining(tvb,offset)), pinfo, icap_tree); } } @@ -296,5 +298,6 @@ proto_register_icap(void) void proto_reg_handoff_icap(void) { + data_handle = find_dissector("data"); dissector_add("tcp.port", TCP_PORT_ICAP, dissect_icap, proto_icap); } diff --git a/packet-ieee80211.c b/packet-ieee80211.c index 182ce7d49d..1b6ff51587 100644 --- a/packet-ieee80211.c +++ b/packet-ieee80211.c @@ -3,7 +3,7 @@ * Copyright 2000, Axis Communications AB * Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com * - * $Id: packet-ieee80211.c,v 1.41 2001/11/20 21:59:12 guy Exp $ + * $Id: packet-ieee80211.c,v 1.42 2001/11/26 04:52:50 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -341,6 +341,7 @@ static gint ett_wep_parameters = -1; static dissector_handle_t llc_handle; static dissector_handle_t ipx_handle; +static dissector_handle_t data_handle; /* ************************************************************************* */ /* Return the length of the current header (in bytes) */ @@ -1450,7 +1451,7 @@ dissect_ieee80211 (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) cap_len -= 4 - (pkt_len - cap_len); pkt_len -= 4; if (cap_len > 0 && pkt_len > 0) - dissect_data (tvb, hdr_len + 4, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, hdr_len + 4, -1,tvb_reported_length_remaining(tvb,hdr_len + 4)),pinfo, tree); } return; } @@ -1902,6 +1903,7 @@ proto_reg_handoff_wlan(void) */ llc_handle = find_dissector("llc"); ipx_handle = find_dissector("ipx"); + data_handle = find_dissector("data"); dissector_add("wtap_encap", WTAP_ENCAP_IEEE_802_11, dissect_ieee80211, proto_wlan); diff --git a/packet-ip.c b/packet-ip.c index 69806e488b..97e517158b 100644 --- a/packet-ip.c +++ b/packet-ip.c @@ -1,7 +1,7 @@ /* packet-ip.c * Routines for IP and miscellaneous IP protocol packet disassembly * - * $Id: packet-ip.c,v 1.147 2001/11/21 21:37:25 guy Exp $ + * $Id: packet-ip.c,v 1.148 2001/11/26 04:52:50 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -117,6 +117,7 @@ static gint ett_ip_fragment = -1; dissector_table_t ip_dissector_table; static dissector_handle_t ip_handle; +static dissector_handle_t data_handle; static int proto_icmp = -1; static int hf_icmp_type = -1; @@ -1103,7 +1104,7 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "Fragmented IP protocol (proto=%s 0x%02x, off=%u)", ipprotostr(iph.ip_p), iph.ip_p, (iph.ip_off & IP_OFFSET) * 8); - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } @@ -1120,7 +1121,7 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "%s (0x%02x)", ipprotostr(iph.ip_p), iph.ip_p); } - dissect_data(next_tvb, 0, pinfo, tree); + call_dissector(data_handle,next_tvb, pinfo, tree); } } @@ -1574,7 +1575,7 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case ICMP_ECHOREPLY: case ICMP_ECHO: - dissect_data(tvb, 8, pinfo, icmp_tree); + call_dissector(data_handle,tvb_new_subset(tvb, 8,-1,tvb_reported_length_remaining(tvb,8)), pinfo, icmp_tree); break; case ICMP_RTRADVERT: @@ -1591,7 +1592,7 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dissect_mip_extensions(tvb,8 + i*8, pinfo, icmp_tree); } } else - dissect_data(tvb, 8, pinfo, icmp_tree); + call_dissector(data_handle,tvb_new_subset(tvb, 8,-1,tvb_reported_length_remaining(tvb,8)), pinfo, icmp_tree); break; case ICMP_TSTAMP: @@ -1797,6 +1798,7 @@ proto_register_ip(void) void proto_reg_handoff_ip(void) { + data_handle = find_dissector("data"); dissector_add("ethertype", ETHERTYPE_IP, dissect_ip, proto_ip); dissector_add("ppp.protocol", PPP_IP, dissect_ip, proto_ip); dissector_add("ppp.protocol", ETHERTYPE_IP, dissect_ip, proto_ip); diff --git a/packet-ipp.c b/packet-ipp.c index 6893aae6c4..7235226eb5 100644 --- a/packet-ipp.c +++ b/packet-ipp.c @@ -3,7 +3,7 @@ * * Guy Harris <guy@alum.mit.edu> * - * $Id: packet-ipp.c,v 1.22 2001/01/11 06:30:54 guy Exp $ + * $Id: packet-ipp.c,v 1.23 2001/11/26 04:52:50 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -49,6 +49,8 @@ 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 @@ -236,7 +238,7 @@ dissect_ipp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset = parse_attributes(tvb, offset, ipp_tree); if (tvb_offset_exists(tvb, offset)) - dissect_data(tvb, offset, pinfo, ipp_tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, ipp_tree); } } @@ -568,5 +570,6 @@ proto_reg_handoff_ipp(void) /* * Register ourselves as running atop HTTP and using port 631. */ + data_handle = find_dissector("data"); http_dissector_add(631, dissect_ipp, proto_ipp); } diff --git a/packet-ipsec.c b/packet-ipsec.c index 7a89465b3b..cadf394cb8 100644 --- a/packet-ipsec.c +++ b/packet-ipsec.c @@ -1,7 +1,7 @@ /* packet-ipsec.c * Routines for IPsec/IPComp packet disassembly * - * $Id: packet-ipsec.c,v 1.33 2001/11/09 08:16:24 guy Exp $ + * $Id: packet-ipsec.c,v 1.34 2001/11/26 04:52:50 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -62,6 +62,8 @@ static gint ett_ah = -1; static gint ett_esp = -1; static gint ett_ipcomp = -1; +static dissector_handle_t data_handle; + struct newah { guint8 ah_nxt; /* Next Header */ guint8 ah_len; /* Length of data + 1, in 32bit */ @@ -122,7 +124,7 @@ dissect_ah(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* do lookup with the subdissector table */ if (!dissector_try_port(ip_dissector_table, nxt, next_tvb, pinfo, next_tree)) { - dissect_data(next_tvb, 0, pinfo, next_tree); + call_dissector(data_handle,next_tvb, pinfo, next_tree); } } @@ -228,7 +230,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint(esp_tree, hf_esp_sequence, tvb, offsetof(struct newesp, esp_seq), 4, (guint32)ntohl(esp.esp_seq)); - dissect_data(tvb, sizeof(struct newesp), pinfo, esp_tree); + call_dissector(data_handle,tvb_new_subset(tvb, sizeof(struct newesp),-1,tvb_reported_length_remaining(tvb,sizeof(struct newesp))), pinfo, esp_tree); } } @@ -279,7 +281,7 @@ dissect_ipcomp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint(ipcomp_tree, hf_ipcomp_cpi, tvb, offsetof(struct ipcomp, comp_cpi), 2, ntohs(ipcomp.comp_cpi)); - dissect_data(tvb, sizeof(struct ipcomp), pinfo, ipcomp_tree); + call_dissector(data_handle,tvb_new_subset(tvb, sizeof(struct ipcomp), -1,tvb_reported_length_remaining(tvb,sizeof(struct ipcomp))),pinfo, ipcomp_tree); } } @@ -348,6 +350,7 @@ proto_register_ipsec(void) void proto_reg_handoff_ipsec(void) { + data_handle = find_dissector("data"); dissector_add("ip.proto", IP_PROTO_AH, dissect_ah, proto_ah); dissector_add("ip.proto", IP_PROTO_ESP, dissect_esp, proto_esp); dissector_add("ip.proto", IP_PROTO_IPCOMP, dissect_ipcomp, proto_ipcomp); diff --git a/packet-ipv6.c b/packet-ipv6.c index e7d67dab65..b41a877cab 100644 --- a/packet-ipv6.c +++ b/packet-ipv6.c @@ -1,7 +1,7 @@ /* packet-ipv6.c * Routines for IPv6 packet disassembly * - * $Id: packet-ipv6.c,v 1.67 2001/11/21 21:37:25 guy Exp $ + * $Id: packet-ipv6.c,v 1.68 2001/11/26 04:52:50 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -105,6 +105,8 @@ static gint ett_ipv6 = -1; static gint ett_ipv6_fragments = -1; static gint ett_ipv6_fragment = -1; +static dissector_handle_t data_handle; + /* Reassemble fragmented datagrams */ static gboolean ipv6_reassemble = FALSE; @@ -939,7 +941,7 @@ again: if (next_tvb == NULL) { /* Just show this as a fragment. */ /* COL_INFO was filled in by "dissect_frag6()" */ - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree); /* As we haven't reassembled anything, we haven't changed "pi", so we don't have to restore it. */ @@ -951,7 +953,7 @@ again: /* Unknown protocol */ if (check_col(pinfo->fd, COL_INFO)) col_add_fstr(pinfo->fd, COL_INFO, "%s (0x%02x)", ipprotostr(nxt),nxt); - dissect_data(next_tvb, 0, pinfo, tree); + call_dissector(data_handle,next_tvb, pinfo, tree); } } @@ -1150,6 +1152,7 @@ proto_register_ipv6(void) void proto_reg_handoff_ipv6(void) { + data_handle = find_dissector("data"); dissector_add("ethertype", ETHERTYPE_IPv6, dissect_ipv6, proto_ipv6); dissector_add("ppp.protocol", PPP_IPV6, dissect_ipv6, proto_ipv6); dissector_add("ip.proto", IP_PROTO_IPV6, dissect_ipv6, proto_ipv6); diff --git a/packet-isis-hello.c b/packet-isis-hello.c index 98068ae7b9..1f42efa3c9 100644 --- a/packet-isis-hello.c +++ b/packet-isis-hello.c @@ -1,7 +1,7 @@ /* packet-isis-hello.c * Routines for decoding isis hello packets and their CLVs * - * $Id: packet-isis-hello.c,v 1.21 2001/08/22 18:00:40 guy Exp $ + * $Id: packet-isis-hello.c,v 1.22 2001/11/26 04:52:50 hagbard Exp $ * Stuart Stanley <stuarts@mxmail.net> * * Ethereal - Network traffic analyzer @@ -68,6 +68,8 @@ static gint ett_isis_hello_clv_ipv6_int_addr = -1; static gint ett_isis_hello_clv_ptp_adj = -1; static gint ett_isis_hello_clv_mt = -1; +static dissector_handle_t data_handle; + static const value_string isis_hello_circuit_type_vals[] = { { ISIS_HELLO_TYPE_RESERVED, "Reserved 0 (discard PDU)"}, { ISIS_HELLO_TYPE_LEVEL_1, "Level 1 only"}, @@ -617,7 +619,7 @@ isis_dissect_isis_hello(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, const guint8 *lan_id; if (!proto_is_protocol_enabled(proto_isis_hello)) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } @@ -792,3 +794,8 @@ proto_register_isis_hello(void) { proto_register_field_array(proto_isis_hello, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_isis_hello(void){ + data_handle = find_dissector("data"); +} diff --git a/packet-isis-lsp.c b/packet-isis-lsp.c index 9882fd257b..9a795333ac 100644 --- a/packet-isis-lsp.c +++ b/packet-isis-lsp.c @@ -1,7 +1,7 @@ /* packet-isis-lsp.c * Routines for decoding isis lsp packets and their CLVs * - * $Id: packet-isis-lsp.c,v 1.20 2001/07/02 00:19:34 guy Exp $ + * $Id: packet-isis-lsp.c,v 1.21 2001/11/26 04:52:50 hagbard Exp $ * Stuart Stanley <stuarts@mxmail.net> * * Ethereal - Network traffic analyzer @@ -86,6 +86,8 @@ static gint ett_isis_lsp_clv_mt = -1; static gint ett_isis_lsp_clv_mt_is = -1; static gint ett_isis_lsp_part_of_clv_mt_is = -1; +static dissector_handle_t data_handle; + static const char *isis_lsp_attached_bits[] = { "error", "expense", "delay", "default" }; @@ -1613,7 +1615,7 @@ isis_dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int inx, q, some, value, len; if (!proto_is_protocol_enabled(proto_isis_lsp)) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1, tvb_reported_length_remaining(tvb,offset)),pinfo, tree); return; } @@ -1780,3 +1782,8 @@ proto_register_isis_lsp(void) { proto_register_field_array(proto_isis_lsp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_isis_lsp(void){ + data_handle = find_dissector("data"); +} diff --git a/packet-isis-snp.c b/packet-isis-snp.c index b35926613d..e4e25c09f9 100644 --- a/packet-isis-snp.c +++ b/packet-isis-snp.c @@ -1,7 +1,7 @@ /* packet-isis-snp.c * Routines for decoding isis complete & partial SNP and their payload * - * $Id: packet-isis-snp.c,v 1.10 2001/07/02 00:19:34 guy Exp $ + * $Id: packet-isis-snp.c,v 1.11 2001/11/26 04:52:50 hagbard Exp $ * Stuart Stanley <stuarts@mxmail.net> * * Ethereal - Network traffic analyzer @@ -60,6 +60,8 @@ static gint ett_isis_psnp_lsp_entries = -1; static gint ett_isis_psnp_authentication = -1; static gint ett_isis_psnp_clv_unknown = -1; +static dissector_handle_t data_handle; + static void dissect_l1_snp_authentication_clv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int id_length, int length); @@ -253,7 +255,7 @@ isis_dissect_isis_csnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int len; if (!proto_is_protocol_enabled(proto_isis_csnp)) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } @@ -334,7 +336,7 @@ isis_dissect_isis_psnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int len; if (!proto_is_protocol_enabled(proto_isis_psnp)) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); return; } @@ -488,3 +490,8 @@ proto_register_isis_psnp(void) { proto_register_field_array(proto_isis_psnp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_isis_psnp(void){ + data_handle = find_dissector("data"); +} diff --git a/packet-netbios.c b/packet-netbios.c index 8046543324..983e39d67d 100644 --- a/packet-netbios.c +++ b/packet-netbios.c @@ -5,7 +5,7 @@ * * derived from the packet-nbns.c * - * $Id: packet-netbios.c,v 1.40 2001/11/20 21:59:13 guy Exp $ + * $Id: packet-netbios.c,v 1.41 2001/11/26 04:52:50 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -107,6 +107,8 @@ static gint ett_netb_name = -1; static gint ett_netb_flags = -1; static gint ett_netb_status = -1; +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 @@ -516,7 +518,7 @@ static void dissect_netb_unknown( tvbuff_t *tvb, int offset, proto_tree *tree) {/* Handle any unknow commands, do nothing */ -/* dissect_data( tvb, offset + NB_COMMAND + 1, pinfo, tree); */ +/* call_dissector(data_handle, tvb_new_subset(tvb, offset + NB_COMMAND + 1,-1,tvb_reported_length_remaining(tvb,offset_NB_COMMAND + 1)), pinfo, tree); */ } @@ -964,7 +966,7 @@ dissect_netbios_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) */ if (!dissector_try_heuristic(netbios_heur_subdissector_list, tvb, pinfo, tree)) - dissect_data(tvb, 0, pinfo, tree); + call_dissector(data_handle,tvb, pinfo, tree); } static void @@ -1140,4 +1142,5 @@ void proto_reg_handoff_netbios(void) { dissector_add("llc.dsap", SAP_NETBIOS, dissect_netbios, proto_netbios); + data_handle = find_dissector("data"); } diff --git a/packet-null.c b/packet-null.c index 067be26adf..7278d20c85 100644 --- a/packet-null.c +++ b/packet-null.c @@ -1,7 +1,7 @@ /* packet-null.c * Routines for null packet disassembly * - * $Id: packet-null.c,v 1.47 2001/11/20 21:59:13 guy Exp $ + * $Id: packet-null.c,v 1.48 2001/11/26 04:52:50 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -72,7 +72,7 @@ static const value_string family_vals[] = { }; static dissector_handle_t ppp_hdlc_handle; - +static dissector_handle_t data_handle; void capture_null( const u_char *pd, int len, packet_counts *ld ) { @@ -284,7 +284,7 @@ dissect_null(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (!dissector_try_port(null_dissector_table, null_header, next_tvb, pinfo, tree)) { /* No sub-dissector found. Label rest of packet as "Data" */ - dissect_data(next_tvb, 0, pinfo, tree); + call_dissector(data_handle,next_tvb, pinfo, tree); } } } @@ -323,5 +323,6 @@ proto_reg_handoff_null(void) * Get a handle for the PPP-in-HDLC-like-framing dissector. */ ppp_hdlc_handle = find_dissector("ppp_hdlc"); + data_handle = find_dissector("data"); dissector_add("wtap_encap", WTAP_ENCAP_NULL, dissect_null, proto_null); } diff --git a/packet-ospf.c b/packet-ospf.c index a211f50462..c27f41a4c1 100644 --- a/packet-ospf.c +++ b/packet-ospf.c @@ -2,7 +2,7 @@ * Routines for OSPF packet disassembly * (c) Copyright Hannes R. Boehm <hannes@boehm.org> * - * $Id: packet-ospf.c,v 1.48 2001/11/21 02:01:05 guy Exp $ + * $Id: packet-ospf.c,v 1.49 2001/11/26 04:52:50 hagbard Exp $ * * At this time, this module is able to analyze OSPF * packets as specified in RFC2328. MOSPF (RFC1584) and other @@ -206,6 +206,8 @@ static gint ett_ospf_lsa_mpls_router = -1; static gint ett_ospf_lsa_mpls_link = -1; static gint ett_ospf_lsa_mpls_link_stlv = -1; +static dissector_handle_t data_handle; + static void dissect_ospf_hello(tvbuff_t*, int, proto_tree*, guint8); static void dissect_ospf_db_desc(tvbuff_t*, int, proto_tree*, guint8); static void dissect_ospf_ls_req(tvbuff_t*, int, proto_tree*, guint8); @@ -420,7 +422,7 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; default: - dissect_data(tvb, ospf_header_length, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, ospf_header_length,-1,tvb_reported_length_remaining(tvb,ospf_header_length)), pinfo, tree); break; } } @@ -1821,4 +1823,5 @@ void proto_reg_handoff_ospf(void) { dissector_add("ip.proto", IP_PROTO_OSPF, dissect_ospf, proto_ospf); + data_handle = find_dissector("data"); } diff --git a/packet-pptp.c b/packet-pptp.c index a996657c69..e768bb44c7 100644 --- a/packet-pptp.c +++ b/packet-pptp.c @@ -2,7 +2,7 @@ * Routines for the Point-to-Point Tunnelling Protocol (PPTP) (RFC 2637) * Brad Robel-Forrest <brad.robel-forrest@watchguard.com> * - * $Id: packet-pptp.c,v 1.19 2001/06/18 02:17:50 guy Exp $ + * $Id: packet-pptp.c,v 1.20 2001/11/26 04:52:51 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -46,6 +46,8 @@ static int hf_pptp_message_type = -1; static gint ett_pptp = -1; +static dissector_handle_t data_handle; + #define TCP_PORT_PPTP 1723 #define MAGIC_COOKIE 0x1A2B3C4D @@ -289,7 +291,7 @@ dissect_pptp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (cntrl_type < NUM_CNTRL_TYPES) ( *(strfuncs[cntrl_type].func))(tvb, offset, pinfo, pptp_tree); else - dissect_data(tvb, offset, pinfo, pptp_tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, pptp_tree); } } @@ -297,7 +299,7 @@ static void dissect_unknown(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); } static void @@ -829,4 +831,5 @@ void proto_reg_handoff_pptp(void) { dissector_add("tcp.port", TCP_PORT_PPTP, dissect_pptp, proto_pptp); + data_handle = find_dissector("data"); } diff --git a/packet-rpc.c b/packet-rpc.c index 3ed91188f7..aefb61eb6d 100644 --- a/packet-rpc.c +++ b/packet-rpc.c @@ -2,7 +2,7 @@ * Routines for rpc dissection * Copyright 1999, Uwe Girlich <Uwe.Girlich@philosys.de> * - * $Id: packet-rpc.c,v 1.74 2001/10/29 21:13:08 guy Exp $ + * $Id: packet-rpc.c,v 1.75 2001/11/26 04:52:51 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -193,6 +193,8 @@ static gint ett_rpc_gids = -1; static gint ett_rpc_gss_data = -1; static gint ett_rpc_array = -1; +static dissector_handle_t data_handle; + /* Hash table with info on RPC program numbers */ static GHashTable *rpc_progs; @@ -2046,7 +2048,7 @@ dissect_rpc_message(tvbuff_t *tvb, int offset, packet_info *pinfo, /* dissect any remaining bytes (incomplete dissection) as pure data in the ptree */ - dissect_data(tvb, offset, pinfo, ptree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, ptree); return TRUE; } @@ -2405,4 +2407,5 @@ proto_reg_handoff_rpc(void) { heur_dissector_add("tcp", dissect_rpc_tcp_heur, proto_rpc); heur_dissector_add("udp", dissect_rpc_heur, proto_rpc); + data_handle = find_dissector("data"); } diff --git a/packet-rtp.c b/packet-rtp.c index ed26e1da8c..d9866f1de1 100644 --- a/packet-rtp.c +++ b/packet-rtp.c @@ -6,7 +6,7 @@ * Copyright 2000, Philips Electronics N.V. * Written by Andreas Sikkema <andreas.sikkema@philips.com> * - * $Id: packet-rtp.c,v 1.25 2001/09/08 00:43:51 guy Exp $ + * $Id: packet-rtp.c,v 1.26 2001/11/26 04:52:51 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -100,6 +100,7 @@ static gint ett_hdr_ext = -1; static dissector_handle_t h261_handle; static dissector_handle_t mpeg1_handle; +static dissector_handle_t data_handle; /* * Fields in the first octet of the RTP header. @@ -494,7 +495,7 @@ dissect_rtp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) */ proto_tree_add_text(rtp_tree, tvb, 0, 0, "Frame has padding, but not all the frame data was captured"); - dissect_data(tvb, offset, pinfo, rtp_tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, rtp_tree); return; } @@ -781,6 +782,7 @@ proto_reg_handoff_rtp(void) */ h261_handle = find_dissector("h261"); mpeg1_handle = find_dissector("mpeg1"); + data_handle = find_dissector("data"); /* * Register this dissector as one that can be assigned to a diff --git a/packet-smb-mailslot.c b/packet-smb-mailslot.c index b36ef5ea2f..f0e49fca3d 100644 --- a/packet-smb-mailslot.c +++ b/packet-smb-mailslot.c @@ -2,7 +2,7 @@ * Routines for SMB mailslot packet dissection * Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com> * - * $Id: packet-smb-mailslot.c,v 1.24 2001/11/19 10:23:38 guy Exp $ + * $Id: packet-smb-mailslot.c,v 1.25 2001/11/26 04:52:51 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -40,6 +40,8 @@ static int hf_name = -1; static int ett_smb_msp = -1; +static dissector_handle_t data_handle; + #define MAILSLOT_UNKNOWN 0 #define MAILSLOT_BROWSE 1 #define MAILSLOT_LANMAN 2 @@ -182,7 +184,7 @@ dissect_mailslot_smb(tvbuff_t *mshdr_tvb, tvbuff_t *setup_tvb, * message; dissect the latter as data, but indicate * that we successfully dissected the mailslot stuff. */ - dissect_data(tvb, 0, pinfo, parent_tree); + call_dissector(data_handle,tvb, pinfo, parent_tree); } return TRUE; } @@ -223,3 +225,9 @@ proto_register_smb_mailslot(void) proto_register_field_array(proto_smb_msp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_smb_mailslot(void) +{ + data_handle = find_dissector("data"); +} diff --git a/packet-smb-pipe.c b/packet-smb-pipe.c index 6cb19568a7..c556afdbda 100644 --- a/packet-smb-pipe.c +++ b/packet-smb-pipe.c @@ -8,7 +8,7 @@ XXX Fixme : shouldnt show [malformed frame] for long packets * significant rewrite to tvbuffify the dissector, Ronnie Sahlberg and * Guy Harris 2001 * - * $Id: packet-smb-pipe.c,v 1.54 2001/11/26 01:22:11 guy Exp $ + * $Id: packet-smb-pipe.c,v 1.55 2001/11/26 04:52:51 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -158,6 +158,8 @@ static gint ett_lanman_share = -1; static gint ett_lanman_servers = -1; static gint ett_lanman_server = -1; +static dissector_handle_t data_handle; + /* * See * @@ -2542,7 +2544,7 @@ dissect_pipe_msrpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree, pinfo->private_data = smb_priv; if (!result) - dissect_data(d_tvb, 0, pinfo, parent_tree); + call_dissector(data_handle,d_tvb, pinfo, parent_tree); return TRUE; } @@ -2960,3 +2962,9 @@ proto_register_smb_pipe(void) proto_register_field_array(proto_smb_pipe, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } + +void +proto_reg_handoff_smb_pipe(void) +{ + data_handle = find_dissector("data"); +} diff --git a/packet-sna.c b/packet-sna.c index f4bc0bc1fd..a3eee6b65a 100644 --- a/packet-sna.c +++ b/packet-sna.c @@ -2,7 +2,7 @@ * Routines for SNA * Gilbert Ramirez <gram@alumni.rice.edu> * - * $Id: packet-sna.c,v 1.33 2001/11/15 21:11:01 gram Exp $ + * $Id: packet-sna.c,v 1.34 2001/11/26 04:52:51 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -120,6 +120,8 @@ static gint ett_sna_rh_0 = -1; static gint ett_sna_rh_1 = -1; static gint ett_sna_rh_2 = -1; +static dissector_handle_t data_handle; + /* Format Identifier */ static const value_string sna_th_fid_vals[] = { { 0x0, "SNA device <--> Non-SNA Device" }, @@ -378,7 +380,7 @@ dissect_sna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) th_header_len = dissect_fidf(tvb, th_tree); break; default: - dissect_data(tvb, 1, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, 1,-1,tvb_reported_length_remaining(tvb,1)), pinfo, tree); } sna_header_len += th_header_len; @@ -402,7 +404,7 @@ dissect_sna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } if (tvb_offset_exists(tvb, offset+1)) { - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset, -1, tvb_reported_length_remaining(tvb,offset)),pinfo, tree); } } @@ -1199,4 +1201,5 @@ proto_reg_handoff_sna(void) { dissector_add("llc.dsap", SAP_SNA_PATHCTRL, dissect_sna, proto_sna); + data_handle = find_dissector("data"); } diff --git a/packet-snmp.c b/packet-snmp.c index 9528ecc54a..5f59ca3b27 100644 --- a/packet-snmp.c +++ b/packet-snmp.c @@ -8,7 +8,7 @@ * * See RFCs 1905, 1906, 1909, and 1910 for SNMPv2u. * - * $Id: packet-snmp.c,v 1.71 2001/09/03 10:33:07 guy Exp $ + * $Id: packet-snmp.c,v 1.72 2001/11/26 04:52:51 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -223,6 +223,8 @@ static int hf_snmpv3_flags_auth = -1; static int hf_snmpv3_flags_crypt = -1; static int hf_snmpv3_flags_report = -1; +static dissector_handle_t data_handle; + #define TH_AUTH 0x01 #define TH_CRYPT 0x02 #define TH_REPORT 0x04 @@ -558,7 +560,7 @@ dissect_snmp_parse_error(tvbuff_t *tvb, int offset, packet_info *pinfo, if (tree != NULL) { proto_tree_add_text(tree, tvb, offset, 0, "ERROR: Couldn't parse %s: %s", field_name, errstr); - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); } } @@ -571,7 +573,7 @@ dissect_snmp_error(tvbuff_t *tvb, int offset, packet_info *pinfo, if (tree != NULL) { proto_tree_add_text(tree, tvb, offset, 0, "%s", message); - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); } } @@ -2309,4 +2311,5 @@ proto_reg_handoff_snmp(void) proto_snmp); dissector_add("ipx.socket", IPX_SOCKET_SNMP_SINK, dissect_snmp, proto_snmp); + data_handle = find_dissector("data"); } diff --git a/packet-tcp.c b/packet-tcp.c index 64cdd9897f..8b78f3f6f6 100644 --- a/packet-tcp.c +++ b/packet-tcp.c @@ -1,7 +1,7 @@ /* packet-tcp.c * Routines for TCP packet disassembly * - * $Id: packet-tcp.c,v 1.116 2001/11/21 21:37:26 guy Exp $ + * $Id: packet-tcp.c,v 1.117 2001/11/26 04:52:51 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -89,6 +89,7 @@ static gint ett_tcp_segments = -1; static dissector_table_t subdissector_table; static heur_dissector_list_t heur_subdissector_list; static conv_dissector_list_t conv_subdissector_list; +static dissector_handle_t data_handle; /* TCP structs and definitions */ @@ -537,7 +538,7 @@ desegment_tcp(tvbuff_t *tvb, packet_info *pinfo, int offset, /* * Show what's left in the packet as data. */ - dissect_data(tvb, deseg_offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, deseg_offset,-1,tvb_reported_length_remaining(tvb,deseg_offset)), pinfo, tree); } } @@ -797,7 +798,7 @@ decode_tcp_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); } @@ -1230,4 +1231,5 @@ void proto_reg_handoff_tcp(void) { dissector_add("ip.proto", IP_PROTO_TCP, dissect_tcp, proto_tcp); + data_handle = find_dissector("data"); } diff --git a/packet-tns.c b/packet-tns.c index d5c02747ec..de49fe861c 100644 --- a/packet-tns.c +++ b/packet-tns.c @@ -1,7 +1,7 @@ /* packet-tns.c * Routines for Oracle TNS packet dissection * - * $Id: packet-tns.c,v 1.21 2001/10/08 14:32:06 nneul Exp $ + * $Id: packet-tns.c,v 1.22 2001/11/26 04:52:51 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -124,6 +124,8 @@ static gint ett_tns_data = -1; static gint ett_tns_data_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[] = { @@ -222,7 +224,7 @@ static void dissect_tns_data(tvbuff_t *tvb, int offset, packet_info *pinfo, if ( data_tree ) { - dissect_data(tvb,offset,pinfo,data_tree); + call_dissector(data_handle,tvb_new_subset(tvb,offset,-1,tvb_reported_length_remaining(tvb,offset)),pinfo,data_tree); } return; @@ -811,7 +813,7 @@ dissect_tns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dissect_tns_data(tvb,offset,pinfo,tree,tns_tree); break; default: - dissect_data(tvb,offset,pinfo,tns_tree); + call_dissector(data_handle,tvb_new_subset(tvb,offset,-1,tvb_reported_length_remaining(tvb,offset)),pinfo,tns_tree); } } @@ -1034,4 +1036,5 @@ void proto_reg_handoff_tns(void) { dissector_add("tcp.port", TCP_PORT_TNS, dissect_tns, proto_tns); + data_handle = find_dissector("data"); } diff --git a/packet-tr.c b/packet-tr.c index 5c2b250628..aba6276926 100644 --- a/packet-tr.c +++ b/packet-tr.c @@ -2,7 +2,7 @@ * Routines for Token-Ring packet disassembly * Gilbert Ramirez <gram@alumni.rice.edu> * - * $Id: packet-tr.c,v 1.65 2001/11/20 21:59:13 guy Exp $ + * $Id: packet-tr.c,v 1.66 2001/11/26 04:52:51 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -118,6 +118,7 @@ static const value_string direction_vals[] = { static dissector_handle_t trmac_handle; static dissector_handle_t llc_handle; +static dissector_handle_t data_handle; /* * DODGY LINUX HACK DODGY LINUX HACK @@ -527,7 +528,7 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; default: /* non-MAC, non-LLC, i.e., "Reserved" */ - dissect_data(next_tvb, 0, pinfo, tree); + call_dissector(data_handle,next_tvb, pinfo, tree); break; } } @@ -678,6 +679,7 @@ proto_reg_handoff_tr(void) */ trmac_handle = find_dissector("trmac"); llc_handle = find_dissector("llc"); + data_handle = find_dissector("data"); dissector_add("wtap_encap", WTAP_ENCAP_TOKEN_RING, dissect_tr, proto_tr); diff --git a/packet-udp.c b/packet-udp.c index 6efa0af98b..bde090f679 100644 --- a/packet-udp.c +++ b/packet-udp.c @@ -1,7 +1,7 @@ /* packet-udp.c * Routines for UDP packet disassembly * - * $Id: packet-udp.c,v 1.95 2001/09/27 10:19:14 guy Exp $ + * $Id: packet-udp.c,v 1.96 2001/11/26 04:52:51 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -78,6 +78,7 @@ typedef struct _e_udphdr { static dissector_table_t udp_dissector_table; static heur_dissector_list_t heur_subdissector_list; static conv_dissector_list_t conv_subdissector_list; +static dissector_handle_t data_handle; /* Determine if there is a sub-dissector and call it. This has been */ /* separated into a stand alone routine to other protocol dissectors */ @@ -107,7 +108,7 @@ decode_udp_ports(tvbuff_t *tvb, int offset, packet_info *pinfo, if (dissector_try_heuristic(heur_subdissector_list, next_tvb, pinfo, tree)) return; - dissect_data(next_tvb, 0, pinfo, tree); + call_dissector(data_handle,next_tvb, pinfo, tree); } @@ -283,4 +284,5 @@ void proto_reg_handoff_udp(void) { dissector_add("ip.proto", IP_PROTO_UDP, dissect_udp, proto_udp); + data_handle = find_dissector("data"); } diff --git a/packet-vines.c b/packet-vines.c index 8680107718..0bb3f0210d 100644 --- a/packet-vines.c +++ b/packet-vines.c @@ -1,7 +1,7 @@ /* packet-vines.c * Routines for Banyan VINES protocol packet disassembly * - * $Id: packet-vines.c,v 1.34 2001/11/20 21:59:13 guy Exp $ + * $Id: packet-vines.c,v 1.35 2001/11/26 04:52:51 hagbard Exp $ * * Don Lafontaine <lafont02@cn.ca> * @@ -77,6 +77,7 @@ capture_vines(const u_char *pd, int offset, int len, packet_counts *ld) } static dissector_handle_t vines_handle; +static dissector_handle_t data_handle; /* AFAIK Vines FRP (Fragmentation Protocol) is used on all media except * Ethernet and TR (and probably FDDI) - Fragmentation on these media types @@ -316,7 +317,7 @@ dissect_vines(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) next_tvb = tvb_new_subset(tvb, offset, -1, -1); if (!dissector_try_port(vines_dissector_table, viph.vip_proto, next_tvb, pinfo, tree)) - dissect_data(next_tvb, 0, pinfo, tree); + call_dissector(data_handle,next_tvb, pinfo, tree); } void @@ -348,6 +349,7 @@ proto_reg_handoff_vines(void) { dissector_add("ethertype", ETHERTYPE_VINES, dissect_vines, proto_vines); dissector_add("ppp.protocol", PPP_VINES, dissect_vines, proto_vines); + data_handle = find_dissector("data"); } static void @@ -454,7 +456,7 @@ dissect_vines_spp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "Window: 0x%04x", viph.vspp_win); } offset += 16; /* sizeof SPP */ - dissect_data(tvb, offset, pinfo, tree); + call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree); } void diff --git a/packet-x11.c b/packet-x11.c index 5f47355f63..46013eb8c4 100644 --- a/packet-x11.c +++ b/packet-x11.c @@ -2,7 +2,7 @@ * Routines for X11 dissection * Copyright 2000, Christophe Tronche <ch.tronche@computer.org> * - * $Id: packet-x11.c,v 1.24 2001/10/26 18:28:16 gram Exp $ + * $Id: packet-x11.c,v 1.25 2001/11/26 04:52:51 hagbard Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -72,6 +72,8 @@ static int proto_x11 = -1; static gint ett_x11 = -1; static gint ett_x11_request = -1; +static dissector_handle_t data_handle; + #define TCP_PORT_X11 6000 #define TCP_PORT_X11_2 6001 #define TCP_PORT_X11_3 6002 @@ -2859,7 +2861,7 @@ dissect_x11_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) little_endian = guess_byte_ordering(tvb, pinfo); left = dissect_x11_request_loop(tvb, x11_tree); if (left) - dissect_data(tvb, cur_offset, pinfo, x11_tree); + call_dissector(data_handle,tvb_new_subset(tvb, cur_offset,-1, tvb_reported_length_remaining(tvb,cur_offset)), pinfo, x11_tree); } static void @@ -2884,7 +2886,7 @@ dissect_x11_event(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Code to process the packet goes here */ - dissect_data(tvb, 0, pinfo, x11_tree); + call_dissector(data_handle,tvb, pinfo, x11_tree); } } @@ -2943,4 +2945,5 @@ proto_reg_handoff_x11(void) dissector_add("tcp.port", TCP_PORT_X11, dissect_x11, proto_x11); dissector_add("tcp.port", TCP_PORT_X11_2, dissect_x11, proto_x11); dissector_add("tcp.port", TCP_PORT_X11_3, dissect_x11, proto_x11); + data_handle = find_dissector("data"); } |