aboutsummaryrefslogtreecommitdiffstats
path: root/capture_ui_utils.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2010-04-01 21:55:01 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2010-04-01 21:55:01 +0000
commit734b51599ef4981aa341330a5c60a5e52e8807c7 (patch)
treeff46a91b7d856f44d11317046d270906f9b538ef /capture_ui_utils.c
parent302cfefe80cf784a353238fbbb1692ce461fcb20 (diff)
Keep a copy of the interface description and capture filter around so that
we can use it in the main window title during and after capture. Add a "-X" option for providing a description for stdin. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32357 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture_ui_utils.c')
-rw-r--r--capture_ui_utils.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/capture_ui_utils.c b/capture_ui_utils.c
index f64e638993..f6ff8c3fb8 100644
--- a/capture_ui_utils.c
+++ b/capture_ui_utils.c
@@ -34,7 +34,8 @@
#include <ctype.h>
#include <glib.h>
-#include <epan/prefs.h>
+#include "epan/prefs.h"
+#include "epan/ex-opt.h"
#include "capture_ifinfo.h"
#include "capture_ui_utils.h"
@@ -155,6 +156,11 @@ get_interface_descriptive_name(const char *if_name)
if (descr != NULL) {
/* Yes - make a copy of that. */
descr = g_strdup(descr);
+ } else if (strcmp(if_name, "-") == 0) {
+ descr = g_strdup(ex_opt_get_nth("stdin_descr", 0));
+ if (!descr) {
+ descr = g_strdup("Standard input");
+ }
} else {
/* No, we don't have a user-supplied description; did we get
one from the OS or libpcap? */