aboutsummaryrefslogtreecommitdiffstats
path: root/reassemble.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-04-09 09:04:08 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-04-09 09:04:08 +0000
commit90a6dc4ea01c78b290a47d75285858b65abdf3fb (patch)
treecb60540db960f6d666fec41a585a85cec1fc854e /reassemble.c
parent9be967086f1d4ceee7fd9b8fb01a16fb75be4485 (diff)
Added new field reassembled_in to the fragment data structure.
This field gets set to the frame number when this pdu was first completely reassembled. This is useful since it will allow us to do reassembly properly in say packet-ip.c instead of printing the full pdu for every fragment and thus making NFSoverUDP rpc-rtt statistics less than useful. A dissector using fragment_add() can tehn choose to only dissect the reassembled PDU only for the frame where it was first reassembled. svn path=/trunk/; revision=7427
Diffstat (limited to 'reassemble.c')
-rw-r--r--reassemble.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/reassemble.c b/reassemble.c
index 5d6a4544ed..b89b5bff72 100644
--- a/reassemble.c
+++ b/reassemble.c
@@ -1,7 +1,7 @@
/* reassemble.c
* Routines for {fragment,segment} reassembly
*
- * $Id: reassemble.c,v 1.29 2003/03/04 06:47:10 guy Exp $
+ * $Id: reassemble.c,v 1.30 2003/04/09 09:04:08 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -465,6 +465,7 @@ fragment_add(tvbuff_t *tvb, int offset, packet_info *pinfo, guint32 id,
fd_head->len=0;
fd_head->flags=0;
fd_head->data=NULL;
+ fd_head->reassembled_in=0;
/*
* We're going to use the key to insert the fragment,
@@ -647,7 +648,8 @@ fragment_add(tvbuff_t *tvb, int offset, packet_info *pinfo, guint32 id,
/* mark this packet as defragmented.
allows us to skip any trailing fragments */
fd_head->flags |= FD_DEFRAGMENTED;
-
+ fd_head->reassembled_in=pinfo->fd->num;
+
return fd_head;
}
@@ -837,6 +839,7 @@ fragment_add_seq_work(fragment_data *fd_head, tvbuff_t *tvb, int offset,
/* mark this packet as defragmented.
allows us to skip any trailing fragments */
fd_head->flags |= FD_DEFRAGMENTED;
+ fd_head->reassembled_in=pinfo->fd->num;
return TRUE;
}
@@ -892,6 +895,7 @@ fragment_add_seq(tvbuff_t *tvb, int offset, packet_info *pinfo, guint32 id,
fd_head->len=0;
fd_head->flags=FD_BLOCKSEQUENCE;
fd_head->data=NULL;
+ fd_head->reassembled_in=0;
/*
* We're going to use the key to insert the fragment,
@@ -1031,6 +1035,7 @@ fragment_add_seq_check_work(tvbuff_t *tvb, int offset, packet_info *pinfo,
fd_head->len=0;
fd_head->flags=FD_BLOCKSEQUENCE;
fd_head->data=NULL;
+ fd_head->reassembled_in=0;
if (!more_frags) {
/*