aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ndps.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-04-08 02:00:54 +0000
committerGuy Harris <guy@alum.mit.edu>2003-04-08 02:00:54 +0000
commit072e149f3c95fa01dc93ecc052c9045423199f08 (patch)
tree53765381c4b43de862d2e060d466bf6122136638 /packet-ndps.c
parent2d61e4ca47178095357efe483a4c920b77df49ba (diff)
Move the definition of the structure constructed for each SPX
transmission (and shared by all retransmissions), and passed to SPX subdissectors, to "packet-ipx.h", and use the same structure in the SPX dissector and the NDPS dissector. Set up conversations and those structures without checking whether we've seen the packet before or not; just check whether we find the conversation before creating a new one, and check whether we find a structure for the packet before creating a new one. Pass it to the subdissector regardless of whether we've seen the packet before or not, and check it in the NDPS dissector regardless of whether we've seen it before or not. Don't store a "retransmission" flag in the structure - the initial transmission and the retransmissions all share a single data structure, but they don't all have the same value for the "retransmission" flag, and you can tell whether a packet is a retransmission or not by comparing its frame number with the frame number from the structure; if they're different, it's a retransmission. svn path=/trunk/; revision=7418
Diffstat (limited to 'packet-ndps.c')
-rw-r--r--packet-ndps.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/packet-ndps.c b/packet-ndps.c
index 72ec2ff528..513b46fedf 100644
--- a/packet-ndps.c
+++ b/packet-ndps.c
@@ -3,7 +3,7 @@
* Greg Morris <gmorris@novell.com>
* Copyright (c) Novell, Inc. 2002-2003
*
- * $Id: packet-ndps.c,v 1.11 2003/04/08 00:56:17 guy Exp $
+ * $Id: packet-ndps.c,v 1.12 2003/04/08 02:00:53 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -3320,14 +3320,12 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint32 id=0;
int len=0;
tvbuff_t *next_tvb = NULL;
- fragment_data *fd_head;
+ fragment_data *fd_head;
spx_info *spx_data;
- if (!pinfo->fd->flags.visited) {
- spx_data = pinfo->private_data;
- }
- if (!ndps_defragment || spx_data->retransmission == TRUE) {
- if (spx_data->retransmission == TRUE) {
+ spx_data = pinfo->private_data;
+ if (!ndps_defragment || spx_data->num != pinfo->fd->num) {
+ if (spx_data->num != pinfo->fd->num) {
if (check_col(pinfo->cinfo, COL_INFO))
{
col_add_fstr(pinfo->cinfo, COL_INFO, "[Retransmission] Original Packet %d", spx_data->num);