diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-01-16 02:48:41 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-01-16 02:48:41 +0000 |
commit | 709b556a788fe29ecbc5fa8b74f7eaed8384a345 (patch) | |
tree | 20a1243e5bc7654bfccddf5cb63105fdfdb3b9b1 /capture.c | |
parent | 7af9548d90ead31fe59ea2f35948706897d177d1 (diff) | |
download | wireshark-709b556a788fe29ecbc5fa8b74f7eaed8384a345.tar.gz wireshark-709b556a788fe29ecbc5fa8b74f7eaed8384a345.tar.bz2 wireshark-709b556a788fe29ecbc5fa8b74f7eaed8384a345.zip |
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.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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; } |