Bodo Petermann <bp245[AT]hotmail.com>
Martin Kupec <martin.kupec[AT]kupson.cz>
Litao Gao <ltgao[AT]juniper.net>
+Niels Widger <niels[AT]qacafe.com>
Dan Lasley <dlasley[AT]promus.com> gave permission for his
dumpit() hex-dump routine to be used.
void (*retap_packets)(void);
void (*copy_to_clipboard)(GString *str);
+ gchar * (*get_filter)(void);
void (*set_filter)(const char*);
void (*set_color_filter_slot)(guint8 flit_nr, const gchar* filter);
gboolean (*open_file)(const char* fname, const char* filter, const char** error);
}
}
+WSLUA_FUNCTION wslua_get_filter(lua_State* L) { /* Get the main filter text */
+ const char *filter_str = NULL;
+
+ if (!ops->get_filter) {
+ WSLUA_ERROR(get_filter, "GUI not available");
+ }
+
+ filter_str = ops->get_filter();
+ lua_pushstring(L,filter_str);
+
+ return 1;
+}
+
WSLUA_FUNCTION wslua_set_filter(lua_State* L) { /* Set the main filter text */
#define WSLUA_ARG_set_filter_TEXT 1 /* The filter's text. */
const char* filter_str = luaL_checkstring(L,WSLUA_ARG_set_filter_TEXT);
#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>
NULL,
NULL,
NULL,
+ NULL,
NULL
};
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);
}
funnel_logger,
funnel_retap_packets,
copy_to_clipboard,
+ funnel_get_filter,
funnel_set_filter,
funnel_set_color_filter_slot,
funnel_open_file,