diff options
Diffstat (limited to 'gtk')
62 files changed, 134 insertions, 127 deletions
diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 97b29ef3df..95d67ff9b3 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -91,7 +91,7 @@ noinst_HEADERS = \ sat.h \ sctp_stat.h \ service_response_time_table.h \ - stat_menu.h \ + gtk_stat_menu.h \ stream_prefs.h \ summary_dlg.h \ supported_protos_dlg.h \ diff --git a/gtk/afp_stat.c b/gtk/afp_stat.c index d0c77a791c..171f0279f9 100644 --- a/gtk/afp_stat.c +++ b/gtk/afp_stat.c @@ -40,7 +40,8 @@ #include <epan/value_string.h> #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include <epan/dissectors/packet-afp.h> #include "../register.h" diff --git a/gtk/ansi_a_stat.c b/gtk/ansi_a_stat.c index c5e9d94535..97edeaa9df 100644 --- a/gtk/ansi_a_stat.c +++ b/gtk/ansi_a_stat.c @@ -41,7 +41,8 @@ #include "epan/epan.h" #include "epan/value_string.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "image/clist_ascend.xpm" #include "image/clist_descend.xpm" #include "simple_dialog.h" diff --git a/gtk/ansi_map_stat.c b/gtk/ansi_map_stat.c index e831708ac6..3f460b8994 100644 --- a/gtk/ansi_map_stat.c +++ b/gtk/ansi_map_stat.c @@ -41,7 +41,8 @@ #include "epan/epan.h" #include "epan/value_string.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "image/clist_ascend.xpm" #include "image/clist_descend.xpm" #include "simple_dialog.h" diff --git a/gtk/bootp_stat.c b/gtk/bootp_stat.c index bf90b5a6cb..539682c7f0 100644 --- a/gtk/bootp_stat.c +++ b/gtk/bootp_stat.c @@ -33,8 +33,6 @@ #include <epan/packet_info.h> #include <epan/epan.h> -#include <epan/stat_cmd_args.h> -#include "stat_menu.h" #include "simple_dialog.h" #include "gui_utils.h" #include "dlg_utils.h" @@ -42,6 +40,7 @@ #include "../register.h" #include "../globals.h" #include "compat_macros.h" +#include "../stat_menu.h" #include "../tap_dfilter_dlg.h" #include "tap_dfilter_dlg.h" @@ -282,8 +281,6 @@ static tap_dfilter_dlg dhcp_stat_dlg = { void register_tap_listener_gtkdhcpstat(void) { - register_stat_cmd_arg("bootp,stat", dhcpstat_init); - - register_stat_menu_item("BOOTP-DHCP", REGISTER_STAT_GROUP_NONE, - gtk_tap_dfilter_dlg_cb, NULL, NULL, &(dhcp_stat_dlg)); + register_dfilter_stat(&dhcp_stat_dlg, "BOOTP-DHCP", + REGISTER_STAT_GROUP_NONE); } diff --git a/gtk/conversations_eth.c b/gtk/conversations_eth.c index af670ff4a9..e582e30a58 100644 --- a/gtk/conversations_eth.c +++ b/gtk/conversations_eth.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "conversations_table.h" diff --git a/gtk/conversations_fc.c b/gtk/conversations_fc.c index 978a68e71f..16e96f4c69 100644 --- a/gtk/conversations_fc.c +++ b/gtk/conversations_fc.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "conversations_table.h" diff --git a/gtk/conversations_fddi.c b/gtk/conversations_fddi.c index cae1be98f0..f27e89a993 100644 --- a/gtk/conversations_fddi.c +++ b/gtk/conversations_fddi.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "conversations_table.h" diff --git a/gtk/conversations_ip.c b/gtk/conversations_ip.c index 5c4f58179d..1ec3e4aa2f 100644 --- a/gtk/conversations_ip.c +++ b/gtk/conversations_ip.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "conversations_table.h" diff --git a/gtk/conversations_ipx.c b/gtk/conversations_ipx.c index ba361a6f7f..00e5393d91 100644 --- a/gtk/conversations_ipx.c +++ b/gtk/conversations_ipx.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "conversations_table.h" diff --git a/gtk/conversations_jxta.c b/gtk/conversations_jxta.c index d28c75a775..210ab4a49e 100644 --- a/gtk/conversations_jxta.c +++ b/gtk/conversations_jxta.c @@ -35,7 +35,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "conversations_table.h" diff --git a/gtk/conversations_sctp.c b/gtk/conversations_sctp.c index 6fd15d8e49..f6ea83df74 100644 --- a/gtk/conversations_sctp.c +++ b/gtk/conversations_sctp.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "conversations_table.h" diff --git a/gtk/conversations_tcpip.c b/gtk/conversations_tcpip.c index d0072b17f8..1cbd3d4adc 100644 --- a/gtk/conversations_tcpip.c +++ b/gtk/conversations_tcpip.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "conversations_table.h" diff --git a/gtk/conversations_tr.c b/gtk/conversations_tr.c index cca32afdcf..8af5f7802b 100644 --- a/gtk/conversations_tr.c +++ b/gtk/conversations_tr.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "conversations_table.h" diff --git a/gtk/conversations_udpip.c b/gtk/conversations_udpip.c index 0163aef051..c8bf2ed70f 100644 --- a/gtk/conversations_udpip.c +++ b/gtk/conversations_udpip.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "conversations_table.h" diff --git a/gtk/conversations_wlan.c b/gtk/conversations_wlan.c index e0a2dda029..3060d5f562 100644 --- a/gtk/conversations_wlan.c +++ b/gtk/conversations_wlan.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "conversations_table.h" diff --git a/gtk/dcerpc_stat.c b/gtk/dcerpc_stat.c index ee67f3ee98..88dca08a66 100644 --- a/gtk/dcerpc_stat.c +++ b/gtk/dcerpc_stat.c @@ -41,7 +41,8 @@ #include <epan/epan.h> #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "simple_dialog.h" #include "dlg_utils.h" #include "gui_utils.h" diff --git a/gtk/fc_stat.c b/gtk/fc_stat.c index 052fed0b0f..f95ebba00f 100644 --- a/gtk/fc_stat.c +++ b/gtk/fc_stat.c @@ -39,7 +39,8 @@ #include <epan/value_string.h> #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include <epan/dissectors/packet-fc.h> #include "../register.h" diff --git a/gtk/flow_graph.c b/gtk/flow_graph.c index 405a4c2b55..978baf18b7 100644 --- a/gtk/flow_graph.c +++ b/gtk/flow_graph.c @@ -34,7 +34,8 @@ #include "graph_analysis.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "dlg_utils.h" #include "gui_utils.h" #include "compat_macros.h" diff --git a/gtk/follow_dlg.c b/gtk/follow_dlg.c index 5288560e69..8765363952 100644 --- a/gtk/follow_dlg.c +++ b/gtk/follow_dlg.c @@ -63,7 +63,6 @@ #include <epan/filesystem.h> #include "compat_macros.h" #include <epan/ipproto.h> -#include "stat_menu.h" #include "print_mswin.h" #include "font_utils.h" diff --git a/gtk/gsm_a_stat.c b/gtk/gsm_a_stat.c index 46eebaf264..2190a627a9 100644 --- a/gtk/gsm_a_stat.c +++ b/gtk/gsm_a_stat.c @@ -41,7 +41,8 @@ #include "epan/epan.h" #include "epan/value_string.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "image/clist_ascend.xpm" #include "image/clist_descend.xpm" #include "simple_dialog.h" diff --git a/gtk/gsm_map_stat.c b/gtk/gsm_map_stat.c index 8d5b32a4c3..d80b4e6dd5 100644 --- a/gtk/gsm_map_stat.c +++ b/gtk/gsm_map_stat.c @@ -41,7 +41,8 @@ #include "epan/epan.h" #include "epan/value_string.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "image/clist_ascend.xpm" #include "image/clist_descend.xpm" #include "simple_dialog.h" diff --git a/gtk/gsm_map_summary.c b/gtk/gsm_map_summary.c index 6cc8fa69e6..3fbc701a01 100644 --- a/gtk/gsm_map_summary.c +++ b/gtk/gsm_map_summary.c @@ -38,7 +38,8 @@ #include "epan/packet_info.h" #include "epan/epan.h" #include "epan/value_string.h" -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "globals.h" #include "file.h" #include "summary.h" diff --git a/gtk/stat_menu.h b/gtk/gtk_stat_menu.h index 43329e8168..fc149a76aa 100644 --- a/gtk/stat_menu.h +++ b/gtk/gtk_stat_menu.h @@ -1,5 +1,5 @@ -/* stat_menu.h - * Menu definitions for use by stats +/* gtk_stat_menu.h + * GTK+-specific menu definitions for use by stats * * $Id$ * @@ -33,17 +33,6 @@ extern "C" { * Add a new menu item for a stat. */ -/** The menu group this stat should be registered in. */ -typedef enum { - REGISTER_STAT_GROUP_NONE, - REGISTER_STAT_GROUP_GENERIC, - REGISTER_STAT_GROUP_CONVERSATION_LIST, - REGISTER_STAT_GROUP_ENDPOINT_LIST, - REGISTER_STAT_GROUP_RESPONSE_TIME, - REGISTER_STAT_GROUP_TELEPHONY - /* XXX - split into telephony and VoIP? */ -} REGISTER_STAT_GROUP_E; - /** * Add a new menu item for a stat. * This must be called after we've created the main menu, so it can't diff --git a/gtk/h225_counter.c b/gtk/h225_counter.c index e94a55266c..38505d9aba 100644 --- a/gtk/h225_counter.c +++ b/gtk/h225_counter.c @@ -39,8 +39,6 @@ #include <epan/epan.h> #include <epan/value_string.h> -#include <epan/stat_cmd_args.h> -#include "stat_menu.h" #include <epan/tap.h> #include "../register.h" #include <epan/dissectors/packet-h225.h> @@ -50,6 +48,7 @@ #include "dlg_utils.h" #include "../file.h" #include "../globals.h" +#include "../stat_menu.h" #include "../tap_dfilter_dlg.h" #include "tap_dfilter_dlg.h" #include "gui_utils.h" @@ -563,8 +562,6 @@ gtk_h225counter_init(const char *optarg) void register_tap_listener_gtk_h225counter(void) { - register_stat_cmd_arg("h225,counter", gtk_h225counter_init); - - register_stat_menu_item("H.225...", REGISTER_STAT_GROUP_TELEPHONY, - gtk_tap_dfilter_dlg_cb, NULL, NULL, &(h225_counter_dlg)); + register_dfilter_stat(&h225_counter_dlg, "H.225...", + REGISTER_STAT_GROUP_TELEPHONY); } diff --git a/gtk/h225_ras_srt.c b/gtk/h225_ras_srt.c index 6203bff88c..6e3ea7c81d 100644 --- a/gtk/h225_ras_srt.c +++ b/gtk/h225_ras_srt.c @@ -39,8 +39,6 @@ #include <epan/epan.h> #include <epan/value_string.h> -#include <epan/stat_cmd_args.h> -#include "stat_menu.h" #include <epan/tap.h> #include "../register.h" #include <epan/dissectors/packet-h225.h> @@ -51,6 +49,7 @@ #include "dlg_utils.h" #include "../file.h" #include "../globals.h" +#include "../stat_menu.h" #include "../tap_dfilter_dlg.h" #include "tap_dfilter_dlg.h" #include "gui_utils.h" @@ -343,8 +342,6 @@ gtk_h225rassrt_init(const char *optarg) void register_tap_listener_gtk_h225rassrt(void) { - register_stat_cmd_arg("h225,srt", gtk_h225rassrt_init); - - register_stat_menu_item("H.225 RAS...", REGISTER_STAT_GROUP_RESPONSE_TIME, - gtk_tap_dfilter_dlg_cb, NULL, NULL, &(h225_rassrt_dlg)); + register_dfilter_stat(&h225_rassrt_dlg, "H.225 RAS...", + REGISTER_STAT_GROUP_RESPONSE_TIME); } diff --git a/gtk/hostlist_eth.c b/gtk/hostlist_eth.c index a5bdaad93f..cca7d01640 100644 --- a/gtk/hostlist_eth.c +++ b/gtk/hostlist_eth.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "hostlist_table.h" diff --git a/gtk/hostlist_fc.c b/gtk/hostlist_fc.c index 8e5cbb3288..c3af37242b 100644 --- a/gtk/hostlist_fc.c +++ b/gtk/hostlist_fc.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "hostlist_table.h" diff --git a/gtk/hostlist_fddi.c b/gtk/hostlist_fddi.c index 9eb82d9b22..ce78f8bd3c 100644 --- a/gtk/hostlist_fddi.c +++ b/gtk/hostlist_fddi.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "hostlist_table.h" diff --git a/gtk/hostlist_ip.c b/gtk/hostlist_ip.c index 370e76216b..67d5fbe11b 100644 --- a/gtk/hostlist_ip.c +++ b/gtk/hostlist_ip.c @@ -36,7 +36,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "hostlist_table.h" diff --git a/gtk/hostlist_ipx.c b/gtk/hostlist_ipx.c index 792d8e4c2d..875f9cd0e0 100644 --- a/gtk/hostlist_ipx.c +++ b/gtk/hostlist_ipx.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "hostlist_table.h" diff --git a/gtk/hostlist_jxta.c b/gtk/hostlist_jxta.c index ca2c053225..ca028f5c94 100644 --- a/gtk/hostlist_jxta.c +++ b/gtk/hostlist_jxta.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "hostlist_table.h" diff --git a/gtk/hostlist_tcpip.c b/gtk/hostlist_tcpip.c index 4daef99b9f..da0edb7054 100644 --- a/gtk/hostlist_tcpip.c +++ b/gtk/hostlist_tcpip.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "hostlist_table.h" diff --git a/gtk/hostlist_tr.c b/gtk/hostlist_tr.c index 81486605cd..4795c70922 100644 --- a/gtk/hostlist_tr.c +++ b/gtk/hostlist_tr.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "hostlist_table.h" diff --git a/gtk/hostlist_udpip.c b/gtk/hostlist_udpip.c index 2d6db2a6e9..d92a414b4d 100644 --- a/gtk/hostlist_udpip.c +++ b/gtk/hostlist_udpip.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "hostlist_table.h" diff --git a/gtk/hostlist_wlan.c b/gtk/hostlist_wlan.c index f57326d3cf..92df1bae64 100644 --- a/gtk/hostlist_wlan.c +++ b/gtk/hostlist_wlan.c @@ -34,7 +34,8 @@ #include <string.h> #include "epan/packet.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "hostlist_table.h" diff --git a/gtk/io_stat.c b/gtk/io_stat.c index 900552e6b7..bb5d6133a2 100644 --- a/gtk/io_stat.c +++ b/gtk/io_stat.c @@ -43,7 +43,8 @@ #include "gtkglobals.h" #include "gui_utils.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "alert_box.h" diff --git a/gtk/ldap_stat.c b/gtk/ldap_stat.c index 83d1e56d73..b0eae13078 100644 --- a/gtk/ldap_stat.c +++ b/gtk/ldap_stat.c @@ -39,7 +39,8 @@ #include <epan/value_string.h> #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include <epan/dissectors/packet-ldap.h> #include "../register.h" diff --git a/gtk/menu.c b/gtk/menu.c index 2379a91b30..58d55a4231 100644 --- a/gtk/menu.c +++ b/gtk/menu.c @@ -32,7 +32,8 @@ #include "main.h" #include "menu.h" -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/packet.h> #include <epan/addr_resolv.h> #include <epan/prefs.h> diff --git a/gtk/mgcp_stat.c b/gtk/mgcp_stat.c index 3349232963..1fc13ff188 100644 --- a/gtk/mgcp_stat.c +++ b/gtk/mgcp_stat.c @@ -39,8 +39,6 @@ #include <epan/epan.h> #include <epan/value_string.h> -#include <epan/stat_cmd_args.h> -#include "stat_menu.h" #include <epan/tap.h> #include "../register.h" #include "../plugins/mgcp/packet-mgcp.h" @@ -51,6 +49,7 @@ #include "dlg_utils.h" #include "../file.h" #include "../globals.h" +#include "../stat_menu.h" #include "../tap_dfilter_dlg.h" #include "tap_dfilter_dlg.h" #include "gui_utils.h" @@ -327,9 +326,7 @@ register_tap_listener_gtkmgcpstat(void) { /* We don't register this tap, if we don't have the mgcp plugin loaded.*/ if (find_tap_id("mgcp")) { - register_stat_cmd_arg("mgcp,srt", gtk_mgcpstat_init); - - register_stat_menu_item("MGCP...", REGISTER_STAT_GROUP_RESPONSE_TIME, - gtk_tap_dfilter_dlg_cb, NULL, NULL, &(mgcp_srt_dlg)); + register_dfilter_stat(&mgcp_srt_dlg, "MGCP...", + REGISTER_STAT_GROUP_RESPONSE_TIME); } } diff --git a/gtk/mtp3_stat.c b/gtk/mtp3_stat.c index c2b2a957a6..afc2a0a1b4 100644 --- a/gtk/mtp3_stat.c +++ b/gtk/mtp3_stat.c @@ -41,7 +41,8 @@ #include "epan/epan.h" #include "epan/value_string.h" #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "image/clist_ascend.xpm" #include "image/clist_descend.xpm" #include "simple_dialog.h" diff --git a/gtk/mtp3_summary.c b/gtk/mtp3_summary.c index bde41d3003..fbbddaf4ef 100644 --- a/gtk/mtp3_summary.c +++ b/gtk/mtp3_summary.c @@ -39,7 +39,8 @@ #include "epan/packet_info.h" #include "epan/epan.h" #include "epan/value_string.h" -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "globals.h" #include "file.h" #include "summary.h" diff --git a/gtk/rpc_progs.c b/gtk/rpc_progs.c index 296e98c121..4db1898e3a 100644 --- a/gtk/rpc_progs.c +++ b/gtk/rpc_progs.c @@ -38,7 +38,8 @@ #include <epan/epan.h> #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../register.h" #include <epan/dissectors/packet-rpc.h> diff --git a/gtk/rpc_stat.c b/gtk/rpc_stat.c index 2edc7d961c..df1fe00faf 100644 --- a/gtk/rpc_stat.c +++ b/gtk/rpc_stat.c @@ -38,7 +38,8 @@ #include <epan/epan.h> #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "simple_dialog.h" #include "gui_utils.h" #include "dlg_utils.h" diff --git a/gtk/rtp_analysis.c b/gtk/rtp_analysis.c index b87bb9d1bd..2686da9e1d 100644 --- a/gtk/rtp_analysis.c +++ b/gtk/rtp_analysis.c @@ -68,7 +68,8 @@ #include "gui_utils.h" #include "alert_box.h" #include "simple_dialog.h" -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "main.h" #include "progress_dlg.h" #include "compat_macros.h" diff --git a/gtk/rtp_stream.c b/gtk/rtp_stream.c index deb90070b7..a003b24c99 100644 --- a/gtk/rtp_stream.c +++ b/gtk/rtp_stream.c @@ -33,7 +33,6 @@ #include "rtp_stream_dlg.h" #include "globals.h" -#include <epan/stat_cmd_args.h> #include <epan/tap.h> #include "register.h" diff --git a/gtk/rtp_stream_dlg.c b/gtk/rtp_stream_dlg.c index adfc3f128d..5d16c3925f 100644 --- a/gtk/rtp_stream_dlg.c +++ b/gtk/rtp_stream_dlg.c @@ -36,7 +36,8 @@ #include "globals.h" #include "epan/filesystem.h" -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "dlg_utils.h" #include "gui_utils.h" #include "compat_macros.h" diff --git a/gtk/sctp_assoc_analyse.c b/gtk/sctp_assoc_analyse.c index 40bba3d243..d14b7c98f0 100644 --- a/gtk/sctp_assoc_analyse.c +++ b/gtk/sctp_assoc_analyse.c @@ -33,7 +33,8 @@ #include <epan/epan_dissect.h> #include "epan/filesystem.h" #include "register.h" -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "dlg_utils.h" #include "gui_utils.h" #include "main.h" diff --git a/gtk/sctp_byte_graph_dlg.c b/gtk/sctp_byte_graph_dlg.c index 52baa680cb..1d1dd7539b 100644 --- a/gtk/sctp_byte_graph_dlg.c +++ b/gtk/sctp_byte_graph_dlg.c @@ -35,7 +35,6 @@ #include "globals.h" #include "epan/filesystem.h" #include "../color.h" -#include "stat_menu.h" #include "dlg_utils.h" #include "gui_utils.h" #include "main.h" diff --git a/gtk/sctp_chunk_stat.c b/gtk/sctp_chunk_stat.c index f425f47396..ea8252dc85 100644 --- a/gtk/sctp_chunk_stat.c +++ b/gtk/sctp_chunk_stat.c @@ -40,8 +40,6 @@ #include <epan/epan.h> #include <epan/value_string.h> -#include <epan/stat_cmd_args.h> -#include "stat_menu.h" #include <epan/tap.h> #include "../register.h" #include <epan/dissectors/packet-sctp.h> @@ -51,6 +49,7 @@ #include "dlg_utils.h" #include "../file.h" #include "../globals.h" +#include "../stat_menu.h" #include "../tap_dfilter_dlg.h" #include "tap_dfilter_dlg.h" #include "gui_utils.h" @@ -345,8 +344,6 @@ sctpstat_init(const char *optarg) void register_tap_listener_sctpstat(void) { - register_stat_cmd_arg("sctp,stat", sctpstat_init); - - register_stat_menu_item("SCTP/Chunk Counter", REGISTER_STAT_GROUP_TELEPHONY, - gtk_tap_dfilter_dlg_cb, NULL, NULL, &(sctp_stat_dlg)); + register_dfilter_stat(&sctp_stat_dlg, "SCTP/Chunk Counter", + REGISTER_STAT_GROUP_TELEPHONY); } diff --git a/gtk/sctp_chunk_stat_dlg.c b/gtk/sctp_chunk_stat_dlg.c index 80c47494f4..646b40030a 100644 --- a/gtk/sctp_chunk_stat_dlg.c +++ b/gtk/sctp_chunk_stat_dlg.c @@ -35,7 +35,6 @@ #include "image/clist_ascend.xpm" #include "image/clist_descend.xpm" -#include "stat_menu.h" #include "dlg_utils.h" #include "gui_utils.h" #include "main.h" diff --git a/gtk/sctp_error_dlg.c b/gtk/sctp_error_dlg.c index 6f72eab3da..1eb37abf7a 100644 --- a/gtk/sctp_error_dlg.c +++ b/gtk/sctp_error_dlg.c @@ -31,7 +31,6 @@ #include "globals.h" #include "epan/filesystem.h" #include "simple_dialog.h" -#include "stat_menu.h" #include "dlg_utils.h" #include "gui_utils.h" #include "main.h" diff --git a/gtk/sctp_graph_dlg.c b/gtk/sctp_graph_dlg.c index 7bb7a92768..bcfcec13e8 100644 --- a/gtk/sctp_graph_dlg.c +++ b/gtk/sctp_graph_dlg.c @@ -35,7 +35,6 @@ #include "globals.h" #include "epan/filesystem.h" #include "../color.h" -#include "stat_menu.h" #include "dlg_utils.h" #include "gui_utils.h" #include "main.h" diff --git a/gtk/sctp_stat.c b/gtk/sctp_stat.c index 57c052970b..5599ac41b7 100644 --- a/gtk/sctp_stat.c +++ b/gtk/sctp_stat.c @@ -32,8 +32,6 @@ #include "globals.h" #include "epan/packet_info.h" /* Needed for packet_info */ #include <epan/tap.h> /* Needed for register_tap_listener */ -#include <epan/stat_cmd_args.h> -#include "stat_menu.h" #include "dlg_utils.h" #include "compat_macros.h" #include "register.h" @@ -1445,12 +1443,6 @@ const sctp_allassocs_info_t* sctp_stat_get_info(void) } -static void -gtk_sctpstat_init(const char *dummy _U_) -{ - -} - static void sctp_update(void *dummy _U_) { if (get_stat_dlg()!=NULL) @@ -1464,7 +1456,6 @@ register_tap_listener_sctp_stat(void) if (!sctp_tapinfo_struct.is_registered) { - register_stat_cmd_arg("sctp",gtk_sctpstat_init); if ((error_string = register_tap_listener("sctp", &sctp_tapinfo_struct, NULL, reset, packet, sctp_update))) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, error_string->str); g_string_free(error_string, TRUE); diff --git a/gtk/sctp_stat_dlg.c b/gtk/sctp_stat_dlg.c index 1591a88d13..77067c48a6 100644 --- a/gtk/sctp_stat_dlg.c +++ b/gtk/sctp_stat_dlg.c @@ -35,7 +35,8 @@ #include "image/clist_ascend.xpm" #include "image/clist_descend.xpm" -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "dlg_utils.h" #include "gui_utils.h" #include "main.h" diff --git a/gtk/sip_stat.c b/gtk/sip_stat.c index e838fb6a17..3618a720ce 100644 --- a/gtk/sip_stat.c +++ b/gtk/sip_stat.c @@ -34,8 +34,6 @@ #include <epan/packet_info.h> #include <epan/epan.h> -#include <epan/stat_cmd_args.h> -#include "stat_menu.h" #include "simple_dialog.h" #include "gui_utils.h" #include "dlg_utils.h" @@ -44,6 +42,7 @@ #include <epan/dissectors/packet-sip.h> #include "../globals.h" #include "compat_macros.h" +#include "../stat_menu.h" #include "../tap_dfilter_dlg.h" #include "tap_dfilter_dlg.h" @@ -663,8 +662,5 @@ static tap_dfilter_dlg sip_stat_dlg = { void register_tap_listener_gtksipstat(void) { - register_stat_cmd_arg("sip,stat", gtk_sipstat_init); - - register_stat_menu_item("SIP", REGISTER_STAT_GROUP_TELEPHONY, - gtk_tap_dfilter_dlg_cb, NULL, NULL, &(sip_stat_dlg)); + register_dfilter_stat(&sip_stat_dlg, "SIP", REGISTER_STAT_GROUP_TELEPHONY); } diff --git a/gtk/smb_stat.c b/gtk/smb_stat.c index b9aace599f..8958af985d 100644 --- a/gtk/smb_stat.c +++ b/gtk/smb_stat.c @@ -39,7 +39,8 @@ #include <epan/value_string.h> #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include <epan/tap.h> #include "../smb.h" #include "../register.h" diff --git a/gtk/stats_tree_stat.c b/gtk/stats_tree_stat.c index babd2048c1..34c5552790 100644 --- a/gtk/stats_tree_stat.c +++ b/gtk/stats_tree_stat.c @@ -34,11 +34,10 @@ #include "simple_dialog.h" #include "globals.h" -#include <epan/stat_cmd_args.h> -#include "stat_menu.h" #include "gui_utils.h" #include "dlg_utils.h" #include "compat_macros.h" +#include "../stat_menu.h" #include "tap_dfilter_dlg.h" #include "../tap_dfilter_dlg.h" @@ -367,12 +366,7 @@ static void init_gtk_tree(const char* optarg) { static void register_gtk_stats_tree_tap (gpointer k _U_, gpointer v, gpointer p _U_) { stats_tree_cfg* cfg = v; - guint8* s; - s = g_strdup_printf("%s,tree",cfg->abbr); - - register_stat_cmd_arg(s, init_gtk_tree); - cfg->pr = g_malloc(sizeof(tree_pres)); cfg->pr->stat_dlg = g_malloc(sizeof(tap_dfilter_dlg)); @@ -382,8 +376,8 @@ static void register_gtk_stats_tree_tap (gpointer k _U_, gpointer v, gpointer p cfg->pr->stat_dlg->tap_init_cb = init_gtk_tree; cfg->pr->stat_dlg->index = -1; - register_stat_menu_item(cfg->name, REGISTER_STAT_GROUP_NONE, - gtk_tap_dfilter_dlg_cb, NULL, NULL, cfg->pr->stat_dlg); + register_dfilter_stat(cfg->pr->stat_dlg, cfg->name, + REGISTER_STAT_GROUP_NONE); } static void free_tree_presentation(stats_tree* st) { diff --git a/gtk/tap_dfilter_dlg.c b/gtk/tap_dfilter_dlg.c index 262bc09ac7..5f937115bb 100644 --- a/gtk/tap_dfilter_dlg.c +++ b/gtk/tap_dfilter_dlg.c @@ -42,6 +42,9 @@ #include "../file.h" #include "../globals.h" #include "filter_dlg.h" +#include <epan/stat_cmd_args.h> +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "../tap_dfilter_dlg.h" #include "tap_dfilter_dlg.h" #include "gui_utils.h" @@ -60,6 +63,20 @@ static tap_dfilter_dlg_list_item *start_dlg_list=NULL; static tap_dfilter_dlg_list_item *end_dlg_list=NULL; static tap_dfilter_dlg_list_item *current_dlg = NULL; +/* + * Register a stat that has a display filter dialog. + * We register it both as a command-line stat and a menu item stat. + */ +void +register_dfilter_stat(tap_dfilter_dlg *info, const char *name, + REGISTER_STAT_GROUP_E group) +{ + register_stat_cmd_arg(info->init_string, info->tap_init_cb); + + register_stat_menu_item(name, group, gtk_tap_dfilter_dlg_cb, NULL, + NULL, info); +} + void tap_dfilter_dlg_update (void) { tap_dfilter_dlg_list_item *dialog = start_dlg_list; diff --git a/gtk/tcp_graph.c b/gtk/tcp_graph.c index a414c51135..951f6012f7 100644 --- a/gtk/tcp_graph.c +++ b/gtk/tcp_graph.c @@ -45,10 +45,11 @@ #include "ppptypes.h" #include "dlg_utils.h" #include <epan/epan_dissect.h> -#include "stat_menu.h" -#include "../epan/dissectors/packet-tcp.h" -#include "../epan/address.h" -#include "../epan/tap.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" +#include <epan/dissectors/packet-tcp.h> +#include <epan/address.h> +#include <epan/tap.h> #define TH_FIN 0x01 #define TH_SYN 0x02 diff --git a/gtk/voip_calls_dlg.c b/gtk/voip_calls_dlg.c index a1c14cd1fe..69ea75a2f0 100644 --- a/gtk/voip_calls_dlg.c +++ b/gtk/voip_calls_dlg.c @@ -51,7 +51,8 @@ #include <epan/tap.h> #include <epan/stat_cmd_args.h> -#include "stat_menu.h" +#include "../stat_menu.h" +#include "gtk_stat_menu.h" #include "dlg_utils.h" #include "gui_utils.h" #include "compat_macros.h" diff --git a/gtk/wsp_stat.c b/gtk/wsp_stat.c index f3bb4ce36d..e4a0078264 100644 --- a/gtk/wsp_stat.c +++ b/gtk/wsp_stat.c @@ -34,8 +34,6 @@ #include <epan/packet_info.h> #include <epan/epan.h> -#include <epan/stat_cmd_args.h> -#include "stat_menu.h" #include "simple_dialog.h" #include "gui_utils.h" #include "dlg_utils.h" @@ -44,6 +42,7 @@ #include "../globals.h" #include "compat_macros.h" #include <epan/dissectors/packet-wsp.h> +#include "../stat_menu.h" #include "../tap_dfilter_dlg.h" #include "tap_dfilter_dlg.h" @@ -426,8 +425,6 @@ static tap_dfilter_dlg wsp_stat_dlg = { void register_tap_listener_gtkwspstat(void) { - register_stat_cmd_arg("wsp,stat", gtk_wspstat_init); - - register_stat_menu_item("WAP-WSP...", REGISTER_STAT_GROUP_TELEPHONY, - gtk_tap_dfilter_dlg_cb, NULL, NULL, &(wsp_stat_dlg)); + register_dfilter_stat(&wsp_stat_dlg, "WAP-WSP...", + REGISTER_STAT_GROUP_TELEPHONY); } |