aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-04-23 03:51:03 +0000
committerGuy Harris <guy@alum.mit.edu>2003-04-23 03:51:03 +0000
commit4cfd8b0f360efd2d867333b80f201d13c630f7c8 (patch)
treee7b3cf15f160bb39b9939f6a9fcbbfbce4ba51b6 /tethereal.c
parent6b0b09b402cb6e47f4f78f867ef10dc43af1b42c (diff)
Allow taps to have menu item registration routines; the menu item
registration routines, for taps with menu items (taps that can be run from the "Tools->Statistics" menu), create the menu item for the tap. "make-tapreg-dotc" constructs a "register_all_tap_menus()" function that calls all the tap menu item registration routines it finds, and Ethereal calls that routine after the main window has been constructed (so that the main menu exists, as the menu items are added to it). (Tethereal doesn't call it.) Get rid of the "menu" and "menu_init" arguments to "register_ethereal_tap"; the menu item is registered in the tap's menu item registration routine, not in its main registration routine. Have the RTP GUI tap register its menu item that way, rather than by having it compiled into "gtk/menu.c". (We're not ready yet to have taps whose menu items are under a submenu register themselves in that fashion, as "register_tap_menu_item()" can't yet create submenus.) svn path=/trunk/; revision=7540
Diffstat (limited to 'tethereal.c')
-rw-r--r--tethereal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tethereal.c b/tethereal.c
index 746f4af564..36b16bbbad 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.180 2003/04/16 05:55:37 guy Exp $
+ * $Id: tethereal.c,v 1.181 2003/04/23 03:50:59 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -329,7 +329,7 @@ typedef struct _ethereal_tap_list {
static ethereal_tap_list *tap_list=NULL;
void
-register_ethereal_tap(char *cmd, void (*func)(char *arg), char *dummy _U_, void (*dummy2)(void) _U_)
+register_ethereal_tap(char *cmd, void (*func)(char *arg))
{
ethereal_tap_list *newtl;
@@ -378,6 +378,9 @@ main(int argc, char *argv[])
dissectors, and we must do it before we read the preferences, in
case any dissectors register preferences. */
epan_init(PLUGIN_DIR,register_all_protocols,register_all_protocol_handoffs);
+
+ /* Register all tap listeners; we do this before we parse the arguments,
+ as the "-z" argument can specify a registered tap. */
register_all_tap_listeners();
/* Now register the preferences for any non-dissector modules.