aboutsummaryrefslogtreecommitdiffstats
path: root/proto_hier_stats.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-12-10 00:26:21 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-12-10 00:26:21 +0000
commit0c3fb23941e125f5f975469ed39cec16bea6e04e (patch)
treeb347f1669210e07039ec31051cbb2c5e82422e6b /proto_hier_stats.c
parent9a31f9b449a3d6091ce3a707da168f623b4beed3 (diff)
Move the pointer to the "column_info" structure in the "frame_data"
structure to the "packet_info" structure; only stuff that's permanently stored with each frame should be in the "frame_data" structure, and the "column_info" structure is not guaranteed to hold the column values for that frame at all times - it was only in the "frame_data" structure so that it could be passed to dissectors, and, as all dissectors are now passed a pointer to a "packet_info" structure, it could just as well be put in the "packet_info" structure. That saves memory, by shrinking the "frame_data" structure (there's one of those per frame), and also lets us clean up the code a bit. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4370 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'proto_hier_stats.c')
-rw-r--r--proto_hier_stats.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/proto_hier_stats.c b/proto_hier_stats.c
index 744beb706e..3a6057ad7e 100644
--- a/proto_hier_stats.c
+++ b/proto_hier_stats.c
@@ -1,13 +1,12 @@
/* proto_hier_stats.c
* Routines for calculating statistics based on protocol.
*
- * $Id: proto_hier_stats.c,v 1.5 2001/12/06 04:25:07 gram Exp $
+ * $Id: proto_hier_stats.c,v 1.6 2001/12/10 00:25:41 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
* as published by the Free Software Foundation; either version 2
@@ -119,7 +118,7 @@ process_tree(proto_tree *protocol_tree, ph_stats_t* ps, guint pkt_len)
}
static void
-process_frame(frame_data *frame, ph_stats_t* ps)
+process_frame(frame_data *frame, column_info *cinfo, ph_stats_t* ps)
{
epan_dissect_t *edt;
union wtap_pseudo_header phdr;
@@ -130,7 +129,7 @@ process_frame(frame_data *frame, ph_stats_t* ps)
pd, frame->cap_len);
/* Dissect the frame */
- edt = epan_dissect_new(&phdr, pd, frame, TRUE);
+ edt = epan_dissect_new(&phdr, pd, frame, TRUE, cinfo);
/* Get stats from this protocol tree */
process_tree(edt->tree, ps, frame->pkt_len);
@@ -205,7 +204,7 @@ ph_stats_new(void)
probably do so for other loops (see "file.c") that
look only at those packets. */
if (frame->flags.passed_dfilter) {
- process_frame(frame, ps);
+ process_frame(frame, &cfile.cinfo, ps);
tot_packets++;
tot_bytes += frame->pkt_len;