diff options
-rw-r--r-- | gtk/Makefile.am | 5 | ||||
-rw-r--r-- | gtk/dcerpc_stat.c | 4 | ||||
-rw-r--r-- | gtk/io_stat.c | 4 | ||||
-rw-r--r-- | gtk/main.c | 13 | ||||
-rw-r--r-- | gtk/menu.c | 5 | ||||
-rw-r--r-- | gtk/mgcp_stat.c | 4 | ||||
-rw-r--r-- | gtk/rpc_progs.c | 4 | ||||
-rw-r--r-- | gtk/rpc_stat.c | 4 | ||||
-rw-r--r-- | gtk/smb_stat.c | 4 | ||||
-rw-r--r-- | gtk/tap_rtp.c | 16 | ||||
-rw-r--r-- | gtk/tap_rtp.h | 35 | ||||
-rwxr-xr-x | make-tapreg-dotc | 19 | ||||
-rw-r--r-- | register.h | 8 | ||||
-rw-r--r-- | tap-dcerpcstat.c | 4 | ||||
-rw-r--r-- | tap-iostat.c | 4 | ||||
-rw-r--r-- | tap-iousers.c | 4 | ||||
-rw-r--r-- | tap-mgcpstat.c | 4 | ||||
-rw-r--r-- | tap-protocolinfo.c | 4 | ||||
-rw-r--r-- | tap-protohierstat.c | 4 | ||||
-rw-r--r-- | tap-rpcprogs.c | 4 | ||||
-rw-r--r-- | tap-rpcstat.c | 4 | ||||
-rw-r--r-- | tap-smbstat.c | 4 | ||||
-rw-r--r-- | tethereal.c | 7 |
23 files changed, 80 insertions, 88 deletions
diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 3fde739797..25e0ce0ca8 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -1,7 +1,7 @@ # Makefile.am # Automake file for the GTK interface routines for Ethereal # -# $Id: Makefile.am,v 1.55 2003/04/16 07:24:06 guy Exp $ +# $Id: Makefile.am,v 1.56 2003/04/23 03:51:02 guy Exp $ # # Ethereal - Network traffic analyzer # By Gerald Combs <gerald@ethereal.com> @@ -40,8 +40,7 @@ ETHEREAL_TAP_SRC = \ rpc_progs.h \ smb_stat.c \ smb_stat.h \ - tap_rtp.c \ - tap_rtp.h + tap_rtp.c ethereal-tap-register.c: $(ETHEREAL_TAP_SRC) $(top_srcdir)/make-tapreg-dotc @echo Making ethereal-tap-register.c diff --git a/gtk/dcerpc_stat.c b/gtk/dcerpc_stat.c index 7003e56ded..064332894d 100644 --- a/gtk/dcerpc_stat.c +++ b/gtk/dcerpc_stat.c @@ -1,7 +1,7 @@ /* dcerpc_stat.c * dcerpc_stat 2002 Ronnie Sahlberg * - * $Id: dcerpc_stat.c,v 1.3 2002/11/11 15:39:05 oabad Exp $ + * $Id: dcerpc_stat.c,v 1.4 2003/04/23 03:51:02 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -610,5 +610,5 @@ gtk_dcerpcstat_cb(GtkWidget *w _U_, gpointer d _U_) void register_tap_listener_gtkdcerpcstat(void) { - register_ethereal_tap("dcerpc,rtt,", gtk_dcerpcstat_init, NULL, NULL); + register_ethereal_tap("dcerpc,rtt,", gtk_dcerpcstat_init); } diff --git a/gtk/io_stat.c b/gtk/io_stat.c index 5b15325a80..f93d5d8d71 100644 --- a/gtk/io_stat.c +++ b/gtk/io_stat.c @@ -1,7 +1,7 @@ /* io_stat.c * io_stat 2002 Ronnie Sahlberg * - * $Id: io_stat.c,v 1.18 2003/03/05 20:12:04 guy Exp $ + * $Id: io_stat.c,v 1.19 2003/04/23 03:51:02 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1650,6 +1650,6 @@ register_tap_listener_gtk_iostat(void) { io_stat_widget_table = g_hash_table_new(io_stat_widget_hash, io_stat_widget_equal); - register_ethereal_tap("io,stat", gtk_iostat_init, NULL, NULL); + register_ethereal_tap("io,stat", gtk_iostat_init); } diff --git a/gtk/main.c b/gtk/main.c index fb3d990122..4c3fd87588 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -1,6 +1,6 @@ /* main.c * - * $Id: main.c,v 1.288 2003/04/16 05:55:41 guy Exp $ + * $Id: main.c,v 1.289 2003/04/23 03:51:03 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1356,7 +1356,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; @@ -1462,6 +1462,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. @@ -2072,10 +2075,12 @@ main(int argc, char *argv[]) to a file that our parent will read? */ if (!capture_child) { #endif - /* No. Pop up the main window, and read in a capture file if + /* No. Pop up the main window, register menus for taps (which we + must do after creating the main window, so that we can add + menu items to the main menu), and read in a capture file if we were told to. */ - create_main_window(pl_size, tv_size, bv_size, prefs); + register_all_tap_menus(); set_menus_for_capture_file(FALSE); /* open tap windows after creating the main window to avoid GTK warnings */ diff --git a/gtk/menu.c b/gtk/menu.c index 92aad426ac..61d780ff61 100644 --- a/gtk/menu.c +++ b/gtk/menu.c @@ -1,7 +1,7 @@ /* menu.c * Menu routines * - * $Id: menu.c,v 1.90 2003/04/23 03:13:16 guy Exp $ + * $Id: menu.c,v 1.91 2003/04/23 03:51:03 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -65,7 +65,6 @@ #include "mgcp_stat.h" #include "compat_macros.h" #include "gtkglobals.h" -#include "tap_rtp.h" #include "../tap.h" GtkWidget *popup_menu_object; @@ -260,8 +259,6 @@ static GtkItemFactoryEntry menu_items[] = NULL), ITEM_FACTORY_ENTRY("/Tools/Statistics/MGCP/RTD", NULL, gtk_mgcpstat_cb, 0, NULL, NULL), - ITEM_FACTORY_ENTRY("/Tools/Statistics/RTP Analysis...", NULL, rtp_analyse_cb, - 0, NULL, NULL), ITEM_FACTORY_ENTRY("/_Help", NULL, NULL, 0, "<LastBranch>", NULL), ITEM_FACTORY_STOCK_ENTRY("/Help/_Help", NULL, help_cb, 0, GTK_STOCK_HELP), ITEM_FACTORY_ENTRY("/Help/<separator>", NULL, NULL, 0, "<Separator>", NULL), diff --git a/gtk/mgcp_stat.c b/gtk/mgcp_stat.c index 1fa087f6db..54a808de2b 100644 --- a/gtk/mgcp_stat.c +++ b/gtk/mgcp_stat.c @@ -2,7 +2,7 @@ * mgcp-statistics for ethereal * Copyright 2003 Lars Roland * - * $Id: mgcp_stat.c,v 1.1 2003/04/16 07:24:06 guy Exp $ + * $Id: mgcp_stat.c,v 1.2 2003/04/23 03:51:03 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -342,7 +342,7 @@ gtk_mgcpstat_init(char *optarg) void register_tap_listener_gtkmgcpstat(void) { - register_ethereal_tap("mgcp,rtd", gtk_mgcpstat_init, NULL, NULL); + register_ethereal_tap("mgcp,rtd", gtk_mgcpstat_init); } diff --git a/gtk/rpc_progs.c b/gtk/rpc_progs.c index 1e6d720d11..1aeb9e7473 100644 --- a/gtk/rpc_progs.c +++ b/gtk/rpc_progs.c @@ -1,7 +1,7 @@ /* rpc_progs.c * rpc_progs 2002 Ronnie Sahlberg * - * $Id: rpc_progs.c,v 1.6 2002/12/16 07:02:05 sahlberg Exp $ + * $Id: rpc_progs.c,v 1.7 2003/04/23 03:51:03 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -397,5 +397,5 @@ gtk_rpcprogs_cb(GtkWidget *w _U_, gpointer d _U_) void register_tap_listener_gtkrpcprogs(void) { - register_ethereal_tap("rpc,programs", gtk_rpcprogs_init, NULL, NULL); + register_ethereal_tap("rpc,programs", gtk_rpcprogs_init); } diff --git a/gtk/rpc_stat.c b/gtk/rpc_stat.c index 0b08f33466..e5b6d14ef9 100644 --- a/gtk/rpc_stat.c +++ b/gtk/rpc_stat.c @@ -1,7 +1,7 @@ /* rpc_stat.c * rpc_stat 2002 Ronnie Sahlberg * - * $Id: rpc_stat.c,v 1.6 2002/11/11 15:39:06 oabad Exp $ + * $Id: rpc_stat.c,v 1.7 2003/04/23 03:51:03 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -604,5 +604,5 @@ gtk_rpcstat_cb(GtkWidget *w _U_, gpointer d _U_) void register_tap_listener_gtkrpcstat(void) { - register_ethereal_tap("rpc,rtt,", gtk_rpcstat_init, NULL, NULL); + register_ethereal_tap("rpc,rtt,", gtk_rpcstat_init); } diff --git a/gtk/smb_stat.c b/gtk/smb_stat.c index 5af4e687e3..9bedf49306 100644 --- a/gtk/smb_stat.c +++ b/gtk/smb_stat.c @@ -1,7 +1,7 @@ /* smb_stat.c * smb_stat 2003 Ronnie Sahlberg * - * $Id: smb_stat.c,v 1.2 2003/04/22 09:30:59 sahlberg Exp $ + * $Id: smb_stat.c,v 1.3 2003/04/23 03:51:03 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -489,7 +489,7 @@ gtk_smbstat_init(char *optarg) void register_tap_listener_gtksmbstat(void) { - register_ethereal_tap("smb,rtt", gtk_smbstat_init, NULL, NULL); + register_ethereal_tap("smb,rtt", gtk_smbstat_init); } diff --git a/gtk/tap_rtp.c b/gtk/tap_rtp.c index 890e0b1907..b4f51b1662 100644 --- a/gtk/tap_rtp.c +++ b/gtk/tap_rtp.c @@ -1,7 +1,7 @@ /* * tap_rtp.c * - * $Id: tap_rtp.c,v 1.8 2003/03/11 08:46:26 sahlberg Exp $ + * $Id: tap_rtp.c,v 1.9 2003/04/23 03:51:03 guy Exp $ * * RTP analysing addition for ethereal * @@ -98,7 +98,6 @@ #endif #include <gtk/gtk.h> -#include "tap_rtp.h" #include "globals.h" #include <string.h> #include "epan/packet_info.h" @@ -111,6 +110,7 @@ #include "dlg_utils.h" #include "ui_util.h" #include "simple_dialog.h" +#include "menu.h" #include "main.h" #include <math.h> #include "progress_dlg.h" @@ -1611,7 +1611,7 @@ static void get_reversed_ssrc(void *prs) /* XXX only handles RTP over IPv4, should add IPv6 support */ /* when the user clicks the RTP dialog button */ -void rtp_analyse_cb(GtkWidget *w _U_, gpointer data _U_) +static void rtp_analyse_cb(GtkWidget *w _U_, gpointer data _U_) { info_stat *rs; gchar filter_text[256]; @@ -1734,11 +1734,16 @@ rtp_analyse_init(char *dummy _U_) rtp_analyse_cb(NULL, NULL); } -/* XXX compiler warning:passing arg 2 of `register_ethereal_tap' from incompatible pointer type */ void register_tap_listener_gtkrtp(void) { - register_ethereal_tap("rtp", rtp_analyse_init, NULL, NULL); + register_ethereal_tap("rtp", rtp_analyse_init); +} + +void +register_tap_menu_gtkrtp(void) +{ + register_tap_menu_item("RTP Analysis...", rtp_analyse_cb); } @@ -1918,4 +1923,3 @@ static gboolean copy_file(gchar *dest, gint channels, /*gint format,*/ void *dat return TRUE; } - diff --git a/gtk/tap_rtp.h b/gtk/tap_rtp.h deleted file mode 100644 index ea4818b4d2..0000000000 --- a/gtk/tap_rtp.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * tap_rtp.h - * - * $Id: tap_rtp.h,v 1.3 2003/03/06 22:36:43 guy Exp $ - * - * Declaration for rtp analysing tool - * - * Copyright 2003, Iskratel, Ltd, Kranj - * By Miha Jemec <m.jemec@iskratel.si> - * - * 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 __TAP_RTP_H__ -#define __TAP_RTP_H__ - -void rtp_analyse_cb(GtkWidget *, gpointer); - -#endif /* _TAP_RTP_H_ */ diff --git a/make-tapreg-dotc b/make-tapreg-dotc index d3c470529c..f68720633c 100755 --- a/make-tapreg-dotc +++ b/make-tapreg-dotc @@ -39,4 +39,23 @@ 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} diff --git a/register.h b/register.h index cd17238c77..35b50e3ae5 100644 --- a/register.h +++ b/register.h @@ -1,13 +1,12 @@ /* register.h * Definitions for protocol registration * - * $Id: register.h,v 1.4 2002/10/31 22:16:01 guy Exp $ + * $Id: register.h,v 1.5 2003/04/23 03:50:59 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * 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 @@ -29,5 +28,6 @@ extern void register_all_protocols(void); extern void register_all_protocol_handoffs(void); extern void register_all_tap_listeners(void); -extern void register_ethereal_tap(char *str, void (*init)(char *), char *menu, void(*menu_init)(void)); +extern void register_all_tap_menus(void); +extern void register_ethereal_tap(char *str, void (*init)(char *)); #endif /* __REGISTER_H__ */ diff --git a/tap-dcerpcstat.c b/tap-dcerpcstat.c index 8433125ff0..96b155fb44 100644 --- a/tap-dcerpcstat.c +++ b/tap-dcerpcstat.c @@ -1,7 +1,7 @@ /* tap-dcerpcstat.c * dcerpcstat 2002 Ronnie Sahlberg * - * $Id: tap-dcerpcstat.c,v 1.3 2002/10/31 22:16:01 guy Exp $ + * $Id: tap-dcerpcstat.c,v 1.4 2003/04/23 03:50:59 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -277,5 +277,5 @@ dcerpcstat_init(char *optarg) void register_tap_listener_dcerpcstat(void) { - register_ethereal_tap("dcerpc,rtt,", dcerpcstat_init, NULL, NULL); + register_ethereal_tap("dcerpc,rtt,", dcerpcstat_init); } diff --git a/tap-iostat.c b/tap-iostat.c index 5e6602ac3a..07f10717dc 100644 --- a/tap-iostat.c +++ b/tap-iostat.c @@ -1,7 +1,7 @@ /* tap-iostat.c * iostat 2002 Ronnie Sahlberg * - * $Id: tap-iostat.c,v 1.4 2003/04/22 09:02:47 sahlberg Exp $ + * $Id: tap-iostat.c,v 1.5 2003/04/23 03:50:59 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -312,6 +312,6 @@ iostat_init(char *optarg) void register_tap_listener_iostat(void) { - register_ethereal_tap("io,stat,", iostat_init, NULL, NULL); + register_ethereal_tap("io,stat,", iostat_init); } diff --git a/tap-iousers.c b/tap-iousers.c index 0a89c877e0..95aeb7e541 100644 --- a/tap-iousers.c +++ b/tap-iousers.c @@ -1,7 +1,7 @@ /* tap-iousers.c * iostat 2003 Ronnie Sahlberg * - * $Id: tap-iousers.c,v 1.4 2003/03/03 23:46:48 sahlberg Exp $ + * $Id: tap-iousers.c,v 1.5 2003/04/23 03:50:59 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -459,6 +459,6 @@ iousers_init(char *optarg) void register_tap_listener_iousers(void) { - register_ethereal_tap("io,users,", iousers_init, NULL, NULL); + register_ethereal_tap("io,users,", iousers_init); } diff --git a/tap-mgcpstat.c b/tap-mgcpstat.c index 6ec9f5ea5e..8313b7f42b 100644 --- a/tap-mgcpstat.c +++ b/tap-mgcpstat.c @@ -1,7 +1,7 @@ /* tap-mgcpstat.c * mgcpstat 2003 Lars Roland * - * $Id: tap-mgcpstat.c,v 1.4 2003/04/16 07:24:04 guy Exp $ + * $Id: tap-mgcpstat.c,v 1.5 2003/04/23 03:50:59 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -230,6 +230,6 @@ mgcpstat_init(char *optarg) void register_tap_listener_mgcpstat(void) { - register_ethereal_tap("mgcp,rtd", mgcpstat_init, NULL, NULL); + register_ethereal_tap("mgcp,rtd", mgcpstat_init); } diff --git a/tap-protocolinfo.c b/tap-protocolinfo.c index c750466b89..bdc88e8a48 100644 --- a/tap-protocolinfo.c +++ b/tap-protocolinfo.c @@ -1,7 +1,7 @@ /* tap-protocolinfo.c * protohierstat 2002 Ronnie Sahlberg * - * $Id: tap-protocolinfo.c,v 1.1 2002/11/04 12:10:59 sahlberg Exp $ + * $Id: tap-protocolinfo.c,v 1.2 2003/04/23 03:50:59 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -122,6 +122,6 @@ protocolinfo_init(char *optarg) void register_tap_listener_protocolinfo(void) { - register_ethereal_tap("proto,colinfo,", protocolinfo_init, NULL, NULL); + register_ethereal_tap("proto,colinfo,", protocolinfo_init); } diff --git a/tap-protohierstat.c b/tap-protohierstat.c index a919d5110f..00131f0910 100644 --- a/tap-protohierstat.c +++ b/tap-protohierstat.c @@ -1,7 +1,7 @@ /* tap-protohierstat.c * protohierstat 2002 Ronnie Sahlberg * - * $Id: tap-protohierstat.c,v 1.1 2002/11/01 05:29:34 sahlberg Exp $ + * $Id: tap-protohierstat.c,v 1.2 2003/04/23 03:50:59 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -212,6 +212,6 @@ protohierstat_init(char *optarg) void register_tap_listener_protohierstat(void) { - register_ethereal_tap("io,phs", protohierstat_init, NULL, NULL); + register_ethereal_tap("io,phs", protohierstat_init); } diff --git a/tap-rpcprogs.c b/tap-rpcprogs.c index 50d3f0c21d..d544234388 100644 --- a/tap-rpcprogs.c +++ b/tap-rpcprogs.c @@ -1,7 +1,7 @@ /* tap-rpcprogs.c * rpcstat 2002 Ronnie Sahlberg * - * $Id: tap-rpcprogs.c,v 1.3 2002/10/31 22:16:01 guy Exp $ + * $Id: tap-rpcprogs.c,v 1.4 2003/04/23 03:50:59 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -237,7 +237,7 @@ rpcprogs_init(char *optarg _U_) void register_tap_listener_rpcprogs(void) { - register_ethereal_tap("rpc,programs", rpcprogs_init, NULL, NULL); + register_ethereal_tap("rpc,programs", rpcprogs_init); } diff --git a/tap-rpcstat.c b/tap-rpcstat.c index acfcd25d14..e6e743c0e0 100644 --- a/tap-rpcstat.c +++ b/tap-rpcstat.c @@ -1,7 +1,7 @@ /* tap-rpcstat.c * rpcstat 2002 Ronnie Sahlberg * - * $Id: tap-rpcstat.c,v 1.6 2002/11/01 01:11:59 sahlberg Exp $ + * $Id: tap-rpcstat.c,v 1.7 2003/04/23 03:50:59 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -358,6 +358,6 @@ rpcstat_init(char *optarg) void register_tap_listener_rpcstat(void) { - register_ethereal_tap("rpc,rtt,", rpcstat_init, NULL, NULL); + register_ethereal_tap("rpc,rtt,", rpcstat_init); } diff --git a/tap-smbstat.c b/tap-smbstat.c index ff3d29ab15..7683ac3a3f 100644 --- a/tap-smbstat.c +++ b/tap-smbstat.c @@ -1,7 +1,7 @@ /* tap-smbstat.c * smbstat 2003 Ronnie Sahlberg * - * $Id: tap-smbstat.c,v 1.1 2003/01/22 00:42:03 sahlberg Exp $ + * $Id: tap-smbstat.c,v 1.2 2003/04/23 03:50:59 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -295,6 +295,6 @@ smbstat_init(char *optarg) void register_tap_listener_smbstat(void) { - register_ethereal_tap("smb,rtt", smbstat_init, NULL, NULL); + register_ethereal_tap("smb,rtt", smbstat_init); } 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. |