aboutsummaryrefslogtreecommitdiffstats
path: root/summary.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-09-02 22:10:32 +0000
committerGuy Harris <guy@alum.mit.edu>2003-09-02 22:10:32 +0000
commit71034c5a3faef6c2305e8e1f9253d544f559a532 (patch)
tree2e61ed55c7483b1dc2f6e5841d0b78ecfa7f6757 /summary.c
parenta3a1ee88505d1650453c12c2aaa459f48795c0ec (diff)
From Jean-Michel Fayard: show in Tools:Summary window statistics about
packets that passed the current display filter, as well as about the entire capture. Document the Tools:Summary item in the man page. Update Gerald's e-mail address. svn path=/trunk/; revision=8344
Diffstat (limited to 'summary.c')
-rw-r--r--summary.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/summary.c b/summary.c
index b10d632afe..2b5715a485 100644
--- a/summary.c
+++ b/summary.c
@@ -1,7 +1,7 @@
/* summary.c
* Routines for capture file summary info
*
- * $Id: summary.c,v 1.22 2002/02/08 10:07:34 guy Exp $
+ * $Id: summary.c,v 1.23 2003/09/02 22:10:32 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -51,8 +51,21 @@ tally_frame_data(frame_data *cur_frame, summary_tally *sum_tally)
sum_tally->stop_time = cur_time;
}
sum_tally->bytes += cur_frame->pkt_len;
- if (cur_frame->flags.passed_dfilter)
+ if (cur_frame->flags.passed_dfilter){
+ if (sum_tally->filtered_count==0){
+ sum_tally->filtered_start= cur_time;
+ sum_tally->filtered_stop = cur_time;
+ } else {
+ if (cur_time < sum_tally->filtered_start) {
+ sum_tally->start_time = cur_time;
+ }
+ if (cur_time > sum_tally->filtered_stop) {
+ sum_tally->filtered_stop = cur_time;
+ }
+ }
sum_tally->filtered_count++;
+ sum_tally->filtered_bytes += cur_frame->pkt_len ;
+ }
if (cur_frame->flags.marked)
sum_tally->marked_count++;
@@ -70,12 +83,15 @@ summary_fill_in(summary_tally *st)
st->stop_time = 0;
st->bytes = 0;
st->filtered_count = 0;
+ st->filtered_start = 0;
+ st->filtered_stop = 0;
+ st->filtered_bytes = 0;
st->marked_count = 0;
/* initialize the tally */
if (cfile.plist != NULL) {
first_frame = cfile.plist;
- st->start_time = secs_usecs(first_frame->abs_secs,first_frame->abs_usecs);
+ 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;