Move the APIs for registering and processing "-z" command-line arguments
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 19 Aug 2005 09:29:41 +0000 (09:29 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 19 Aug 2005 09:29:41 +0000 (09:29 +0000)
and "Statistics" menu items into "stat.h" and "stat.c", to separate them
from the core tapping APIs.  A tap could conceivably not register as a
"-z" command-line argument or "Statistics" menu item, and a stat could
conceivably not be implemented as a tap, and dissectors that implement
tapping points don't need the UI-related stuff from "stat.h", they just
want the tap-related stuff in <epan/tap.h>.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15427 f5534014-38df-0310-8fa8-9805f1628bb7

89 files changed:
Makefile.common
epan/libethereal.def
epan/tap.c
epan/tap.h
gtk/Makefile.am
gtk/ansi_a_stat.c
gtk/ansi_map_stat.c
gtk/bootp_stat.c
gtk/conversations_eth.c
gtk/conversations_fc.c
gtk/conversations_fddi.c
gtk/conversations_ip.c
gtk/conversations_ipx.c
gtk/conversations_jxta.c
gtk/conversations_sctp.c
gtk/conversations_tcpip.c
gtk/conversations_tr.c
gtk/conversations_udpip.c
gtk/conversations_wlan.c
gtk/dcerpc_stat.c
gtk/fc_stat.c
gtk/flow_graph.c
gtk/follow_dlg.c
gtk/gsm_a_stat.c
gtk/gsm_map_stat.c
gtk/gsm_map_summary.c
gtk/h225_counter.c
gtk/h225_ras_srt.c
gtk/hostlist_eth.c
gtk/hostlist_fc.c
gtk/hostlist_fddi.c
gtk/hostlist_ip.c
gtk/hostlist_ipx.c
gtk/hostlist_jxta.c
gtk/hostlist_tcpip.c
gtk/hostlist_tr.c
gtk/hostlist_udpip.c
gtk/hostlist_wlan.c
gtk/io_stat.c
gtk/ldap_stat.c
gtk/main.c
gtk/menu.c
gtk/mgcp_stat.c
gtk/mtp3_stat.c
gtk/mtp3_summary.c
gtk/rpc_progs.c
gtk/rpc_stat.c
gtk/rtp_analysis.c
gtk/rtp_stream.c
gtk/rtp_stream_dlg.c
gtk/sctp_assoc_analyse.c
gtk/sctp_byte_graph_dlg.c
gtk/sctp_chunk_stat.c
gtk/sctp_chunk_stat_dlg.c
gtk/sctp_error_dlg.c
gtk/sctp_graph_dlg.c
gtk/sctp_stat.c
gtk/sctp_stat_dlg.c
gtk/sip_stat.c
gtk/smb_stat.c
gtk/stat_menu.h [moved from gtk/tap_menu.h with 68% similarity]
gtk/stats_tree_stat.c
gtk/tcp_graph.c
gtk/voip_calls_dlg.c
gtk/wsp_stat.c
stat.c [new file with mode: 0644]
stat.h [new file with mode: 0644]
tap-ansi_astat.c
tap-bootpstat.c
tap-dcerpcstat.c
tap-gsm_astat.c
tap-h225counter.c
tap-h225rassrt.c
tap-httpstat.c
tap-iostat.c
tap-iousers.c
tap-mgcpstat.c
tap-protocolinfo.c
tap-protohierstat.c
tap-rpcprogs.c
tap-rpcstat.c
tap-sctpchunkstat.c
tap-sipstat.c
tap-smbsids.c
tap-smbstat.c
tap-stats_tree.c
tap-wspstat.c
tap_dfilter_dlg.h
tethereal.c

index cf43eb6d3af3d4b6c3a43832fc911234f6b09ef1..bc4db2cf03bb6ab1f0daaefe3a6b5cdfcef44543 100644 (file)
@@ -82,6 +82,7 @@ ETHEREAL_COMMON_SRC = \
        print.c \
        ps.c    \
        ringbuffer.c    \
+       stat.c  \
        timestats.c     \
        util.c  \
        version_info.c
@@ -106,6 +107,7 @@ ETHEREAL_COMMON_INCLUDES =  \
        ps.h    \
        register.h      \
        ringbuffer.h    \
+       stat.h  \
        timestats.h     \
        util.h  \
        version_info.h
index d3b8cd9368d0e4cf60c8b50e07e3e381c83aa347..1ab118cec6b1f307f866d720282f3597c47a7d81 100644 (file)
@@ -339,7 +339,6 @@ isup_message_type_value         DATA
 isup_message_type_value_acro    DATA
 is_big_endian
 is_tpkt
-list_tap_cmd_args
 LocationRejectReason_vals       DATA
 match_strval
 match_strval_idx
@@ -370,7 +369,6 @@ prefs_register_string_preference
 prefs_register_uint_preference
 prefs_set_pref
 process_reassembled_data
-process_tap_cmd_arg
 protocols_module                DATA
 proto_can_match_selected
 proto_can_toggle_protocol
@@ -492,7 +490,6 @@ register_init_routine
 register_postseq_cleanup_routine
 register_tap
 register_tap_listener
-register_tap_listener_cmd_arg
 RegistrationRejectReason_vals   DATA
 ReleaseCompleteReason_vals      DATA
 remove_tap_listener
@@ -522,7 +519,6 @@ sid_name_snooping               DATA
 sid_name_table                  DATA
 smb_cmd_vals                    DATA
 sminmpec_values                 DATA
-start_requested_taps
 stats_tree_branch_max_namelen
 stats_tree_branch_to_str
 stats_tree_create_node
index 14f100c195f413e3251b9136b63e1b6fe977f9aa..2b8dd1da2079e7f09f689a671ba076ffd8f21106 100644 (file)
@@ -79,25 +79,6 @@ typedef struct _tap_listener_t {
 } tap_listener_t;
 static volatile tap_listener_t *tap_listener_queue=NULL;
 
-/* structure to keep track of what tap listeners have registered
-   command-line arguments.
- */
-typedef struct _tap_cmd_arg {
-       struct _tap_cmd_arg *next;
-       const char *cmd;
-       void (*func)(const char *arg);
-} tap_cmd_arg;
-static tap_cmd_arg *tap_cmd_arg_list=NULL;
-
-/* structure to keep track of what taps have been specified on the
-   command line.
- */
-typedef struct {
-       tap_cmd_arg *tca;
-       char *arg;
-} tap_requested;
-static GSList *taps_requested = NULL;
-
 /* **********************************************************************
  * Init routine only called from epan at application startup
  * ********************************************************************** */
@@ -112,73 +93,6 @@ tap_init(void)
        return;
 }
 
-/* **********************************************************************
- * Function called from tap to register the tap's command-line argument
- * and initialization routine
- * ********************************************************************** */
-void
-register_tap_listener_cmd_arg(const char *cmd, void (*func)(const char *arg))
-{
-       tap_cmd_arg *newtca;
-
-       newtca=g_malloc(sizeof(tap_cmd_arg));
-       newtca->next=tap_cmd_arg_list;
-       tap_cmd_arg_list=newtca;
-       newtca->cmd=cmd;
-       newtca->func=func;
-}
-
-/* **********************************************************************
- * Function called for a tap command-line argument
- * ********************************************************************** */
-gboolean
-process_tap_cmd_arg(char *optarg)
-{
-       tap_cmd_arg *tca;
-       tap_requested *tr;
-
-       for(tca=tap_cmd_arg_list;tca;tca=tca->next){
-               if(!strncmp(tca->cmd,optarg,strlen(tca->cmd))){
-                       tr=g_malloc(sizeof (tap_requested));
-                       tr->tca = tca;
-                       tr->arg=g_strdup(optarg);
-                       taps_requested=g_slist_append(taps_requested, tr);
-                       return TRUE;
-               }
-       }
-       return FALSE;
-}
-
-/* **********************************************************************
- * Function to list all possible tap command-line arguments
- * ********************************************************************** */
-void
-list_tap_cmd_args(void)
-{
-       tap_cmd_arg *tca;
-
-       for(tca=tap_cmd_arg_list;tca;tca=tca->next){
-               fprintf(stderr,"     %s\n",tca->cmd);
-       }
-}
-
-/* **********************************************************************
- * Function to process taps requested with command-line arguments
- * ********************************************************************** */
-void
-start_requested_taps(void)
-{
-       tap_requested *tr;
-
-       while(taps_requested){
-               tr=taps_requested->data;
-               (*tr->tca->func)(tr->arg);
-               g_free(tr->arg);
-               g_free(tr);
-               taps_requested=g_slist_remove(taps_requested, tr);
-       }
-}
-
 /* **********************************************************************
  * Functions called from dissector when made tappable
  * ********************************************************************** */
index c37dd450dbf27241a6c6e5391f60924f9dbb8368..9fc8233b46ac772250ccb814d67dd4ac252c39c3 100644 (file)
@@ -38,11 +38,6 @@ typedef void (*tap_draw_cb)(void *tapdata);
 
 
 extern void tap_init(void);
-extern void register_tap_listener_cmd_arg(const char *cmd,
-    void (*func)(const char *arg));
-extern gboolean process_tap_cmd_arg(char *optarg);
-extern void list_tap_cmd_args(void);
-extern void start_requested_taps(void);
 extern int register_tap(const char *name);
 extern int find_tap_id(const char *name);
 extern void tap_queue_packet(int tap_id, packet_info *pinfo, const void *tap_specific_data);
index 45b5db19054f6333b178a9a098f184ec7a56e583..f91adfe53e406c5daed6279b9ceb228b3630a12b 100644 (file)
@@ -89,11 +89,11 @@ noinst_HEADERS = \
        sat.h           \
        sctp_stat.h     \
        service_response_time_table.h   \
+       stat_menu.h     \
        stream_prefs.h  \
        summary_dlg.h   \
        supported_protos_dlg.h   \
        tap_dfilter_dlg.h \
-       tap_menu.h      \
        text_page.h     \
        toolbar.h       \
        ui_util.h       \
index b4550ad6ab50b759a1f6b9249d989ae025b8e9a3..eafe9f5a802b64e8f02d8328f69c853d873f5fda 100644 (file)
@@ -40,7 +40,8 @@
 #include "epan/packet_info.h"
 #include "epan/epan.h"
 #include "epan/value_string.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "image/clist_ascend.xpm"
 #include "image/clist_descend.xpm"
 #include "simple_dialog.h"
@@ -458,7 +459,7 @@ register_tap_listener_gtkansi_a_stat(void)
     GString            *err_p;
 
 
-    register_tap_listener_cmd_arg("ansi_a,", ansi_a_stat_gtk_init);
+    register_stat_cmd_arg("ansi_a,", ansi_a_stat_gtk_init);
 
     memset((void *) &stat, 0, sizeof(ansi_a_stat_t));
 
@@ -476,8 +477,8 @@ register_tap_listener_gtkansi_a_stat(void)
        exit(1);
     }
 
-    register_tap_menu_item("ANSI/A-Interface BSMAP", REGISTER_TAP_GROUP_TELEPHONY, 
+    register_stat_menu_item("ANSI/A-Interface BSMAP", REGISTER_STAT_GROUP_TELEPHONY, 
         ansi_a_stat_gtk_bsmap_cb, NULL, NULL ,NULL);
-    register_tap_menu_item("ANSI/A-Interface DTAP", REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("ANSI/A-Interface DTAP", REGISTER_STAT_GROUP_TELEPHONY,
         ansi_a_stat_gtk_dtap_cb, NULL, NULL ,NULL);
 }
index 764cdb78c81fe23cbee972b8291e31dace12e4e0..ab54d4d957dc87b62fc1ff40613f5231a0e2b261 100644 (file)
@@ -40,7 +40,8 @@
 #include "epan/packet_info.h"
 #include "epan/epan.h"
 #include "epan/value_string.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "image/clist_ascend.xpm"
 #include "image/clist_descend.xpm"
 #include "simple_dialog.h"
@@ -422,7 +423,7 @@ register_tap_listener_gtkansi_map_stat(void)
     GString            *err_p;
 
 
-    register_tap_listener_cmd_arg("ansi_map,", ansi_map_stat_gtk_init);
+    register_stat_cmd_arg("ansi_map,", ansi_map_stat_gtk_init);
 
     memset((void *) &stat, 0, sizeof(ansi_map_stat_t));
 
@@ -440,6 +441,6 @@ register_tap_listener_gtkansi_map_stat(void)
        exit(1);
     }
 
-    register_tap_menu_item("ANSI/MAP Operation", REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("ANSI/MAP Operation", REGISTER_STAT_GROUP_TELEPHONY,
         ansi_map_stat_gtk_cb, NULL, NULL, NULL);
 }
index 54df43e2cb64faecfada754547753e16e47f874e..a63b300016da912ba1470c4ad1f2d0ccf6d688cd 100644 (file)
@@ -33,7 +33,8 @@
 #include <epan/packet_info.h>
 #include <epan/epan.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "simple_dialog.h"
 #include "ui_util.h"
 #include "dlg_utils.h"
@@ -281,8 +282,8 @@ static tap_dfilter_dlg dhcp_stat_dlg = {
 void
 register_tap_listener_gtkdhcpstat(void)
 {
-       register_tap_listener_cmd_arg("bootp,stat", dhcpstat_init);
+       register_stat_cmd_arg("bootp,stat", dhcpstat_init);
 
-       register_tap_menu_item("BOOTP-DHCP", REGISTER_TAP_GROUP_NONE,
+       register_stat_menu_item("BOOTP-DHCP", REGISTER_STAT_GROUP_NONE,
            gtk_tap_dfilter_dlg_cb, NULL, NULL, &(dhcp_stat_dlg));
 }
index 262590b3b438efb60398ff7e76ab1b4b89df986a..0b1a34bd44cf483d670ee03d2321f92b54d77c40 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "conversations_table.h"
@@ -78,9 +79,9 @@ eth_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_eth_conversation(void)
 {
-       register_tap_listener_cmd_arg("conv,eth", eth_conversation_init);
+       register_stat_cmd_arg("conv,eth", eth_conversation_init);
 
-       register_tap_menu_item("Ethernet", REGISTER_TAP_GROUP_CONVERSATION_LIST,
+       register_stat_menu_item("Ethernet", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            eth_endpoints_cb, NULL, NULL, NULL);
 
        register_conversation_table(TRUE, "Ethernet", "eth", NULL /*filter*/, eth_conversation_packet);
index ed4e12e1e07ef554a16c75a2cebc8eb7c0f36150..70acf6d683731d9de8eb73ee668a4318a5232e19 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "conversations_table.h"
@@ -78,9 +79,9 @@ fc_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_fc_conversation(void)
 {
-       register_tap_listener_cmd_arg("conv,fc", fc_conversation_init);
+       register_stat_cmd_arg("conv,fc", fc_conversation_init);
 
-       register_tap_menu_item("Fibre Channel", REGISTER_TAP_GROUP_CONVERSATION_LIST,
+       register_stat_menu_item("Fibre Channel", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            fc_endpoints_cb, NULL, NULL, NULL);
 
        register_conversation_table(TRUE, "Fibre Channel", "fc", NULL /*filter*/, fc_conversation_packet);
index 135d03865deb04bf7fb8c50e7d5a1e3f97457851..0551e1c564bc2ae592ceadf95f2fec861e733d82 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "conversations_table.h"
@@ -78,9 +79,9 @@ fddi_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_fddi_conversation(void)
 {
-       register_tap_listener_cmd_arg("conv,fddi", fddi_conversation_init);
+       register_stat_cmd_arg("conv,fddi", fddi_conversation_init);
 
-       register_tap_menu_item("FDDI", REGISTER_TAP_GROUP_CONVERSATION_LIST,
+       register_stat_menu_item("FDDI", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            fddi_endpoints_cb, NULL, NULL, NULL);
 
        register_conversation_table(TRUE, "FDDI", "fddi", NULL /*filter*/, fddi_conversation_packet);
index baac47ca88930b754145c0371d407d53665ec73a..4a8b10c55acf9790d94d19eb102a657b258012f0 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "conversations_table.h"
@@ -76,9 +77,9 @@ ip_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_ip_conversation(void)
 {
-       register_tap_listener_cmd_arg("conv,ip", ip_conversation_init);
+       register_stat_cmd_arg("conv,ip", ip_conversation_init);
 
-       register_tap_menu_item("IPv4", REGISTER_TAP_GROUP_CONVERSATION_LIST,
+       register_stat_menu_item("IPv4", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            ip_endpoints_cb, NULL, NULL, NULL);
 
        register_conversation_table(TRUE, "IPv4", "ip", NULL /*filter*/, ip_conversation_packet);
index d397d1426378526388bf587f8a1f096426e95f6b..af235ad8c5ac5a91f272ac0dc4409c01f59f12a8 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "conversations_table.h"
@@ -78,9 +79,9 @@ ipx_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_ipx_conversation(void)
 {
-       register_tap_listener_cmd_arg("conv,ipx", ipx_conversation_init);
+       register_stat_cmd_arg("conv,ipx", ipx_conversation_init);
 
-       register_tap_menu_item("IPX", REGISTER_TAP_GROUP_CONVERSATION_LIST,
+       register_stat_menu_item("IPX", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            ipx_endpoints_cb, NULL, NULL, NULL);
 
        register_conversation_table(TRUE, "IPX", "ipx", NULL /*filter*/, ipx_conversation_packet);
index 29acc7d78bfb12f8f743ea6630c138368bbe57b7..e49f5896e164be18b2510533af69331da0ea914a 100644 (file)
@@ -34,7 +34,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "conversations_table.h"
@@ -86,10 +87,10 @@ jxta_conversation_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_jxta_conversation(void)
 {
-       register_tap_listener_cmd_arg("conv,jxta", jxta_conversation_init);
+       register_stat_cmd_arg("conv,jxta", jxta_conversation_init);
 
-       register_tap_menu_item("JXTA", REGISTER_TAP_GROUP_CONVERSATION_LIST,
+       register_stat_menu_item("JXTA", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            jxta_conversation_cb, NULL, NULL, NULL);
 
-    register_conversation_table(TRUE, "JXTA", "jxta", NULL /*filter*/, jxta_conversation_packet);
+       register_conversation_table(TRUE, "JXTA", "jxta", NULL /*filter*/, jxta_conversation_packet);
 }
index 2a62cec083db55008c0a499522efa50f818d3a4c..aa3458924a91304e1788861ed4693fa6440e0316 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "conversations_table.h"
@@ -87,9 +88,9 @@ sctp_conversation_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_sctp_conversation(void)
 {
-       register_tap_listener_cmd_arg("conv,sctp", sctp_conversation_init);
+       register_stat_cmd_arg("conv,sctp", sctp_conversation_init);
 
-       register_tap_menu_item("SCTP", REGISTER_TAP_GROUP_CONVERSATION_LIST,
+       register_stat_menu_item("SCTP", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            sctp_conversation_cb, NULL, NULL, NULL);
 
     register_conversation_table(FALSE, "SCTP", "sctp", NULL /*filter*/, sctp_conversation_packet);
index f35051275b9bf852376e79f6ae70c564f4de8e3e..ed77b85218c0e6bfc88e12beb9338413ce4549cc 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "conversations_table.h"
@@ -78,9 +79,9 @@ tcpip_conversation_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_tcpip_conversation(void)
 {
-       register_tap_listener_cmd_arg("conv,tcp", tcpip_conversation_init);
+       register_stat_cmd_arg("conv,tcp", tcpip_conversation_init);
 
-       register_tap_menu_item("TCP (IPv4 & IPv6)", REGISTER_TAP_GROUP_CONVERSATION_LIST,
+       register_stat_menu_item("TCP (IPv4 & IPv6)", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            tcpip_conversation_cb, NULL, NULL, NULL);
 
        register_conversation_table(FALSE, "TCP", "tcp", NULL /*filter*/, tcpip_conversation_packet);
index ad7252fca642e7ec228733238916d8bb526f2190..b56684617e66ca2a7a1e4e67fc023f04d819fca4 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "conversations_table.h"
@@ -78,9 +79,9 @@ tr_conversation_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_tr_conversation(void)
 {
-       register_tap_listener_cmd_arg("conv,tr", tr_conversation_init);
+       register_stat_cmd_arg("conv,tr", tr_conversation_init);
 
-       register_tap_menu_item("Token Ring", REGISTER_TAP_GROUP_CONVERSATION_LIST,
+       register_stat_menu_item("Token Ring", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            tr_conversation_cb, NULL, NULL, NULL);
 
     register_conversation_table(TRUE, "Token Ring", "tr", NULL /*filter*/, tr_conversation_packet);
index 9e66323065960ecf78dd6175a622709447cc815f..4a5cb40b9d2e6f380d1b827cfdf4b328c47b9268 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "conversations_table.h"
@@ -78,9 +79,9 @@ udpip_conversation_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_udpip_conversation(void)
 {
-       register_tap_listener_cmd_arg("conv,udp", udpip_conversation_init);
+       register_stat_cmd_arg("conv,udp", udpip_conversation_init);
 
-       register_tap_menu_item("UDP (IPv4 & IPv6)", REGISTER_TAP_GROUP_CONVERSATION_LIST,
+       register_stat_menu_item("UDP (IPv4 & IPv6)", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            udpip_conversation_cb, NULL, NULL, NULL);
 
     register_conversation_table(FALSE, "UDP", "udp", NULL /*filter*/, udpip_conversation_packet);
index 88e76be3697d214f45de4d30cc61fb7a03820199..028409a512090c79b613bc842282f32c4bffea0e 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "conversations_table.h"
@@ -78,9 +79,9 @@ wlan_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_wlan_conversation(void)
 {
-       register_tap_listener_cmd_arg("conv,wlan", wlan_conversation_init);
+       register_stat_cmd_arg("conv,wlan", wlan_conversation_init);
 
-       register_tap_menu_item("WLAN", REGISTER_TAP_GROUP_CONVERSATION_LIST,
+       register_stat_menu_item("WLAN", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            wlan_endpoints_cb, NULL, NULL, NULL);
 
        register_conversation_table(TRUE, "WLAN", "wlan", NULL /*filter*/, wlan_conversation_packet);
index 9892f090e963de108a49a7d32adccfea286e380b..4a3fcdaa9d5dab8da71aed6e71a1c71c657b5b27 100644 (file)
@@ -40,7 +40,8 @@
 #include <epan/packet_info.h>
 #include <epan/epan.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "simple_dialog.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
@@ -675,8 +676,8 @@ gtk_dcerpcstat_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_gtkdcerpcstat(void)
 {
-       register_tap_listener_cmd_arg("dcerpc,srt,", gtk_dcerpcstat_init);
+       register_stat_cmd_arg("dcerpc,srt,", gtk_dcerpcstat_init);
 
-       register_tap_menu_item("DCE-RPC...", REGISTER_TAP_GROUP_RESPONSE_TIME,
+       register_stat_menu_item("DCE-RPC...", REGISTER_STAT_GROUP_RESPONSE_TIME,
            gtk_dcerpcstat_cb, NULL, NULL, NULL);
 }
index 04650a960ee5be70319da8a216e08d83bd596f61..5e6c5bd15ca7c36a3ab5295642bcf7121877f686 100644 (file)
@@ -38,7 +38,8 @@
 #include <epan/epan.h>
 #include <epan/value_string.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include <epan/dissectors/packet-fc.h>
 #include "../register.h"
@@ -312,8 +313,8 @@ gtk_fcstat_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_gtkfcstat(void)
 {
-       register_tap_listener_cmd_arg("fc,srt", gtk_fcstat_init);
+       register_stat_cmd_arg("fc,srt", gtk_fcstat_init);
 
-       register_tap_menu_item("Fibre Channel...", REGISTER_TAP_GROUP_RESPONSE_TIME,
+       register_stat_menu_item("Fibre Channel...", REGISTER_STAT_GROUP_RESPONSE_TIME,
            gtk_fcstat_cb, NULL, NULL, NULL);
 }
index 2eaa75e1d2ac5fade58586eff3e2de9e96feb9c4..8b2e77749d875c496838977c02266284bdf6bafb 100644 (file)
@@ -33,7 +33,8 @@
 #include "epan/filesystem.h"
 
 #include "graph_analysis.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
 #include "compat_macros.h"
@@ -556,8 +557,8 @@ void flow_graph_launch(GtkWidget *w _U_, gpointer data _U_)
 void
 register_tap_listener_flow_graph(void)
 {
-       register_tap_listener_cmd_arg("flow_graph",flow_graph_init_tap);
-       register_tap_menu_item("Flow graph", REGISTER_TAP_GROUP_NONE,
+       register_stat_cmd_arg("flow_graph",flow_graph_init_tap);
+       register_stat_menu_item("Flow graph", REGISTER_STAT_GROUP_NONE,
            flow_graph_launch, NULL, NULL, NULL);
            
 }
index 7055e31201d0876a047cb8398ef9cfe9b1f6a884..9b2fc5e5eaad367a869cb0873724954457cbb9fa 100644 (file)
@@ -63,7 +63,7 @@
 #include <epan/filesystem.h>
 #include "compat_macros.h"
 #include <epan/ipproto.h>
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include "print_mswin.h"
 #include "font_utils.h"
 
index 9e558a35fa763ddecb22b25585cf7f924691c877..eec62033b9a202b34966653bd5eac8ab9e20352b 100644 (file)
@@ -40,7 +40,8 @@
 #include "epan/packet_info.h"
 #include "epan/epan.h"
 #include "epan/value_string.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "image/clist_ascend.xpm"
 #include "image/clist_descend.xpm"
 #include "simple_dialog.h"
@@ -618,7 +619,7 @@ register_tap_listener_gtkgsm_a_stat(void)
     GString            *err_p;
 
 
-    register_tap_listener_cmd_arg("gsm_a,", gsm_a_stat_gtk_init);
+    register_stat_cmd_arg("gsm_a,", gsm_a_stat_gtk_init);
 
     memset((void *) &stat, 0, sizeof(gsm_a_stat_t));
 
@@ -636,27 +637,27 @@ register_tap_listener_gtkgsm_a_stat(void)
        exit(1);
     }
 
-    register_tap_menu_item("GSM/A-Interface BSSMAP", REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("GSM/A-Interface BSSMAP", REGISTER_STAT_GROUP_TELEPHONY,
        gsm_a_stat_gtk_bssmap_cb, NULL, NULL, NULL);
 
-    register_tap_menu_item("GSM/A-Interface DTAP/Mobility Management", REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("GSM/A-Interface DTAP/Mobility Management", REGISTER_STAT_GROUP_TELEPHONY,
        gsm_a_stat_gtk_dtap_mm_cb, NULL, NULL, NULL);
 
-    register_tap_menu_item("GSM/A-Interface DTAP/Radio Resource Management", REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("GSM/A-Interface DTAP/Radio Resource Management", REGISTER_STAT_GROUP_TELEPHONY,
        gsm_a_stat_gtk_dtap_rr_cb, NULL, NULL, NULL);
 
-    register_tap_menu_item("GSM/A-Interface DTAP/Call Control", REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("GSM/A-Interface DTAP/Call Control", REGISTER_STAT_GROUP_TELEPHONY,
        gsm_a_stat_gtk_dtap_cc_cb, NULL, NULL, NULL);
 
-    register_tap_menu_item("GSM/A-Interface DTAP/GPRS Mobility Management", REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("GSM/A-Interface DTAP/GPRS Mobility Management", REGISTER_STAT_GROUP_TELEPHONY,
        gsm_a_stat_gtk_dtap_gmm_cb, NULL, NULL, NULL);
 
-    register_tap_menu_item("GSM/A-Interface DTAP/Short Message Service", REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("GSM/A-Interface DTAP/Short Message Service", REGISTER_STAT_GROUP_TELEPHONY,
        gsm_a_stat_gtk_dtap_sms_cb, NULL, NULL, NULL);
 
-    register_tap_menu_item("GSM/A-Interface DTAP/GPRS Session Management", REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("GSM/A-Interface DTAP/GPRS Session Management", REGISTER_STAT_GROUP_TELEPHONY,
        gsm_a_stat_gtk_dtap_sm_cb, NULL, NULL, NULL);
 
-    register_tap_menu_item("GSM/A-Interface DTAP/Supplementary Services", REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("GSM/A-Interface DTAP/Supplementary Services", REGISTER_STAT_GROUP_TELEPHONY,
        gsm_a_stat_gtk_dtap_ss_cb, NULL, NULL, NULL);
 }
index 7e4391d841551d9c022e252ea09b3ecea5969eb4..7f7b9abead9ba16cbdcbe0ec534b65e3da5d682c 100644 (file)
@@ -40,7 +40,8 @@
 #include "epan/packet_info.h"
 #include "epan/epan.h"
 #include "epan/value_string.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "image/clist_ascend.xpm"
 #include "image/clist_descend.xpm"
 #include "simple_dialog.h"
@@ -454,7 +455,7 @@ register_tap_listener_gtkgsm_map_stat(void)
     GString            *err_p;
 
 
-    register_tap_listener_cmd_arg("gsm_map,", gsm_map_stat_gtk_init);
+    register_stat_cmd_arg("gsm_map,", gsm_map_stat_gtk_init);
 
     memset((void *) &gsm_map_stat, 0, sizeof(gsm_map_stat_t));
 
@@ -472,6 +473,6 @@ register_tap_listener_gtkgsm_map_stat(void)
        exit(1);
     }
 
-    register_tap_menu_item("GSM/MAP Operation",  REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("GSM/MAP Operation",  REGISTER_STAT_GROUP_TELEPHONY,
         gsm_map_stat_gtk_cb, NULL, NULL, NULL);
 }
index 0ccd1ee5be9527b06fdac7cd88f65bf2e31721e8..0257edcd391a86cd0dc98c071e1381062dd2cfce 100644 (file)
@@ -38,7 +38,7 @@
 #include "epan/packet_info.h"
 #include "epan/epan.h"
 #include "epan/value_string.h"
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include "globals.h"
 #include "file.h"
 #include "summary.h"
@@ -290,6 +290,6 @@ gsm_map_stat_gtk_sum_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_gtkgsm_map_summary(void)
 {
-    register_tap_menu_item("GSM/MAP Summary",  REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("GSM/MAP Summary",  REGISTER_STAT_GROUP_TELEPHONY,
         gsm_map_stat_gtk_sum_cb, NULL, NULL, NULL);
 }
index c7cb4858f58b0784d8653f2123b8bf2c93bcfcca..336dff10198fe2fce83d192de117a9df8082b085 100644 (file)
@@ -39,7 +39,8 @@
 #include <epan/epan.h>
 #include <epan/value_string.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include <epan/dissectors/packet-h225.h>
@@ -562,8 +563,8 @@ gtk_h225counter_init(const char *optarg)
 void
 register_tap_listener_gtk_h225counter(void)
 {
-       register_tap_listener_cmd_arg("h225,counter", gtk_h225counter_init);
+       register_stat_cmd_arg("h225,counter", gtk_h225counter_init);
 
-       register_tap_menu_item("H.225...", REGISTER_TAP_GROUP_TELEPHONY,
+       register_stat_menu_item("H.225...", REGISTER_STAT_GROUP_TELEPHONY,
            gtk_tap_dfilter_dlg_cb, NULL, NULL, &(h225_counter_dlg));
 }
index 92a6da1c3e51404b4e8cedad363ed55b8c3a1d84..5b8758dd0a1f92a07e52f205d84f31b9e4930b15 100644 (file)
@@ -39,7 +39,8 @@
 #include <epan/epan.h>
 #include <epan/value_string.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include <epan/dissectors/packet-h225.h>
@@ -342,8 +343,8 @@ gtk_h225rassrt_init(const char *optarg)
 void
 register_tap_listener_gtk_h225rassrt(void)
 {
-       register_tap_listener_cmd_arg("h225,srt", gtk_h225rassrt_init);
+       register_stat_cmd_arg("h225,srt", gtk_h225rassrt_init);
 
-       register_tap_menu_item("H.225 RAS...", REGISTER_TAP_GROUP_RESPONSE_TIME,
+       register_stat_menu_item("H.225 RAS...", REGISTER_STAT_GROUP_RESPONSE_TIME,
            gtk_tap_dfilter_dlg_cb, NULL, NULL, &(h225_rassrt_dlg));
 }
index 7e61370a42c26c35c7a1b83c02a5485b96228a4e..226fbd0f9228d28c57be441fb6a22b851209017f 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "hostlist_table.h"
@@ -83,9 +84,9 @@ gtk_eth_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_eth_hostlist(void)
 {
-       register_tap_listener_cmd_arg("hosts,eth", gtk_eth_hostlist_init);
+       register_stat_cmd_arg("hosts,eth", gtk_eth_hostlist_init);
 
-       register_tap_menu_item("Ethernet", REGISTER_TAP_GROUP_ENDPOINT_LIST,
+       register_stat_menu_item("Ethernet", REGISTER_STAT_GROUP_ENDPOINT_LIST,
            gtk_eth_hostlist_cb, NULL, NULL, NULL);
 
        register_hostlist_table(TRUE, "Ethernet", "eth", NULL /*filter*/, eth_hostlist_packet);
index 8aab16a80835bec092beda16d98cd3244e4151fd..dc7c86d0d80d716b85d5c9b6d6399fd18d280133 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "hostlist_table.h"
@@ -83,9 +84,9 @@ gtk_fc_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_fc_hostlist(void)
 {
-       register_tap_listener_cmd_arg("hosts,fc", gtk_fc_hostlist_init);
+       register_stat_cmd_arg("hosts,fc", gtk_fc_hostlist_init);
 
-       register_tap_menu_item("Fibre Channel", REGISTER_TAP_GROUP_ENDPOINT_LIST,
+       register_stat_menu_item("Fibre Channel", REGISTER_STAT_GROUP_ENDPOINT_LIST,
            gtk_fc_hostlist_cb, NULL, NULL, NULL);
 
        register_hostlist_table(TRUE, "Fibre Channel", "fc", NULL /*filter*/, fc_hostlist_packet);
index 6df39c6048fa246c586a4424cbc46add3f04ebd1..7fcd91901f9bbb145d4d3e712d53de0f5b27c580 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "hostlist_table.h"
@@ -83,9 +84,9 @@ gtk_fddi_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_fddi_hostlist(void)
 {
-       register_tap_listener_cmd_arg("hosts,fddi", gtk_fddi_hostlist_init);
+       register_stat_cmd_arg("hosts,fddi", gtk_fddi_hostlist_init);
 
-       register_tap_menu_item("FDDI", REGISTER_TAP_GROUP_ENDPOINT_LIST,
+       register_stat_menu_item("FDDI", REGISTER_STAT_GROUP_ENDPOINT_LIST,
            gtk_fddi_hostlist_cb, NULL, NULL, NULL);
 
        register_hostlist_table(TRUE, "FDDI", "fddi", NULL /*filter*/, fddi_hostlist_packet);
index 9ed2cf71909692748200c09953bbf89469920b69..f2c0633b676866841b6c512caa0785b068bb415e 100644 (file)
@@ -35,7 +35,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "hostlist_table.h"
@@ -82,9 +83,9 @@ gtk_ip_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_ip_hostlist(void)
 {
-       register_tap_listener_cmd_arg("hosts,ip", gtk_ip_hostlist_init);
+       register_stat_cmd_arg("hosts,ip", gtk_ip_hostlist_init);
 
-       register_tap_menu_item("IPv4", REGISTER_TAP_GROUP_ENDPOINT_LIST,
+       register_stat_menu_item("IPv4", REGISTER_STAT_GROUP_ENDPOINT_LIST,
                gtk_ip_hostlist_cb, NULL, NULL, NULL);
 
        register_hostlist_table(TRUE, "IPv4", "ip", NULL /*filter*/, ip_hostlist_packet);
index 04a54f1cfc10b2c272217dc818bc2fb100241fc0..d703135586a52c6f2c02df7d942140a5cb9ae0a8 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "hostlist_table.h"
@@ -83,9 +84,9 @@ gtk_ipx_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_ipx_hostlist(void)
 {
-       register_tap_listener_cmd_arg("hosts,ipx", gtk_ipx_hostlist_init);
+       register_stat_cmd_arg("hosts,ipx", gtk_ipx_hostlist_init);
 
-       register_tap_menu_item("IPX", REGISTER_TAP_GROUP_ENDPOINT_LIST,
+       register_stat_menu_item("IPX", REGISTER_STAT_GROUP_ENDPOINT_LIST,
            gtk_ipx_hostlist_cb, NULL, NULL, NULL);
 
        register_hostlist_table(TRUE, "IPX", "ipx", NULL /*filter*/, ipx_hostlist_packet);
index a31699cc29e24c849433dbe6f348fd77441f1f5a..951038c51567532e847b713fbe1d81d987fab3db 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "hostlist_table.h"
@@ -80,9 +81,9 @@ gtk_jxta_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_jxta_hostlist(void)
 {
-       register_tap_listener_cmd_arg("hosts,jxta", gtk_jxta_hostlist_init);
+       register_stat_cmd_arg("hosts,jxta", gtk_jxta_hostlist_init);
 
-       register_tap_menu_item("JXTA", REGISTER_TAP_GROUP_ENDPOINT_LIST,
+       register_stat_menu_item("JXTA", REGISTER_STAT_GROUP_ENDPOINT_LIST,
            gtk_jxta_hostlist_cb, NULL, NULL, NULL);
 
        register_hostlist_table(TRUE, "JXTA", "jxta", NULL /*filter*/, jxta_hostlist_packet);
index f84958db3ffc706f3357045528b7f74a344229d0..7a68a793d0c551452cd4e4eab29fbcfa1c1c3eaf 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "hostlist_table.h"
@@ -83,9 +84,9 @@ gtk_tcpip_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_tcpip_hostlist(void)
 {
-       register_tap_listener_cmd_arg("endpoints,tcp", gtk_tcpip_hostlist_init);
+       register_stat_cmd_arg("endpoints,tcp", gtk_tcpip_hostlist_init);
 
-       register_tap_menu_item("TCP (IPv4 & IPv6)", REGISTER_TAP_GROUP_ENDPOINT_LIST,
+       register_stat_menu_item("TCP (IPv4 & IPv6)", REGISTER_STAT_GROUP_ENDPOINT_LIST,
            gtk_tcpip_hostlist_cb, NULL, NULL, NULL);
 
        register_hostlist_table(FALSE, "TCP", "tcp", NULL /*filter*/, tcpip_hostlist_packet);
index cb2021ef9d86851a0802f4f521c0a969b56a8408..a82c53b15e36d96d20658294c40e69524915282f 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "hostlist_table.h"
@@ -83,9 +84,9 @@ gtk_tr_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_tr_hostlist(void)
 {
-       register_tap_listener_cmd_arg("hosts,tr", gtk_tr_hostlist_init);
+       register_stat_cmd_arg("hosts,tr", gtk_tr_hostlist_init);
 
-       register_tap_menu_item("Token Ring", REGISTER_TAP_GROUP_ENDPOINT_LIST,
+       register_stat_menu_item("Token Ring", REGISTER_STAT_GROUP_ENDPOINT_LIST,
            gtk_tr_hostlist_cb, NULL, NULL, NULL);
 
        register_hostlist_table(TRUE, "Token Ring", "tr", NULL /*filter*/, tr_hostlist_packet);
index 7565cf0cbc1673ca4b8a9ff7e343f111c8c4abe0..c0c8dcb9a016347c91ee626a5ca6093f691d665d 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "hostlist_table.h"
@@ -83,9 +84,9 @@ gtk_udpip_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_udpip_hostlist(void)
 {
-       register_tap_listener_cmd_arg("endpoints,udp", gtk_udpip_hostlist_init);
+       register_stat_cmd_arg("endpoints,udp", gtk_udpip_hostlist_init);
 
-       register_tap_menu_item("UDP (IPv4 & IPv6)", REGISTER_TAP_GROUP_ENDPOINT_LIST,
+       register_stat_menu_item("UDP (IPv4 & IPv6)", REGISTER_STAT_GROUP_ENDPOINT_LIST,
            gtk_udpip_hostlist_cb, NULL, NULL, NULL);
 
        register_hostlist_table(FALSE, "UDP", "udp", NULL /*filter*/, udpip_hostlist_packet);
index 65e0fe338bcee5e1a99b8ecf793fff4d3ed13325..0726cf72604e941288eb5cbd077559093b76d805 100644 (file)
@@ -33,7 +33,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "hostlist_table.h"
@@ -81,9 +82,9 @@ gtk_wlan_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_wlan_hostlist(void)
 {
-        register_tap_listener_cmd_arg("hosts,wlan", gtk_wlan_hostlist_init);
+        register_stat_cmd_arg("hosts,wlan", gtk_wlan_hostlist_init);
 
-        register_tap_menu_item("WLAN", REGISTER_TAP_GROUP_ENDPOINT_LIST,
+        register_stat_menu_item("WLAN", REGISTER_STAT_GROUP_ENDPOINT_LIST,
             gtk_wlan_hostlist_cb, NULL, NULL, NULL);
 
         register_hostlist_table(TRUE, "WLAN", "wlan", NULL /*filter*/, wlan_hostlist_packet);
index 2da21c7cbe5569fe19a777829fab9c9d3e46d111..fe7953295f28d6cba4660c27d3c41f4a8178c9ce 100644 (file)
@@ -42,7 +42,8 @@
 
 #include "gtkglobals.h"
 #include "ui_util.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "alert_box.h"
@@ -1935,8 +1936,8 @@ gtk_iostat_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_gtk_iostat(void)
 {
-       register_tap_listener_cmd_arg("io,stat", gtk_iostat_init);
+       register_stat_cmd_arg("io,stat", gtk_iostat_init);
 
-       register_tap_menu_item("_IO Graphs", REGISTER_TAP_GROUP_GENERIC,
+       register_stat_menu_item("_IO Graphs", REGISTER_STAT_GROUP_GENERIC,
         gtk_iostat_cb, NULL, NULL, NULL);
 }
index 6f49002d1f270766992ab391601ee1d5c5afe61a..aa2df72db7fb1525a97a88d4b24076374d0dee56 100644 (file)
@@ -38,7 +38,8 @@
 #include <epan/epan.h>
 #include <epan/value_string.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include <epan/dissectors/packet-ldap.h>
 #include "../register.h"
@@ -347,8 +348,8 @@ gtk_ldapstat_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_gtkldapstat(void)
 {
-       register_tap_listener_cmd_arg("ldap,srt", gtk_ldapstat_init);
+       register_stat_cmd_arg("ldap,srt", gtk_ldapstat_init);
 
-       register_tap_menu_item("LDAP...", REGISTER_TAP_GROUP_RESPONSE_TIME,
+       register_stat_menu_item("LDAP...", REGISTER_STAT_GROUP_RESPONSE_TIME,
            gtk_ldapstat_cb, NULL, NULL, NULL);
 }
index 5e99501c808832cbe41fec87ecd11fe9a56a584e..8449b3108883b4d58a2ecb9d719d48c856dadd43 100644 (file)
@@ -83,6 +83,7 @@
 #include "ringbuffer.h"
 #include "../ui_util.h"     /* beware: ui_util.h exists twice! */
 #include <epan/tap.h>
+#include "../stat.h"
 #include "util.h"
 #include "clopts_common.h"
 #include "version_info.h"
@@ -2098,15 +2099,15 @@ main(int argc, char *argv[])
         }
         break;
       case 'z':
-        /* We won't call the init function for the tap this soon
+        /* We won't call the init function for the stat this soon
            as it would disallow MATE's fields (which are registered
            by the preferences set callback) from being used as
            part of a tap filter.  Instead, we just add the argument
-           to a list of tap arguments. */
-        if (!process_tap_cmd_arg(optarg)) {
+           to a list of stat arguments. */
+        if (!process_stat_cmd_arg(optarg)) {
          fprintf(stderr,"ethereal: invalid -z argument.\n");
          fprintf(stderr,"  -z argument must be one of :\n");
-         list_tap_cmd_args();
+         list_stat_cmd_args();
          exit(1);
        }
         break;
@@ -2446,14 +2447,14 @@ main(int argc, char *argv[])
            attached to "cf". */
 
         cfile.rfcode = rfcode;
-        /* Open tap windows; we do so after creating the main window,
+        /* Open stat windows; we do so after creating the main window,
            to avoid GTK warnings, and after successfully opening the
-           capture file, so we know we have something to tap, and
-           after registering all dissectors, so that MATE will have
-           registered its field array and we can have a filter with
-           one of MATE's late-registered fields as part of the tap's
+           capture file, so we know we have something to compute stats
+           on, and after registering all dissectors, so that MATE will
+           have registered its field array and we can have a tap filter
+           with one of MATE's late-registered fields as part of the
            filter. */
-        start_requested_taps();
+        start_requested_stats();
 
         /* Read the capture file. */
         switch (cf_read(&cfile)) {
@@ -2504,14 +2505,13 @@ main(int argc, char *argv[])
       /* "-k" was specified; start a capture. */
       show_main_window(TRUE);
       if (capture_start(capture_opts)) {
-        /* The capture started.  Open tap windows; we do so after creating
+        /* The capture started.  Open stat windows; we do so after creating
           the main window, to avoid GTK warnings, and after successfully
-          opening the capture file, so we know we have something to tap,
-          and after registering all dissectors, so that MATE will have
-           registered its field array and we can have a filter with
-           one of MATE's late-registered fields as part of the tap's
-           filter. */
-        start_requested_taps();
+          opening the capture file, so we know we have something to compute
+          stats on, and after registering all dissectors, so that MATE will
+          have registered its field array and we can have a tap filter with
+           one of MATE's late-registered fields as part of the filter. */
+        start_requested_stats();
       }
     }
     else {
index e8d5eed7903e30e573d6315f7112073b495ecb51..2379a91b305680e387da77e152e439cf588438f4 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "main.h"
 #include "menu.h"
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include <epan/packet.h>
 #include <epan/addr_resolv.h>
 #include <epan/prefs.h>
@@ -649,9 +649,9 @@ static GList * tap_menu_item_add(
  * is selected and, if one is, on the tree row) and FALSE if not.
  */
 void
-register_tap_menu_item(
+register_stat_menu_item(
     const char *name, 
-    REGISTER_TAP_GROUP_E group,
+    REGISTER_STAT_GROUP_E group,
     GtkItemFactoryCallback callback,
     gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *),
     gboolean (*selected_tree_row_enabled)(field_info *),
@@ -672,12 +672,12 @@ register_tap_menu_item(
     g_assert(*name != '/');
 
     switch(group) {
-    case(REGISTER_TAP_GROUP_GENERIC): toolspath = "/Statistics/"; break;
-    case(REGISTER_TAP_GROUP_CONVERSATION_LIST): toolspath = "/Statistics/_Conversation List/"; break;
-    case(REGISTER_TAP_GROUP_ENDPOINT_LIST): toolspath = "/Statistics/_Endpoint List/"; break;
-    case(REGISTER_TAP_GROUP_RESPONSE_TIME): toolspath = "/Statistics/Service _Response Time/"; break;
-    case(REGISTER_TAP_GROUP_TELEPHONY): toolspath = "/Statistics/"; break;
-    case(REGISTER_TAP_GROUP_NONE): toolspath = "/Statistics/"; break;
+    case(REGISTER_STAT_GROUP_GENERIC): toolspath = "/Statistics/"; break;
+    case(REGISTER_STAT_GROUP_CONVERSATION_LIST): toolspath = "/Statistics/_Conversation List/"; break;
+    case(REGISTER_STAT_GROUP_ENDPOINT_LIST): toolspath = "/Statistics/_Endpoint List/"; break;
+    case(REGISTER_STAT_GROUP_RESPONSE_TIME): toolspath = "/Statistics/Service _Response Time/"; break;
+    case(REGISTER_STAT_GROUP_TELEPHONY): toolspath = "/Statistics/"; break;
+    case(REGISTER_STAT_GROUP_NONE): toolspath = "/Statistics/"; break;
     default:
         g_assert(0);
         toolspath = NULL;
@@ -781,23 +781,23 @@ static guint merge_tap_menus_layered(GList *node, gint group) {
             entry->callback = node_data->callback;
 #if GTK_MAJOR_VERSION >= 2
             switch(group) {
-            case(REGISTER_TAP_GROUP_NONE):
+            case(REGISTER_STAT_GROUP_NONE):
                 break;
-            case(REGISTER_TAP_GROUP_GENERIC):
+            case(REGISTER_STAT_GROUP_GENERIC):
                 break;
-            case(REGISTER_TAP_GROUP_CONVERSATION_LIST):
+            case(REGISTER_STAT_GROUP_CONVERSATION_LIST):
                 entry->item_type = "<StockItem>";
                 entry->extra_data = ETHEREAL_STOCK_CONVERSATIONS;
                 break;
-            case(REGISTER_TAP_GROUP_ENDPOINT_LIST):
+            case(REGISTER_STAT_GROUP_ENDPOINT_LIST):
                 entry->item_type = "<StockItem>";
                 entry->extra_data = ETHEREAL_STOCK_ENDPOINTS;
                 break;
-            case(REGISTER_TAP_GROUP_RESPONSE_TIME):
+            case(REGISTER_STAT_GROUP_RESPONSE_TIME):
                 entry->item_type = "<StockItem>";
                 entry->extra_data = ETHEREAL_STOCK_TIME;
                 break;
-            case(REGISTER_TAP_GROUP_TELEPHONY):
+            case(REGISTER_STAT_GROUP_TELEPHONY):
                 entry->item_type = "<StockItem>";
                 entry->extra_data = ETHEREAL_STOCK_TELEPHONY;
                 break;
@@ -851,22 +851,22 @@ void merge_all_tap_menus(GList *node) {
      * merge only the menu items of the specific group,
      * and then append a seperator
      */
-    if (merge_tap_menus_layered(node, REGISTER_TAP_GROUP_GENERIC)) {
+    if (merge_tap_menus_layered(node, REGISTER_STAT_GROUP_GENERIC)) {
         gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);
     }
-    if (merge_tap_menus_layered(node, REGISTER_TAP_GROUP_CONVERSATION_LIST)) {
+    if (merge_tap_menus_layered(node, REGISTER_STAT_GROUP_CONVERSATION_LIST)) {
         /*gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);*/
     }
-    if (merge_tap_menus_layered(node, REGISTER_TAP_GROUP_ENDPOINT_LIST)) {
+    if (merge_tap_menus_layered(node, REGISTER_STAT_GROUP_ENDPOINT_LIST)) {
         /*gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);*/
     }
-    if (merge_tap_menus_layered(node, REGISTER_TAP_GROUP_RESPONSE_TIME)) {
+    if (merge_tap_menus_layered(node, REGISTER_STAT_GROUP_RESPONSE_TIME)) {
         gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);
     }
-    if (merge_tap_menus_layered(node, REGISTER_TAP_GROUP_TELEPHONY)) {
+    if (merge_tap_menus_layered(node, REGISTER_STAT_GROUP_TELEPHONY)) {
         gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);
     }
-    if (merge_tap_menus_layered(node, REGISTER_TAP_GROUP_NONE)) {
+    if (merge_tap_menus_layered(node, REGISTER_STAT_GROUP_NONE)) {
         /*gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);*/
     }
 }
index 6ce3a3cbcd5d98a54462ec0f5cf4b0dc9bc732aa..68ec5c47e1c3c2e0dcd82808b61d4abc19f0233b 100644 (file)
@@ -39,7 +39,8 @@
 #include <epan/epan.h>
 #include <epan/value_string.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include "../plugins/mgcp/packet-mgcp.h"
@@ -326,9 +327,9 @@ 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_tap_listener_cmd_arg("mgcp,srt", gtk_mgcpstat_init);
+               register_stat_cmd_arg("mgcp,srt", gtk_mgcpstat_init);
 
-               register_tap_menu_item("MGCP...", REGISTER_TAP_GROUP_RESPONSE_TIME,
+               register_stat_menu_item("MGCP...", REGISTER_STAT_GROUP_RESPONSE_TIME,
                    gtk_tap_dfilter_dlg_cb, NULL, NULL, &(mgcp_srt_dlg));
        }
 }
index 398578997ea3dd94eb3a34569c2020623c1fc651..503c6b33c69c88d06e32cf6402b342b5e0707d8b 100644 (file)
@@ -40,7 +40,8 @@
 #include "epan/packet_info.h"
 #include "epan/epan.h"
 #include "epan/value_string.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "image/clist_ascend.xpm"
 #include "image/clist_descend.xpm"
 #include "simple_dialog.h"
@@ -445,7 +446,7 @@ register_tap_listener_gtkmtp3_stat(void)
     GString            *err_p;
 
 
-    register_tap_listener_cmd_arg("mtp3,", mtp3_stat_gtk_init);
+    register_stat_cmd_arg("mtp3,", mtp3_stat_gtk_init);
 
     memset((void *) &mtp3_stat, 0, sizeof(mtp3_stat_t));
 
@@ -463,6 +464,6 @@ register_tap_listener_gtkmtp3_stat(void)
        exit(1);
     }
 
-    register_tap_menu_item("MTP3/MSUs",  REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("MTP3/MSUs",  REGISTER_STAT_GROUP_TELEPHONY,
         mtp3_stat_gtk_cb, NULL, NULL, NULL);
 }
index 05b674c8268d3713d48d4b6b9b6fb139fefa359f..0de9494d6aa900b60a97f794a66a3706d2fc4acc 100644 (file)
@@ -39,7 +39,7 @@
 #include "epan/packet_info.h"
 #include "epan/epan.h"
 #include "epan/value_string.h"
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include "globals.h"
 #include "file.h"
 #include "summary.h"
@@ -430,6 +430,6 @@ mtp3_sum_gtk_sum_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_gtkmtp3_summary(void)
 {
-    register_tap_menu_item("MTP3/MSU Summary",  REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("MTP3/MSU Summary",  REGISTER_STAT_GROUP_TELEPHONY,
         mtp3_sum_gtk_sum_cb, NULL, NULL, NULL);
 }
index d335496b7c468f3b4e7de88508f668d92423ca33..bf85645e609da217719c5b8912abcd1347ad0128 100644 (file)
@@ -37,7 +37,8 @@
 #include <epan/packet_info.h>
 #include <epan/epan.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include <epan/dissectors/packet-rpc.h>
@@ -418,8 +419,8 @@ gtk_rpcprogs_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_gtkrpcprogs(void)
 {
-       register_tap_listener_cmd_arg("rpc,programs", gtk_rpcprogs_init);
+       register_stat_cmd_arg("rpc,programs", gtk_rpcprogs_init);
 
-       register_tap_menu_item("ONC-RPC Programs", REGISTER_TAP_GROUP_NONE,
+       register_stat_menu_item("ONC-RPC Programs", REGISTER_STAT_GROUP_NONE,
        gtk_rpcprogs_cb, NULL, NULL, NULL);
 }
index 88d26caac1fce21e7a7e92818ebeaaf498626eb3..3e97ac2ce927980b567c9ff27b5b9f1b209dd784 100644 (file)
@@ -37,7 +37,8 @@
 #include <epan/packet_info.h>
 #include <epan/epan.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "simple_dialog.h"
 #include "ui_util.h"
 #include "dlg_utils.h"
@@ -536,8 +537,8 @@ gtk_rpcstat_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_gtkrpcstat(void)
 {
-       register_tap_listener_cmd_arg("rpc,srt,", gtk_rpcstat_init);
+       register_stat_cmd_arg("rpc,srt,", gtk_rpcstat_init);
 
-       register_tap_menu_item("ONC-RPC...", REGISTER_TAP_GROUP_RESPONSE_TIME,
+       register_stat_menu_item("ONC-RPC...", REGISTER_STAT_GROUP_RESPONSE_TIME,
            gtk_rpcstat_cb, NULL, NULL, NULL);
 }
index 34c43a18ea116fba5623eec775f42d43725c0455..230a3f4a4621978d57db7cd04cdd78176e841e8c 100644 (file)
 #include <gtk/gtk.h>
 #include "gtkglobals.h"
 
+#include "../stat.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
 #include "alert_box.h"
 #include "simple_dialog.h"
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include "main.h"
 #include "progress_dlg.h"
 #include "compat_macros.h"
@@ -3650,8 +3651,8 @@ rtp_analysis_init(const char *dummy _U_)
 void
 register_tap_listener_rtp_analysis(void)
 {
-       register_tap_listener_cmd_arg("rtp", rtp_analysis_init);
+       register_stat_cmd_arg("rtp", rtp_analysis_init);
 
-       register_tap_menu_item("RTP/Stream Analysis...", REGISTER_TAP_GROUP_TELEPHONY,
+       register_stat_menu_item("RTP/Stream Analysis...", REGISTER_STAT_GROUP_TELEPHONY,
            rtp_analysis_cb, NULL, NULL, NULL);
 }
index ea9cf6e1649b0080a1ee0068241661757b2a238c..91f5d4096202eaabec1c616471c8f46da7de283a 100644 (file)
@@ -33,6 +33,7 @@
 #include "rtp_stream_dlg.h"
 
 #include "globals.h"
+#include "../stat.h"
 
 #include <epan/tap.h>
 #include "register.h"
@@ -438,7 +439,7 @@ register_tap_listener_rtp_stream(void)
        GString *error_string;
 
        if (!the_tapinfo_struct.is_registered) {
-               register_tap_listener_cmd_arg("rtp", rtpstream_init_tap);
+               register_stat_cmd_arg("rtp", rtpstream_init_tap);
 
                error_string = register_tap_listener("rtp", &the_tapinfo_struct,
                        NULL, rtpstream_reset_cb, rtpstream_packet,
index dbf17ae61a902c85231aaea45d9e44c6abf5a631..548697eb4bb8780469dd17e6b56e740295787b42 100644 (file)
@@ -36,7 +36,7 @@
 #include "globals.h"
 #include "epan/filesystem.h"
 
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
 #include "compat_macros.h"
@@ -884,6 +884,6 @@ void rtpstream_launch(GtkWidget *w _U_, gpointer data _U_)
 void
 register_tap_listener_rtp_stream_dlg(void)
 {
-       register_tap_menu_item("RTP/Show All Streams...", REGISTER_TAP_GROUP_TELEPHONY,
+       register_stat_menu_item("RTP/Show All Streams...", REGISTER_STAT_GROUP_TELEPHONY,
            rtpstream_launch, NULL, NULL, NULL);
 }
index 15881c463445851cd1f7f698934112af09a05f58..2a0610c215535dcce4ed79e0ac941ec51175d10f 100644 (file)
@@ -33,7 +33,7 @@
 #include <epan/epan_dissect.h>
 #include "epan/filesystem.h"
 #include "register.h"
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
 #include "main.h"
@@ -875,6 +875,6 @@ void sctp_analyse_start(GtkWidget *w _U_, gpointer data _U_)
 void
 register_tap_listener_sctp_analyse(void)
 {
-       register_tap_menu_item("SCTP/Analyse Association", REGISTER_TAP_GROUP_TELEPHONY,
+       register_stat_menu_item("SCTP/Analyse Association", REGISTER_STAT_GROUP_TELEPHONY,
                               sctp_analyse_start, NULL, NULL, NULL);
 }
index ade141718bc9105442ee88d33b7c00938af9ff2e..aaf60dc37c12ff85dd46b228f4ab4f6c01af52e9 100644 (file)
@@ -35,7 +35,7 @@
 #include "globals.h"
 #include "epan/filesystem.h"
 #include "../color.h"
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
 #include "main.h"
index 0f7e4268bb6beb44a562cfee5c9f0e4823d4ef83..0aed0e9c0f8d418061de28ab4dcba38defa6812e 100644 (file)
@@ -40,7 +40,8 @@
 #include <epan/epan.h>
 #include <epan/value_string.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../register.h"
 #include <epan/dissectors/packet-sctp.h>
@@ -344,8 +345,8 @@ sctpstat_init(const char *optarg)
 void
 register_tap_listener_sctpstat(void)
 {
-       register_tap_listener_cmd_arg("sctp,stat", sctpstat_init);
+       register_stat_cmd_arg("sctp,stat", sctpstat_init);
 
-       register_tap_menu_item("SCTP/Chunk Counter", REGISTER_TAP_GROUP_TELEPHONY,
+       register_stat_menu_item("SCTP/Chunk Counter", REGISTER_STAT_GROUP_TELEPHONY,
                               gtk_tap_dfilter_dlg_cb, NULL, NULL, &(sctp_stat_dlg));
 }
index 2a4185be458aa229d2295144510912af4ede6ed8..cea840b03c95aecda2ae613cab17f81f1edf8c8c 100644 (file)
@@ -35,7 +35,7 @@
 #include "image/clist_ascend.xpm"
 #include "image/clist_descend.xpm"
 
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
 #include "main.h"
index 3b6a5b1a6dac39591f2ec919e5f5a39034fc6339..e74c1af6f8ce9e918ea766b551e5fcbc54337a98 100644 (file)
@@ -31,7 +31,7 @@
 #include "globals.h"
 #include "epan/filesystem.h"
 #include "simple_dialog.h"
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
 #include "main.h"
index 6a5f9dad6d239ea41788fa5a9103702d3beaad7f..e75df1f71555661a8897ce1c486cef799aba0067 100644 (file)
@@ -35,7 +35,7 @@
 #include "globals.h"
 #include "epan/filesystem.h"
 #include "../color.h"
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
 #include "main.h"
index 3dbc2c89f26bb1d2a8a026aa8f7d301ba3f01f04..45b2b57fa3bce99f14acf70a6e303662b81dc3d1 100644 (file)
@@ -32,7 +32,8 @@
 #include "globals.h"
 #include "epan/packet_info.h"   /* Needed for packet_info */
 #include <epan/tap.h>           /* Needed for register_tap_listener */
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "dlg_utils.h"
 #include "compat_macros.h"
 #include "register.h"
@@ -1463,7 +1464,7 @@ register_tap_listener_sctp_stat(void)
 
        if (!sctp_tapinfo_struct.is_registered)
        {
-               register_tap_listener_cmd_arg("sctp",gtk_sctpstat_init);
+               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);
index fad456fef81cf3ecfd81b877397637a69a9d3f75..23de118f72fe24e0fb0b09500272d02b6e188926 100644 (file)
@@ -35,7 +35,7 @@
 #include "image/clist_ascend.xpm"
 #include "image/clist_descend.xpm"
 
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
 #include "main.h"
@@ -607,7 +607,7 @@ void sctp_stat_start(GtkWidget *w _U_, gpointer data _U_)
 void
 register_tap_listener_sctp_stat_dlg(void)
 {
-       register_tap_menu_item("SCTP/Show All Associations...", REGISTER_TAP_GROUP_TELEPHONY,
+       register_stat_menu_item("SCTP/Show All Associations...", REGISTER_STAT_GROUP_TELEPHONY,
            sctp_stat_start, NULL, NULL, NULL);
 }
 
index cff8020079d7680fe078fa85080595179ada6f76..d35ed5e8904f8b71a9fab408400082473ca0d787 100644 (file)
@@ -34,7 +34,8 @@
 #include <epan/packet_info.h>
 #include <epan/epan.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "simple_dialog.h"
 #include "ui_util.h"
 #include "dlg_utils.h"
@@ -662,8 +663,8 @@ static tap_dfilter_dlg sip_stat_dlg = {
 void
 register_tap_listener_gtksipstat(void)
 {
-    register_tap_listener_cmd_arg("sip,stat", gtk_sipstat_init);
+    register_stat_cmd_arg("sip,stat", gtk_sipstat_init);
 
-    register_tap_menu_item("SIP", REGISTER_TAP_GROUP_TELEPHONY,
+    register_stat_menu_item("SIP", REGISTER_STAT_GROUP_TELEPHONY,
                            gtk_tap_dfilter_dlg_cb, NULL, NULL, &(sip_stat_dlg));
 }
index 46fa1d7967e49af192d8167356ad056673033787..051f1fbb00ef8599dc662a4718849cebe7793ba6 100644 (file)
@@ -38,7 +38,8 @@
 #include <epan/epan.h>
 #include <epan/value_string.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include <epan/tap.h>
 #include "../smb.h"
 #include "../register.h"
@@ -351,8 +352,8 @@ gtk_smbstat_cb(GtkWidget *w _U_, gpointer d _U_)
 void
 register_tap_listener_gtksmbstat(void)
 {
-       register_tap_listener_cmd_arg("smb,srt", gtk_smbstat_init);
+       register_stat_cmd_arg("smb,srt", gtk_smbstat_init);
 
-       register_tap_menu_item("SMB...", REGISTER_TAP_GROUP_RESPONSE_TIME,
+       register_stat_menu_item("SMB...", REGISTER_STAT_GROUP_RESPONSE_TIME,
            gtk_smbstat_cb, NULL, NULL, NULL);
 }
similarity index 68%
rename from gtk/tap_menu.h
rename to gtk/stat_menu.h
index 3a7de2a08d3bd12cdfc9976924dd80fd99f0eb0b..43329e816827a9996bf51de1af97a947f86cb760 100644 (file)
@@ -1,5 +1,5 @@
-/* tap_menu.h
- * Menu definitions for use by taps
+/* stat_menu.h
+ * Menu definitions for use by stats
  *
  * $Id$
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
-#ifndef __GTKGUITAPMENU_H__
-#define __GTKGUITAPMENU_H__
+#ifndef __GTKGUISTATMENU_H__
+#define __GTKGUISTATMENU_H__
 
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
 
 /** @file
- * Add a new menu item for a tap.
+ * Add a new menu item for a stat.
  */
 
-/** The menu group this tap should be registered at. */
+/** The menu group this stat should be registered in. */
 typedef enum {
-    REGISTER_TAP_GROUP_NONE,
-    REGISTER_TAP_GROUP_GENERIC,
-    REGISTER_TAP_GROUP_CONVERSATION_LIST,
-    REGISTER_TAP_GROUP_ENDPOINT_LIST,
-    REGISTER_TAP_GROUP_RESPONSE_TIME,
-    REGISTER_TAP_GROUP_TELEPHONY
+    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_TAP_GROUP_E;
+} REGISTER_STAT_GROUP_E;
 
 /**
- * Add a new menu item for a tap.
+ * Add a new menu item for a stat.
  * This must be called after we've created the main menu, so it can't
- * be called from the routine that registers taps - we have to introduce
- * another per-tap registration routine.
+ * be called from the routine that registers stats - we have to introduce
+ * another per-stat registration routine.
  *
  * @param name the menu label
  *
- * @param group the menu group, this tap should be registered to
+ * @param group the menu group this stat should be registered to
  *
  * @param callback gets called when the menu item is selected; it should do
- * the work of creating the tap window.
+ * the work of creating the stat window.
  *
  * @param selected_packet_enabled gets called by set_menus_for_selected_packet();
  * it's passed a pointer to the "frame_data" structure for the current frame,
  * if any, and to the "epan_dissect_t" structure for that frame, if any, and
- * should return TRUE if the tap will work now (which might depend on whether
+ * should return TRUE if the stat will work now (which might depend on whether
  * a frame is selected and, if one is, on the frame) and FALSE if not.
  *
  * @param selected_tree_row_enabled gets called by
  * set_menus_for_selected_tree_row(); it's passed a pointer to the
  * "field_info" structure for the currently selected field, if any,
- * and should return TRUE if the tap will work now (which might depend on
+ * and should return TRUE if the stat will work now (which might depend on
  * whether a tree row is selected and, if one is, on the tree row) and
  * FALSE if not.
  *
  * @param callback_data data for callback function
  */    
-extern void register_tap_menu_item(
+extern void register_stat_menu_item(
     const char *name, 
-    REGISTER_TAP_GROUP_E group,
+    REGISTER_STAT_GROUP_E group,
     GtkItemFactoryCallback callback,
     gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *),
     gboolean (*selected_tree_row_enabled)(field_info *),
@@ -84,4 +84,4 @@ extern void register_tap_menu_item(
 }
 #endif /* __cplusplus */
 
-#endif /* __GTKGUITAPMENU_H__ */
+#endif /* __GTKGUISTATMENU_H__ */
index ebde04b424aa1c4b939c41b17840a71b8d93e899..dba134b93f744e408d7ce408afceaa171c51ddac 100644 (file)
@@ -34,7 +34,8 @@
 
 #include "simple_dialog.h"
 #include "globals.h"
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "ui_util.h"
 #include "dlg_utils.h"
 #include "compat_macros.h"
@@ -370,7 +371,7 @@ static void register_gtk_stats_tree_tap (gpointer k _U_, gpointer v, gpointer p
 
        s = g_strdup_printf("%s,tree",cfg->abbr);
        
-       register_tap_listener_cmd_arg(s, init_gtk_tree);
+       register_stat_cmd_arg(s, init_gtk_tree);
        
        cfg->pr = g_malloc(sizeof(tree_pres));
        
@@ -381,7 +382,7 @@ 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_tap_menu_item(cfg->name, REGISTER_TAP_GROUP_NONE,
+       register_stat_menu_item(cfg->name, REGISTER_STAT_GROUP_NONE,
                                                   gtk_tap_dfilter_dlg_cb, NULL, NULL, cfg->pr->stat_dlg);
 }
 
index 480af52c1d7de8f12a6a0602bb0ffb4c0bd62bfa..1b48d014c6c7c3583ca850df8b5220267202f4fb 100644 (file)
@@ -45,7 +45,7 @@
 #include "ppptypes.h"
 #include "dlg_utils.h"
 #include <epan/epan_dissect.h>
-#include "tap_menu.h"
+#include "stat_menu.h"
 #include "../epan/dissectors/packet-tcp.h"
 #include "../epan/address.h"
 #include "../epan/tap.h"
@@ -4050,12 +4050,12 @@ gboolean tcp_graph_selected_packet_enabled(frame_data *current_frame, epan_disse
 void
 register_tap_listener_tcp_graph(void)
 {
-    register_tap_menu_item("TCP Stream Graph/Time-Sequence Graph (Stevens)", REGISTER_TAP_GROUP_NONE,
+    register_stat_menu_item("TCP Stream Graph/Time-Sequence Graph (Stevens)", REGISTER_STAT_GROUP_NONE,
         tcp_graph_cb, tcp_graph_selected_packet_enabled, NULL, GINT_TO_POINTER(0));
-    register_tap_menu_item("TCP Stream Graph/Time-Sequence Graph (tcptrace)", REGISTER_TAP_GROUP_NONE,
+    register_stat_menu_item("TCP Stream Graph/Time-Sequence Graph (tcptrace)", REGISTER_STAT_GROUP_NONE,
         tcp_graph_cb, tcp_graph_selected_packet_enabled, NULL, GINT_TO_POINTER(1));
-    register_tap_menu_item("TCP Stream Graph/Throughput Graph", REGISTER_TAP_GROUP_NONE,
+    register_stat_menu_item("TCP Stream Graph/Throughput Graph", REGISTER_STAT_GROUP_NONE,
         tcp_graph_cb, tcp_graph_selected_packet_enabled, NULL, GINT_TO_POINTER(2));
-    register_tap_menu_item("TCP Stream Graph/Round Trip Time Graph", REGISTER_TAP_GROUP_NONE,
+    register_stat_menu_item("TCP Stream Graph/Round Trip Time Graph", REGISTER_STAT_GROUP_NONE,
         tcp_graph_cb, tcp_graph_selected_packet_enabled, NULL, GINT_TO_POINTER(3));
 }
index b77562ac06f1afdd819a709a1aeb56aeadf08b56..7601e42d6d1fc5ff85b4e4e891cf4ca73542ef99 100644 (file)
@@ -50,7 +50,8 @@
 #include "epan/filesystem.h"
 
 #include <epan/tap.h>
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
 #include "compat_macros.h"
@@ -809,8 +810,8 @@ void voip_calls_launch(GtkWidget *w _U_, gpointer data _U_)
 void
 register_tap_listener_voip_calls_dlg(void)
 {
-       register_tap_listener_cmd_arg("voip,calls",voip_calls_init_tap);
-       register_tap_menu_item("VoIP Calls...", REGISTER_TAP_GROUP_TELEPHONY,
+       register_stat_cmd_arg("voip,calls",voip_calls_init_tap);
+       register_stat_menu_item("VoIP Calls...", REGISTER_STAT_GROUP_TELEPHONY,
            voip_calls_launch, NULL, NULL, NULL);
            
 }
index d3e713c0323ab00f0d43d184c5dd8ca5c58591b0..f41df5337a1b7252d3f1eca519d6aa77865f5abd 100644 (file)
@@ -34,7 +34,8 @@
 #include <epan/packet_info.h>
 #include <epan/epan.h>
 
-#include "tap_menu.h"
+#include "../stat.h"
+#include "stat_menu.h"
 #include "simple_dialog.h"
 #include "ui_util.h"
 #include "dlg_utils.h"
@@ -425,8 +426,8 @@ static tap_dfilter_dlg wsp_stat_dlg = {
 void
 register_tap_listener_gtkwspstat(void)
 {
-       register_tap_listener_cmd_arg("wsp,stat", gtk_wspstat_init);
+       register_stat_cmd_arg("wsp,stat", gtk_wspstat_init);
 
-       register_tap_menu_item("WAP-WSP...", REGISTER_TAP_GROUP_TELEPHONY,
+       register_stat_menu_item("WAP-WSP...", REGISTER_STAT_GROUP_TELEPHONY,
            gtk_tap_dfilter_dlg_cb, NULL, NULL, &(wsp_stat_dlg));
 }
diff --git a/stat.c b/stat.c
new file mode 100644 (file)
index 0000000..369d420
--- /dev/null
+++ b/stat.c
@@ -0,0 +1,122 @@
+/* stat.c
+ * Routines to register "-z" command-line argument or Statistics menu item
+ * handlers
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+
+#include <string.h>
+
+#include <glib.h>
+
+#include "stat.h"
+
+/* structure to keep track of what stats have registered command-line
+   arguments.
+ */
+typedef struct _stat_cmd_arg {
+       struct _stat_cmd_arg *next;
+       const char *cmd;
+       void (*func)(const char *arg);
+} stat_cmd_arg;
+static stat_cmd_arg *stat_cmd_arg_list=NULL;
+
+/* structure to keep track of what stats have been specified on the
+   command line.
+ */
+typedef struct {
+       stat_cmd_arg *sca;
+       char *arg;
+} stat_requested;
+static GSList *stats_requested = NULL;
+
+/* **********************************************************************
+ * Function called from stat to register the stat's command-line argument
+ * and initialization routine
+ * ********************************************************************** */
+void
+register_stat_cmd_arg(const char *cmd, void (*func)(const char *arg))
+{
+       stat_cmd_arg *newsca;
+
+       newsca=g_malloc(sizeof(stat_cmd_arg));
+       newsca->next=stat_cmd_arg_list;
+       stat_cmd_arg_list=newsca;
+       newsca->cmd=cmd;
+       newsca->func=func;
+}
+
+/* **********************************************************************
+ * Function called for a stat command-line argument
+ * ********************************************************************** */
+gboolean
+process_stat_cmd_arg(char *optarg)
+{
+       stat_cmd_arg *sca;
+       stat_requested *tr;
+
+       for(sca=stat_cmd_arg_list;sca;sca=sca->next){
+               if(!strncmp(sca->cmd,optarg,strlen(sca->cmd))){
+                       tr=g_malloc(sizeof (stat_requested));
+                       tr->sca = sca;
+                       tr->arg=g_strdup(optarg);
+                       stats_requested=g_slist_append(stats_requested, tr);
+                       return TRUE;
+               }
+       }
+       return FALSE;
+}
+
+/* **********************************************************************
+ * Function to list all possible tap command-line arguments
+ * ********************************************************************** */
+void
+list_stat_cmd_args(void)
+{
+       stat_cmd_arg *sca;
+
+       for(sca=stat_cmd_arg_list;sca;sca=sca->next){
+               fprintf(stderr,"     %s\n",sca->cmd);
+       }
+}
+
+/* **********************************************************************
+ * Function to process stats requested with command-line arguments
+ * ********************************************************************** */
+void
+start_requested_stats(void)
+{
+       stat_requested *sr;
+
+       while(stats_requested){
+               sr=stats_requested->data;
+               (*sr->sca->func)(sr->arg);
+               g_free(sr->arg);
+               g_free(sr);
+               stats_requested=g_slist_remove(stats_requested, sr);
+       }
+}
diff --git a/stat.h b/stat.h
new file mode 100644 (file)
index 0000000..31f81b4
--- /dev/null
+++ b/stat.h
@@ -0,0 +1,35 @@
+/* stat.h
+ * Declarations of routines to register "-z" command-line argument or
+ * Statistics menu item handlers
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifndef _STAT_H_
+#define _STAT_H_
+
+extern void register_stat_cmd_arg(const char *cmd,
+    void (*func)(const char *arg));
+extern gboolean process_stat_cmd_arg(char *optarg);
+extern void list_stat_cmd_args(void);
+extern void start_requested_stats(void);
+
+#endif
index 34f6684091ff8f886676c41ba5f707a43febe5ec..83d9c320b5b5aea37194acb37c1b77d4b12d55df 100644 (file)
@@ -44,6 +44,7 @@
 #include <epan/tap.h>
 #include <epan/dissectors/packet-bssap.h>
 #include <epan/dissectors/packet-ansi_a.h>
+#include "stat.h"
 #include "register.h"
 
 
@@ -162,5 +163,5 @@ ansi_a_stat_init(const char *optarg _U_)
 void
 register_tap_listener_ansi_astat(void)
 {
-    register_tap_listener_cmd_arg("ansi_a,", ansi_a_stat_init);
+    register_stat_cmd_arg("ansi_a,", ansi_a_stat_init);
 }
index a7b08ec0c2f26e4e78d1e43a37e56e50a3b9fdc2..3d722bb12514cfed35ac27b48623cfbac969840b 100644 (file)
 #endif
 
 #include <stdio.h>
+#include <string.h>
 
 #include "epan/packet_info.h"
 #include <epan/tap.h>
+#include "stat.h"
 #include "register.h"
-#include <string.h>
 
 
 typedef const char* bootp_info_value_t;
@@ -181,6 +182,6 @@ dhcpstat_init(const char *optarg)
 void
 register_tap_listener_gtkdhcpstat(void)
 {
-       register_tap_listener_cmd_arg("bootp,stat,", dhcpstat_init);
+       register_stat_cmd_arg("bootp,stat,", dhcpstat_init);
 }
 
index a3dce1e4da291d7a68b3aae410b3ec5a391e13b4..18a2402447200012c58b969ca668da6fffdcd3d1 100644 (file)
@@ -36,6 +36,7 @@
 #include "epan/packet_info.h"
 #include <epan/tap.h>
 #include <epan/dissectors/packet-dcerpc.h>
+#include "stat.h"
 #include "register.h"
 
 /* used to keep track of statistics for a specific procedure */
@@ -305,5 +306,5 @@ dcerpcstat_init(const char *optarg)
 void
 register_tap_listener_dcerpcstat(void)
 {
-       register_tap_listener_cmd_arg("dcerpc,rtt,", dcerpcstat_init);
+       register_stat_cmd_arg("dcerpc,rtt,", dcerpcstat_init);
 }
index 0390e4e53dddf1af469ed3c44a757b7d77a20102..d5096d47dc2f41a30469d2c2ef776e9f9cd07e07 100644 (file)
@@ -44,6 +44,7 @@
 #include <epan/tap.h>
 #include <epan/dissectors/packet-bssap.h>
 #include <epan/dissectors/packet-gsm_a.h>
+#include "stat.h"
 #include "register.h"
 
 
@@ -297,5 +298,5 @@ gsm_a_stat_init(const char *optarg _U_)
 void
 register_tap_listener_gsm_astat(void)
 {
-    register_tap_listener_cmd_arg("gsm_a,", gsm_a_stat_init);
+    register_stat_cmd_arg("gsm_a,", gsm_a_stat_init);
 }
index 90950ab509e141151d048e3568d52737883fc445..a19f0b5c1fa9f009f7966cebb15d2e72bfbf232f 100644 (file)
@@ -37,6 +37,7 @@
 #include "epan/packet_info.h"
 #include <epan/tap.h>
 #include "epan/value_string.h"
+#include "stat.h"
 #include "register.h"
 #include <epan/dissectors/packet-h225.h>
 
@@ -422,5 +423,5 @@ h225counter_init(const char *optarg)
 void
 register_tap_listener_h225counter(void)
 {
-       register_tap_listener_cmd_arg("h225,counter", h225counter_init);
+       register_stat_cmd_arg("h225,counter", h225counter_init);
 }
index c4fc55c9fcbc90e87ea579362b0f87711386a87e..0bb9148fc758de7615f1ab929f3577d8497a0346 100644 (file)
@@ -37,6 +37,7 @@
 #include "epan/packet_info.h"
 #include <epan/tap.h>
 #include "epan/value_string.h"
+#include "stat.h"
 #include "register.h"
 #include <epan/dissectors/packet-h225.h>
 #include "timestats.h"
@@ -246,5 +247,5 @@ h225rassrt_init(const char *optarg)
 void
 register_tap_listener_h225rassrt(void)
 {
-       register_tap_listener_cmd_arg("h225,srt", h225rassrt_init);
+       register_stat_cmd_arg("h225,srt", h225rassrt_init);
 }
index 6d4db1306376273d73cc79acb18daf29f19efc24..8d48e847561de2883ce443b1ab90fb0725df8b0e 100644 (file)
@@ -32,6 +32,7 @@
 #include "epan/packet_info.h"
 #include "epan/value_string.h"
 #include <epan/tap.h>
+#include "stat.h"
 #include "register.h"
 #include <epan/dissectors/packet-http.h>
 
@@ -325,5 +326,5 @@ gtk_httpstat_init(const char *optarg)
 void
 register_tap_listener_gtkhttpstat(void)
 {
-       register_tap_listener_cmd_arg("http,stat,", gtk_httpstat_init);
+       register_stat_cmd_arg("http,stat,", gtk_httpstat_init);
 }
index c25f430108adc26caedc1ba31a588e268581990e..b3a60619884656826b5888de869e67a40655cb60 100644 (file)
@@ -36,6 +36,7 @@
 #include "epan/epan_dissect.h"
 #include "epan/packet_info.h"
 #include <epan/tap.h>
+#include "stat.h"
 #include "register.h"
 
 
@@ -651,5 +652,5 @@ iostat_init(const char *optarg)
 void
 register_tap_listener_iostat(void)
 {
-       register_tap_listener_cmd_arg("io,stat,", iostat_init);
+       register_stat_cmd_arg("io,stat,", iostat_init);
 }
index 8ae39be9839293ad1fe40b612aed8714eb740071..37169311f49b53fd8eed9dce6ed896cc1d821726 100644 (file)
@@ -37,6 +37,7 @@
 #include <epan/packet.h>
 #include <epan/addr_resolv.h>
 #include <epan/tap.h>
+#include "stat.h"
 #include "register.h"
 #include <epan/dissectors/packet-ip.h>
 #include <epan/dissectors/packet-ipx.h>
@@ -47,7 +48,6 @@
 #include <epan/dissectors/packet-tr.h>
 #include <epan/dissectors/packet-fc.h>
 #include <epan/dissectors/packet-fddi.h>
-#include <string.h>
 
 typedef struct _io_users_t {
        const char *type;
@@ -710,5 +710,5 @@ iousers_init(const char *optarg)
 void
 register_tap_listener_iousers(void)
 {
-       register_tap_listener_cmd_arg("conv,", iousers_init);
+       register_stat_cmd_arg("conv,", iousers_init);
 }
index bb38620bb1c4fb76985b0507fa804c43227ead5a..9f01a523f71223fb02cfde34c09982e1df118026 100644 (file)
@@ -36,6 +36,7 @@
 #include "epan/packet_info.h"
 #include <epan/tap.h>
 #include "epan/value_string.h"
+#include "stat.h"
 #include "register.h"
 #include "plugins/mgcp/packet-mgcp.h"
 #include "timestats.h"
@@ -234,7 +235,7 @@ register_tap_listener_mgcpstat(void)
 {
        /* We don't register this tap, if we don't have the mgcp plugin loaded.*/
        if (find_tap_id("mgcp")) {
-               register_tap_listener_cmd_arg("mgcp,rtd", mgcpstat_init);
+               register_stat_cmd_arg("mgcp,rtd", mgcpstat_init);
        }
 }
 
index 8c66866b52aa857ab69e3f35f048a8cd630b165b..19d4cb0379a015ace2300d95ab3d715be953dcda 100644 (file)
@@ -39,6 +39,7 @@
 #include "epan/column-utils.h"
 #include "epan/proto.h"
 #include <epan/tap.h>
+#include "stat.h"
 #include "register.h"
 
 typedef struct _pci_t {
@@ -142,6 +143,6 @@ protocolinfo_init(const char *optarg)
 void
 register_tap_listener_protocolinfo(void)
 {
-       register_tap_listener_cmd_arg("proto,colinfo,", protocolinfo_init);
+       register_stat_cmd_arg("proto,colinfo,", protocolinfo_init);
 }
 
index ac3721a66d5857db1e2c5ac8ab52ea30f928fb90..81f1eda94f8c8d92cf0a72d3df5405fbd4f09734 100644 (file)
@@ -39,6 +39,7 @@
 #include "epan/epan_dissect.h"
 #include "epan/proto.h"
 #include <epan/tap.h>
+#include "stat.h"
 #include "register.h"
 
 typedef struct _phs_t {
@@ -216,6 +217,6 @@ protohierstat_init(const char *optarg)
 void
 register_tap_listener_protohierstat(void)
 {
-       register_tap_listener_cmd_arg("io,phs", protohierstat_init);
+       register_stat_cmd_arg("io,phs", protohierstat_init);
 }
 
index 9a1980e1707be72299669e9fdfb9e29c7460c7e5..a7dc8d9ddae683cd28879e7ee10334c6e0036fdb 100644 (file)
@@ -40,6 +40,7 @@
 #include "epan/packet_info.h"
 #include <epan/tap.h>
 #include <epan/dissectors/packet-rpc.h>
+#include "stat.h"
 #include "register.h"
 
 /* used to keep track of statistics for a specific program/version */
@@ -242,7 +243,7 @@ rpcprogs_init(const char *optarg _U_)
 void
 register_tap_listener_rpcprogs(void)
 {
-       register_tap_listener_cmd_arg("rpc,programs", rpcprogs_init);
+       register_stat_cmd_arg("rpc,programs", rpcprogs_init);
 }
 
 
index cfd4cc3827519b355da8577e71673ff0f743cf6d..171dc64f7ec8fa321e84ac9c049cd3cdd983774f 100644 (file)
@@ -42,6 +42,7 @@
 #include "epan/packet_info.h"
 #include <epan/tap.h>
 #include <epan/dissectors/packet-rpc.h>
+#include "stat.h"
 #include "register.h"
 
 /* used to keep track of statistics for a specific procedure */
@@ -360,6 +361,6 @@ rpcstat_init(const char *optarg)
 void
 register_tap_listener_rpcstat(void)
 {
-       register_tap_listener_cmd_arg("rpc,rtt,", rpcstat_init);
+       register_stat_cmd_arg("rpc,rtt,", rpcstat_init);
 }
 
index 5d60ccbab99ac34076fa7c0625b74d198f65f1bc..9fb7d114aea8b06325f7063a07b7e6bc57bc34f3 100644 (file)
@@ -38,6 +38,7 @@
 #include "epan/addr_resolv.h"
 #include <epan/tap.h>
 #include "epan/value_string.h"
+#include "stat.h"
 #include "register.h"
 #include <epan/dissectors/packet-sctp.h>
 
@@ -256,5 +257,5 @@ sctpstat_init(const char *optarg)
 void
 register_tap_listener_sctpstat(void)
 {
-       register_tap_listener_cmd_arg("sctp,stat", sctpstat_init);
+       register_stat_cmd_arg("sctp,stat", sctpstat_init);
 }
index 190506a099cded2c2c6376eec5a515a8156fa198..65f008502fb551b59d8f9a5905d157cd6da22fea 100644 (file)
@@ -37,6 +37,7 @@
 #include "epan/packet_info.h"
 #include <epan/tap.h>
 #include "epan/value_string.h"
+#include "stat.h"
 #include "register.h"
 #include <epan/dissectors/packet-sip.h>
 
@@ -390,5 +391,5 @@ sipstat_init(const char *optarg)
 void
 register_tap_listener_sipstat(void)
 {
-       register_tap_listener_cmd_arg("sip,stat", sipstat_init);
+       register_stat_cmd_arg("sip,stat", sipstat_init);
 }
index 641140bffebff2e116b3b36eb851d76527266b23..8da279bb558942d7d2a1d6fc60585dddf472ac25 100644 (file)
@@ -35,6 +35,7 @@
 #include <string.h>
 #include "epan/packet_info.h"
 #include <epan/dissectors/packet-smb-sidsnooping.h>
+#include "stat.h"
 #include "register.h"
 #include <epan/tap.h>
 #include "epan/value_string.h"
@@ -95,6 +96,6 @@ smbsids_init(const char *optarg _U_)
 void
 register_tap_listener_smbsids(void)
 {
-       register_tap_listener_cmd_arg("smb,sids", smbsids_init);
+       register_stat_cmd_arg("smb,sids", smbsids_init);
 }
 
index 2c5aae3ddb0cef8282d58584d129b8130affc1f0..d63b9fb991e5978e2aeba37e10471e3e0e21744f 100644 (file)
@@ -36,6 +36,7 @@
 #include "epan/packet_info.h"
 #include <epan/tap.h>
 #include "epan/value_string.h"
+#include "stat.h"
 #include "smb.h"
 #include "register.h"
 #include "timestats.h"
@@ -279,6 +280,6 @@ smbstat_init(const char *optarg)
 void
 register_tap_listener_smbstat(void)
 {
-       register_tap_listener_cmd_arg("smb,rtt", smbstat_init);
+       register_stat_cmd_arg("smb,rtt", smbstat_init);
 }
 
index 9533ac533a6f4f06909da09d8ed57d698c0ba6da..f126a38e8288596c09b0257407b3984faa684b17 100644 (file)
@@ -31,6 +31,7 @@
 #include <stdio.h>
 #include <glib.h>
 #include <epan/stats_tree_priv.h>
+#include "stat.h"
 
 /* actually unused */
 struct _st_node_pres {
@@ -113,7 +114,7 @@ void register_stats_tree_tap (gpointer k _U_, gpointer v, gpointer p _U_) {
        cfg->pr = g_malloc(sizeof(tree_cfg_pres));
        cfg->pr->init_string = g_strdup_printf("%s,tree",cfg->abbr);
 
-       register_tap_listener_cmd_arg(cfg->pr->init_string, init_stats_tree);
+       register_stat_cmd_arg(cfg->pr->init_string, init_stats_tree);
        
 }
 
index d22610b35b996e086e31e6b7bafb39a9ff7c8cdb..a5d744e9c95999b6e6a06d11183bdee0588b9364 100644 (file)
@@ -40,6 +40,7 @@
 #include <string.h>
 #include "epan/packet_info.h"
 #include <epan/tap.h>
+#include "stat.h"
 #include "register.h"
 #include "epan/value_string.h"
 #include <epan/dissectors/packet-wsp.h>
@@ -280,5 +281,5 @@ wspstat_init(const char *optarg)
 void 
 register_tap_listener_wspstat(void)
 {
-       register_tap_listener_cmd_arg("wsp,stat,", wspstat_init);
+       register_stat_cmd_arg("wsp,stat,", wspstat_init);
 }
index afd7e47c039d12d623e6b57d0304af7ee3b4427e..a4f0166c849b21c4e2920f6c4e5687bc175b449d 100644 (file)
@@ -36,7 +36,7 @@
  *    on the start button in the display filter dialog.
  * 4) the index with "-1"
  *
- * Within register_tap_menu_yourtap(void), call register_tap_menu_item() with gtk_tap_dfilter_dlg_cb as callback and a pointer 
+ * Within register_tap_menu_yourtap(void), call register_stat_menu_item() with gtk_tap_dfilter_dlg_cb as callback and a pointer 
  * to the global tap_dfilter_dlg structure .
  *
  * Usage:
@@ -44,7 +44,7 @@
  * tap_dfilter_dlg my_tap_dfilter_dlg = {"My Title", "myproto,mytap", gtk_mytap_init, -1};
  *
  * register_tap_menu_mytap(void) {
- *   register_tap_menu_item(char *menu_string, gtk_tap_dfilter_dlg_cb, NULL, NULL, &(my_tap_dfilter_dlg));
+ *   register_stat_menu_item(char *menu_string, gtk_tap_dfilter_dlg_cb, NULL, NULL, &(my_tap_dfilter_dlg));
  * }
  *
  * See also: h225_ras_srt.c or h225_counter.c
index ec69777f28963f775c71a3e20dac2761a9ea018e..028d85479b4bde1df778f174f7f2d2c8c345dc73 100644 (file)
@@ -1009,15 +1009,15 @@ main(int argc, char *argv[])
         print_hex = TRUE;
         break;
       case 'z':
-        /* We won't call the init function for the tap this soon
+        /* We won't call the init function for the stat this soon
            as it would disallow MATE's fields (which are registered
            by the preferences set callback) from being used as
            part of a tap filter.  Instead, we just add the argument
-           to a list of tap arguments. */
-        if (!process_tap_cmd_arg(optarg)) {
+           to a list of stat arguments. */
+        if (!process_stat_cmd_arg(optarg)) {
          fprintf(stderr,"tethereal: invalid -z argument.\n");
          fprintf(stderr,"  -z argument must be one of :\n");
-         list_tap_cmd_args();
+         list_stat_cmd_args();
          exit(1);
        }
         break;
@@ -1196,9 +1196,9 @@ main(int argc, char *argv[])
   prefs_apply_all();
 
   /* At this point MATE will have registered its field array so we can
-     have a filter with one of MATE's late-registered fields as part
-     of the tap's filter.  We can now process all the "-z" arguments. */
-  start_requested_taps();
+     have a tap filter with one of MATE's late-registered fields as part
+     of the filter.  We can now process all the "-z" arguments. */
+  start_requested_stats();
   
   /* disabled protocols as per configuration file */
   if (gdp_path == NULL && dp_path == NULL) {