aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2012-09-15 13:58:57 +0000
committerEvan Huus <eapache@gmail.com>2012-09-15 13:58:57 +0000
commitdd01cc049038b934c19a33c4d2d01082ee58ca67 (patch)
tree7107823e4712007d0b58a472742471c52940d6e3 /ui
parent5a7af5d6d96c647d75be8fb0f57e9bbe3e530fb2 (diff)
From Niels Widger via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7725
Add get_filter method to Wireshark's Lua interface (to correspond with the already-exposed set_filter method). svn path=/trunk/; revision=44916
Diffstat (limited to 'ui')
-rw-r--r--ui/cli/tap-funnel.c6
-rw-r--r--ui/gtk/funnel_stat.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/ui/cli/tap-funnel.c b/ui/cli/tap-funnel.c
index 79d6ef33c8..0326ca874d 100644
--- a/ui/cli/tap-funnel.c
+++ b/ui/cli/tap-funnel.c
@@ -30,6 +30,11 @@
#include "config.h"
#endif
+#include <glib.h>
+#include <wiretap/wtap.h>
+#include <epan/nstime.h>
+#include <epan/proto.h>
+
#include <epan/funnel.h>
#include <stdio.h>
#include <epan/stat_cmd_args.h>
@@ -112,6 +117,7 @@ static const funnel_ops_t funnel_ops = {
NULL,
NULL,
NULL,
+ NULL,
NULL
};
diff --git a/ui/gtk/funnel_stat.c b/ui/gtk/funnel_stat.c
index 083899390d..03795efbec 100644
--- a/ui/gtk/funnel_stat.c
+++ b/ui/gtk/funnel_stat.c
@@ -468,6 +468,10 @@ static void funnel_new_dialog(const gchar* title,
gtk_widget_show(win);
}
+static gchar * funnel_get_filter(void) {
+ return (gchar *)gtk_entry_get_text(GTK_ENTRY(main_display_filter_widget));
+}
+
static void funnel_set_filter(const char* filter_string) {
gtk_entry_set_text(GTK_ENTRY(main_display_filter_widget), filter_string);
}
@@ -571,6 +575,7 @@ static const funnel_ops_t funnel_ops = {
funnel_logger,
funnel_retap_packets,
copy_to_clipboard,
+ funnel_get_filter,
funnel_set_filter,
funnel_set_color_filter_slot,
funnel_open_file,