2005-08-21 19:24:11 +00:00
|
|
|
/* gui_stat_menu.h
|
2005-08-21 09:48:27 +00:00
|
|
|
* GTK+-specific menu definitions for use by stats
|
2004-02-11 04:17:05 +00:00
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2004-02-11 04:17:05 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2004-02-11 04:17:05 +00:00
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2010-06-15 21:18:31 +00:00
|
|
|
#ifndef __GTK_STAT_MENU_H__
|
|
|
|
#define __GTK_STAT_MENU_H__
|
2004-02-11 04:17:05 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2004-06-02 22:13:04 +00:00
|
|
|
/** @file
|
2005-08-19 09:29:41 +00:00
|
|
|
* Add a new menu item for a stat.
|
2004-06-02 22:13:04 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2005-08-19 09:29:41 +00:00
|
|
|
* Add a new menu item for a stat.
|
2004-02-11 04:17:05 +00:00
|
|
|
* This must be called after we've created the main menu, so it can't
|
2005-08-19 09:29:41 +00:00
|
|
|
* be called from the routine that registers stats - we have to introduce
|
|
|
|
* another per-stat registration routine.
|
2004-02-11 04:17:05 +00:00
|
|
|
*
|
2004-06-02 22:13:04 +00:00
|
|
|
* @param name the menu label
|
|
|
|
*
|
2005-08-19 09:29:41 +00:00
|
|
|
* @param group the menu group this stat should be registered to
|
2004-06-02 22:13:04 +00:00
|
|
|
*
|
|
|
|
* @param callback gets called when the menu item is selected; it should do
|
2005-08-19 09:29:41 +00:00
|
|
|
* the work of creating the stat window.
|
2004-02-11 04:17:05 +00:00
|
|
|
*
|
2004-06-02 22:13:04 +00:00
|
|
|
* @param selected_packet_enabled gets called by set_menus_for_selected_packet();
|
2004-02-11 04:17:05 +00:00
|
|
|
* 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
|
2005-08-19 09:29:41 +00:00
|
|
|
* should return TRUE if the stat will work now (which might depend on whether
|
2004-02-11 04:17:05 +00:00
|
|
|
* a frame is selected and, if one is, on the frame) and FALSE if not.
|
|
|
|
*
|
2004-06-02 22:13:04 +00:00
|
|
|
* @param selected_tree_row_enabled gets called by
|
|
|
|
* set_menus_for_selected_tree_row(); it's passed a pointer to the
|
2004-02-11 04:17:05 +00:00
|
|
|
* "field_info" structure for the currently selected field, if any,
|
2005-08-19 09:29:41 +00:00
|
|
|
* and should return TRUE if the stat will work now (which might depend on
|
2004-02-11 04:17:05 +00:00
|
|
|
* whether a tree row is selected and, if one is, on the tree row) and
|
|
|
|
* FALSE if not.
|
2004-06-02 22:13:04 +00:00
|
|
|
*
|
|
|
|
* @param callback_data data for callback function
|
|
|
|
*/
|
2005-08-19 09:29:41 +00:00
|
|
|
extern void register_stat_menu_item(
|
2005-08-05 20:59:08 +00:00
|
|
|
const char *name,
|
2006-09-27 17:12:42 +00:00
|
|
|
register_stat_group_t group,
|
2004-02-22 18:47:04 +00:00
|
|
|
GtkItemFactoryCallback callback,
|
2007-08-16 22:03:10 +00:00
|
|
|
gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *, gpointer callback_data),
|
|
|
|
gboolean (*selected_tree_row_enabled)(field_info *, gpointer callback_data),
|
2004-02-11 04:17:05 +00:00
|
|
|
gpointer callback_data);
|
|
|
|
|
2008-04-13 23:55:32 +00:00
|
|
|
/**
|
|
|
|
* Same as register_stat_menu_item() but with optional stock item.
|
|
|
|
*
|
2010-08-26 15:02:27 +00:00
|
|
|
* @param name the menu label
|
|
|
|
*
|
|
|
|
* @param group the menu group this stat should be registered to
|
|
|
|
*
|
2008-04-13 23:55:32 +00:00
|
|
|
* @param stock_id the stock_id (icon) to show, or NULL
|
|
|
|
*
|
2010-08-26 15:02:27 +00:00
|
|
|
* @param callback gets called when the menu item is selected; it should do
|
|
|
|
* 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 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 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
|
2008-04-13 23:55:32 +00:00
|
|
|
*/
|
2011-05-03 16:45:37 +00:00
|
|
|
#ifdef MAIN_MENU_USE_UIMANAGER
|
2011-05-10 05:31:45 +00:00
|
|
|
void eth_endpoints_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void fc_endpoints_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void fddi_endpoints_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void ip_endpoints_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void ipv6_endpoints_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void ipx_endpoints_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void jxta_conversation_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void ncp_endpoints_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void rsvp_endpoints_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void sctp_conversation_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void tcpip_conversation_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void tr_conversation_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void udpip_conversation_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void usb_endpoints_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void wlan_endpoints_cb(GtkAction *action, gpointer user_data);
|
|
|
|
|
|
|
|
void gtk_eth_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_fc_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_fddi_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_ip_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_ipv6_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_ipx_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_jxta_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_ncp_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_rsvp_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_sctp_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_tcpip_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_tr_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_udpip_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_usb_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gtk_wlan_hostlist_cb(GtkAction *action, gpointer user_data);
|
|
|
|
|
|
|
|
void flow_graph_launch(GtkAction *action, gpointer user_data);
|
|
|
|
|
|
|
|
void iax2_analysis_cb(GtkAction *action, gpointer user_data);
|
|
|
|
|
|
|
|
void gui_iostat_cb(GtkAction *action, gpointer user_data);
|
|
|
|
|
|
|
|
void voip_calls_launch(GtkAction *action, gpointer user_data);
|
|
|
|
|
2011-05-12 10:56:26 +00:00
|
|
|
void ansi_a_stat_gtk_bsmap_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void ansi_a_stat_gtk_dtap_cb(GtkAction *action, gpointer user_data);
|
2011-05-12 15:17:28 +00:00
|
|
|
void ansi_map_stat_gtk_cb(GtkAction *action, gpointer user_data);
|
2011-05-12 10:56:26 +00:00
|
|
|
|
|
|
|
void gsm_a_stat_gtk_bssmap_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gsm_a_stat_gtk_dtap_mm_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gsm_a_stat_gtk_dtap_rr_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gsm_a_stat_gtk_dtap_cc_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gsm_a_stat_gtk_dtap_gmm_cb(GtkAction *action, gpointer user_data);
|
2011-05-12 15:17:28 +00:00
|
|
|
void gsm_a_stat_gtk_dtap_sms_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gsm_a_stat_gtk_dtap_sm_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gsm_a_stat_gtk_dtap_ss_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gsm_a_stat_gtk_dtap_tp_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gsm_a_stat_gtk_sacch_rr_cb(GtkAction *action, gpointer user_data);
|
|
|
|
|
|
|
|
void gsm_map_stat_gtk_cb(GtkAction *action, gpointer user_data);
|
|
|
|
void gsm_map_stat_gtk_sum_cb(GtkAction *action, gpointer user_data);
|
2011-05-12 10:56:26 +00:00
|
|
|
|
2011-05-15 14:18:22 +00:00
|
|
|
void tcp_graph_cb (GtkAction *action, gpointer user_data);
|
2011-05-15 15:08:47 +00:00
|
|
|
gboolean tcp_graph_selected_packet_enabled(frame_data *current_frame, epan_dissect_t *edt, gpointer callback_data _U_);
|
2011-05-15 14:18:22 +00:00
|
|
|
|
2011-05-16 06:28:33 +00:00
|
|
|
void gtk_rpcprogs_cb(GtkWidget *w, gpointer data);
|
|
|
|
void mcaststream_launch(GtkAction *action, gpointer user_data);
|
|
|
|
void wlanstat_launch(GtkAction *action, gpointer user_data);
|
|
|
|
|
2011-05-03 16:45:37 +00:00
|
|
|
extern void register_stat_menu_item_stock(
|
|
|
|
register_stat_group_t group,
|
|
|
|
const char *gui_path,
|
|
|
|
const char *name,
|
|
|
|
const gchar *stock_id,
|
|
|
|
const char *label,
|
|
|
|
const char *accelerator,
|
|
|
|
const gchar *tooltip,
|
|
|
|
GCallback callback,
|
|
|
|
gboolean enabled,
|
|
|
|
gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *, gpointer callback_data),
|
|
|
|
gboolean (*selected_tree_row_enabled)(field_info *, gpointer callback_data),
|
|
|
|
gpointer callback_data);
|
|
|
|
#else
|
2008-04-13 23:55:32 +00:00
|
|
|
extern void register_stat_menu_item_stock(
|
|
|
|
const char *name,
|
|
|
|
register_stat_group_t group,
|
|
|
|
const gchar *stock_id,
|
|
|
|
GtkItemFactoryCallback callback,
|
|
|
|
gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *, gpointer callback_data),
|
|
|
|
gboolean (*selected_tree_row_enabled)(field_info *, gpointer callback_data),
|
|
|
|
gpointer callback_data);
|
2011-05-03 16:45:37 +00:00
|
|
|
#endif
|
2008-04-13 23:55:32 +00:00
|
|
|
|
2004-02-11 04:17:05 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2010-06-15 21:18:31 +00:00
|
|
|
#endif /* __GTK_STAT_MENU_H__ */
|