Add the number of marked packets in the summary window.
authordeniel <deniel@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 21 Aug 2000 18:20:19 +0000 (18:20 +0000)
committerdeniel <deniel@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 21 Aug 2000 18:20:19 +0000 (18:20 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2323 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/summary_dlg.c
summary.c
summary.h

index 5e8f75327022a4fce3f4d4261ca2f3b5a46775fe..08e0cbb9b276b1b98b16c34a9138102cad7e85bb 100644 (file)
@@ -1,7 +1,7 @@
 /* summary_dlg.c
  * Routines for capture file summary window
  *
- * $Id: summary_dlg.c,v 1.7 2000/08/19 21:36:51 deniel Exp $
+ * $Id: summary_dlg.c,v 1.8 2000/08/21 18:20:19 deniel Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -131,6 +131,10 @@ summary_open_cb(GtkWidget *w, gpointer d)
   snprintf(string_buff, SUM_STR_MAX, "Filtered packet count: %i", summary.filtered_count);
   add_string_to_box(string_buff, data_box);
 
+  /* Marked Packet count */
+  snprintf(string_buff, SUM_STR_MAX, "Marked packet count: %i", summary.marked_count);
+  add_string_to_box(string_buff, data_box);
+
   /* Packets per second */
   if (seconds > 0){
     snprintf(string_buff, SUM_STR_MAX, "Avg. packets/sec: %.3f", summary.packet_count/seconds);
index 3e60f58e5917cff29edc176889054f3a7e257c3d..90717a91f09193934911e52075a9d1853ffb95a2 100644 (file)
--- a/summary.c
+++ b/summary.c
@@ -1,7 +1,7 @@
 /* summary.c
  * Routines for capture file summary info
  *
- * $Id: summary.c,v 1.18 2000/06/27 04:35:46 guy Exp $
+ * $Id: summary.c,v 1.19 2000/08/21 18:20:11 deniel Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -55,6 +55,9 @@ tally_frame_data(frame_data *cur_frame, summary_tally *sum_tally)
   sum_tally->bytes += cur_frame->pkt_len;
   if (cur_frame->flags.passed_dfilter)
     sum_tally->filtered_count++;
+  if (cur_frame->flags.marked)
+    sum_tally->marked_count++;
+
 }
 
 void
@@ -69,6 +72,7 @@ summary_fill_in(summary_tally *st)
   st->stop_time = 0;
   st->bytes = 0;
   st->filtered_count = 0;
+  st->marked_count = 0;
 
   /* initialize the tally */
   if (cfile.plist != NULL) {
index 9e1f2a0785371e1e1cbc2f8aebecfd4a5a73bf10..ed64ae669ab71e22a26a565385f5cab6905d8dde 100644 (file)
--- a/summary.h
+++ b/summary.h
@@ -1,7 +1,7 @@
 /* summary.h
  * Definitions for capture file summary data
  *
- * $Id: summary.h,v 1.4 1999/12/10 04:20:54 gram Exp $
+ * $Id: summary.h,v 1.5 2000/08/21 18:20:12 deniel Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -34,6 +34,7 @@ typedef struct _summary_tally {
                                   includes time before first packet
                                   and after last packet */
     int                filtered_count; /* number of filtered packets */
+    int                marked_count;   /* number of marked packets */
     int                packet_count;   /* total number of packets in trace */
     const char *filename;
     long       file_length;    /* file length in bytes */