From 6e39bc94d1ed6db0229eb284b253dbcda6d0ba29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Wed, 28 Nov 2007 01:09:02 +0000 Subject: Summary enhancements: - Added traffic statistics for marked packages. - Do not show Displayed column unless using it. - Removed Marked packets line, as this info is in the marked packets column. Will add documentation changes if keeping this feature. svn path=/trunk/; revision=23633 --- summary.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'summary.c') diff --git a/summary.c b/summary.c index ffdccd22de..d6d774f809 100644 --- a/summary.c +++ b/summary.c @@ -67,9 +67,21 @@ tally_frame_data(frame_data *cur_frame, summary_tally *sum_tally) sum_tally->filtered_count++; sum_tally->filtered_bytes += cur_frame->pkt_len ; } - if (cur_frame->flags.marked) + if (cur_frame->flags.marked){ + if (sum_tally->marked_count==0){ + sum_tally->marked_start= cur_time; + sum_tally->marked_stop = cur_time; + } else { + if (cur_time < sum_tally->marked_start) { + sum_tally->marked_start = cur_time; + } + if (cur_time > sum_tally->marked_stop) { + sum_tally->marked_stop = cur_time; + } + } sum_tally->marked_count++; - + sum_tally->marked_bytes += cur_frame->pkt_len ; + } } void @@ -85,9 +97,12 @@ summary_fill_in(capture_file *cf, summary_tally *st) st->bytes = 0; st->filtered_count = 0; st->filtered_start = 0; - st->filtered_stop = 0; + st->filtered_stop = 0; st->filtered_bytes = 0; st->marked_count = 0; + st->marked_start = 0; + st->marked_stop = 0; + st->marked_bytes = 0; /* initialize the tally */ if (cf->plist != NULL) { -- cgit v1.2.3