Add additional Type->Name associations: Now we can roughly
[obnox/wireshark/wip.git] / summary.c
index 528bbfc55609d72778b8932409b20b250f7fbc3c..9fc95c8d78ca21f6d64134179d6440854722fe93 100644 (file)
--- a/summary.c
+++ b/summary.c
@@ -58,7 +58,7 @@ tally_frame_data(frame_data *cur_frame, summary_tally *sum_tally)
            sum_tally->filtered_stop = cur_time;
     } else {
            if (cur_time < sum_tally->filtered_start) {
-                   sum_tally->start_time = cur_time;
+                   sum_tally->filtered_start = cur_time;
            }
            if (cur_time > sum_tally->filtered_stop) {
                    sum_tally->filtered_stop = cur_time;
@@ -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) {
@@ -105,7 +120,8 @@ summary_fill_in(capture_file *cf, summary_tally *st)
 
   st->filename = cf->filename;
   st->file_length = cf->f_datalen;
-  st->encap_type = cf->cd_t;
+  st->file_type = cf->cd_t;
+  st->encap_type = cf->lnk_t;
   st->has_snap = cf->has_snap;
   st->snap = cf->snap;
   st->elapsed_time = nstime_to_sec(&cf->elapsed_time);