aboutsummaryrefslogtreecommitdiffstats
path: root/capture.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-01-16 02:48:41 +0000
committerGuy Harris <guy@alum.mit.edu>2005-01-16 02:48:41 +0000
commit709b556a788fe29ecbc5fa8b74f7eaed8384a345 (patch)
tree20a1243e5bc7654bfccddf5cb63105fdfdb3b9b1 /capture.c
parent7af9548d90ead31fe59ea2f35948706897d177d1 (diff)
Use a more descriptive name, if available, for the network interface in
window titles even on UN*X, and if the user's specified a description for an interface, use that rather than the description supplied by libpcap. Put the interface name into the main window title when doing a live capture. svn path=/trunk/; revision=13060
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/capture.c b/capture.c
index 39e8786417..d1f3c03c56 100644
--- a/capture.c
+++ b/capture.c
@@ -55,6 +55,7 @@
#include "file.h"
#include "capture.h"
#include "capture_sync.h"
+#include "capture_combo_utils.h"
#include "util.h"
#include "pcap-util.h"
#include "alert_box.h"
@@ -145,24 +146,27 @@ do_capture(capture_options *capture_opts, const char *save_file)
{
gboolean is_tempfile;
gboolean ret;
-
+ gchar *title;
/* open the output file (temporary/specified name/ringbuffer) and close the old one */
if(!capture_open_output(capture_opts, save_file, &is_tempfile)) {
return FALSE;
}
+ title = g_strdup_printf("%s: Capturing - Ethereal",
+ get_interface_descriptive_name(cfile.iface));
if (capture_opts->sync_mode) {
/* sync mode: do the capture in a child process */
ret = sync_pipe_do_capture(capture_opts, is_tempfile);
/* capture is still running */
- set_main_window_name("(Live Capture in Progress) - Ethereal");
+ set_main_window_name(title);
} else {
/* normal mode: do the capture synchronously */
- set_main_window_name("(Live Capture in Progress) - Ethereal");
+ set_main_window_name(title);
ret = normal_do_capture(capture_opts, is_tempfile);
/* capture is finished here */
}
+ g_free(title);
return ret;
}