From 23319ff023bcb144347a1307b958359b5226c699 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 10 Dec 2001 00:26:21 +0000 Subject: 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. svn path=/trunk/; revision=4370 --- proto_hier_stats.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'proto_hier_stats.c') 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 + * By Gerald Combs * 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; -- cgit v1.2.3