From Jon Oberheide: Add interface name to the capture and ethereal window
authortuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 13 Apr 2004 18:01:40 +0000 (18:01 +0000)
committertuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 13 Apr 2004 18:01:40 +0000 (18:01 +0000)
                    while capturing.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10594 f5534014-38df-0310-8fa8-9805f1628bb7

capture.c
capture.h
file.c
gtk/capture_info_dlg.c

index 277bbd0db6ec5324d898c192d332e6e5efb9075b..281d87b021b7ab13d9ef0931f0c6c70029e21d46 100644 (file)
--- a/capture.c
+++ b/capture.c
@@ -1,7 +1,7 @@
 /* capture.c
  * Routines for packet capture windows
  *
- * $Id: capture.c,v 1.248 2004/03/23 06:48:31 guy Exp $
+ * $Id: capture.c,v 1.249 2004/04/13 18:01:39 tuexen Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -1756,7 +1756,7 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
   /* start capture info dialog */
   capture_ui.callback_data  = &ld;
   capture_ui.counts         = &ld.counts;
-  capture_info_create(&capture_ui);
+  capture_info_create(&capture_ui, cfile.iface);
 
   start_time = time(NULL);
   upd_time = time(NULL);
index 916a6a74c09abcba7a2c6a331d43c86111de8eca..a7fafe16576dc4791d3b45a794c7e35a4419dd9f 100644 (file)
--- a/capture.h
+++ b/capture.h
@@ -1,7 +1,7 @@
 /* capture.h
  * Definitions for packet capture windows
  *
- * $Id: capture.h,v 1.44 2004/03/13 22:49:30 ulfl Exp $
+ * $Id: capture.h,v 1.45 2004/04/13 18:01:39 tuexen Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -101,7 +101,8 @@ typedef struct {
 
 /* create the capture info dialog */
 extern void capture_info_create(
-capture_info    *cinfo);
+capture_info    *cinfo,
+gchar           *iface);
 
 /* Update the capture info counters in the dialog */
 extern void capture_info_update(
diff --git a/file.c b/file.c
index 22a2ff778349addd219b347a0d7868d238aee2e1..0ef5ff1f2f934ca917672ba1c55b164354c614db 100644 (file)
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
 /* file.c
  * File I/O routines
  *
- * $Id: file.c,v 1.370 2004/03/08 23:45:24 guy Exp $
+ * $Id: file.c,v 1.371 2004/04/13 18:01:39 tuexen Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -529,6 +529,7 @@ int
 cf_start_tail(char *fname, gboolean is_tempfile, capture_file *cf)
 {
   int     err;
+  gchar *capture_msg;
 
   err = cf_open(fname, is_tempfile, cf);
   if (err == 0) {
@@ -540,7 +541,9 @@ cf_start_tail(char *fname, gboolean is_tempfile, capture_file *cf)
        packets (yes, I know, we don't have any *yet*). */
     set_menus_for_captured_packets(TRUE);
 
-    statusbar_push_file_msg(" <live capture in progress>");
+    capture_msg = g_strdup_printf(" %s: <live capture in progress>", cf->iface);
+
+    statusbar_push_file_msg(capture_msg);
   }
   return err;
 }
index 76a37cdad779f43e02952817432092f7f7c576fb..3dcf101b2164a11e653c85b3ee7f94cde558519c 100644 (file)
@@ -1,7 +1,7 @@
 /* capture_info_dlg.c
  * Routines for packet capture info dialog
  *
- * $Id: capture_info_dlg.c,v 1.13 2004/03/13 15:15:22 ulfl Exp $
+ * $Id: capture_info_dlg.c,v 1.14 2004/04/13 18:01:40 tuexen Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -84,12 +84,14 @@ capture_info_delete_cb(GtkWidget *w _U_, GdkEvent *event _U_, gpointer data _U_)
 /* create the capture info dialog */
 /* will keep pointers to the fields in the counts parameter */
 void capture_info_create(
-capture_info    *cinfo)
+capture_info    *cinfo,
+gchar           *iface)
 {
   unsigned int      i;
   GtkWidget         *main_vb, *stop_bt, *counts_tb;
   GtkWidget         *counts_fr, *running_tb, *running_label, *bbox;
   capture_info_ui_t *info;
+  gchar             *cap_w_title;
 
   info = g_malloc0(sizeof(capture_info_ui_t));
   info->counts[0].title = "Total";
@@ -117,7 +119,9 @@ capture_info    *cinfo)
   info->counts[11].title = "Other";
   info->counts[11].value_ptr = &(cinfo->counts->other);
 
-  info->cap_w = dlg_window_new("Ethereal: Capture");
+  cap_w_title = g_strdup_printf("Ethereal: Capture - Interface %s", iface);
+
+  info->cap_w = dlg_window_new(cap_w_title);
   gtk_window_set_modal(GTK_WINDOW(info->cap_w), TRUE);
 
   /* Container for capture display widgets */