aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packet-bxxp.c12
-rw-r--r--packet-fddi.c10
-rw-r--r--packet-ipx.c10
-rw-r--r--packet-ospf.c5
-rw-r--r--packet-q931.c5
-rw-r--r--packet-quake.c8
-rw-r--r--packet-rtcp.c10
-rw-r--r--packet-rtp.c10
-rw-r--r--packet-sctp.c6
-rw-r--r--packet-smtp.c4
-rw-r--r--packet-sna.c19
-rw-r--r--packet-tr.c15
-rw-r--r--packet-yhoo.c6
13 files changed, 58 insertions, 62 deletions
diff --git a/packet-bxxp.c b/packet-bxxp.c
index 6d8d2a18c5..a490e47b48 100644
--- a/packet-bxxp.c
+++ b/packet-bxxp.c
@@ -1,7 +1,7 @@
/* packet-bxxp.c
* Routines for BXXP packet disassembly
*
- * $Id: packet-bxxp.c,v 1.19 2001/06/18 02:17:45 guy Exp $
+ * $Id: packet-bxxp.c,v 1.20 2001/07/03 04:56:45 guy Exp $
*
* Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
*
@@ -487,12 +487,12 @@ dissect_bxxp_int(tvbuff_t *tvb, int offset, frame_data *fd,
static void
set_mime_hdr_flags(int more, struct bxxp_request_val *request_val,
- struct bxxp_proto_data *frame_data)
+ struct bxxp_proto_data *frame_data, packet_info *pinfo)
{
if (!request_val) return; /* Nothing to do ??? */
- if (pi.destport == tcp_port) { /* Going to the server ... client */
+ if (pinfo->destport == tcp_port) { /* Going to the server ... client */
if (request_val->c_mime_hdr) {
@@ -582,7 +582,7 @@ dissect_bxxp_tree(tvbuff_t *tvb, int offset, packet_info *pinfo,
* will get it wrong!
*/
- set_mime_hdr_flags(more, request_val, frame_data);
+ set_mime_hdr_flags(more, request_val, frame_data, pinfo);
}
else { /* Protocol violation, so dissect rest as undisectable */
@@ -723,7 +723,7 @@ dissect_bxxp_tree(tvbuff_t *tvb, int offset, packet_info *pinfo,
if ((more = dissect_bxxp_more(tvb, offset, pinfo->fd, hdr)) >= 0) {
- set_mime_hdr_flags(more, request_val, frame_data);
+ set_mime_hdr_flags(more, request_val, frame_data, pinfo);
}
else {
@@ -1015,7 +1015,7 @@ dissect_bxxp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (!frame_data) {
- conversation = find_conversation(&pinfo->src, &pinfo->dst, pi.ptype,
+ conversation = find_conversation(&pinfo->src, &pinfo->dst, pinfo->ptype,
pinfo->srcport, pinfo->destport, 0);
if (conversation == NULL) { /* No conversation, create one */
conversation = conversation_new(&pinfo->src, &pinfo->dst, pinfo->ptype,
diff --git a/packet-fddi.c b/packet-fddi.c
index 6ff1425b67..ee1adea540 100644
--- a/packet-fddi.c
+++ b/packet-fddi.c
@@ -3,7 +3,7 @@
*
* Laurent Deniel <deniel@worldnet.fr>
*
- * $Id: packet-fddi.c,v 1.50 2001/07/03 01:23:21 guy Exp $
+ * $Id: packet-fddi.c,v 1.51 2001/07/03 04:56:45 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -310,8 +310,8 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* XXX - copy them to some buffer associated with "pi", rather than
just making "dst" static? */
- SET_ADDRESS(&pi.dl_dst, AT_ETHER, 6, &dst[0]);
- SET_ADDRESS(&pi.dst, AT_ETHER, 6, &dst[0]);
+ SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, &dst[0]);
+ SET_ADDRESS(&pinfo->dst, AT_ETHER, 6, &dst[0]);
if (fh_tree) {
proto_tree_add_ether(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST, 6, dst);
@@ -331,8 +331,8 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* XXX - copy them to some buffer associated with "pi", rather than
just making "src" static? */
- SET_ADDRESS(&pi.dl_src, AT_ETHER, 6, &src[0]);
- SET_ADDRESS(&pi.src, AT_ETHER, 6, &src[0]);
+ SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, &src[0]);
+ SET_ADDRESS(&pinfo->src, AT_ETHER, 6, &src[0]);
if (fh_tree) {
proto_tree_add_ether(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST, 6, src);
diff --git a/packet-ipx.c b/packet-ipx.c
index 3b7a786cf2..96e5870b96 100644
--- a/packet-ipx.c
+++ b/packet-ipx.c
@@ -2,7 +2,7 @@
* Routines for NetWare's IPX
* Gilbert Ramirez <gram@xiexie.org>
*
- * $Id: packet-ipx.c,v 1.87 2001/06/29 09:46:52 guy Exp $
+ * $Id: packet-ipx.c,v 1.88 2001/07/03 04:56:45 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -229,10 +229,10 @@ dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
src_net_node = tvb_get_ptr(tvb, 18, 10);
dst_net_node = tvb_get_ptr(tvb, 6, 10);
- SET_ADDRESS(&pi.net_src, AT_IPX, 10, src_net_node);
- SET_ADDRESS(&pi.src, AT_IPX, 10, src_net_node);
- SET_ADDRESS(&pi.net_dst, AT_IPX, 10, dst_net_node);
- SET_ADDRESS(&pi.dst, AT_IPX, 10, dst_net_node);
+ SET_ADDRESS(&pinfo->net_src, AT_IPX, 10, src_net_node);
+ SET_ADDRESS(&pinfo->src, AT_IPX, 10, src_net_node);
+ SET_ADDRESS(&pinfo->net_dst, AT_IPX, 10, dst_net_node);
+ SET_ADDRESS(&pinfo->dst, AT_IPX, 10, dst_net_node);
if (check_col(pinfo->fd, COL_INFO))
col_add_fstr(pinfo->fd, COL_INFO, "%s (0x%04X)",
diff --git a/packet-ospf.c b/packet-ospf.c
index 103a04aad3..119ed1c979 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.40 2001/05/14 18:25:34 guy Exp $
+ * $Id: packet-ospf.c,v 1.41 2001/07/03 04:56:45 guy Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
@@ -15,7 +15,6 @@
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
@@ -221,7 +220,7 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
length = tvb_length(tvb);
/* XXX - include only the length from the OSPF header? */
reported_length = tvb_reported_length(tvb);
- if (!pi.fragmented && length >= reported_length
+ if (!pinfo->fragmented && length >= reported_length
&& length >= OSPF_HEADER_LENGTH) {
/* The packet isn't part of a fragmented datagram and isn't
truncated, so we can checksum it. */
diff --git a/packet-q931.c b/packet-q931.c
index fd6cb8a293..c3a46b7e27 100644
--- a/packet-q931.c
+++ b/packet-q931.c
@@ -2,14 +2,13 @@
* Routines for Q.931 frame disassembly
* Guy Harris <guy@alum.mit.edu>
*
- * $Id: packet-q931.c,v 1.30 2001/06/18 02:17:50 guy Exp $
+ * $Id: packet-q931.c,v 1.31 2001/07/03 04:56:45 guy Exp $
*
* Modified by Andreas Sikkema for possible use with H.323
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -2365,7 +2364,7 @@ q931_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if ( ( tvb_get_guint8( tvb, offset ) == 0x7E ) &&
( tvb_get_guint8( tvb, offset + 3 ) == 0x05 ) &&
- /* ( ( pi.srcport == 1720 ) || ( pi.destport == 1720 ) ) && */
+ /* ( ( pinfo->srcport == 1720 ) || ( pinfo->destport == 1720 ) ) && */
( protocol_discriminator == NLPID_Q_931 ) ) {
info_element_len = tvb_get_ntohs( tvb, offset + 1 );
is_h323_h225 = TRUE;
diff --git a/packet-quake.c b/packet-quake.c
index 7552d046c2..6982725d1c 100644
--- a/packet-quake.c
+++ b/packet-quake.c
@@ -4,10 +4,10 @@
* Uwe Girlich <uwe@planetquake.com>
* http://www.idsoftware.com/q1source/q1source.zip
*
- * $Id: packet-quake.c,v 1.16 2001/06/21 15:13:42 girlich Exp $
+ * $Id: packet-quake.c,v 1.17 2001/07/03 04:56:45 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* Copied from packet-tftp.c
@@ -240,8 +240,8 @@ dissect_quake_CCREP_ACCEPT
conversation_t *c;
port = tvb_get_letohl(tvb, 0);
- c = conversation_new( &pi.src, &pi.dst, PT_UDP, port, pi.destport,
- NULL, 0);
+ c = conversation_new( &pinfo->src, &pinfo->dst, PT_UDP, port,
+ pinfo->destport, NULL, 0);
if (c) {
conversation_set_dissector(c, dissect_quake);
}
diff --git a/packet-rtcp.c b/packet-rtcp.c
index 504d615b6f..1507497bc0 100644
--- a/packet-rtcp.c
+++ b/packet-rtcp.c
@@ -1,6 +1,6 @@
/* packet-rtcp.c
*
- * $Id: packet-rtcp.c,v 1.17 2001/06/20 04:45:51 guy Exp $
+ * $Id: packet-rtcp.c,v 1.18 2001/07/03 04:56:45 guy Exp $
*
* Routines for RTCP dissection
* RTCP = Real-time Transport Control Protocol
@@ -248,14 +248,14 @@ dissect_rtcp_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
* a heuristic dissector called before us!
* So we first check if the frame is really meant for us.
*/
- if ( ( pconv = find_conversation( &pi.src, &fake_addr, pi.ptype,
- pi.srcport, 0, 0 ) ) == NULL ) {
+ if ( ( pconv = find_conversation( &pinfo->src, &fake_addr, pinfo->ptype,
+ pinfo->srcport, 0, 0 ) ) == NULL ) {
/*
* The source ip:port combination was not what we were
* looking for, check the destination
*/
- if ( ( pconv = find_conversation( &pi.dst, &fake_addr,
- pi.ptype, pi.destport, 0, 0 ) ) == NULL ) {
+ if ( ( pconv = find_conversation( &pinfo->dst, &fake_addr,
+ pinfo->ptype, pinfo->destport, 0, 0 ) ) == NULL ) {
return FALSE;
}
}
diff --git a/packet-rtp.c b/packet-rtp.c
index cf1abac6b7..eaf0151daf 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.21 2001/06/18 02:17:51 guy Exp $
+ * $Id: packet-rtp.c,v 1.22 2001/07/03 04:56:45 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -261,14 +261,14 @@ dissect_rtp_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
* a heuristic dissector called before us!
* So we first check if the frame is really meant for us.
*/
- if ( ( pconv = find_conversation( &pi.src, &fake_addr, pi.ptype,
- pi.srcport, 0, 0 ) ) == NULL ) {
+ if ( ( pconv = find_conversation( &pinfo->src, &fake_addr, pinfo->ptype,
+ pinfo->srcport, 0, 0 ) ) == NULL ) {
/*
* The source ip:port combination was not what we were
* looking for, check the destination
*/
- if ( ( pconv = find_conversation( &pi.dst, &fake_addr,
- pi.ptype, pi.destport, 0, 0 ) ) == NULL ) {
+ if ( ( pconv = find_conversation( &pinfo->dst, &fake_addr,
+ pinfo->ptype, pinfo->destport, 0, 0 ) ) == NULL ) {
return FALSE;
}
}
diff --git a/packet-sctp.c b/packet-sctp.c
index 9845fc5206..8c32040fbc 100644
--- a/packet-sctp.c
+++ b/packet-sctp.c
@@ -2,7 +2,7 @@
* Routines for Stream Control Transmission Protocol dissection
* Copyright 2000, Michael Tüxen <Michael.Tuexen@icn.siemens.de>
*
- * $Id: packet-sctp.c,v 1.18 2001/06/21 22:35:33 guy Exp $
+ * $Id: packet-sctp.c,v 1.19 2001/07/03 04:56:46 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -987,8 +987,8 @@ dissect_payload(tvbuff_t *payload_tvb, packet_info *pinfo, proto_tree *tree,
{
/* do lookup with the subdissector table */
if (dissector_try_port (sctp_ppi_dissector_table, ppi, payload_tvb, pinfo, tree) ||
- dissector_try_port(sctp_port_dissector_table, pi.srcport, payload_tvb, pinfo, tree) ||
- dissector_try_port(sctp_port_dissector_table, pi.destport, payload_tvb, pinfo, tree)){
+ dissector_try_port(sctp_port_dissector_table, pinfo->srcport, payload_tvb, pinfo, tree) ||
+ dissector_try_port(sctp_port_dissector_table, pinfo->destport, payload_tvb, pinfo, tree)){
return TRUE;
}
else {
diff --git a/packet-smtp.c b/packet-smtp.c
index cd5740b8ef..220b015243 100644
--- a/packet-smtp.c
+++ b/packet-smtp.c
@@ -1,7 +1,7 @@
/* packet-smtp.c
* Routines for SMTP packet disassembly
*
- * $Id: packet-smtp.c,v 1.18 2001/06/18 02:17:52 guy Exp $
+ * $Id: packet-smtp.c,v 1.19 2001/07/03 04:56:46 guy Exp $
*
* Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
*
@@ -216,7 +216,7 @@ dissect_smtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (!frame_data) {
- conversation = find_conversation(&pinfo->src, &pinfo->dst, pi.ptype,
+ conversation = find_conversation(&pinfo->src, &pinfo->dst, pinfo->ptype,
pinfo->srcport, pinfo->destport, 0);
if (conversation == NULL) { /* No conversation, create one */
conversation = conversation_new(&pinfo->src, &pinfo->dst, pinfo->ptype,
diff --git a/packet-sna.c b/packet-sna.c
index c8a2b6eda7..3333d68c17 100644
--- a/packet-sna.c
+++ b/packet-sna.c
@@ -2,12 +2,11 @@
* Routines for SNA
* Gilbert Ramirez <gram@xiexie.org>
*
- * $Id: packet-sna.c,v 1.30 2001/06/18 02:17:52 guy Exp $
+ * $Id: packet-sna.c,v 1.31 2001/07/03 04:56:46 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -312,7 +311,7 @@ static const true_false_string sna_th_vr_rwi_truth = {
static int dissect_fid0_1 (tvbuff_t*, packet_info*, proto_tree*);
static int dissect_fid2 (tvbuff_t*, packet_info*, proto_tree*);
static int dissect_fid3 (tvbuff_t*, proto_tree*);
-static int dissect_fid4 (tvbuff_t*, proto_tree*);
+static int dissect_fid4 (tvbuff_t*, packet_info*, proto_tree*);
static int dissect_fid5 (tvbuff_t*, proto_tree*);
static int dissect_fidf (tvbuff_t*, proto_tree*);
static void dissect_rh (tvbuff_t*, int, proto_tree*);
@@ -370,7 +369,7 @@ dissect_sna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
th_header_len = dissect_fid3(tvb, th_tree);
break;
case 0x4:
- th_header_len = dissect_fid4(tvb, th_tree);
+ th_header_len = dissect_fid4(tvb, pinfo, th_tree);
break;
case 0x5:
th_header_len = dissect_fid5(tvb, th_tree);
@@ -552,7 +551,7 @@ dissect_fid3(tvbuff_t *tvb, proto_tree *tree)
static int
-dissect_fid4(tvbuff_t *tvb, proto_tree *tree)
+dissect_fid4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *bf_tree;
proto_item *bf_item;
@@ -702,8 +701,8 @@ dissect_fid4(tvbuff_t *tvb, proto_tree *tree)
/* Addresses in FID 4 are discontiguous, sigh */
dst.saf = dsaf;
dst.ef = def;
- SET_ADDRESS(&pi.net_dst, AT_SNA, SNA_FID_TYPE_4_ADDR_LEN, (guint8* )&dst);
- SET_ADDRESS(&pi.dst, AT_SNA, SNA_FID_TYPE_4_ADDR_LEN, (guint8 *)&dst);
+ SET_ADDRESS(&pinfo->net_dst, AT_SNA, SNA_FID_TYPE_4_ADDR_LEN, (guint8* )&dst);
+ SET_ADDRESS(&pinfo->dst, AT_SNA, SNA_FID_TYPE_4_ADDR_LEN, (guint8 *)&dst);
oef = tvb_get_ntohs(tvb, 20);
@@ -714,8 +713,8 @@ dissect_fid4(tvbuff_t *tvb, proto_tree *tree)
/* Addresses in FID 4 are discontiguous, sigh */
src.saf = osaf;
src.ef = oef;
- SET_ADDRESS(&pi.net_src, AT_SNA, SNA_FID_TYPE_4_ADDR_LEN, (guint8 *)&src);
- SET_ADDRESS(&pi.src, AT_SNA, SNA_FID_TYPE_4_ADDR_LEN, (guint8 *)&src);
+ SET_ADDRESS(&pinfo->net_src, AT_SNA, SNA_FID_TYPE_4_ADDR_LEN, (guint8 *)&src);
+ SET_ADDRESS(&pinfo->src, AT_SNA, SNA_FID_TYPE_4_ADDR_LEN, (guint8 *)&src);
if (tree) {
proto_tree_add_item(tree, hf_sna_th_snf, tvb, offset+4, 2, FALSE);
diff --git a/packet-tr.c b/packet-tr.c
index af6add0ef2..31cf29975f 100644
--- a/packet-tr.c
+++ b/packet-tr.c
@@ -2,12 +2,11 @@
* Routines for Token-Ring packet disassembly
* Gilbert Ramirez <gram@xiexie.org>
*
- * $Id: packet-tr.c,v 1.62 2001/06/18 02:17:53 guy Exp $
+ * $Id: packet-tr.c,v 1.63 2001/07/03 04:56:46 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -439,12 +438,12 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ENDTRY;
- /* XXX - copy it to some buffer associated with "pi", rather than
+ /* XXX - copy it to some buffer associated with "*pinfo", rather than
just making "trn_shost_nonsr" static? */
- SET_ADDRESS(&pi.dl_src, AT_ETHER, 6, trn_shost_nonsr);
- SET_ADDRESS(&pi.src, AT_ETHER, 6, trn_shost_nonsr);
- SET_ADDRESS(&pi.dl_dst, AT_ETHER, 6, trn_dhost);
- SET_ADDRESS(&pi.dst, AT_ETHER, 6, trn_dhost);
+ SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, trn_shost_nonsr);
+ SET_ADDRESS(&pinfo->src, AT_ETHER, 6, trn_shost_nonsr);
+ SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, trn_dhost);
+ SET_ADDRESS(&pinfo->dst, AT_ETHER, 6, trn_dhost);
/* protocol analysis tree */
if (tree) {
diff --git a/packet-yhoo.c b/packet-yhoo.c
index 0d84c9102d..b671be2add 100644
--- a/packet-yhoo.c
+++ b/packet-yhoo.c
@@ -2,10 +2,10 @@
* Routines for yahoo messenger packet dissection
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
- * $Id: packet-yhoo.c,v 1.16 2001/06/18 02:17:58 guy Exp $
+ * $Id: packet-yhoo.c,v 1.17 2001/07/03 04:56:46 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* Copied from packet-tftp.c
@@ -115,7 +115,7 @@ dissect_yhoo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return FALSE;
}
- if (pi.srcport != TCP_PORT_YHOO && pi.destport != TCP_PORT_YHOO) {
+ if (pinfo->srcport != TCP_PORT_YHOO && pinfo->destport != TCP_PORT_YHOO) {
/* Not the Yahoo port - not a Yahoo Messenger packet. */
return FALSE;
}