Switched from calling dissect_data to using call_dissector

svn path=/trunk/; revision=4263
This commit is contained in:
Ed Warnicke 2001-11-25 22:19:25 +00:00
parent 3054b1127a
commit a810a01338
10 changed files with 46 additions and 25 deletions

View File

@ -4,7 +4,7 @@
* Uwe Girlich <uwe@planetquake.com>
* http://www.idsoftware.com/q1source/q1source.zip
*
* $Id: packet-quake.c,v 1.18 2001/09/03 10:33:06 guy Exp $
* $Id: packet-quake.c,v 1.19 2001/11/25 22:19:24 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -80,6 +80,7 @@ static gint ett_quake_control = -1;
static gint ett_quake_control_colors = -1;
static gint ett_quake_flags = -1;
static dissector_handle_t data_handle;
/* I took these names directly out of the Q1 source. */
#define NETFLAG_LENGTH_MASK 0x0000ffff
@ -501,7 +502,7 @@ dissect_quake_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
(next_tvb, pinfo, control_tree);
break;
default:
dissect_data(next_tvb, 0, pinfo, control_tree);
call_dissector(data_handle,next_tvb, pinfo, control_tree);
break;
}
}
@ -595,7 +596,7 @@ dissect_quake(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
rest_length = tvb_reported_length(tvb) - 8;
next_tvb = tvb_new_subset(tvb, 8, rest_length , rest_length);
dissect_data(next_tvb, 0, pinfo, quake_tree);
call_dissector(data_handle,next_tvb, pinfo, quake_tree);
}
@ -616,6 +617,7 @@ proto_reg_handoff_quake(void)
dissector_add("udp.port", gbl_quakeServerPort,
dissect_quake, proto_quake);
data_handle = find_dissector("data");
}

View File

@ -7,7 +7,7 @@
* http://www.dgs.monash.edu.au/~timf/bottim/
* http://www.opt-sci.Arizona.EDU/Pandora/default.asp
*
* $Id: packet-quake2.c,v 1.2 2001/07/22 18:52:38 girlich Exp $
* $Id: packet-quake2.c,v 1.3 2001/11/25 22:19:24 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -64,6 +64,7 @@ static gint ett_quake2_game_seq2 = -1;
static gint ett_quake2_game_clc = -1;
static gint ett_quake2_game_svc = -1;
static dissector_handle_t data_handle;
#define PORT_MASTER 27910
static unsigned int gbl_quake2ServerPort=PORT_MASTER;
@ -120,7 +121,7 @@ dissect_quake2_client_commands(tvbuff_t *tvb, packet_info *pinfo,
the information from my DM2 specs:
http://www.planetquake.com/demospecs/dm2/
*/
dissect_data(tvb, 0, pinfo, tree);
call_dissector(data_handle,tvb, pinfo, tree);
}
@ -132,7 +133,7 @@ dissect_quake2_server_commands(tvbuff_t *tvb, packet_info *pinfo,
the information from my DM2 specs:
http://www.planetquake.com/demospecs/dm2/
*/
dissect_data(tvb, 0, pinfo, tree);
call_dissector(data_handle,tvb, pinfo, tree);
}
@ -347,6 +348,7 @@ proto_reg_handoff_quake2(void)
dissector_add("udp.port", gbl_quake2ServerPort,
dissect_quake2, proto_quake2);
data_handle = find_dissector("data");
}

View File

@ -3,7 +3,7 @@
*
* Uwe Girlich <uwe@planetquake.com>
*
* $Id: packet-quake3.c,v 1.4 2001/10/13 07:43:25 guy Exp $
* $Id: packet-quake3.c,v 1.5 2001/11/25 22:19:24 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -77,6 +77,7 @@ 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
@ -353,7 +354,7 @@ dissect_quake3_client_commands(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree)
{
/* this shouldn't be too difficult */
dissect_data(tvb, 0, pinfo, tree);
call_dissector(data_handle,tvb, pinfo, tree);
}
@ -363,7 +364,7 @@ dissect_quake3_server_commands(tvbuff_t *tvb, packet_info *pinfo,
{
/* It is totally forbidden to decode this any further,
I wont do it. */
dissect_data(tvb, 0, pinfo, tree);
call_dissector(data_handle,tvb, pinfo, tree);
}
@ -580,6 +581,7 @@ proto_reg_handoff_quake3(void)
for (i=0;i<4;i++)
dissector_add("udp.port", gbl_quake3_master_port + i,
dissect_quake3, proto_quake3);
data_handle = find_dissector("data");
}

View File

@ -4,7 +4,7 @@
* Uwe Girlich <uwe@planetquake.com>
* http://www.idsoftware.com/q1source/q1source.zip
*
* $Id: packet-quakeworld.c,v 1.4 2001/07/22 18:51:51 girlich Exp $
* $Id: packet-quakeworld.c,v 1.5 2001/11/25 22:19:24 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -77,7 +77,7 @@ 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
@ -580,7 +580,7 @@ dissect_quakeworld_client_commands(tvbuff_t *tvb, packet_info *pinfo,
the information from my QWD specs:
http://www.planetquake.com/demospecs/qwd/
*/
dissect_data(tvb, 0, pinfo, tree);
call_dissector(data_handle,tvb, pinfo, tree);
}
@ -592,7 +592,7 @@ dissect_quakeworld_server_commands(tvbuff_t *tvb, packet_info *pinfo,
the information from my QWD specs:
http://www.planetquake.com/demospecs/qwd/
*/
dissect_data(tvb, 0, pinfo, tree);
call_dissector(data_handle,tvb, pinfo, tree);
}
@ -798,6 +798,7 @@ proto_reg_handoff_quakeworld(void)
dissector_add("udp.port", gbl_quakeworldServerPort,
dissect_quakeworld, proto_quakeworld);
data_handle = find_dissector("data");
}

View File

@ -15,7 +15,7 @@
* Copyright 2000, Heikki Vatiainen <hessu@cs.tut.fi>
* Copyright 2001, Jean-Francois Mule <jfm@clarent.com>
*
* $Id: packet-sip.c,v 1.17 2001/10/26 18:28:16 gram Exp $
* $Id: packet-sip.c,v 1.18 2001/11/25 22:19:24 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -78,6 +78,7 @@ static gboolean sip_is_request(tvbuff_t *tvb, guint32 offset);
static gint sip_get_msg_offset(tvbuff_t *tvb, guint32 offset);
static dissector_handle_t sdp_handle;
static dissector_handle_t data_handle;
#define SIP2_HDR "SIP/2.0 "
#define SIP2_HDR_LEN (strlen (SIP2_HDR))
@ -153,7 +154,7 @@ static void dissect_sip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
bad:
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
dissect_data(next_tvb, 0, pinfo, tree);
call_dissector(data_handle,next_tvb, pinfo, tree);
return;
}
@ -227,4 +228,5 @@ proto_reg_handoff_sip(void)
* Get a handle for the SDP dissector.
*/
sdp_handle = find_dissector("sdp");
data_handle = find_dissector("data");
}

View File

@ -7,7 +7,7 @@
* This file is based on packet-aim.c, which is
* Copyright 2000, Ralf Hoelzer <ralf@well.com>
*
* $Id: packet-skinny.c,v 1.4 2001/10/20 18:42:01 guy Exp $
* $Id: packet-skinny.c,v 1.5 2001/11/25 22:19:25 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -175,6 +175,8 @@ static int hf_skinny_messageid = -1;
/* Initialize the subtree pointers */
static gint ett_skinny = -1;
static dissector_handle_t data_handle;
/* Code to actually dissect the packets */
static void dissect_skinny(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
@ -204,7 +206,7 @@ static void dissect_skinny(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* hdr_data_length > 1024 is just a heuristic. Better values/checks welcome */
if (hdr_data_length < 4 || hdr_data_length > 1024 || hdr_reserved != 0) {
/* Not an SKINNY packet, just happened to use the same port */
dissect_data(tvb, 0, pinfo, tree);
call_dissector(data_handle,tvb, pinfo, tree);
return;
}
@ -289,5 +291,6 @@ proto_register_skinny(void)
void
proto_reg_handoff_skinny(void)
{
data_handle = find_dissector("data");
dissector_add("tcp.port", TCP_PORT_SKINNY, &dissect_skinny, proto_skinny);
}

View File

@ -1,7 +1,7 @@
/* packet-sll.c
* Routines for disassembly of packets from Linux "cooked mode" captures
*
* $Id: packet-sll.c,v 1.12 2001/11/20 21:59:13 guy Exp $
* $Id: packet-sll.c,v 1.13 2001/11/25 22:19:25 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -90,6 +90,7 @@ static const value_string ltype_vals[] = {
static dissector_handle_t ipx_handle;
static dissector_handle_t llc_handle;
static dissector_handle_t data_handle;
void
capture_sll(const u_char *pd, int len, packet_counts *ld)
@ -216,7 +217,7 @@ dissect_sll(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 {
@ -284,6 +285,7 @@ proto_reg_handoff_sll(void)
*/
llc_handle = find_dissector("llc");
ipx_handle = find_dissector("ipx");
data_handle = find_dissector("data");
dissector_add("wtap_encap", WTAP_ENCAP_SLL, dissect_sll, proto_sll);
}

View File

@ -2,7 +2,7 @@
* Routines for SSCOP (Q.2110, Q.SAAL) frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
* $Id: packet-sscop.c,v 1.15 2001/05/27 07:15:26 guy Exp $
* $Id: packet-sscop.c,v 1.16 2001/11/25 22:19:25 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -42,6 +42,7 @@ static int proto_sscop = -1;
static gint ett_sscop = -1;
static dissector_handle_t q2931_handle;
static dissector_handle_t data_handle;
/*
* See
@ -307,7 +308,7 @@ dissect_sscop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (pdu_type == SSCOP_SD)
call_dissector(q2931_handle, next_tvb, pinfo, tree);
else
dissect_data(next_tvb, 0, pinfo, tree);
call_dissector(data_handle,next_tvb, pinfo, tree);
}
break;
}
@ -331,4 +332,5 @@ proto_reg_handoff_sscop(void)
* Get handle for the Q.2931 dissector.
*/
q2931_handle = find_dissector("q2931");
data_handle = find_dissector("data");
}

View File

@ -2,7 +2,7 @@
* Routines for v120 frame disassembly
* Bert Driehuis <driehuis@playbeing.org>
*
* $Id: packet-v120.c,v 1.19 2001/06/18 02:17:53 guy Exp $
* $Id: packet-v120.c,v 1.20 2001/11/25 22:19:25 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -50,6 +50,8 @@ 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 int dissect_v120_header(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree);
static void
@ -142,7 +144,7 @@ dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
v120len += dissect_v120_header(tvb, v120len, pinfo, v120_tree);
proto_item_set_len(ti, v120len);
next_tvb = tvb_new_subset(tvb, v120len, -1, -1);
dissect_data(next_tvb, 0, pinfo, v120_tree);
call_dissector(data_handle,next_tvb, pinfo, v120_tree);
}
}
@ -233,6 +235,7 @@ proto_register_v120(void)
void
proto_reg_handoff_v120(void)
{
data_handle = find_dissector("data");
dissector_add("wtap_encap", WTAP_ENCAP_V120, dissect_v120,
proto_v120);
}

View File

@ -2,7 +2,7 @@
* Routines for x25 packet disassembly
* Olivier Abad <oabad@cybercable.fr>
*
* $Id: packet-x25.c,v 1.54 2001/11/15 21:11:01 gram Exp $
* $Id: packet-x25.c,v 1.55 2001/11/25 22:19:25 hagbard Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -158,6 +158,7 @@ static dissector_handle_t ip_handle;
static dissector_handle_t ositp_handle;
static dissector_handle_t sna_handle;
static dissector_handle_t qllc_handle;
static dissector_handle_t data_handle;
/* Preferences */
static gboolean non_q_bit_is_sna = FALSE;
@ -2029,7 +2030,7 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
call_dissector(ip_handle, next_tvb, pinfo, tree);
}
else {
dissect_data(next_tvb, 0, pinfo, tree);
call_dissector(data_handle,next_tvb, pinfo, tree);
}
}
}
@ -2129,6 +2130,7 @@ proto_reg_handoff_x25(void)
ositp_handle = find_dissector("ositp");
sna_handle = find_dissector("sna");
qllc_handle = find_dissector("qllc");
data_handle = find_dissector("data");
dissector_add("llc.dsap", SAP_X25, dissect_x25, proto_x25);
}