forked from osmocom/wireshark
Redesigned the menu structure of the former statistics stuff,
now sorted by ISO-layer, than alphabetically (now longer by functionality). Seperated the tap registering from the actual menu making stuff, so the seperate step of registering the tap and the menu is no longer needed. Removed all things related to this double registering. svn path=/trunk/; revision=10180
This commit is contained in:
parent
26a84495c8
commit
cdebea69ce
|
@ -3,7 +3,7 @@
|
|||
# a) common to both files and
|
||||
# b) portable between both files
|
||||
#
|
||||
# $Id: Makefile.common,v 1.6 2004/02/20 09:09:11 guy Exp $
|
||||
# $Id: Makefile.common,v 1.7 2004/02/22 18:44:02 ulfl Exp $
|
||||
#
|
||||
# Ethereal - Network traffic analyzer
|
||||
# By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -46,7 +46,6 @@ ETHEREAL_GTK_SRC = \
|
|||
file_dlg.c \
|
||||
filter_prefs.c \
|
||||
find_dlg.c \
|
||||
follow_dlg.c \
|
||||
goto_dlg.c \
|
||||
gtk_stat_util.c \
|
||||
gui_prefs.c \
|
||||
|
@ -73,7 +72,6 @@ ETHEREAL_GTK_SRC = \
|
|||
summary_dlg.c \
|
||||
supported_protos_dlg.c \
|
||||
tap_dfilter_dlg.c \
|
||||
tcp_graph.c \
|
||||
toolbar.c \
|
||||
ui_util.c
|
||||
|
||||
|
@ -92,6 +90,7 @@ ETHEREAL_TAP_SRC = \
|
|||
endpoint_talkers_tr.c \
|
||||
endpoint_talkers_udpip.c \
|
||||
fc_stat.c \
|
||||
follow_dlg.c \
|
||||
gsm_a_stat.c \
|
||||
gsm_map_stat.c \
|
||||
h225_counter.c \
|
||||
|
@ -113,5 +112,6 @@ ETHEREAL_TAP_SRC = \
|
|||
rpc_stat.c \
|
||||
rtp_analysis.c \
|
||||
rtp_stream_dlg.c \
|
||||
tcp_graph.c \
|
||||
smb_stat.c \
|
||||
wsp_stat.c
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* MUCH code modified from service_response_time_table.c.
|
||||
*
|
||||
* $Id: ansi_a_stat.c,v 1.13 2004/02/11 04:28:47 guy Exp $
|
||||
* $Id: ansi_a_stat.c,v 1.14 2004/02/22 18:44:00 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -534,12 +534,9 @@ register_tap_listener_gtkansi_a_stat(void)
|
|||
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_gtkansi_a_stat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/ANSI A-Interface/BSMAP", ansi_a_stat_gtk_bsmap_cb, NULL, NULL ,NULL);
|
||||
register_tap_menu_item("_Statistics/ANSI A-Interface/DTAP", ansi_a_stat_gtk_dtap_cb, NULL, NULL ,NULL);
|
||||
register_tap_menu_item("ANSI/A-Interface BSMAP", REGISTER_TAP_LAYER_APPLICATION,
|
||||
ansi_a_stat_gtk_bsmap_cb, NULL, NULL ,NULL);
|
||||
register_tap_menu_item("ANSI/A-Interface DTAP", REGISTER_TAP_LAYER_APPLICATION,
|
||||
ansi_a_stat_gtk_dtap_cb, NULL, NULL ,NULL);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* MUCH code modified from service_response_time_table.c.
|
||||
*
|
||||
* $Id: ansi_map_stat.c,v 1.16 2004/02/11 04:28:47 guy Exp $
|
||||
* $Id: ansi_map_stat.c,v 1.17 2004/02/22 18:44:00 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -467,11 +467,7 @@ register_tap_listener_gtkansi_map_stat(void)
|
|||
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_gtkansi_map_stat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/ANSI MAP Operation", ansi_map_stat_gtk_cb, NULL, NULL, NULL);
|
||||
register_tap_menu_item("ANSI/MAP Operation", REGISTER_TAP_LAYER_APPLICATION,
|
||||
ansi_map_stat_gtk_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* bootp_stat.c
|
||||
* boop_stat 2003 Jean-Michel FAYARD
|
||||
*
|
||||
* $Id: bootp_stat.c,v 1.18 2004/02/13 00:53:34 guy Exp $
|
||||
* $Id: bootp_stat.c,v 1.19 2004/02/22 18:44:00 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -357,11 +357,7 @@ void
|
|||
register_tap_listener_gtkdhcpstat(void)
|
||||
{
|
||||
register_ethereal_tap("bootp,stat,", gtk_dhcpstat_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtkdhcpstat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Watch protocol/BOOTP-DHCP...",
|
||||
register_tap_menu_item("BOOTP-DHCP (Watch Protocol)", REGISTER_TAP_LAYER_NETWORK,
|
||||
gtk_dhcpstat_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* dcerpc_stat.c
|
||||
* dcerpc_stat 2002 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: dcerpc_stat.c,v 1.49 2004/02/13 00:53:34 guy Exp $
|
||||
* $Id: dcerpc_stat.c,v 1.50 2004/02/22 18:44:00 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -676,11 +676,7 @@ void
|
|||
register_tap_listener_gtkdcerpcstat(void)
|
||||
{
|
||||
register_ethereal_tap("dcerpc,srt,", gtk_dcerpcstat_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtkdcerpcstat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Service Response Time/DCE-RPC...",
|
||||
register_tap_menu_item("DCE-RPC (Service Response Time...)", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gtk_dcerpcstat_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* endpoint_talkers_eth.c
|
||||
* endpoint_talkers_eth 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: endpoint_talkers_eth.c,v 1.22 2004/02/11 04:28:47 guy Exp $
|
||||
* $Id: endpoint_talkers_eth.c,v 1.23 2004/02/22 18:44:00 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -76,19 +76,12 @@ gtk_eth_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_eth_talkers(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Conversation List/Ethernet",
|
||||
gtk_eth_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_eth_talkers(void)
|
||||
{
|
||||
register_ethereal_tap("conv,eth", gtk_eth_talkers_init);
|
||||
|
||||
register_tap_menu_item("Ethernet/Conversation List", REGISTER_TAP_LAYER_DATA_LINK,
|
||||
gtk_eth_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* endpoint_talkers_fc.c
|
||||
* endpoint_talkers_fc 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: endpoint_talkers_fc.c,v 1.22 2004/02/11 04:28:47 guy Exp $
|
||||
* $Id: endpoint_talkers_fc.c,v 1.23 2004/02/22 18:44:00 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -76,19 +76,12 @@ gtk_fc_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_fc_talkers(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Conversation List/Fibre Channel",
|
||||
gtk_fc_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_fc_talkers(void)
|
||||
{
|
||||
register_ethereal_tap("conv,fc", gtk_fc_talkers_init);
|
||||
|
||||
register_tap_menu_item("Fibre Channel/Conversation List", REGISTER_TAP_LAYER_DATA_LINK,
|
||||
gtk_fc_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* endpoint_talkers_fddi.c
|
||||
* endpoint_talkers_fddi 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: endpoint_talkers_fddi.c,v 1.17 2004/02/11 04:28:47 guy Exp $
|
||||
* $Id: endpoint_talkers_fddi.c,v 1.18 2004/02/22 18:44:00 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -76,19 +76,12 @@ gtk_fddi_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_fddi_talkers(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Conversation List/FDDI",
|
||||
gtk_fddi_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_fddi_talkers(void)
|
||||
{
|
||||
register_ethereal_tap("conv,fddi", gtk_fddi_talkers_init);
|
||||
|
||||
register_tap_menu_item("FDDI/Conversation List", REGISTER_TAP_LAYER_DATA_LINK,
|
||||
gtk_fddi_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* endpoint_talkers_ip.c
|
||||
* endpoint_talkers_ip 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: endpoint_talkers_ip.c,v 1.23 2004/02/11 04:28:47 guy Exp $
|
||||
* $Id: endpoint_talkers_ip.c,v 1.24 2004/02/22 18:44:00 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -74,19 +74,12 @@ gtk_ip_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_ip_talkers(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Conversation List/IPv4",
|
||||
gtk_ip_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_ip_talkers(void)
|
||||
{
|
||||
register_ethereal_tap("conv,ip", gtk_ip_talkers_init);
|
||||
|
||||
register_tap_menu_item("IP/Conversation List (IPv4)", REGISTER_TAP_LAYER_NETWORK,
|
||||
gtk_ip_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* endpoint_talkers_ipx.c
|
||||
* endpoint_talkers_ipx 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: endpoint_talkers_ipx.c,v 1.21 2004/02/11 04:28:47 guy Exp $
|
||||
* $Id: endpoint_talkers_ipx.c,v 1.22 2004/02/22 18:44:00 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -76,19 +76,12 @@ gtk_ipx_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_ipx_talkers(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Conversation List/IPX",
|
||||
gtk_ipx_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_ipx_talkers(void)
|
||||
{
|
||||
register_ethereal_tap("conv,ipx", gtk_ipx_talkers_init);
|
||||
|
||||
register_tap_menu_item("IPX/Conversation List", REGISTER_TAP_LAYER_NETWORK,
|
||||
gtk_ipx_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* endpoint_talkers_tcpip.c
|
||||
* endpoint_talkers_tcpip 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: endpoint_talkers_tcpip.c,v 1.24 2004/02/11 04:28:48 guy Exp $
|
||||
* $Id: endpoint_talkers_tcpip.c,v 1.25 2004/02/22 18:44:00 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -76,19 +76,12 @@ gtk_tcpip_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_tcpip_talkers(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Conversation List/TCP (IPv4 IPv6)",
|
||||
gtk_tcpip_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_tcpip_talkers(void)
|
||||
{
|
||||
register_ethereal_tap("conv,tcp", gtk_tcpip_talkers_init);
|
||||
|
||||
register_tap_menu_item("TCP/Conversation List (IPv4 & IPv6)", REGISTER_TAP_LAYER_TRANSPORT,
|
||||
gtk_tcpip_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* endpoint_talkers_tr.c
|
||||
* endpoint_talkers_tr 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: endpoint_talkers_tr.c,v 1.23 2004/02/11 04:28:48 guy Exp $
|
||||
* $Id: endpoint_talkers_tr.c,v 1.24 2004/02/22 18:44:00 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -76,19 +76,12 @@ gtk_tr_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_tr_talkers(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Conversation List/Token Ring",
|
||||
gtk_tr_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_tr_talkers(void)
|
||||
{
|
||||
register_ethereal_tap("conv,tr", gtk_tr_talkers_init);
|
||||
|
||||
register_tap_menu_item("Token Ring/Conversation List", REGISTER_TAP_LAYER_DATA_LINK,
|
||||
gtk_tr_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* endpoint_talkers_udpip.c
|
||||
* endpoint_talkers_udpip 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: endpoint_talkers_udpip.c,v 1.24 2004/02/11 04:28:48 guy Exp $
|
||||
* $Id: endpoint_talkers_udpip.c,v 1.25 2004/02/22 18:44:01 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -76,19 +76,12 @@ gtk_udpip_endpoints_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_udpip_talkers(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Conversation List/UDP (IPv4 IPv6)",
|
||||
gtk_udpip_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_udpip_talkers(void)
|
||||
{
|
||||
register_ethereal_tap("conv,udp", gtk_udpip_talkers_init);
|
||||
|
||||
register_tap_menu_item("UDP/Conversation List (IPv4 & IPv6)", REGISTER_TAP_LAYER_TRANSPORT,
|
||||
gtk_udpip_endpoints_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* fc_stat.c
|
||||
* fc_stat 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: fc_stat.c,v 1.25 2004/02/13 00:53:35 guy Exp $
|
||||
* $Id: fc_stat.c,v 1.26 2004/02/22 18:44:01 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -312,11 +312,7 @@ void
|
|||
register_tap_listener_gtkfcstat(void)
|
||||
{
|
||||
register_ethereal_tap("fc,srt", gtk_fcstat_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtkfcstat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Service Response Time/Fibre Channel...",
|
||||
register_tap_menu_item("Fibre Channel/Service Response Time...", REGISTER_TAP_LAYER_DATA_LINK,
|
||||
gtk_fcstat_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* follow_dlg.c
|
||||
*
|
||||
* $Id: follow_dlg.c,v 1.46 2004/02/13 00:53:35 guy Exp $
|
||||
* $Id: follow_dlg.c,v 1.47 2004/02/22 18:44:01 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -64,6 +64,8 @@
|
|||
#include <epan/epan_dissect.h>
|
||||
#include <epan/filesystem.h>
|
||||
#include "compat_macros.h"
|
||||
#include "ipproto.h"
|
||||
#include "tap_menu.h"
|
||||
|
||||
/* Show Stream */
|
||||
typedef enum {
|
||||
|
@ -1014,3 +1016,20 @@ follow_save_as_destroy_cb(GtkWidget * win _U_, gpointer data)
|
|||
/* Note that we no longer have a dialog box. */
|
||||
follow_info->follow_save_as_w = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
gboolean follow_stream_selected_packet_enabled(frame_data *current_frame, epan_dissect_t *edt)
|
||||
{
|
||||
return current_frame != NULL ? (edt->pi.ipproto == IP_PROTO_TCP) : FALSE;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_follow_stream(void)
|
||||
{
|
||||
register_tap_menu_item("TCP/Follow Stream", REGISTER_TAP_LAYER_TRANSPORT,
|
||||
follow_stream_cb, follow_stream_selected_packet_enabled, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* MUCH code modified from service_response_time_table.c.
|
||||
*
|
||||
* $Id: gsm_a_stat.c,v 1.13 2004/02/11 04:28:48 guy Exp $
|
||||
* $Id: gsm_a_stat.c,v 1.14 2004/02/22 18:44:01 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -690,33 +690,28 @@ register_tap_listener_gtkgsm_a_stat(void)
|
|||
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_gtkgsm_a_stat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/GSM A-Interface/BSSMAP",
|
||||
register_tap_menu_item("GSM/A-Interface BSSMAP", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gsm_a_stat_gtk_bssmap_cb, NULL, NULL, NULL);
|
||||
|
||||
register_tap_menu_item("_Statistics/GSM A-Interface/DTAP/Mobility Management",
|
||||
register_tap_menu_item("GSM/A-Interface DTAP/Mobility Management", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gsm_a_stat_gtk_dtap_mm_cb, NULL, NULL, NULL);
|
||||
|
||||
register_tap_menu_item("_Statistics/GSM A-Interface/DTAP/Radio Resource Management",
|
||||
register_tap_menu_item("GSM/A-Interface DTAP/Radio Resource Management", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gsm_a_stat_gtk_dtap_rr_cb, NULL, NULL, NULL);
|
||||
|
||||
register_tap_menu_item("_Statistics/GSM A-Interface/DTAP/Call Control",
|
||||
register_tap_menu_item("GSM/A-Interface DTAP/Call Control", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gsm_a_stat_gtk_dtap_cc_cb, NULL, NULL, NULL);
|
||||
|
||||
register_tap_menu_item("_Statistics/GSM A-Interface/DTAP/GPRS Mobility Management",
|
||||
register_tap_menu_item("GSM/A-Interface DTAP/GPRS Mobility Management", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gsm_a_stat_gtk_dtap_gmm_cb, NULL, NULL, NULL);
|
||||
|
||||
register_tap_menu_item("_Statistics/GSM A-Interface/DTAP/Short Message Service",
|
||||
register_tap_menu_item("GSM/A-Interface DTAP/Short Message Service", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gsm_a_stat_gtk_dtap_sms_cb, NULL, NULL, NULL);
|
||||
|
||||
register_tap_menu_item("_Statistics/GSM A-Interface/DTAP/GPRS Session Management",
|
||||
register_tap_menu_item("GSM/A-Interface DTAP/GPRS Session Management", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gsm_a_stat_gtk_dtap_sm_cb, NULL, NULL, NULL);
|
||||
|
||||
register_tap_menu_item("_Statistics/GSM A-Interface/DTAP/Supplementary Services",
|
||||
register_tap_menu_item("GSM/A-Interface DTAP/Supplementary Services", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gsm_a_stat_gtk_dtap_ss_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* MUCH code modified from service_response_time_table.c.
|
||||
*
|
||||
* $Id: gsm_map_stat.c,v 1.2 2004/02/18 04:11:42 jmayer Exp $
|
||||
* $Id: gsm_map_stat.c,v 1.3 2004/02/22 18:44:01 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -478,11 +478,7 @@ register_tap_listener_gtkgsm_map_stat(void)
|
|||
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_gtkgsm_map_stat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/GSM MAP Operation", gsm_map_stat_gtk_cb, NULL, NULL, NULL);
|
||||
register_tap_menu_item("GSM/MAP Operation", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gsm_map_stat_gtk_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* h225 message counter for ethereal
|
||||
* Copyright 2003 Lars Roland
|
||||
*
|
||||
* $Id: h225_counter.c,v 1.12 2004/02/13 00:53:35 guy Exp $
|
||||
* $Id: h225_counter.c,v 1.13 2004/02/22 18:44:01 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -519,11 +519,7 @@ void
|
|||
register_tap_listener_gtk_h225counter(void)
|
||||
{
|
||||
register_ethereal_tap("h225,counter", gtk_h225counter_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtk_h225counter(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Watch protocol/ITU-T H.225...",
|
||||
register_tap_menu_item("ITU-T H.225/Watch Protocol...", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gtk_tap_dfilter_dlg_cb, NULL, NULL, &(h225_counter_dlg));
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* h225 RAS Service Response Time statistics for ethereal
|
||||
* Copyright 2003 Lars Roland
|
||||
*
|
||||
* $Id: h225_ras_srt.c,v 1.11 2004/02/13 00:53:35 guy Exp $
|
||||
* $Id: h225_ras_srt.c,v 1.12 2004/02/22 18:44:01 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -316,11 +316,7 @@ void
|
|||
register_tap_listener_gtk_h225rassrt(void)
|
||||
{
|
||||
register_ethereal_tap("h225,srt", gtk_h225rassrt_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtk_h225rassrt(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Service Response Time/ITU-T H.225 RAS ...",
|
||||
register_tap_menu_item("ITU-T H.225/RAS (Service Response Time ...)", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gtk_tap_dfilter_dlg_cb, NULL, NULL, &(h225_rassrt_dlg));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* hostlist_eth.c 2004 Ian Schorr
|
||||
* modified from endpoint_talkers_eth.c 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: hostlist_eth.c,v 1.1 2004/02/20 09:09:11 guy Exp $
|
||||
* $Id: hostlist_eth.c,v 1.2 2004/02/22 18:44:01 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -80,19 +80,12 @@ gtk_eth_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_eth_hostlist(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Host List/Ethernet",
|
||||
gtk_eth_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_eth_hostlist(void)
|
||||
{
|
||||
register_ethereal_tap("conv,eth", gtk_eth_hostlist_init);
|
||||
|
||||
register_tap_menu_item("Ethernet/Host List", REGISTER_TAP_LAYER_DATA_LINK,
|
||||
gtk_eth_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* hostlist_fc.c 2004 Ian Schorr
|
||||
* modified from endpoint_talkers_fc.c 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: hostlist_fc.c,v 1.1 2004/02/20 09:09:11 guy Exp $
|
||||
* $Id: hostlist_fc.c,v 1.2 2004/02/22 18:44:01 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -80,19 +80,12 @@ gtk_fc_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_fc_hostlist(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Host List/Fibre Channel",
|
||||
gtk_fc_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_fc_hostlist(void)
|
||||
{
|
||||
register_ethereal_tap("conv,fc", gtk_fc_hostlist_init);
|
||||
|
||||
register_tap_menu_item("Fibre Channel/Host List", REGISTER_TAP_LAYER_DATA_LINK,
|
||||
gtk_fc_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* hostlist_fddi.c 2004 Ian Schorr
|
||||
* modified from endpoint_talkers_fddi.c 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: hostlist_fddi.c,v 1.1 2004/02/20 09:09:11 guy Exp $
|
||||
* $Id: hostlist_fddi.c,v 1.2 2004/02/22 18:44:01 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -80,19 +80,12 @@ gtk_fddi_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_fddi_hostlist(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Host List/FDDI",
|
||||
gtk_fddi_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_fddi_hostlist(void)
|
||||
{
|
||||
register_ethereal_tap("conv,fddi", gtk_fddi_hostlist_init);
|
||||
|
||||
register_tap_menu_item("FDDI/Host List", REGISTER_TAP_LAYER_DATA_LINK,
|
||||
gtk_fddi_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* hostlist_ip.c 2004 Ian Schorr
|
||||
* modified from endpoint_talkers_ip.c 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: hostlist_ip.c,v 1.1 2004/02/20 09:09:11 guy Exp $
|
||||
* $Id: hostlist_ip.c,v 1.2 2004/02/22 18:44:01 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -79,17 +79,12 @@ gtk_ip_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_ip_hostlist(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Host List/IPv4",
|
||||
gtk_ip_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_ip_hostlist(void)
|
||||
{
|
||||
register_ethereal_tap("conv,ip", gtk_ip_hostlist_init);
|
||||
|
||||
register_tap_menu_item("IP/Host List (IPv4)", REGISTER_TAP_LAYER_NETWORK,
|
||||
gtk_ip_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* hostlist_ipx.c 2004 Ian Schorr
|
||||
* modified from endpoint_talkers_ipx.c 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: hostlist_ipx.c,v 1.1 2004/02/20 09:09:11 guy Exp $
|
||||
* $Id: hostlist_ipx.c,v 1.2 2004/02/22 18:44:02 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -80,19 +80,12 @@ gtk_ipx_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_ipx_hostlist(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Host List/IPX",
|
||||
gtk_ipx_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_ipx_hostlist(void)
|
||||
{
|
||||
register_ethereal_tap("conv,ipx", gtk_ipx_hostlist_init);
|
||||
|
||||
register_tap_menu_item("IPX/Host List", REGISTER_TAP_LAYER_NETWORK,
|
||||
gtk_ipx_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* hostlist_tcpip.c 2004 Ian Schorr
|
||||
* modified from endpoint_talkers_tcpip.c 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: hostlist_tcpip.c,v 1.1 2004/02/20 09:09:12 guy Exp $
|
||||
* $Id: hostlist_tcpip.c,v 1.2 2004/02/22 18:44:02 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -80,19 +80,12 @@ gtk_tcpip_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_tcpip_hostlist(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Host List/TCP (IPv4 IPv6)",
|
||||
gtk_tcpip_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_tcpip_hostlist(void)
|
||||
{
|
||||
register_ethereal_tap("conv,tcp", gtk_tcpip_hostlist_init);
|
||||
|
||||
register_tap_menu_item("TCP/Host List (IPv4 & IPv6)", REGISTER_TAP_LAYER_TRANSPORT,
|
||||
gtk_tcpip_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* hostlist_tr.c 2004 Ian Schorr
|
||||
* modified from endpoint_talkers_tr.c 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: hostlist_tr.c,v 1.1 2004/02/20 09:09:12 guy Exp $
|
||||
* $Id: hostlist_tr.c,v 1.2 2004/02/22 18:44:02 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -80,19 +80,12 @@ gtk_tr_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_tr_hostlist(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Host List/Token Ring",
|
||||
gtk_tr_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_tr_hostlist(void)
|
||||
{
|
||||
register_ethereal_tap("conv,tr", gtk_tr_hostlist_init);
|
||||
|
||||
register_tap_menu_item("Token Ring/Host List", REGISTER_TAP_LAYER_DATA_LINK,
|
||||
gtk_tr_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* hostlist_udpip.c 2004 Ian Schorr
|
||||
* modified from endpoint_talkers_udpip.c 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: hostlist_udpip.c,v 1.1 2004/02/20 09:09:12 guy Exp $
|
||||
* $Id: hostlist_udpip.c,v 1.2 2004/02/22 18:44:02 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -80,19 +80,12 @@ gtk_udpip_hostlist_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_udpip_hostlist(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Host List/UDP (IPv4 IPv6)",
|
||||
gtk_udpip_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_udpip_hostlist(void)
|
||||
{
|
||||
register_ethereal_tap("conv,udp", gtk_udpip_hostlist_init);
|
||||
|
||||
register_tap_menu_item("UDP/Host List (IPv4 & IPv6)", REGISTER_TAP_LAYER_TRANSPORT,
|
||||
gtk_udpip_hostlist_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* http_stat.c
|
||||
* http_stat 2003 Jean-Michel FAYARD
|
||||
*
|
||||
* $Id: http_stat.c,v 1.20 2004/02/13 00:53:35 guy Exp $
|
||||
* $Id: http_stat.c,v 1.21 2004/02/22 18:44:02 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -603,11 +603,7 @@ void
|
|||
register_tap_listener_gtkhttpstat(void)
|
||||
{
|
||||
register_ethereal_tap("http,stat,", gtk_httpstat_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtkhttpstat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Watch protocol/HTTP...",
|
||||
register_tap_menu_item("HTTP (Watch Protocol)", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gtk_httpstat_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* io_stat.c
|
||||
* io_stat 2002 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: io_stat.c,v 1.63 2004/02/13 00:53:35 guy Exp $
|
||||
* $Id: io_stat.c,v 1.64 2004/02/22 18:44:02 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -1791,11 +1791,7 @@ void
|
|||
register_tap_listener_gtk_iostat(void)
|
||||
{
|
||||
register_ethereal_tap("io,stat", gtk_iostat_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtkiostat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/IO/IO-Stat", gtk_iostat_cb, NULL,
|
||||
NULL, NULL);
|
||||
register_tap_menu_item("IO Statistics", REGISTER_TAP_LAYER_GENERIC,
|
||||
gtk_iostat_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* MUCH code modified from service_response_time_table.c.
|
||||
*
|
||||
* $Id: isup_stat.c,v 1.17 2004/02/18 04:11:42 jmayer Exp $
|
||||
* $Id: isup_stat.c,v 1.18 2004/02/22 18:44:02 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -472,11 +472,7 @@ register_tap_listener_gtkisup_stat(void)
|
|||
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_menu_gtkisup_stat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/ISUP Message Type", isup_stat_gtk_cb, NULL, NULL, NULL);
|
||||
register_tap_menu_item("ISUP (Message Types)", REGISTER_TAP_LAYER_APPLICATION,
|
||||
isup_stat_gtk_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* ldap_stat.c
|
||||
* ldap_stat 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: ldap_stat.c,v 1.13 2004/02/13 00:53:35 guy Exp $
|
||||
* $Id: ldap_stat.c,v 1.14 2004/02/22 18:44:02 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -347,11 +347,7 @@ void
|
|||
register_tap_listener_gtkldapstat(void)
|
||||
{
|
||||
register_ethereal_tap("ldap,srt", gtk_ldapstat_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtkldapstat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Service Response Time/LDAP...",
|
||||
register_tap_menu_item("LDAP (Service Response Time...)", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gtk_ldapstat_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* main.c
|
||||
*
|
||||
* $Id: main.c,v 1.403 2004/02/21 13:40:06 ulfl Exp $
|
||||
* $Id: main.c,v 1.404 2004/02/22 18:44:02 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -3787,7 +3787,7 @@ create_main_window (gint pl_size, gint tv_size, gint bv_size, e_prefs *prefs)
|
|||
set_menu_object_data("/File/Open...", E_DFILTER_TE_KEY, filter_te);
|
||||
set_menu_object_data("/Analyze/Display Filters...", E_FILT_TE_PTR_KEY,
|
||||
filter_te);
|
||||
set_menu_object_data("/Analyze/Follow TCP Stream", E_DFILTER_TE_KEY,
|
||||
set_menu_object_data("/Analyze/TCP/Follow Stream", E_DFILTER_TE_KEY,
|
||||
filter_te);
|
||||
set_menu_object_data("/Analyze/Match/Selected", E_DFILTER_TE_KEY,
|
||||
filter_te);
|
||||
|
@ -3814,6 +3814,9 @@ create_main_window (gint pl_size, gint tv_size, gint bv_size, e_prefs *prefs)
|
|||
set_menu_object_data("/Analyze/Prepare/Or Not Selected", E_DFILTER_TE_KEY,
|
||||
filter_te);
|
||||
set_toolbar_object_data(E_DFILTER_TE_KEY, filter_te);
|
||||
/* XXX: why does the popup menues depend on this? */
|
||||
set_menu_object_data("/Follow TCP Stream", E_DFILTER_TE_KEY,
|
||||
filter_te);
|
||||
OBJECT_SET_DATA(popup_menu_object, E_DFILTER_TE_KEY, filter_te);
|
||||
OBJECT_SET_DATA(popup_menu_object, E_MPACKET_LIST_KEY, packet_list);
|
||||
|
||||
|
|
351
gtk/menu.c
351
gtk/menu.c
|
@ -1,7 +1,7 @@
|
|||
/* menu.c
|
||||
* Menu routines
|
||||
*
|
||||
* $Id: menu.c,v 1.166 2004/02/20 18:43:59 ulfl Exp $
|
||||
* $Id: menu.c,v 1.167 2004/02/22 18:44:02 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -77,6 +77,22 @@ extern void savehex_cb(GtkWidget * w, gpointer data _U_);
|
|||
static void
|
||||
clear_menu_recent_capture_file_cmd_cb(GtkWidget *w, gpointer unused _U_);
|
||||
|
||||
typedef struct _menu_item {
|
||||
char *name;
|
||||
gint layer;
|
||||
gboolean enabled;
|
||||
GtkItemFactoryCallback callback;
|
||||
gpointer callback_data;
|
||||
gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *);
|
||||
gboolean (*selected_tree_row_enabled)(field_info *);
|
||||
GList *children;
|
||||
} menu_item_t;
|
||||
|
||||
static GList *tap_menu_tree_root = NULL;
|
||||
|
||||
static void
|
||||
merge_all_tap_menus(GList *node);
|
||||
|
||||
#define GTK_MENU_FUNC(a) ((GtkItemFactoryCallback)(a))
|
||||
|
||||
static void menus_init(void);
|
||||
|
@ -276,20 +292,6 @@ static GtkItemFactoryEntry menu_items[] =
|
|||
ITEM_FACTORY_ENTRY("/Analyze/_User Specified Decodes...", NULL,
|
||||
decode_show_cb, 0, NULL, NULL),
|
||||
ITEM_FACTORY_ENTRY("/Analyze/<separator>", NULL, NULL, 0, "<Separator>", NULL),
|
||||
ITEM_FACTORY_ENTRY("/Analyze/_Follow TCP Stream", NULL, follow_stream_cb,
|
||||
0, NULL, NULL),
|
||||
/* {"/Analyze/Graph", NULL, NULL, 0, NULL}, future use */
|
||||
ITEM_FACTORY_ENTRY("/Analyze/_TCP Stream Analysis", NULL, NULL,
|
||||
0, "<Branch>", NULL),
|
||||
ITEM_FACTORY_ENTRY("/Analyze/TCP Stream Analysis/Time-Sequence Graph (Stevens)",
|
||||
NULL, tcp_graph_cb, 0, NULL, NULL),
|
||||
ITEM_FACTORY_ENTRY("/Analyze/TCP Stream Analysis/Time-Sequence Graph (tcptrace)",
|
||||
NULL, tcp_graph_cb, 1, NULL, NULL),
|
||||
ITEM_FACTORY_ENTRY("/Analyze/TCP Stream Analysis/Throughput Graph", NULL,
|
||||
tcp_graph_cb, 2, NULL, NULL),
|
||||
ITEM_FACTORY_ENTRY("/Analyze/TCP Stream Analysis/Round Trip Time Graph", NULL,
|
||||
tcp_graph_cb, 3, NULL, NULL),
|
||||
ITEM_FACTORY_ENTRY("/Analyze/<separator>", NULL, NULL, 0, "<Separator>", NULL),
|
||||
ITEM_FACTORY_ENTRY("/Analyze/Summar_y", NULL, summary_open_cb, 0, NULL, NULL),
|
||||
ITEM_FACTORY_ENTRY("/Analyze/Protocol _Hierarchy Statistics", NULL,
|
||||
proto_hier_stats_cb, 0, NULL, NULL),
|
||||
|
@ -442,7 +444,6 @@ main_menu_new(GtkAccelGroup ** table) {
|
|||
|
||||
static void
|
||||
menus_init(void) {
|
||||
|
||||
if (initialize) {
|
||||
initialize = FALSE;
|
||||
|
||||
|
@ -469,7 +470,8 @@ menus_init(void) {
|
|||
/* main */
|
||||
main_menu_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", grp);
|
||||
gtk_item_factory_create_items_ac(main_menu_factory, nmenu_items, menu_items, NULL, 2);
|
||||
register_all_tap_menus(); /* must be done after creating the main menu */
|
||||
|
||||
merge_all_tap_menus(tap_menu_tree_root);
|
||||
|
||||
/* Initialize enabled/disabled state of menu items */
|
||||
set_menus_for_unsaved_capture_file(FALSE);
|
||||
|
@ -491,17 +493,47 @@ menus_init(void) {
|
|||
}
|
||||
}
|
||||
|
||||
typedef struct _menu_item {
|
||||
char *name;
|
||||
gboolean enabled;
|
||||
gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *);
|
||||
gboolean (*selected_tree_row_enabled)(field_info *);
|
||||
struct _menu_item *parent;
|
||||
struct _menu_item *children;
|
||||
struct _menu_item *next;
|
||||
} menu_item_t;
|
||||
|
||||
static menu_item_t tap_menu_tree_root;
|
||||
gint tap_menu_item_add_compare(gconstpointer a, gconstpointer b)
|
||||
{
|
||||
return strcmp(
|
||||
((const menu_item_t *) a)->name,
|
||||
((const menu_item_t *) b)->name);
|
||||
}
|
||||
|
||||
|
||||
/* add a menuitem below the current node */
|
||||
GList * tap_menu_item_add(
|
||||
gint layer,
|
||||
char *name,
|
||||
GtkItemFactoryCallback callback,
|
||||
gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *),
|
||||
gboolean (*selected_tree_row_enabled)(field_info *),
|
||||
gpointer callback_data,
|
||||
GList *curnode)
|
||||
{
|
||||
menu_item_t *curr;
|
||||
menu_item_t *child;
|
||||
|
||||
|
||||
child = g_malloc(sizeof (menu_item_t));
|
||||
child->layer = layer;
|
||||
child->name = name;
|
||||
child->callback = callback;
|
||||
child->selected_packet_enabled = selected_packet_enabled;
|
||||
child->selected_tree_row_enabled = selected_tree_row_enabled;
|
||||
child->callback_data = callback_data;
|
||||
child->enabled = FALSE;
|
||||
child->children = NULL;
|
||||
|
||||
/* insert the new child node into the parent */
|
||||
curr = curnode->data;
|
||||
curr->children = g_list_insert_sorted(curr->children, child, tap_menu_item_add_compare);
|
||||
|
||||
/* return the new node */
|
||||
/* XXX: improve this */
|
||||
return g_list_find(curr->children, child);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a new menu item for a tap.
|
||||
|
@ -525,27 +557,53 @@ static menu_item_t tap_menu_tree_root;
|
|||
* is selected and, if one is, on the tree row) and FALSE if not.
|
||||
*/
|
||||
void
|
||||
register_tap_menu_item(char *name, GtkItemFactoryCallback callback,
|
||||
register_tap_menu_item(
|
||||
char *name,
|
||||
gint layer,
|
||||
GtkItemFactoryCallback callback,
|
||||
gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *),
|
||||
gboolean (*selected_tree_row_enabled)(field_info *),
|
||||
gpointer callback_data)
|
||||
{
|
||||
static const char toolspath[] = "/Analyze/";
|
||||
/*char *toolspath; */
|
||||
char *p;
|
||||
char *menupath;
|
||||
size_t menupathlen;
|
||||
GtkItemFactoryEntry *entry;
|
||||
menu_item_t *curnode, *child;
|
||||
menu_item_t *child;
|
||||
GList *curnode;
|
||||
GList *childnode;
|
||||
|
||||
/*
|
||||
* The menu path must be relative.
|
||||
*/
|
||||
g_assert(*name != '/');
|
||||
|
||||
#if 0
|
||||
switch(layer) {
|
||||
case(REGISTER_TAP_LAYER_GENERIC): toolspath = "/Analyze/"; break;
|
||||
case(REGISTER_TAP_LAYER_PHYSICAL): toolspath = "/Physical/"; break;
|
||||
case(REGISTER_TAP_LAYER_DATA_LINK): toolspath = "/Link/"; break;
|
||||
case(REGISTER_TAP_LAYER_NETWORK): toolspath = "/Network/"; break;
|
||||
case(REGISTER_TAP_LAYER_TRANSPORT): toolspath = "/Transport/"; break;
|
||||
case(REGISTER_TAP_LAYER_SESSION): toolspath = "/Session/"; break;
|
||||
case(REGISTER_TAP_LAYER_PRESENTATION): toolspath = "/Presentation/"; break;
|
||||
case(REGISTER_TAP_LAYER_APPLICATION): toolspath = "/Application/"; break;
|
||||
default:
|
||||
g_assert(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* add the (empty) root node, if not already done */
|
||||
if(tap_menu_tree_root == NULL) {
|
||||
child = g_malloc0(sizeof (menu_item_t));
|
||||
tap_menu_tree_root = g_list_append(NULL, child);
|
||||
}
|
||||
|
||||
/*
|
||||
* Create any submenus required.
|
||||
*/
|
||||
curnode = &tap_menu_tree_root;
|
||||
curnode = tap_menu_tree_root;
|
||||
p = name;
|
||||
while ((p = strchr(p, '/')) != NULL) {
|
||||
/*
|
||||
|
@ -555,7 +613,7 @@ register_tap_menu_item(char *name, GtkItemFactoryCallback callback,
|
|||
*
|
||||
* Construct the absolute path name of that subtree.
|
||||
*/
|
||||
menupathlen = sizeof toolspath + (p - name);
|
||||
menupathlen = strlen(toolspath) + 1 + (p - name);
|
||||
menupath = g_malloc(menupathlen);
|
||||
strcpy(menupath, toolspath);
|
||||
strncat(menupath, name, p - name);
|
||||
|
@ -564,39 +622,26 @@ register_tap_menu_item(char *name, GtkItemFactoryCallback callback,
|
|||
* Does there exist an entry with that path at this
|
||||
* level of the Analyze menu tree?
|
||||
*/
|
||||
for (child = curnode->children; child != NULL;
|
||||
child = child->next) {
|
||||
child = curnode->data;
|
||||
for (childnode = child->children; childnode != NULL; childnode = childnode->next) {
|
||||
child = childnode->data;
|
||||
if (strcmp(child->name, menupath) == 0)
|
||||
break;
|
||||
}
|
||||
if (child == NULL) {
|
||||
if (childnode == NULL) {
|
||||
/*
|
||||
* No. Create such an item as a subtree, and
|
||||
* add it to the Tools menu tree.
|
||||
*/
|
||||
entry = g_malloc0(sizeof (GtkItemFactoryEntry));
|
||||
entry->path = menupath;
|
||||
entry->item_type = "<Branch>";
|
||||
gtk_item_factory_create_item(main_menu_factory, entry,
|
||||
NULL, 2);
|
||||
set_menu_sensitivity(main_menu_factory, menupath,
|
||||
FALSE); /* no children yet */
|
||||
child = g_malloc(sizeof (menu_item_t));
|
||||
child->name = menupath;
|
||||
child->selected_packet_enabled = NULL;
|
||||
child->selected_tree_row_enabled = NULL;
|
||||
child->enabled = FALSE; /* no children yet */
|
||||
child->parent = curnode;
|
||||
child->children = NULL;
|
||||
child->next = curnode->children;
|
||||
curnode->children = child;
|
||||
childnode = tap_menu_item_add(
|
||||
layer, menupath, NULL, NULL ,NULL, NULL, curnode);
|
||||
} else {
|
||||
/*
|
||||
* Yes. We don't need "menupath" any more.
|
||||
* Yes. We don't need this "menupath" any longer.
|
||||
*/
|
||||
g_free(menupath);
|
||||
}
|
||||
curnode = child;
|
||||
curnode = childnode;
|
||||
|
||||
/*
|
||||
* Skip over the '/' we found.
|
||||
|
@ -606,12 +651,8 @@ register_tap_menu_item(char *name, GtkItemFactoryCallback callback,
|
|||
|
||||
/*
|
||||
* Construct the main menu path for the menu item.
|
||||
*
|
||||
* "sizeof toolspath" includes the trailing '\0', so the sum
|
||||
* of that and the length of "name" is enough to hold a string
|
||||
* containing their concatenation.
|
||||
*/
|
||||
menupathlen = sizeof toolspath + strlen(name);
|
||||
*/
|
||||
menupathlen = strlen(toolspath) + 1 + strlen(name);
|
||||
menupath = g_malloc(menupathlen);
|
||||
strcpy(menupath, toolspath);
|
||||
strcat(menupath, name);
|
||||
|
@ -620,22 +661,101 @@ register_tap_menu_item(char *name, GtkItemFactoryCallback callback,
|
|||
* Construct an item factory entry for the item, and add it to
|
||||
* the main menu.
|
||||
*/
|
||||
entry = g_malloc0(sizeof (GtkItemFactoryEntry));
|
||||
entry->path = menupath;
|
||||
entry->callback = callback;
|
||||
gtk_item_factory_create_item(main_menu_factory, entry, callback_data, 2);
|
||||
set_menu_sensitivity(main_menu_factory, menupath, FALSE); /* no capture file yet */
|
||||
child = g_malloc(sizeof (menu_item_t));
|
||||
child->name = menupath;
|
||||
child->enabled = FALSE; /* no capture file yet, hence no taps yet */
|
||||
child->selected_packet_enabled = selected_packet_enabled;
|
||||
child->selected_tree_row_enabled = selected_tree_row_enabled;
|
||||
child->parent = curnode;
|
||||
child->children = NULL;
|
||||
child->next = curnode->children;
|
||||
curnode->children = child;
|
||||
tap_menu_item_add(
|
||||
layer, menupath, callback,
|
||||
selected_packet_enabled, selected_tree_row_enabled,
|
||||
callback_data, curnode);
|
||||
}
|
||||
|
||||
|
||||
guint merge_tap_menus_layered(GList *node, gint layer) {
|
||||
GtkItemFactoryEntry *entry;
|
||||
GList *child;
|
||||
guint added = 0;
|
||||
menu_item_t *node_data = node->data;
|
||||
|
||||
/*
|
||||
* Is this a leaf node or an interior node?
|
||||
*/
|
||||
if (node_data->children == NULL) {
|
||||
/*
|
||||
* It's a leaf node.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The root node doesn't correspond to a menu tree item; it
|
||||
* has a null name pointer.
|
||||
*/
|
||||
if (node_data->name != NULL && layer == node_data->layer) {
|
||||
entry = g_malloc0(sizeof (GtkItemFactoryEntry));
|
||||
entry->path = node_data->name;
|
||||
entry->callback = node_data->callback;
|
||||
gtk_item_factory_create_item(main_menu_factory, entry, node_data->callback_data, 2);
|
||||
set_menu_sensitivity(main_menu_factory, node_data->name, FALSE); /* no capture file yet */
|
||||
added++;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* It's an interior node; call
|
||||
* "merge_tap_menus_layered()" on all its children
|
||||
*/
|
||||
|
||||
/*
|
||||
* The root node doesn't correspond to a menu tree item; it
|
||||
* has a null name pointer.
|
||||
*/
|
||||
if (node_data->name != NULL && layer == node_data->layer) {
|
||||
entry = g_malloc0(sizeof (GtkItemFactoryEntry));
|
||||
entry->path = node_data->name;
|
||||
entry->item_type = "<Branch>";
|
||||
gtk_item_factory_create_item(main_menu_factory, entry,
|
||||
NULL, 2);
|
||||
set_menu_sensitivity(main_menu_factory, node_data->name,
|
||||
FALSE); /* no children yet */
|
||||
added++;
|
||||
}
|
||||
|
||||
for (child = node_data->children; child != NULL; child =
|
||||
child->next) {
|
||||
added += merge_tap_menus_layered(child, layer);
|
||||
}
|
||||
}
|
||||
|
||||
return added;
|
||||
}
|
||||
|
||||
|
||||
void merge_all_tap_menus(GList *node) {
|
||||
GtkItemFactoryEntry *entry;
|
||||
static char toolspath[] = "/Analyze/";
|
||||
|
||||
entry = g_malloc0(sizeof (GtkItemFactoryEntry));
|
||||
entry->path = toolspath;
|
||||
entry->item_type = "<Separator>";
|
||||
|
||||
/*
|
||||
* merge only the menu items of the specific layer,
|
||||
* and then append a seperator
|
||||
*/
|
||||
if (merge_tap_menus_layered(node, REGISTER_TAP_LAYER_GENERIC))
|
||||
gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);
|
||||
if (merge_tap_menus_layered(node, REGISTER_TAP_LAYER_PHYSICAL))
|
||||
gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);
|
||||
if (merge_tap_menus_layered(node, REGISTER_TAP_LAYER_DATA_LINK))
|
||||
gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);
|
||||
if (merge_tap_menus_layered(node, REGISTER_TAP_LAYER_NETWORK))
|
||||
gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);
|
||||
if (merge_tap_menus_layered(node, REGISTER_TAP_LAYER_TRANSPORT))
|
||||
gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);
|
||||
if (merge_tap_menus_layered(node, REGISTER_TAP_LAYER_SESSION))
|
||||
gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);
|
||||
if (merge_tap_menus_layered(node, REGISTER_TAP_LAYER_PRESENTATION))
|
||||
gtk_item_factory_create_item(main_menu_factory, entry, NULL, 2);
|
||||
merge_tap_menus_layered(node, REGISTER_TAP_LAYER_APPLICATION);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Enable/disable menu sensitivity.
|
||||
*/
|
||||
|
@ -1323,16 +1443,17 @@ set_menus_for_capture_in_progress(gboolean capture_in_progress)
|
|||
/* Enable or disable menu items based on whether you have some captured
|
||||
packets. */
|
||||
static gboolean
|
||||
walk_menu_tree_for_captured_packets(menu_item_t *node,
|
||||
walk_menu_tree_for_captured_packets(GList *node,
|
||||
gboolean have_captured_packets)
|
||||
{
|
||||
gboolean is_enabled;
|
||||
menu_item_t *child;
|
||||
gboolean is_enabled;
|
||||
GList *child;
|
||||
menu_item_t *node_data = node->data;
|
||||
|
||||
/*
|
||||
* Is this a leaf node or an interior node?
|
||||
*/
|
||||
if (node->children == NULL) {
|
||||
if (node_data->children == NULL) {
|
||||
/*
|
||||
* It's a leaf node.
|
||||
*
|
||||
|
@ -1355,11 +1476,11 @@ walk_menu_tree_for_captured_packets(menu_item_t *node,
|
|||
* selected, that's OK.
|
||||
* XXX - that should be done better.
|
||||
*/
|
||||
if (node->selected_packet_enabled == NULL &&
|
||||
node->selected_tree_row_enabled == NULL)
|
||||
node->enabled = TRUE;
|
||||
if (node_data->selected_packet_enabled == NULL &&
|
||||
node_data->selected_tree_row_enabled == NULL)
|
||||
node_data->enabled = TRUE;
|
||||
else
|
||||
node->enabled = FALSE;
|
||||
node_data->enabled = FALSE;
|
||||
} else {
|
||||
/*
|
||||
* It's an interior node; call
|
||||
|
@ -1371,24 +1492,24 @@ walk_menu_tree_for_captured_packets(menu_item_t *node,
|
|||
* Which is a better UI choice?
|
||||
*/
|
||||
is_enabled = FALSE;
|
||||
for (child = node->children; child != NULL; child =
|
||||
for (child = node_data->children; child != NULL; child =
|
||||
child->next) {
|
||||
if (walk_menu_tree_for_captured_packets(child,
|
||||
have_captured_packets))
|
||||
is_enabled = TRUE;
|
||||
}
|
||||
node->enabled = is_enabled;
|
||||
node_data->enabled = is_enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
* The root node doesn't correspond to a menu tree item; it
|
||||
* has a null name pointer.
|
||||
*/
|
||||
if (node->name != NULL) {
|
||||
set_menu_sensitivity(main_menu_factory, node->name,
|
||||
node->enabled);
|
||||
if (node_data->name != NULL) {
|
||||
set_menu_sensitivity(main_menu_factory, node_data->name,
|
||||
node_data->enabled);
|
||||
}
|
||||
return node->enabled;
|
||||
return node_data->enabled;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1425,7 +1546,7 @@ set_menus_for_captured_packets(gboolean have_captured_packets)
|
|||
set_menu_sensitivity(main_menu_factory, "/Analyze/Protocol Hierarchy Statistics",
|
||||
have_captured_packets);
|
||||
|
||||
walk_menu_tree_for_captured_packets(&tap_menu_tree_root,
|
||||
walk_menu_tree_for_captured_packets(tap_menu_tree_root,
|
||||
have_captured_packets);
|
||||
set_toolbar_for_captured_packets(have_captured_packets);
|
||||
packets_bar_update();
|
||||
|
@ -1434,16 +1555,17 @@ set_menus_for_captured_packets(gboolean have_captured_packets)
|
|||
/* Enable or disable menu items based on whether a packet is selected and,
|
||||
if so, on the properties of the packet. */
|
||||
static gboolean
|
||||
walk_menu_tree_for_selected_packet(menu_item_t *node, frame_data *fd,
|
||||
walk_menu_tree_for_selected_packet(GList *node, frame_data *fd,
|
||||
epan_dissect_t *edt)
|
||||
{
|
||||
gboolean is_enabled;
|
||||
menu_item_t *child;
|
||||
GList *child;
|
||||
menu_item_t *node_data = node->data;
|
||||
|
||||
/*
|
||||
* Is this a leaf node or an interior node?
|
||||
*/
|
||||
if (node->children == NULL) {
|
||||
if (node_data->children == NULL) {
|
||||
/*
|
||||
* It's a leaf node.
|
||||
*
|
||||
|
@ -1456,8 +1578,8 @@ walk_menu_tree_for_selected_packet(menu_item_t *node, frame_data *fd,
|
|||
* call it and set the item's enabled/disabled status
|
||||
* based on its return value.
|
||||
*/
|
||||
if (node->selected_packet_enabled != NULL)
|
||||
node->enabled = node->selected_packet_enabled(fd, edt);
|
||||
if (node_data->selected_packet_enabled != NULL)
|
||||
node_data->enabled = node_data->selected_packet_enabled(fd, edt);
|
||||
} else {
|
||||
/*
|
||||
* It's an interior node; call
|
||||
|
@ -1469,23 +1591,23 @@ walk_menu_tree_for_selected_packet(menu_item_t *node, frame_data *fd,
|
|||
* Which is a better UI choice?
|
||||
*/
|
||||
is_enabled = FALSE;
|
||||
for (child = node->children; child != NULL; child =
|
||||
for (child = node_data->children; child != NULL; child =
|
||||
child->next) {
|
||||
if (walk_menu_tree_for_selected_packet(child, fd, edt))
|
||||
is_enabled = TRUE;
|
||||
}
|
||||
node->enabled = is_enabled;
|
||||
node_data->enabled = is_enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
* The root node doesn't correspond to a menu tree item; it
|
||||
* has a null name pointer.
|
||||
*/
|
||||
if (node->name != NULL) {
|
||||
set_menu_sensitivity(main_menu_factory, node->name,
|
||||
node->enabled);
|
||||
if (node_data->name != NULL) {
|
||||
set_menu_sensitivity(main_menu_factory, node_data->name,
|
||||
node_data->enabled);
|
||||
}
|
||||
return node->enabled;
|
||||
return node_data->enabled;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1515,8 +1637,6 @@ set_menus_for_selected_packet(capture_file *cf)
|
|||
cf->current_frame != NULL);
|
||||
set_menu_sensitivity(packet_list_menu_factory, "/Show Packet In New Window",
|
||||
cf->current_frame != NULL);
|
||||
set_menu_sensitivity(main_menu_factory, "/Analyze/Follow TCP Stream",
|
||||
cf->current_frame != NULL ? (cf->edt->pi.ipproto == IP_PROTO_TCP) : FALSE);
|
||||
set_menu_sensitivity(NULL, "/Follow TCP Stream",
|
||||
cf->current_frame != NULL ? (cf->edt->pi.ipproto == IP_PROTO_TCP) : FALSE);
|
||||
set_menu_sensitivity(main_menu_factory, "/Analyze/Decode As...",
|
||||
|
@ -1525,14 +1645,12 @@ set_menus_for_selected_packet(capture_file *cf)
|
|||
cf->current_frame != NULL && decode_as_ok());
|
||||
set_menu_sensitivity(tree_view_menu_factory, "/Resolve Name",
|
||||
cf->current_frame != NULL && (g_resolv_flags & RESOLV_ALL_ADDRS) != RESOLV_ALL_ADDRS);
|
||||
set_menu_sensitivity(main_menu_factory, "/Analyze/TCP Stream Analysis",
|
||||
cf->current_frame != NULL ? (cf->edt->pi.ipproto == IP_PROTO_TCP) : FALSE);
|
||||
set_menu_sensitivity(packet_list_menu_factory, "/Match",
|
||||
cf->current_frame != NULL);
|
||||
set_menu_sensitivity(packet_list_menu_factory, "/Prepare",
|
||||
cf->current_frame != NULL);
|
||||
|
||||
walk_menu_tree_for_selected_packet(&tap_menu_tree_root, cf->current_frame,
|
||||
walk_menu_tree_for_selected_packet(tap_menu_tree_root, cf->current_frame,
|
||||
cf->edt);
|
||||
packets_bar_update();
|
||||
}
|
||||
|
@ -1540,15 +1658,16 @@ set_menus_for_selected_packet(capture_file *cf)
|
|||
/* Enable or disable menu items based on whether a tree row is selected
|
||||
and, if so, on the properties of the tree row. */
|
||||
static gboolean
|
||||
walk_menu_tree_for_selected_tree_row(menu_item_t *node, field_info *fi)
|
||||
walk_menu_tree_for_selected_tree_row(GList *node, field_info *fi)
|
||||
{
|
||||
gboolean is_enabled;
|
||||
menu_item_t *child;
|
||||
GList *child;
|
||||
menu_item_t *node_data = node->data;
|
||||
|
||||
/*
|
||||
* Is this a leaf node or an interior node?
|
||||
*/
|
||||
if (node->children == NULL) {
|
||||
if (node_data->children == NULL) {
|
||||
/*
|
||||
* It's a leaf node.
|
||||
*
|
||||
|
@ -1561,8 +1680,8 @@ walk_menu_tree_for_selected_tree_row(menu_item_t *node, field_info *fi)
|
|||
* call it and set the item's enabled/disabled status
|
||||
* based on its return value.
|
||||
*/
|
||||
if (node->selected_tree_row_enabled != NULL)
|
||||
node->enabled = node->selected_tree_row_enabled(fi);
|
||||
if (node_data->selected_tree_row_enabled != NULL)
|
||||
node_data->enabled = node_data->selected_tree_row_enabled(fi);
|
||||
} else {
|
||||
/*
|
||||
* It's an interior node; call
|
||||
|
@ -1574,23 +1693,23 @@ walk_menu_tree_for_selected_tree_row(menu_item_t *node, field_info *fi)
|
|||
* Which is a better UI choice?
|
||||
*/
|
||||
is_enabled = FALSE;
|
||||
for (child = node->children; child != NULL; child =
|
||||
for (child = node_data->children; child != NULL; child =
|
||||
child->next) {
|
||||
if (walk_menu_tree_for_selected_tree_row(child, fi))
|
||||
is_enabled = TRUE;
|
||||
}
|
||||
node->enabled = is_enabled;
|
||||
node_data->enabled = is_enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
* The root node doesn't correspond to a menu tree item; it
|
||||
* has a null name pointer.
|
||||
*/
|
||||
if (node->name != NULL) {
|
||||
set_menu_sensitivity(main_menu_factory, node->name,
|
||||
node->enabled);
|
||||
if (node_data->name != NULL) {
|
||||
set_menu_sensitivity(main_menu_factory, node_data->name,
|
||||
node_data->enabled);
|
||||
}
|
||||
return node->enabled;
|
||||
return node_data->enabled;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1640,5 +1759,5 @@ set_menus_for_selected_tree_row(capture_file *cf)
|
|||
FALSE);
|
||||
}
|
||||
|
||||
walk_menu_tree_for_selected_tree_row(&tap_menu_tree_root, cf->finfo_selected);
|
||||
walk_menu_tree_for_selected_tree_row(tap_menu_tree_root, cf->finfo_selected);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* mgcp-statistics for ethereal
|
||||
* Copyright 2003 Lars Roland
|
||||
*
|
||||
* $Id: mgcp_stat.c,v 1.28 2004/02/13 00:53:35 guy Exp $
|
||||
* $Id: mgcp_stat.c,v 1.29 2004/02/22 18:44:02 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -310,13 +310,8 @@ void
|
|||
register_tap_listener_gtkmgcpstat(void)
|
||||
{
|
||||
register_ethereal_tap("mgcp,srt", gtk_mgcpstat_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtkmgcpstat(void)
|
||||
{
|
||||
if (find_tap_id("mgcp"))
|
||||
register_tap_menu_item("_Statistics/Service Response Time/MGCP...",
|
||||
register_tap_menu_item("MGCP (Service Response Time...)", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gtk_tap_dfilter_dlg_cb, NULL, NULL, &(mgcp_srt_dlg));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* rpc_progs.c
|
||||
* rpc_progs 2002 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: rpc_progs.c,v 1.19 2004/02/13 00:53:36 guy Exp $
|
||||
* $Id: rpc_progs.c,v 1.20 2004/02/22 18:44:02 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -403,12 +403,7 @@ void
|
|||
register_tap_listener_gtkrpcprogs(void)
|
||||
{
|
||||
register_ethereal_tap("rpc,programs", gtk_rpcprogs_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtkrpcprogs(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/ONC-RPC/Programs", gtk_rpcprogs_cb,
|
||||
NULL, NULL, NULL);
|
||||
register_tap_menu_item("ONC-RPC/Programs", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gtk_rpcprogs_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* rpc_stat.c
|
||||
* rpc_stat 2002 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: rpc_stat.c,v 1.38 2004/02/13 00:53:36 guy Exp $
|
||||
* $Id: rpc_stat.c,v 1.39 2004/02/22 18:44:03 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -522,11 +522,8 @@ void
|
|||
register_tap_listener_gtkrpcstat(void)
|
||||
{
|
||||
register_ethereal_tap("rpc,srt,", gtk_rpcstat_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtkrpcstat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Service Response Time/ONC-RPC...",
|
||||
register_tap_menu_item("ONC-RPC/Service Response Time...", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gtk_rpcstat_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* rtp_analysis.c
|
||||
* RTP analysis addition for ethereal
|
||||
*
|
||||
* $Id: rtp_analysis.c,v 1.37 2004/02/13 00:53:36 guy Exp $
|
||||
* $Id: rtp_analysis.c,v 1.38 2004/02/22 18:44:03 ulfl Exp $
|
||||
*
|
||||
* Copyright 2003, Alcatel Business Systems
|
||||
* By Lars Ruoff <lars.ruoff@gmx.net>
|
||||
|
@ -2344,11 +2344,7 @@ void
|
|||
register_tap_listener_rtp_analysis(void)
|
||||
{
|
||||
register_ethereal_tap("rtp", rtp_analysis_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_rtp_analysis(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/RTP Streams/Analyse...",
|
||||
register_tap_menu_item("RTP/Stream Analysis...", REGISTER_TAP_LAYER_APPLICATION,
|
||||
rtp_analysis_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* rtp_stream_dlg.c
|
||||
* RTP streams summary addition for ethereal
|
||||
*
|
||||
* $Id: rtp_stream_dlg.c,v 1.14 2004/02/11 04:17:04 guy Exp $
|
||||
* $Id: rtp_stream_dlg.c,v 1.15 2004/02/22 18:44:03 ulfl Exp $
|
||||
*
|
||||
* Copyright 2003, Alcatel Business Systems
|
||||
* By Lars Ruoff <lars.ruoff@gmx.net>
|
||||
|
@ -824,8 +824,8 @@ void rtpstream_launch(GtkWidget *w _U_, gpointer data _U_)
|
|||
|
||||
/****************************************************************************/
|
||||
void
|
||||
register_tap_menu_rtp_stream(void)
|
||||
register_tap_listener_rtp_stream_dlg(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/RTP Streams/Show All...",
|
||||
register_tap_menu_item("RTP/Show All Streams...", REGISTER_TAP_LAYER_APPLICATION,
|
||||
rtpstream_launch, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* smb_stat.c
|
||||
* smb_stat 2003 Ronnie Sahlberg
|
||||
*
|
||||
* $Id: smb_stat.c,v 1.36 2004/02/13 00:53:36 guy Exp $
|
||||
* $Id: smb_stat.c,v 1.37 2004/02/22 18:44:03 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -352,11 +352,7 @@ void
|
|||
register_tap_listener_gtksmbstat(void)
|
||||
{
|
||||
register_ethereal_tap("smb,srt", gtk_smbstat_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtksmbstat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Service Response Time/SMB...",
|
||||
register_tap_menu_item("SMB (Service Response Time...)", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gtk_smbstat_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* tap_menu.h
|
||||
* Menu definitions for use by taps
|
||||
*
|
||||
* $Id: tap_menu.h,v 1.1 2004/02/11 04:17:05 guy Exp $
|
||||
* $Id: tap_menu.h,v 1.2 2004/02/22 18:44:03 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -51,11 +51,24 @@ extern "C" {
|
|||
* whether a tree row is selected and, if one is, on the tree row) and
|
||||
* FALSE if not.
|
||||
*/
|
||||
extern void register_tap_menu_item(char *name, GtkItemFactoryCallback callback,
|
||||
extern void register_tap_menu_item(
|
||||
char *name,
|
||||
gint layer,
|
||||
GtkItemFactoryCallback callback,
|
||||
gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *),
|
||||
gboolean (*selected_tree_row_enabled)(field_info *),
|
||||
gpointer callback_data);
|
||||
|
||||
/* XXX: would it better to use an enum here? */
|
||||
#define REGISTER_TAP_LAYER_GENERIC 0
|
||||
#define REGISTER_TAP_LAYER_PHYSICAL 1 /* currently unused */
|
||||
#define REGISTER_TAP_LAYER_DATA_LINK 2
|
||||
#define REGISTER_TAP_LAYER_NETWORK 3
|
||||
#define REGISTER_TAP_LAYER_TRANSPORT 4
|
||||
#define REGISTER_TAP_LAYER_SESSION 5 /* currently unused */
|
||||
#define REGISTER_TAP_LAYER_PRESENTATION 6 /* currently unused */
|
||||
#define REGISTER_TAP_LAYER_APPLICATION 7
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* By Pavel Mores <pvl@uh.cz>
|
||||
* Win32 port: rwh@unifiedtech.com
|
||||
*
|
||||
* $Id: tcp_graph.c,v 1.51 2004/02/13 00:53:36 guy Exp $
|
||||
* $Id: tcp_graph.c,v 1.52 2004/02/22 18:44:03 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -49,6 +49,8 @@
|
|||
#include "etypes.h"
|
||||
#include "ppptypes.h"
|
||||
#include "dlg_utils.h"
|
||||
#include <epan/epan_dissect.h>
|
||||
#include "tap_menu.h"
|
||||
|
||||
/* from <net/ethernet.h> */
|
||||
struct ether_header {
|
||||
|
@ -539,10 +541,11 @@ static char helptext[] =
|
|||
";
|
||||
#endif
|
||||
|
||||
void tcp_graph_cb (GtkWidget *w _U_, gpointer data _U_, guint graph_type)
|
||||
void tcp_graph_cb (GtkWidget *w _U_, gpointer data, guint callback_action /*graph_type*/ _U_)
|
||||
{
|
||||
struct segment current;
|
||||
struct graph *g;
|
||||
guint graph_type = GPOINTER_TO_INT(data);
|
||||
|
||||
debug(DBS_FENTRY) puts ("tcp_graph_cb()");
|
||||
|
||||
|
@ -3961,3 +3964,24 @@ static int rint (double x)
|
|||
return(i);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
gboolean tcp_graph_selected_packet_enabled(frame_data *current_frame, epan_dissect_t *edt)
|
||||
{
|
||||
return current_frame != NULL ? (edt->pi.ipproto == IP_PROTO_TCP) : FALSE;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
register_tap_listener_tcp_graph(void)
|
||||
{
|
||||
register_tap_menu_item("TCP/Stream Analysis/Time-Sequence Graph (Stevens)", REGISTER_TAP_LAYER_TRANSPORT,
|
||||
tcp_graph_cb, tcp_graph_selected_packet_enabled, NULL, GINT_TO_POINTER(0));
|
||||
register_tap_menu_item("TCP/Stream Analysis/Time-Sequence Graph (tcptrace)", REGISTER_TAP_LAYER_TRANSPORT,
|
||||
tcp_graph_cb, tcp_graph_selected_packet_enabled, NULL, GINT_TO_POINTER(1));
|
||||
register_tap_menu_item("TCP/Stream Analysis/Throughput Graph", REGISTER_TAP_LAYER_TRANSPORT,
|
||||
tcp_graph_cb, tcp_graph_selected_packet_enabled, NULL, GINT_TO_POINTER(2));
|
||||
register_tap_menu_item("TCP/Stream Analysis/Round Trip Time Graph", REGISTER_TAP_LAYER_TRANSPORT,
|
||||
tcp_graph_cb, tcp_graph_selected_packet_enabled, NULL, GINT_TO_POINTER(3));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* wsp_stat.c
|
||||
* wsp_stat 2003 Jean-Michel FAYARD
|
||||
*
|
||||
* $Id: wsp_stat.c,v 1.18 2004/02/13 00:53:37 guy Exp $
|
||||
* $Id: wsp_stat.c,v 1.19 2004/02/22 18:44:03 ulfl Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -507,11 +507,7 @@ void
|
|||
register_tap_listener_gtkwspstat(void)
|
||||
{
|
||||
register_ethereal_tap("wsp,stat,", gtk_wspstat_init);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_menu_gtkwspstat(void)
|
||||
{
|
||||
register_tap_menu_item("_Statistics/Watch protocol/WAP-WSP...",
|
||||
register_tap_menu_item("WAP-WSP (Watch Protocol...)", REGISTER_TAP_LAYER_APPLICATION,
|
||||
gtk_wspstat_cb, NULL, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -39,23 +39,4 @@ done | while read func; do
|
|||
done
|
||||
echo '}' >>${outfile}-tmp
|
||||
|
||||
#
|
||||
# Build code to call all the tap listener menu item registration routines.
|
||||
#
|
||||
echo 'void register_all_tap_menus(void) {' >>${outfile}-tmp
|
||||
for f in "$@"
|
||||
do
|
||||
if [ -f $f ]
|
||||
then
|
||||
srcfile=$f
|
||||
else
|
||||
srcfile=$srcdir/$f
|
||||
fi
|
||||
grep '^register_tap_menu_[a-z_0-9A-Z]* *(' $srcfile 2>/dev/null | grep -v ';' | sed -e 's/(.*//'
|
||||
done | while read func; do
|
||||
echo " { extern void $func (void);" >>${outfile}-tmp
|
||||
echo " $func ();}" >>${outfile}-tmp
|
||||
done
|
||||
echo '}' >>${outfile}-tmp
|
||||
|
||||
mv ${outfile}-tmp ${outfile}
|
||||
|
|
Loading…
Reference in New Issue