summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-11-20 22:29:07 +0000
committerGuy Harris <guy@alum.mit.edu>2001-11-20 22:29:07 +0000
commit2f10c7f6304036dee28e5e3a0ad9af7db049903d (patch)
tree45212e011cc18df312b3fa15ff0ce394482acf81 /epan
parente8d4f4f0ac7481c316b3e25a41b1cc747440220e (diff)
downloadwireshark-2f10c7f6304036dee28e5e3a0ad9af7db049903d.tar.gz
Get rid of the "len" and "captured_len" members of the "packet_info"
structure; they're no longer used. svn path=/trunk/; revision=4236
Diffstat (limited to 'epan')
-rw-r--r--epan/packet.c29
-rw-r--r--epan/packet_info.h4
2 files changed, 3 insertions, 30 deletions
diff --git a/epan/packet.c b/epan/packet.c
index e3190a2fa4..d9ba602360 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
- * $Id: packet.c,v 1.38 2001/11/15 10:58:50 guy Exp $
+ * $Id: packet.c,v 1.39 2001/11/20 22:29:07 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -98,9 +98,7 @@ packet_cleanup(void)
/*
* Given a tvbuff, a packet_info *, and a length from a packet header,
- * adjust the length of the tvbuff, and the "len" and "captured_len"
- * members of the "packet_info" structure, to reflect the specified
- * length.
+ * adjust the length of the tvbuff to reflect the specified length.
*/
void
set_actual_length(tvbuff_t *tvb, packet_info *pinfo, guint specified_len)
@@ -120,23 +118,6 @@ set_actual_length(tvbuff_t *tvb, packet_info *pinfo, guint specified_len)
probably us) may use that to determine how much of its packet
was padding. */
tvb_set_reported_length(tvb, specified_len);
-
- /* XXX - can we get rid of "pinfo->len" and "pinfo->captured_len"
- when the last dissector is tvbuffified? */
-
- /* Shrink the total payload by the amount of padding. */
- padding = reported_payload_len - specified_len;
- if (pinfo->len >= padding)
- pinfo->len -= padding;
-
- /* Shrink the captured payload by the amount of padding in the
- captured payload (which may be less than the amount of padding,
- as the padding may not have been captured). */
- if (specified_len < payload_len) {
- padding = payload_len - specified_len;
- if (pinfo->captured_len >= padding)
- pinfo->captured_len -= padding;
- }
}
}
@@ -174,12 +155,6 @@ dissect_packet(tvbuff_t **p_tvb, union wtap_pseudo_header *pseudo_header,
{
blank_packetinfo();
- /* Set the initial payload to the packet length, and the initial
- captured payload to the capture length (other protocols may
- reduce them if their headers say they're less). */
- pi.len = fd->pkt_len;
- pi.captured_len = fd->cap_len;
-
pi.fd = fd;
pi.pseudo_header = pseudo_header;
diff --git a/epan/packet_info.h b/epan/packet_info.h
index a9f49dccae..c91cb9dc57 100644
--- a/epan/packet_info.h
+++ b/epan/packet_info.h
@@ -1,7 +1,7 @@
/* packet_info.h
* Definitions for packet info structures and routines
*
- * $Id: packet_info.h,v 1.9 2001/11/15 10:58:51 guy Exp $
+ * $Id: packet_info.h,v 1.10 2001/11/20 22:29:07 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -91,8 +91,6 @@ typedef struct _packet_info {
const char *current_proto; /* name of protocol currently being dissected */
frame_data *fd;
union wtap_pseudo_header *pseudo_header;
- int len;
- int captured_len;
address dl_src; /* link-layer source address */
address dl_dst; /* link-layer destination address */
address net_src; /* network-layer source address */