aboutsummaryrefslogtreecommitdiffstats
path: root/proto_hier_stats.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2001-12-06 04:25:09 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2001-12-06 04:25:09 +0000
commit6542c181722792d78608f924d087fd1e5ae90377 (patch)
tree184b82bfdeff9456df17b77f7ecf14b7c3aeec2e /proto_hier_stats.c
parent2026f857bc17b5af3deac56cb3a875a37e3485b6 (diff)
Remove proto_tree from capture_file and PacketWinData, since they
already contain a pointer to an epan_dissect_t, which contains the proto_tree. Routines calling epan_dissect_new() do not create their own proto_tree via proto_tree_create_root(); instead, they pass a boolean to epan_dissect_new() telling it whether it should create the root proto_tree. svn path=/trunk/; revision=4343
Diffstat (limited to 'proto_hier_stats.c')
-rw-r--r--proto_hier_stats.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/proto_hier_stats.c b/proto_hier_stats.c
index dc09fab34a..744beb706e 100644
--- a/proto_hier_stats.c
+++ b/proto_hier_stats.c
@@ -1,7 +1,7 @@
/* proto_hier_stats.c
* Routines for calculating statistics based on protocol.
*
- * $Id: proto_hier_stats.c,v 1.4 2001/06/19 23:08:55 guy Exp $
+ * $Id: proto_hier_stats.c,v 1.5 2001/12/06 04:25:07 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -123,24 +123,20 @@ process_frame(frame_data *frame, ph_stats_t* ps)
{
epan_dissect_t *edt;
union wtap_pseudo_header phdr;
- proto_tree *protocol_tree;
guint8 pd[WTAP_MAX_PACKET_SIZE];
- protocol_tree = proto_tree_create_root();
-
/* Load the frame from the capture file */
wtap_seek_read(cfile.wth, frame->file_off, &phdr,
pd, frame->cap_len);
/* Dissect the frame */
- edt = epan_dissect_new(&phdr, pd, frame, protocol_tree);
+ edt = epan_dissect_new(&phdr, pd, frame, TRUE);
/* Get stats from this protocol tree */
- process_tree(protocol_tree, ps, frame->pkt_len);
+ process_tree(edt->tree, ps, frame->pkt_len);
/* Free our memory. */
epan_dissect_free(edt);
- proto_tree_free(protocol_tree);
}