From 69e94faff889d3e99696a089d357b86fd8cd0b3f Mon Sep 17 00:00:00 2001 From: Ulf Lamping Date: Fri, 4 Feb 2005 19:29:27 +0000 Subject: remove #include "globals.h" from summary.c, as it's a bad idea for multiple capture files. If a summary user would like to get a summary, it should know the file of *which* it needs the summary. svn path=/trunk/; revision=13291 --- summary.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'summary.c') diff --git a/summary.c b/summary.c index fc3c51cc91..5d13ef2cd0 100644 --- a/summary.c +++ b/summary.c @@ -27,7 +27,7 @@ #endif #include -#include "globals.h" +#include "cfile.h" #include "summary.h" @@ -72,7 +72,7 @@ tally_frame_data(frame_data *cur_frame, summary_tally *sum_tally) } void -summary_fill_in(summary_tally *st) +summary_fill_in(capture_file *cf, summary_tally *st) { frame_data *first_frame, *cur_frame; @@ -89,33 +89,33 @@ summary_fill_in(summary_tally *st) st->marked_count = 0; /* initialize the tally */ - if (cfile.plist != NULL) { - first_frame = cfile.plist; + if (cf->plist != NULL) { + first_frame = cf->plist; st->start_time = secs_usecs(first_frame->abs_secs,first_frame->abs_usecs); st->stop_time = secs_usecs(first_frame->abs_secs,first_frame->abs_usecs); - cur_glist = cfile.plist; + cur_glist = cf->plist; - for (i = 0; i < cfile.count; i++) { + for (i = 0; i < cf->count; i++) { cur_frame = cur_glist; tally_frame_data(cur_frame, st); cur_glist = cur_glist->next; } } - st->filename = cfile.filename; - st->file_length = cfile.f_len; - st->encap_type = cfile.cd_t; - st->has_snap = cfile.has_snap; - st->snap = cfile.snap; - st->elapsed_time = secs_usecs(cfile.esec, cfile.eusec); - st->packet_count = cfile.count; - st->drops_known = cfile.drops_known; - st->drops = cfile.drops; - st->iface = cfile.iface; - st->dfilter = cfile.dfilter; + st->filename = cf->filename; + st->file_length = cf->f_len; + st->encap_type = cf->cd_t; + st->has_snap = cf->has_snap; + st->snap = cf->snap; + st->elapsed_time = secs_usecs(cf->esec, cf->eusec); + st->packet_count = cf->count; + st->drops_known = cf->drops_known; + st->drops = cf->drops; + st->iface = cf->iface; + st->dfilter = cf->dfilter; #ifdef HAVE_LIBPCAP - st->cfilter = cfile.cfilter; + st->cfilter = cf->cfilter; #else st->cfilter = NULL; #endif -- cgit v1.2.3