aboutsummaryrefslogtreecommitdiffstats
path: root/summary.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2007-11-28 01:09:02 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2007-11-28 01:09:02 +0000
commit6e39bc94d1ed6db0229eb284b253dbcda6d0ba29 (patch)
tree36d7e23970bda18c84cbf953f58b18f3ab4ac89d /summary.c
parent482e3f7820cf45c668c06ff6672cafbe9406b010 (diff)
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
Diffstat (limited to 'summary.c')
-rw-r--r--summary.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/summary.c b/summary.c
index ffdccd2..d6d774f 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) {