Move the declaration of "register_tap_menu_item()" into a new
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 11 Feb 2004 04:17:05 +0000 (04:17 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 11 Feb 2004 04:17:05 +0000 (04:17 +0000)
"tap_menu.h" file, and have the Ethereal taps include that rather than
"menu.h", so we don't have to worry about making sure we've included
<stdio.h> to define FILE, etc. just because some "menu.h" functions
require it.

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

31 files changed:
gtk/Makefile.am
gtk/ansi_a_stat.c
gtk/ansi_map_stat.c
gtk/bootp_stat.c
gtk/dcerpc_stat.c
gtk/endpoint_talkers_eth.c
gtk/endpoint_talkers_fc.c
gtk/endpoint_talkers_fddi.c
gtk/endpoint_talkers_ip.c
gtk/endpoint_talkers_ipx.c
gtk/endpoint_talkers_tcpip.c
gtk/endpoint_talkers_tr.c
gtk/endpoint_talkers_udpip.c
gtk/fc_stat.c
gtk/gsm_a_stat.c
gtk/h225_counter.c
gtk/h225_ras_srt.c
gtk/http_stat.c
gtk/io_stat.c
gtk/isup_stat.c
gtk/ldap_stat.c
gtk/menu.c
gtk/menu.h
gtk/mgcp_stat.c
gtk/rpc_progs.c
gtk/rpc_stat.c
gtk/rtp_analysis.c
gtk/rtp_stream_dlg.c
gtk/smb_stat.c
gtk/tap_menu.h [new file with mode: 0644]
gtk/wsp_stat.c

index e32df807c0468671fae796be88ff41412c26c559..20337dcb76aa52fd0c5b43306b86944ab90e967e 100644 (file)
@@ -1,7 +1,7 @@
 # Makefile.am
 # Automake file for the GTK interface routines for Ethereal
 #
-# $Id: Makefile.am,v 1.89 2004/01/22 20:31:44 guy Exp $
+# $Id: Makefile.am,v 1.90 2004/02/11 04:17:02 guy Exp $
 #
 # Ethereal - Network traffic analyzer
 # By Gerald Combs <gerald@ethereal.com>
@@ -76,6 +76,7 @@ noinst_HEADERS = \
        summary_dlg.h   \
        supported_protos_dlg.h   \
        tap_dfilter_dlg.h \
+       tap_menu.h      \
        tcp_graph.h     \
        toolbar.h       \
        ui_util.h
index b1993f6516ca81902a261ca559647b9bed6ac314..6e45b106687e1bad42c334da8830eb1fe8b10360 100644 (file)
@@ -5,7 +5,7 @@
  *
  * MUCH code modified from service_response_time_table.c.
  *
- * $Id: ansi_a_stat.c,v 1.11 2004/02/06 19:19:09 ulfl Exp $
+ * $Id: ansi_a_stat.c,v 1.12 2004/02/11 04:17:02 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -41,7 +41,7 @@
 #include "epan/packet_info.h"
 #include "epan/epan.h"
 #include "epan/value_string.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "image/clist_ascend.xpm"
 #include "image/clist_descend.xpm"
 #include "simple_dialog.h"
index bababd4eee707549a282124ba76b6dd103a89965..b82205f61b2d48efdcc773717b4037b5cad8e642 100644 (file)
@@ -5,7 +5,7 @@
  *
  * MUCH code modified from service_response_time_table.c.
  *
- * $Id: ansi_map_stat.c,v 1.14 2004/02/06 19:19:09 ulfl Exp $
+ * $Id: ansi_map_stat.c,v 1.15 2004/02/11 04:17:02 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -41,7 +41,7 @@
 #include "epan/packet_info.h"
 #include "epan/epan.h"
 #include "epan/value_string.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "image/clist_ascend.xpm"
 #include "image/clist_descend.xpm"
 #include "simple_dialog.h"
index 97bb778c91b299deb079f6a789feaecedee6b065..5f555db093cef67443ed9df5d818faa216fafc1b 100644 (file)
@@ -1,7 +1,7 @@
 /* bootp_stat.c
  * boop_stat   2003 Jean-Michel FAYARD
  *
- * $Id: bootp_stat.c,v 1.15 2004/01/31 03:22:39 guy Exp $
+ * $Id: bootp_stat.c,v 1.16 2004/02/11 04:17:02 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -33,7 +33,7 @@
 
 #include "epan/packet_info.h"
 #include "epan/epan.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "simple_dialog.h"
 #include "dlg_utils.h"
 #include "tap.h"
index 2a18d14483338af327a3fc89a4be827b61455f0e..9e918f76edce8e57fa59dc5d5d8e675c82e3f8f0 100644 (file)
@@ -1,7 +1,7 @@
 /* dcerpc_stat.c
  * dcerpc_stat   2002 Ronnie Sahlberg
  *
- * $Id: dcerpc_stat.c,v 1.46 2004/01/31 03:22:39 guy Exp $
+ * $Id: dcerpc_stat.c,v 1.47 2004/02/11 04:17:02 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -39,7 +39,7 @@
 
 #include "epan/packet_info.h"
 #include "epan/epan.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "simple_dialog.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
index a401830bb5c482143169b88c568b341e139107f0..f97f0ada13eedc5a34b24f273beb5edb525827e9 100644 (file)
@@ -1,7 +1,7 @@
 /* endpoint_talkers_eth.c
  * endpoint_talkers_eth   2003 Ronnie Sahlberg
  *
- * $Id: endpoint_talkers_eth.c,v 1.20 2004/01/03 18:05:55 sharpe Exp $
+ * $Id: endpoint_talkers_eth.c,v 1.21 2004/02/11 04:17:02 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -35,7 +35,7 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../register.h"
 #include "endpoint_talkers_table.h"
index bfa849f07eba371fe6a7c6e9fea9e2532c5eba14..d48bb2ba233d369263d9d0cb32eddbd9c6cc8409 100644 (file)
@@ -1,7 +1,7 @@
 /* endpoint_talkers_fc.c
  * endpoint_talkers_fc   2003 Ronnie Sahlberg
  *
- * $Id: endpoint_talkers_fc.c,v 1.20 2004/01/03 18:05:55 sharpe Exp $
+ * $Id: endpoint_talkers_fc.c,v 1.21 2004/02/11 04:17:02 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -35,7 +35,7 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../register.h"
 #include "endpoint_talkers_table.h"
index 0fec9d883e0643e8e6ae8fdb1297970e35e4feaf..f27b617900ab8d112fd0b29b6f257544c4d19254 100644 (file)
@@ -1,7 +1,7 @@
 /* endpoint_talkers_fddi.c
  * endpoint_talkers_fddi   2003 Ronnie Sahlberg
  *
- * $Id: endpoint_talkers_fddi.c,v 1.15 2004/01/03 18:05:56 sharpe Exp $
+ * $Id: endpoint_talkers_fddi.c,v 1.16 2004/02/11 04:17:02 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -35,7 +35,7 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../register.h"
 #include "endpoint_talkers_table.h"
index 62bec1c0a03baa5cc18892137464b41f456d6544..87b10f872dff0803e0fd2dc817aad196d801ce14 100644 (file)
@@ -1,7 +1,7 @@
 /* endpoint_talkers_ip.c
  * endpoint_talkers_ip   2003 Ronnie Sahlberg
  *
- * $Id: endpoint_talkers_ip.c,v 1.21 2004/01/03 18:05:56 sharpe Exp $
+ * $Id: endpoint_talkers_ip.c,v 1.22 2004/02/11 04:17:02 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -35,7 +35,7 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../register.h"
 #include "endpoint_talkers_table.h"
index 111b07d376497899452d7b19411b4d04f3bf80c1..26e5d205afe1ba62dd9b1d96f295bf90981f4e5b 100644 (file)
@@ -1,7 +1,7 @@
 /* endpoint_talkers_ipx.c
  * endpoint_talkers_ipx   2003 Ronnie Sahlberg
  *
- * $Id: endpoint_talkers_ipx.c,v 1.19 2004/01/03 18:05:56 sharpe Exp $
+ * $Id: endpoint_talkers_ipx.c,v 1.20 2004/02/11 04:17:02 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -35,7 +35,7 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../register.h"
 #include "endpoint_talkers_table.h"
index 99b36c03cea8beccdfa7eb3cfe1666092a7aae7d..a0327daf0ab23f16cc27b733246520b58e01023d 100644 (file)
@@ -1,7 +1,7 @@
 /* endpoint_talkers_tcpip.c
  * endpoint_talkers_tcpip   2003 Ronnie Sahlberg
  *
- * $Id: endpoint_talkers_tcpip.c,v 1.22 2004/01/03 18:05:56 sharpe Exp $
+ * $Id: endpoint_talkers_tcpip.c,v 1.23 2004/02/11 04:17:02 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -35,7 +35,7 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../register.h"
 #include "endpoint_talkers_table.h"
index a2123c7ddf88104092db065651ba813e8d1386d1..335809b25901ac64e9b47e743ada0c540c76f4d8 100644 (file)
@@ -1,7 +1,7 @@
 /* endpoint_talkers_tr.c
  * endpoint_talkers_tr   2003 Ronnie Sahlberg
  *
- * $Id: endpoint_talkers_tr.c,v 1.21 2004/01/03 18:05:56 sharpe Exp $
+ * $Id: endpoint_talkers_tr.c,v 1.22 2004/02/11 04:17:02 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -35,7 +35,7 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../register.h"
 #include "endpoint_talkers_table.h"
index 1ae09690571ba27de6d26c83e00c5324097e0c86..4d77ebb321c3a6e25c21b6e50339a19b24c0d44a 100644 (file)
@@ -1,7 +1,7 @@
 /* endpoint_talkers_udpip.c
  * endpoint_talkers_udpip   2003 Ronnie Sahlberg
  *
- * $Id: endpoint_talkers_udpip.c,v 1.22 2004/01/03 18:05:56 sharpe Exp $
+ * $Id: endpoint_talkers_udpip.c,v 1.23 2004/02/11 04:17:03 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -35,7 +35,7 @@
 #include <gtk/gtk.h>
 #include <string.h>
 #include "epan/packet.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../register.h"
 #include "endpoint_talkers_table.h"
index 0eb4b297b723432cfc1d23d783c71f077708d045..c4637403acee0c480bf3d24f860509e48ec48b9c 100644 (file)
@@ -1,7 +1,7 @@
 /* fc_stat.c
  * fc_stat   2003 Ronnie Sahlberg
  *
- * $Id: fc_stat.c,v 1.22 2004/01/31 03:22:39 guy Exp $
+ * $Id: fc_stat.c,v 1.23 2004/02/11 04:17:03 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -36,7 +36,7 @@
 #include <string.h>
 #include "../epan/packet_info.h"
 #include "../epan/epan.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../epan/value_string.h"
 #include "../packet-fc.h"
index ebf343c38388f57a9ee3a2be9da8daee7e73ec23..f25a298771f9151e047aaab23c4b804324c64167 100644 (file)
@@ -5,7 +5,7 @@
  *
  * MUCH code modified from service_response_time_table.c.
  *
- * $Id: gsm_a_stat.c,v 1.11 2004/02/06 19:19:10 ulfl Exp $
+ * $Id: gsm_a_stat.c,v 1.12 2004/02/11 04:17:03 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -41,7 +41,7 @@
 #include "epan/packet_info.h"
 #include "epan/epan.h"
 #include "epan/value_string.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "image/clist_ascend.xpm"
 #include "image/clist_descend.xpm"
 #include "simple_dialog.h"
index d5c51af5f9e627e952b79d0a935d34e9eeb682fa..8ac5fb42dbed113cd4c592d505275a3dfa548668 100644 (file)
@@ -2,7 +2,7 @@
  * h225 message counter for ethereal
  * Copyright 2003 Lars Roland
  *
- * $Id: h225_counter.c,v 1.9 2004/02/06 19:19:10 ulfl Exp $
+ * $Id: h225_counter.c,v 1.10 2004/02/11 04:17:03 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -37,7 +37,7 @@
 #include <string.h>
 #include "../epan/packet_info.h"
 #include "../epan/epan.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../epan/value_string.h"
 #include "../register.h"
index 6291f69b2a73c709194a3503a43f4e022339cb45..0b1c1b354c45365636ae8899615753a32069ce39 100644 (file)
@@ -2,7 +2,7 @@
  * h225 RAS Service Response Time statistics for ethereal
  * Copyright 2003 Lars Roland
  *
- * $Id: h225_ras_srt.c,v 1.8 2004/02/06 19:19:10 ulfl Exp $
+ * $Id: h225_ras_srt.c,v 1.9 2004/02/11 04:17:03 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -37,7 +37,7 @@
 #include <string.h>
 #include "../epan/packet_info.h"
 #include "../epan/epan.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../epan/value_string.h"
 #include "../register.h"
index 02b8c4730c0d84ca3e8ad413059148f52085b93c..37a7d9404422e8cc2ade2337ba1ec189fca8bd3f 100644 (file)
@@ -1,7 +1,7 @@
 /* http_stat.c
  * http_stat   2003 Jean-Michel FAYARD
  *
- * $Id: http_stat.c,v 1.17 2004/01/31 03:22:41 guy Exp $
+ * $Id: http_stat.c,v 1.18 2004/02/11 04:17:03 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -32,7 +32,7 @@
 
 #include "epan/packet_info.h"
 #include "epan/epan.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "simple_dialog.h"
 #include "dlg_utils.h"
 #include "tap.h"
index 6eac1be01a9c5adfb8a062be34d2fd732860e270..1c6ecca6c3f8ae941e993fc5b18756778d4baecc 100644 (file)
@@ -1,7 +1,7 @@
 /* io_stat.c
  * io_stat   2002 Ronnie Sahlberg
  *
- * $Id: io_stat.c,v 1.60 2004/02/11 00:55:28 guy Exp $
+ * $Id: io_stat.c,v 1.61 2004/02/11 04:17:03 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -41,7 +41,7 @@
 #include "gtkglobals.h"
 #include "epan/epan_dissect.h"
 #include "epan/packet_info.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../register.h"
 #include "alert_box.h"
index cbeb7875b9368bfb81b49178cf9d141b2ad9786a..36e6232b56572689235e3cbba9c09f4e504ff610 100644 (file)
@@ -5,7 +5,7 @@
  *
  * MUCH code modified from service_response_time_table.c.
  *
- * $Id: isup_stat.c,v 1.14 2004/02/06 19:19:10 ulfl Exp $
+ * $Id: isup_stat.c,v 1.15 2004/02/11 04:17:04 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -41,7 +41,7 @@
 #include "epan/packet_info.h"
 #include "epan/epan.h"
 #include "epan/value_string.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "image/clist_ascend.xpm"
 #include "image/clist_descend.xpm"
 #include "simple_dialog.h"
index 0b97bd3f03dc9349cc7e5bd547463915bf29d408..ecd706c4030b5fbe48db16e1abd420643379fede 100644 (file)
@@ -1,7 +1,7 @@
 /* ldap_stat.c
  * ldap_stat   2003 Ronnie Sahlberg
  *
- * $Id: ldap_stat.c,v 1.10 2004/01/31 03:22:41 guy Exp $
+ * $Id: ldap_stat.c,v 1.11 2004/02/11 04:17:04 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -36,7 +36,7 @@
 #include <string.h>
 #include "../epan/packet_info.h"
 #include "../epan/epan.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../epan/value_string.h"
 #include "../packet-ldap.h"
index fce970053e39dd2106bfbaaf41882b45d19e5082..93c34eeedf3253cc25e382217f4607de0bc1e446 100644 (file)
@@ -1,7 +1,7 @@
 /* menu.c
  * Menu routines
  *
- * $Id: menu.c,v 1.160 2004/02/11 03:55:48 guy Exp $
+ * $Id: menu.c,v 1.161 2004/02/11 04:17:04 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -33,6 +33,7 @@
 
 #include "main.h"
 #include "menu.h"
+#include "tap_menu.h"
 #include <epan/packet.h>
 #include <epan/resolv.h>
 #include "prefs.h"
index e264701a68d0be52465b7537e315886a9a662fbc..ef7b20f9ce3c5e5617841e421b6c1e98302b4fae 100644 (file)
@@ -1,7 +1,7 @@
 /* menu.h
  * Menu definitions
  *
- * $Id: menu.h,v 1.16 2004/02/01 20:28:11 ulfl Exp $
+ * $Id: menu.h,v 1.17 2004/02/11 04:17:04 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -38,34 +38,6 @@ GtkWidget *main_menu_new(GtkAccelGroup **);
 void set_menu_object_data (gchar *path, gchar *key, gpointer data);
 gint popup_menu_handler(GtkWidget *widget, GdkEvent *event, gpointer data);
 
-
-/*
- * Add a new menu item for a tap.
- * 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.
- *
- * "callback" gets called when the menu item is selected; it should do
- * the work of creating the tap window.
- *
- * "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
- * a frame is selected and, if one is, on the frame) and FALSE if not.
- *
- * "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
- * 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,
-    gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *),
-    gboolean (*selected_tree_row_enabled)(field_info *),
-    gpointer callback_data);
-
 extern GtkWidget           *popup_menu_object;
 
 #ifdef __cplusplus
index bcd262fd7c021dd77f0417d5ad811deff24f426a..6a189fa65ac10ae0348c8bc99ef616258cd5cc94 100644 (file)
@@ -2,7 +2,7 @@
  * mgcp-statistics for ethereal
  * Copyright 2003 Lars Roland
  *
- * $Id: mgcp_stat.c,v 1.25 2004/02/06 19:19:10 ulfl Exp $
+ * $Id: mgcp_stat.c,v 1.26 2004/02/11 04:17:04 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -37,7 +37,7 @@
 #include <string.h>
 #include "../epan/packet_info.h"
 #include "../epan/epan.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../epan/value_string.h"
 #include "../register.h"
index af9821ef8b19895eabd2908c8d89f83e6abd5a15..a8aeb8ac19916d7a6a19a2528f98bffb5346e3d9 100644 (file)
@@ -1,7 +1,7 @@
 /* rpc_progs.c
  * rpc_progs   2002 Ronnie Sahlberg
  *
- * $Id: rpc_progs.c,v 1.16 2004/01/03 18:05:56 sharpe Exp $
+ * $Id: rpc_progs.c,v 1.17 2004/02/11 04:17:04 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -37,7 +37,7 @@
 
 #include "epan/packet_info.h"
 #include "epan/epan.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "tap.h"
 #include "../register.h"
 #include "packet-rpc.h"
index cf548730a6f1f7deae1fcb1e54413c00c9969f60..cdd8b533cf9b20bf3274ce43ab7ac6eada763bb2 100644 (file)
@@ -1,7 +1,7 @@
 /* rpc_stat.c
  * rpc_stat   2002 Ronnie Sahlberg
  *
- * $Id: rpc_stat.c,v 1.35 2004/01/31 03:22:42 guy Exp $
+ * $Id: rpc_stat.c,v 1.36 2004/02/11 04:17:04 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -37,7 +37,7 @@
 
 #include "epan/packet_info.h"
 #include "epan/epan.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "simple_dialog.h"
 #include "dlg_utils.h"
 #include "tap.h"
index d6c8ae74a83b349c3a312d8231b44ea7a0290c98..0e693db7165726afafce62d72f9f3dc0baef2c78 100644 (file)
@@ -1,7 +1,7 @@
 /* rtp_analysis.c
  * RTP analysis addition for ethereal
  *
- * $Id: rtp_analysis.c,v 1.34 2004/02/11 01:37:13 guy Exp $
+ * $Id: rtp_analysis.c,v 1.35 2004/02/11 04:17:04 guy Exp $
  *
  * Copyright 2003, Alcatel Business Systems
  * By Lars Ruoff <lars.ruoff@gmx.net>
@@ -62,7 +62,7 @@
 #include "ui_util.h"
 #include "alert_box.h"
 #include "simple_dialog.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "main.h"
 #include "progress_dlg.h"
 #include "compat_macros.h"
index 4fe9bcdb413fddb7fd40274f60654ae05120980e..d310ab7aaa2dffec354d8ed8ff46a725f790b074 100644 (file)
@@ -1,7 +1,7 @@
 /* rtp_stream_dlg.c
  * RTP streams summary addition for ethereal
  *
- * $Id: rtp_stream_dlg.c,v 1.13 2004/02/06 19:19:11 ulfl Exp $
+ * $Id: rtp_stream_dlg.c,v 1.14 2004/02/11 04:17:04 guy Exp $
  *
  * Copyright 2003, Alcatel Business Systems
  * By Lars Ruoff <lars.ruoff@gmx.net>
@@ -36,7 +36,7 @@
 #include "globals.h"
 #include "epan/filesystem.h"
 
-#include "menu.h"
+#include "tap_menu.h"
 #include "dlg_utils.h"
 #include "ui_util.h"
 #include "main.h"
index 2867cfbb69e79c5d456e9876e4bd8446094b96a9..8fd39128604d79f5b3fd00941271aba11cff9ed2 100644 (file)
@@ -1,7 +1,7 @@
 /* smb_stat.c
  * smb_stat   2003 Ronnie Sahlberg
  *
- * $Id: smb_stat.c,v 1.33 2004/01/31 03:22:42 guy Exp $
+ * $Id: smb_stat.c,v 1.34 2004/02/11 04:17:05 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -36,7 +36,7 @@
 #include <string.h>
 #include "../epan/packet_info.h"
 #include "../epan/epan.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "../tap.h"
 #include "../epan/value_string.h"
 #include "../smb.h"
diff --git a/gtk/tap_menu.h b/gtk/tap_menu.h
new file mode 100644 (file)
index 0000000..7d4b42f
--- /dev/null
@@ -0,0 +1,63 @@
+/* tap_menu.h
+ * Menu definitions for use by taps
+ *
+ * $Id: tap_menu.h,v 1.1 2004/02/11 04:17:05 guy Exp $
+ *
+ * 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 __GTKGUITAPMENU_H__
+#define __GTKGUITAPMENU_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*
+ * Add a new menu item for a tap.
+ * 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.
+ *
+ * "callback" gets called when the menu item is selected; it should do
+ * the work of creating the tap window.
+ *
+ * "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
+ * a frame is selected and, if one is, on the frame) and FALSE if not.
+ *
+ * "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
+ * 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,
+    gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *),
+    gboolean (*selected_tree_row_enabled)(field_info *),
+    gpointer callback_data);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __GTKGUITAPMENU_H__ */
index 663edb18157d9b7128281c41a7ac505237457d10..afd9ceeba926f1a56994fe4e88f68fe07b9cd142 100644 (file)
@@ -1,7 +1,7 @@
 /* wsp_stat.c
  * wsp_stat   2003 Jean-Michel FAYARD
  *
- * $Id: wsp_stat.c,v 1.15 2004/01/31 03:22:42 guy Exp $
+ * $Id: wsp_stat.c,v 1.16 2004/02/11 04:17:05 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -33,7 +33,7 @@
 
 #include "epan/packet_info.h"
 #include "epan/epan.h"
-#include "menu.h"
+#include "tap_menu.h"
 #include "simple_dialog.h"
 #include "dlg_utils.h"
 #include "tap.h"