aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Roland <Lars.Roland@gmx.net>2005-03-05 06:28:10 +0000
committerLars Roland <Lars.Roland@gmx.net>2005-03-05 06:28:10 +0000
commit00273300e721999ac67a4ce66dab80fed6a1314f (patch)
treeac2c8b87fdd4dc989c3ef1d3b646f7700ba7626c
parent1a7b3ec1439203e3bea3381dfb31b4357758b4c3 (diff)
Preparations for dropping the old plugin api.
Introduce a new init routine for plugins, which does not take the plugin api table as an argument and allows etheral to distinguish between plugins using the old and the new api. Update README.plugins accordingly Change all g_warnings() in epan/plugins.c to report_failue(). On windows we do not have a log console open while loading the plugins, because a log console cannot be opened before the prefs have been read. Thus g_warnings() does not work for reporting problems with plugins. svn path=/trunk/; revision=13596
-rw-r--r--doc/README.plugins40
-rw-r--r--epan/plugins.c51
-rw-r--r--plugins/acn/Makefile.nmake7
-rw-r--r--plugins/acn/packet-acn.c13
-rw-r--r--plugins/agentx/Makefile.nmake7
-rw-r--r--plugins/agentx/packet-agentx.c12
-rw-r--r--plugins/artnet/Makefile.nmake7
-rw-r--r--plugins/artnet/packet-artnet.c13
-rw-r--r--plugins/asn1/Makefile.nmake7
-rw-r--r--plugins/asn1/packet-asn1.c12
-rw-r--r--plugins/ciscosm/Makefile.nmake7
-rw-r--r--plugins/ciscosm/packet-sm.c13
-rw-r--r--plugins/docsis/Makefile.nmake7
-rw-r--r--plugins/docsis/packet-bpkmattr.c2
-rw-r--r--plugins/docsis/packet-bpkmreq.c2
-rw-r--r--plugins/docsis/packet-bpkmrsp.c2
-rw-r--r--plugins/docsis/packet-docsis.c10
-rw-r--r--plugins/docsis/packet-dsaack.c2
-rw-r--r--plugins/docsis/packet-dsareq.c2
-rw-r--r--plugins/docsis/packet-dsarsp.c2
-rw-r--r--plugins/docsis/packet-dscack.c2
-rw-r--r--plugins/docsis/packet-dscreq.c2
-rw-r--r--plugins/docsis/packet-dscrsp.c2
-rw-r--r--plugins/docsis/packet-dsdreq.c2
-rw-r--r--plugins/docsis/packet-dsdrsp.c2
-rw-r--r--plugins/docsis/packet-intrngreq.c3
-rw-r--r--plugins/docsis/packet-macmgmt.c3
-rw-r--r--plugins/docsis/packet-map.c3
-rw-r--r--plugins/docsis/packet-regack.c2
-rw-r--r--plugins/docsis/packet-regreq.c2
-rw-r--r--plugins/docsis/packet-regrsp.c2
-rw-r--r--plugins/docsis/packet-rngreq.c3
-rw-r--r--plugins/docsis/packet-rngrsp.c2
-rw-r--r--plugins/docsis/packet-tlv.c3
-rw-r--r--plugins/docsis/packet-type29ucd.c3
-rw-r--r--plugins/docsis/packet-uccreq.c2
-rw-r--r--plugins/docsis/packet-uccrsp.c2
-rw-r--r--plugins/docsis/packet-ucd.c3
-rw-r--r--plugins/docsis/packet-vendor.c3
-rw-r--r--plugins/enttec/Makefile.nmake7
-rw-r--r--plugins/enttec/packet-enttec.c13
-rw-r--r--plugins/giop/Makefile.nmake7
-rw-r--r--plugins/giop/packet-coseventcomm.c13
-rw-r--r--plugins/giop/packet-cosnaming.c13
-rw-r--r--plugins/gryphon/Makefile.nmake7
-rw-r--r--plugins/gryphon/packet-gryphon.c13
-rw-r--r--plugins/irda/Makefile.nmake7
-rw-r--r--plugins/irda/packet-ircomm.c4
-rw-r--r--plugins/irda/packet-irda.c13
-rw-r--r--plugins/irda/packet-sir.c1
-rw-r--r--plugins/lwres/Makefile.nmake7
-rw-r--r--plugins/lwres/packet-lwres.c12
-rw-r--r--plugins/mate/Makefile.nmake7
-rw-r--r--plugins/megaco/Makefile.nmake7
-rw-r--r--plugins/megaco/packet-megaco.c12
-rw-r--r--plugins/mgcp/Makefile.nmake7
-rw-r--r--plugins/mgcp/packet-mgcp.c14
-rw-r--r--plugins/opsi/Makefile.nmake7
-rw-r--r--plugins/opsi/packet-opsi.c11
-rw-r--r--plugins/pcli/Makefile.nmake7
-rw-r--r--plugins/pcli/packet-pcli.c14
-rw-r--r--plugins/rdm/Makefile.nmake7
-rw-r--r--plugins/rdm/packet-rdm.c13
-rw-r--r--plugins/rlm/Makefile.nmake7
-rw-r--r--plugins/rlm/packet-rlm.c11
-rw-r--r--plugins/rtnet/Makefile.nmake7
-rw-r--r--plugins/rtnet/packet-rtnet.c13
-rw-r--r--plugins/rudp/Makefile.nmake7
-rw-r--r--plugins/rudp/packet-rudp.c11
-rw-r--r--plugins/v5ua/Makefile.nmake7
-rw-r--r--plugins/v5ua/packet-v5ua.c14
71 files changed, 159 insertions, 405 deletions
diff --git a/doc/README.plugins b/doc/README.plugins
index cbc78078eb..59d7975485 100644
--- a/doc/README.plugins
+++ b/doc/README.plugins
@@ -15,13 +15,6 @@ only a few changes you need to make to "pluginize" your dissector.
1 New headers needed in packet-xxx.c
-#include "plugins/plugin_api.h"
-
-Some OSes (Win32) have DLLs that cannot reference symbols in the parent
-executable. So, the executable needs to provide a table of pointers for the DLL
-plugin to use. The plugin_api.h header provides definitions for this (or empty
-definitions on OSes which don't need this).
-
#include "moduleinfo.h"
This header is optional and is described in greater detail further on.
@@ -35,11 +28,6 @@ you include "gmodule.h"; however, "glib.h" is protected from multiple
inclusion by #ifdefs, so it's safe to include it after including
"gmodule.h".
-#include "plugins/plugin_api_defs.h"
-Only include this in one source file if you have more than one. It defines,
-(as opposed to declares,) the function pointer variables that the plugin uses
-to reference the address table.
-
2 New exported constants in packet-xxx.c
Plugins need to provide the following exported constants:
@@ -59,19 +47,15 @@ The following two functions need to be exported by the plugin:
#ifndef ENABLE_STATIC
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat)
+new_plugin_init(void)
#endif
This function is called by Ethereal when the plugin is initialized; it's
similar to the "proto_register_XXX()" routine for a non-plugin
-dissector, except for the name and the call to
-"plugin_address_table_init()".
+dissector, except for the name.
Here is a sample code for the function:
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
-
/* register the new protocol, protocol fields, and subtrees */
if (proto_xxx == -1) { /* execute protocol initialization only once */
proto_register_xxx();
@@ -150,12 +134,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-xxx.obj
@@ -163,11 +144,15 @@ xxx.dll xxx.exp xxx.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:xxx.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) xxx.dll xxx.exp xxx.lib *.pdb
distclean: clean
+maintainer-clean: distclean
+
4.3 plugins/xxx/moduleinfo.h
moduleinfo.h is used to set the version information for the plugin.
@@ -238,6 +223,17 @@ distclean: clean
cd ..
+maintainer-clean: clean
+ cd gryphon
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ../mgcp
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ..
+ cd xxx
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
+ cd ..
+
+
4.6 Changes to the top level Makefile.am
Unfortunately there are quite some several places in the top level
diff --git a/epan/plugins.c b/epan/plugins.c
index 72e05fc305..96f56911e5 100644
--- a/epan/plugins.c
+++ b/epan/plugins.c
@@ -171,6 +171,7 @@ plugins_scan_dir(const char *dirname)
gchar *version;
gpointer gp;
void (*init)(void *);
+ void (*newinit)(void) = NULL;
void (*reg_handoff)(void);
void (*register_tap_listener)(void);
gchar *dot;
@@ -232,29 +233,49 @@ plugins_scan_dir(const char *dirname)
#endif
if ((handle = g_module_open(filename, 0)) == NULL)
{
- g_warning("Couldn't load module %s: %s", filename,
+ report_failure("Couldn't load module %s: %s", filename,
g_module_error());
continue;
}
if (!g_module_symbol(handle, "version", &gp))
{
- g_warning("The plugin %s has no version symbol", name);
+ report_failure("The plugin %s has no version symbol", name);
g_module_close(handle);
continue;
}
version = gp;
-
+
/*
* We require the plugin to have a "plugin_init()" routine.
*/
- if (!g_module_symbol(handle, "plugin_init", &gp))
+ if (g_module_symbol(handle, "new_plugin_init", &gp))
{
- g_warning("The plugin %s has no plugin_init routine",
- name);
- g_module_close(handle);
- continue;
+ /*
+ * We have a new init routine which does not need the
+ * plugin api table.
+ */
+ newinit = gp;
+ } else
+ {
+ newinit = NULL;
+ if (!g_module_symbol(handle, "plugin_init", &gp))
+ {
+ /*
+ * We don't have an init routine. Close the plugin.
+ */
+ report_failure("The plugin %s has no plugin_init routine",
+ name);
+ g_module_close(handle);
+ continue;
+ }
+ /*
+ * We have an old init routine. Throw a warning that
+ * support is going to be dropped.
+ */
+ report_failure("The plugin %s has an old plugin init routine.\nSupport is going to be dropped in the near future.",
+ name);
+ init = gp;
}
- init = gp;
/*
* Do we have a reg_handoff routine?
@@ -300,7 +321,7 @@ plugins_scan_dir(const char *dirname)
/*
* No.
*/
- g_warning("The plugin %s has neither a reg_handoff nor a register_tap_listener routine",
+ report_failure("The plugin %s has neither a reg_handoff nor a register_tap_listener routine",
name);
g_module_close(handle);
continue;
@@ -326,11 +347,17 @@ plugins_scan_dir(const char *dirname)
/*
* Call its init routine.
*/
+ if(newinit != NULL) {
+ newinit();
+ }
+ else
+ {
#ifdef PLUGINS_NEED_ADDRESS_TABLE
- init(&patable);
+ init(&patable);
#else
- init(NULL);
+ init(NULL);
#endif
+ }
}
#if GLIB_MAJOR_VERSION < 2
closedir(dir);
diff --git a/plugins/acn/Makefile.nmake b/plugins/acn/Makefile.nmake
index 4412be937e..00b0f38be9 100644
--- a/plugins/acn/Makefile.nmake
+++ b/plugins/acn/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-acn.obj
@@ -24,6 +21,8 @@ acn.dll acn.exp acn.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:acn.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) acn.dll acn.exp acn.lib *.pdb
diff --git a/plugins/acn/packet-acn.c b/plugins/acn/packet-acn.c
index 3c7b78b248..8bccfee84a 100644
--- a/plugins/acn/packet-acn.c
+++ b/plugins/acn/packet-acn.c
@@ -30,8 +30,6 @@
#include "config.h"
#endif
-#include "plugins/plugin_api.h"
-
#include "moduleinfo.h"
#include <stdio.h>
@@ -50,8 +48,6 @@
#include "acn.h"
-#include "plugins/plugin_api_defs.h"
-
/* Define version if we are not building ethereal statically */
#ifndef ENABLE_STATIC
@@ -1207,13 +1203,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_acn == -1) { /* execute protocol initialization only once */
proto_register_acn();
diff --git a/plugins/agentx/Makefile.nmake b/plugins/agentx/Makefile.nmake
index 0076318000..6d4b31e8f8 100644
--- a/plugins/agentx/Makefile.nmake
+++ b/plugins/agentx/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-agentx.obj
@@ -24,6 +21,8 @@ agentx.dll agentx.exp agentx.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:agentx.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) agentx.dll agentx.exp agentx.lib *.pdb
diff --git a/plugins/agentx/packet-agentx.c b/plugins/agentx/packet-agentx.c
index c0efecac28..26f19ee6dc 100644
--- a/plugins/agentx/packet-agentx.c
+++ b/plugins/agentx/packet-agentx.c
@@ -29,7 +29,6 @@
#include "config.h"
#endif
-#include "plugins/plugin_api.h"
#include "moduleinfo.h"
#include <stdio.h>
@@ -45,8 +44,6 @@
#include <epan/dissectors/packet-tcp.h>
-#include "plugins/plugin_api_defs.h"
-
static guint global_agentx_tcp_port = 705;
static guint agentx_tcp_port = 705;
@@ -1173,13 +1170,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_agentx == -1) { /* execute protocol initialization only once */
proto_register_agentx();
diff --git a/plugins/artnet/Makefile.nmake b/plugins/artnet/Makefile.nmake
index 28128cef5f..6fc03762ff 100644
--- a/plugins/artnet/Makefile.nmake
+++ b/plugins/artnet/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-artnet.obj
@@ -24,6 +21,8 @@ artnet.dll artnet.exp artnet.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:artnet.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) artnet.dll artnet.exp artnet.lib *.pdb
diff --git a/plugins/artnet/packet-artnet.c b/plugins/artnet/packet-artnet.c
index f2c4ee174f..7ce20e79a1 100644
--- a/plugins/artnet/packet-artnet.c
+++ b/plugins/artnet/packet-artnet.c
@@ -30,8 +30,6 @@
#include "config.h"
#endif
-#include "plugins/plugin_api.h"
-
#include "moduleinfo.h"
#include <stdio.h>
@@ -45,8 +43,6 @@
#include <epan/prefs.h>
#include <epan/strutil.h>
-#include "plugins/plugin_api_defs.h"
-
/* Define version if we are not building ethereal statically */
#ifndef ENABLE_STATIC
@@ -2731,13 +2727,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_artnet == -1) { /* execute protocol initialization only once */
proto_register_artnet();
diff --git a/plugins/asn1/Makefile.nmake b/plugins/asn1/Makefile.nmake
index 397bbf5e2c..d1ea5f513b 100644
--- a/plugins/asn1/Makefile.nmake
+++ b/plugins/asn1/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-asn1.obj
@@ -24,6 +21,8 @@ asn1.dll asn1.exp asn1.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:asn1.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) asn1.dll asn1.exp asn1.lib *.pdb
diff --git a/plugins/asn1/packet-asn1.c b/plugins/asn1/packet-asn1.c
index 0d94a87cb6..3c2148f776 100644
--- a/plugins/asn1/packet-asn1.c
+++ b/plugins/asn1/packet-asn1.c
@@ -67,8 +67,6 @@
#include <sys/stat.h>
#include <errno.h>
-#include "plugins/plugin_api.h"
-
#include "moduleinfo.h"
#include <stdio.h>
@@ -86,8 +84,6 @@
#include <epan/dissectors/packet-tcp.h>
#include <epan/asn1.h>
-#include "plugins/plugin_api_defs.h"
-
#ifdef DISSECTOR_WITH_GUI
#include <gtk/gtk.h>
#endif
@@ -5221,14 +5217,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-)
+new_plugin_init(void)
{
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
/* register the new protocol, protocol fields, and subtrees */
if (proto_asn1 == -1) { /* execute protocol initialization only once */
proto_register_asn1();
diff --git a/plugins/ciscosm/Makefile.nmake b/plugins/ciscosm/Makefile.nmake
index f71e97c2eb..922d3bbeb7 100644
--- a/plugins/ciscosm/Makefile.nmake
+++ b/plugins/ciscosm/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-sm.obj
@@ -24,6 +21,8 @@ ciscosm.dll ciscosm.exp ciscosm.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:ciscosm.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) ciscosm.dll ciscosm.exp ciscosm.lib *.pdb
diff --git a/plugins/ciscosm/packet-sm.c b/plugins/ciscosm/packet-sm.c
index ee7e0d3f3c..94180154ec 100644
--- a/plugins/ciscosm/packet-sm.c
+++ b/plugins/ciscosm/packet-sm.c
@@ -60,9 +60,7 @@
#include <gmodule.h>
#include <epan/packet.h>
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
- /* Define version if we are not building ethereal statically */
+/* Define version if we are not building ethereal statically */
#include "moduleinfo.h"
@@ -181,15 +179,8 @@ plugin_reg_handoff_sm(void)
#ifndef ENABLE_STATIC
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-)
+new_plugin_init(void)
{
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
-
/* register the new protocol, protocol fields, and subtrees */
if (proto_sm == -1) { /* execute protocol initialization only once */
proto_register_sm();
diff --git a/plugins/docsis/Makefile.nmake b/plugins/docsis/Makefile.nmake
index e565427852..ea8916603a 100644
--- a/plugins/docsis/Makefile.nmake
+++ b/plugins/docsis/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-intrngreq.obj packet-type29ucd.obj \
packet-docsis.obj packet-bpkmattr.obj \
@@ -36,6 +33,8 @@ docsis.dll docsis.exp docsis.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:docsis.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) docsis.dll docsis.exp docsis.lib *.pdb
diff --git a/plugins/docsis/packet-bpkmattr.c b/plugins/docsis/packet-bpkmattr.c
index 41bf022b14..483a0a35c3 100644
--- a/plugins/docsis/packet-bpkmattr.c
+++ b/plugins/docsis/packet-bpkmattr.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-bpkmreq.c b/plugins/docsis/packet-bpkmreq.c
index ed9f467e1d..eaa2be39b5 100644
--- a/plugins/docsis/packet-bpkmreq.c
+++ b/plugins/docsis/packet-bpkmreq.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-bpkmrsp.c b/plugins/docsis/packet-bpkmrsp.c
index 3dd4cf9e8e..e615b702d3 100644
--- a/plugins/docsis/packet-bpkmrsp.c
+++ b/plugins/docsis/packet-bpkmrsp.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-docsis.c b/plugins/docsis/packet-docsis.c
index cd7ed7943f..0b60707e54 100644
--- a/plugins/docsis/packet-docsis.c
+++ b/plugins/docsis/packet-docsis.c
@@ -49,8 +49,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
@@ -805,14 +803,8 @@ plugin_reg_handoff (void)
}
G_MODULE_EXPORT void
-plugin_init (plugin_address_table_t * pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
- _U_
-#endif
- )
+new_plugin_init (void)
{
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init (pat);
/* register the new protocol, protocol fields, and subtrees */
if (proto_docsis == -1)
{ /* execute protocol initialization only once */
diff --git a/plugins/docsis/packet-dsaack.c b/plugins/docsis/packet-dsaack.c
index 16f5581ea9..e20c9afc09 100644
--- a/plugins/docsis/packet-dsaack.c
+++ b/plugins/docsis/packet-dsaack.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-dsareq.c b/plugins/docsis/packet-dsareq.c
index 23e57ef54c..8c495fed14 100644
--- a/plugins/docsis/packet-dsareq.c
+++ b/plugins/docsis/packet-dsareq.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-dsarsp.c b/plugins/docsis/packet-dsarsp.c
index 369cc93681..725f227e58 100644
--- a/plugins/docsis/packet-dsarsp.c
+++ b/plugins/docsis/packet-dsarsp.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-dscack.c b/plugins/docsis/packet-dscack.c
index eb320fb3de..150a2efd0b 100644
--- a/plugins/docsis/packet-dscack.c
+++ b/plugins/docsis/packet-dscack.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-dscreq.c b/plugins/docsis/packet-dscreq.c
index cc427534d8..ae09452717 100644
--- a/plugins/docsis/packet-dscreq.c
+++ b/plugins/docsis/packet-dscreq.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-dscrsp.c b/plugins/docsis/packet-dscrsp.c
index da70b34c37..8534371b13 100644
--- a/plugins/docsis/packet-dscrsp.c
+++ b/plugins/docsis/packet-dscrsp.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-dsdreq.c b/plugins/docsis/packet-dsdreq.c
index 1352e15743..4ceabf8674 100644
--- a/plugins/docsis/packet-dsdreq.c
+++ b/plugins/docsis/packet-dsdreq.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-dsdrsp.c b/plugins/docsis/packet-dsdrsp.c
index 31fdc66b2c..01460c3718 100644
--- a/plugins/docsis/packet-dsdrsp.c
+++ b/plugins/docsis/packet-dsdrsp.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-intrngreq.c b/plugins/docsis/packet-intrngreq.c
index 37dcf69615..5dc3e9063a 100644
--- a/plugins/docsis/packet-intrngreq.c
+++ b/plugins/docsis/packet-intrngreq.c
@@ -27,9 +27,6 @@
#include "config.h"
#endif
-
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-macmgmt.c b/plugins/docsis/packet-macmgmt.c
index e6a88e9e74..62cf75128d 100644
--- a/plugins/docsis/packet-macmgmt.c
+++ b/plugins/docsis/packet-macmgmt.c
@@ -27,9 +27,6 @@
# include "config.h"
#endif
-
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-map.c b/plugins/docsis/packet-map.c
index 01be69fc66..ad9b3a634a 100644
--- a/plugins/docsis/packet-map.c
+++ b/plugins/docsis/packet-map.c
@@ -27,9 +27,6 @@
# include "config.h"
#endif
-
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-regack.c b/plugins/docsis/packet-regack.c
index 916d0677eb..f7e87f4024 100644
--- a/plugins/docsis/packet-regack.c
+++ b/plugins/docsis/packet-regack.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-regreq.c b/plugins/docsis/packet-regreq.c
index 69a80dac1d..21565aba9e 100644
--- a/plugins/docsis/packet-regreq.c
+++ b/plugins/docsis/packet-regreq.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-regrsp.c b/plugins/docsis/packet-regrsp.c
index 2669fbdc62..75fec0801a 100644
--- a/plugins/docsis/packet-regrsp.c
+++ b/plugins/docsis/packet-regrsp.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-rngreq.c b/plugins/docsis/packet-rngreq.c
index cb0bface54..682f1cdc88 100644
--- a/plugins/docsis/packet-rngreq.c
+++ b/plugins/docsis/packet-rngreq.c
@@ -27,9 +27,6 @@
#include "config.h"
#endif
-
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-rngrsp.c b/plugins/docsis/packet-rngrsp.c
index 60840746c3..601376afca 100644
--- a/plugins/docsis/packet-rngrsp.c
+++ b/plugins/docsis/packet-rngrsp.c
@@ -27,8 +27,6 @@
#include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-tlv.c b/plugins/docsis/packet-tlv.c
index 93819b6d7b..08989d87c9 100644
--- a/plugins/docsis/packet-tlv.c
+++ b/plugins/docsis/packet-tlv.c
@@ -27,9 +27,6 @@
# include "config.h"
#endif
-
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-type29ucd.c b/plugins/docsis/packet-type29ucd.c
index 769a74975f..a89e05f279 100644
--- a/plugins/docsis/packet-type29ucd.c
+++ b/plugins/docsis/packet-type29ucd.c
@@ -27,9 +27,6 @@
#include "config.h"
#endif
-
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-uccreq.c b/plugins/docsis/packet-uccreq.c
index 681dad7655..d03b42b37d 100644
--- a/plugins/docsis/packet-uccreq.c
+++ b/plugins/docsis/packet-uccreq.c
@@ -31,8 +31,6 @@
#include <stdlib.h>
#include <string.h>
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <gmodule.h>
diff --git a/plugins/docsis/packet-uccrsp.c b/plugins/docsis/packet-uccrsp.c
index d04b6925b7..2b3cf37c13 100644
--- a/plugins/docsis/packet-uccrsp.c
+++ b/plugins/docsis/packet-uccrsp.c
@@ -27,8 +27,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-ucd.c b/plugins/docsis/packet-ucd.c
index c08e113ee7..571a849467 100644
--- a/plugins/docsis/packet-ucd.c
+++ b/plugins/docsis/packet-ucd.c
@@ -27,9 +27,6 @@
# include "config.h"
#endif
-
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/docsis/packet-vendor.c b/plugins/docsis/packet-vendor.c
index 1b4247e76d..9bb56402c2 100644
--- a/plugins/docsis/packet-vendor.c
+++ b/plugins/docsis/packet-vendor.c
@@ -45,9 +45,6 @@
# include "config.h"
#endif
-
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
#include "moduleinfo.h"
#include <stdio.h>
diff --git a/plugins/enttec/Makefile.nmake b/plugins/enttec/Makefile.nmake
index ef0c579037..19032e1e2a 100644
--- a/plugins/enttec/Makefile.nmake
+++ b/plugins/enttec/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-enttec.obj
@@ -24,6 +21,8 @@ enttec.dll enttec.exp enttec.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:enttec.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) enttec.dll enttec.exp enttec.lib *.pdb
diff --git a/plugins/enttec/packet-enttec.c b/plugins/enttec/packet-enttec.c
index 055f3f2de6..c7c0371bee 100644
--- a/plugins/enttec/packet-enttec.c
+++ b/plugins/enttec/packet-enttec.c
@@ -30,8 +30,6 @@
#include "config.h"
#endif
-#include "plugins/plugin_api.h"
-
#include "moduleinfo.h"
#include <stdio.h>
@@ -45,8 +43,6 @@
#include <epan/prefs.h>
#include <epan/strutil.h>
-#include "plugins/plugin_api_defs.h"
-
/* Define version if we are not building ethereal statically */
#ifndef ENABLE_STATIC
@@ -596,13 +592,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_enttec == -1) { /* execute protocol initialization only once */
proto_register_enttec();
diff --git a/plugins/giop/Makefile.nmake b/plugins/giop/Makefile.nmake
index 333de09bb6..216f8a51c9 100644
--- a/plugins/giop/Makefile.nmake
+++ b/plugins/giop/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-cosnaming.obj packet-coseventcomm.obj
@@ -30,6 +27,8 @@ coseventcomm.dll coseventcomm.exp coseventcomm.lib : packet-coseventcomm.obj $(L
link -dll /out:coseventcomm.dll $(LDFLAGS) packet-coseventcomm.obj $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) cosnaming.dll cosnaming.exp cosnaming.lib \
coseventcomm.dll coseventcomm.exp coseventcomm.lib *.pdb
diff --git a/plugins/giop/packet-coseventcomm.c b/plugins/giop/packet-coseventcomm.c
index 6b8e259e1b..110eec0a88 100644
--- a/plugins/giop/packet-coseventcomm.c
+++ b/plugins/giop/packet-coseventcomm.c
@@ -35,8 +35,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-
#include <stdio.h>
#include <stdlib.h>
#include <gmodule.h>
@@ -47,8 +45,6 @@
#include <epan/proto.h>
#include <epan/dissectors/packet-giop.h>
-#include "plugins/plugin_api_defs.h"
-
#ifndef ENABLE_STATIC
G_MODULE_EXPORT const gchar version[] = "0.0.1";
#endif
@@ -868,13 +864,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
if (proto_coseventcomm == -1) {
proto_register_giop_coseventcomm();
}
diff --git a/plugins/giop/packet-cosnaming.c b/plugins/giop/packet-cosnaming.c
index 87c3982c70..44e6229ff8 100644
--- a/plugins/giop/packet-cosnaming.c
+++ b/plugins/giop/packet-cosnaming.c
@@ -35,8 +35,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-
#include <stdio.h>
#include <stdlib.h>
#include <gmodule.h>
@@ -47,8 +45,6 @@
#include <epan/proto.h>
#include <epan/dissectors/packet-giop.h>
-#include "plugins/plugin_api_defs.h"
-
#ifndef ENABLE_STATIC
G_MODULE_EXPORT const gchar version[] = "0.0.1";
#endif
@@ -1746,13 +1742,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
if (proto_cosnaming == -1) {
proto_register_giop_cosnaming();
}
diff --git a/plugins/gryphon/Makefile.nmake b/plugins/gryphon/Makefile.nmake
index 7ad5c9bf70..883c905556 100644
--- a/plugins/gryphon/Makefile.nmake
+++ b/plugins/gryphon/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-gryphon.obj
@@ -24,6 +21,8 @@ gryphon.dll gryphon.exp gryphon.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:gryphon.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) gryphon.dll gryphon.exp gryphon.lib *.pdb
diff --git a/plugins/gryphon/packet-gryphon.c b/plugins/gryphon/packet-gryphon.c
index fe8abcd62b..ea6196fe7f 100644
--- a/plugins/gryphon/packet-gryphon.c
+++ b/plugins/gryphon/packet-gryphon.c
@@ -28,8 +28,6 @@
#include "config.h"
#endif
-#include "plugins/plugin_api.h"
-
#include "moduleinfo.h"
#include <string.h>
@@ -42,8 +40,6 @@
#include <epan/dissectors/packet-tcp.h>
#include <epan/prefs.h>
-#include "plugins/plugin_api_defs.h"
-
#ifndef ENABLE_STATIC
G_MODULE_EXPORT const gchar version[] = VERSION;
#endif
@@ -2302,13 +2298,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_gryphon == -1) { /* execute protocol initialization only once */
proto_register_gryphon();
diff --git a/plugins/irda/Makefile.nmake b/plugins/irda/Makefile.nmake
index 03b950c988..1a51de7933 100644
--- a/plugins/irda/Makefile.nmake
+++ b/plugins/irda/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-irda.obj packet-ircomm.obj packet-sir.obj
@@ -24,6 +21,8 @@ irda.dll irda.exp irda.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:irda.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) irda.dll irda.exp irda.lib *.pdb
diff --git a/plugins/irda/packet-ircomm.c b/plugins/irda/packet-ircomm.c
index f2888839ea..0148f89747 100644
--- a/plugins/irda/packet-ircomm.c
+++ b/plugins/irda/packet-ircomm.c
@@ -28,8 +28,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-
#include "moduleinfo.h"
#include <stdio.h>
@@ -41,8 +39,6 @@
#include <epan/packet.h>
#include <epan/proto.h>
-#include "plugins/plugin_api_defs.h"
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
diff --git a/plugins/irda/packet-irda.c b/plugins/irda/packet-irda.c
index 28545d72cf..a87b748d65 100644
--- a/plugins/irda/packet-irda.c
+++ b/plugins/irda/packet-irda.c
@@ -31,8 +31,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-
#include "moduleinfo.h"
#include <stdio.h>
@@ -46,8 +44,6 @@
#include <epan/conversation.h>
#include <epan/xdlc.h>
-#include "plugins/plugin_api_defs.h"
-
#ifdef NEED_SNPRINTF_H
# include "snprintf.h"
#endif
@@ -2343,13 +2339,8 @@ plugin_reg_handoff(void)
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t* pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_irlap == -1)
{
diff --git a/plugins/irda/packet-sir.c b/plugins/irda/packet-sir.c
index dd46c9089c..a41904a6a5 100644
--- a/plugins/irda/packet-sir.c
+++ b/plugins/irda/packet-sir.c
@@ -22,7 +22,6 @@
# include "config.h"
#endif
#include "moduleinfo.h"
-#include "plugins/plugin_api.h"
#include <gmodule.h>
diff --git a/plugins/lwres/Makefile.nmake b/plugins/lwres/Makefile.nmake
index 686bc2fe48..97470f88a2 100644
--- a/plugins/lwres/Makefile.nmake
+++ b/plugins/lwres/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-lwres.obj
@@ -24,6 +21,8 @@ lwres.dll lwres.exp lwres.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:lwres.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) lwres.dll lwres.exp lwres.lib *.pdb
diff --git a/plugins/lwres/packet-lwres.c b/plugins/lwres/packet-lwres.c
index 16de34150d..52b57aac05 100644
--- a/plugins/lwres/packet-lwres.c
+++ b/plugins/lwres/packet-lwres.c
@@ -28,7 +28,6 @@
#include "config.h"
#endif
-#include "plugins/plugin_api.h"
#include "moduleinfo.h"
#include <stdio.h>
@@ -41,8 +40,6 @@
#include <epan/packet.h>
#include <epan/prefs.h>
-#include "plugins/plugin_api_defs.h"
-
#define LWRES_LWPACKET_LENGTH (4 * 5 + 2 * 4)
#define LWRES_LWPACKETFLAG_RESPONSE 0x0001U /* if set, pkt is a response */
#define LWRES_LWPACKETVERSION_0 0
@@ -1531,13 +1528,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_lwres == -1) { /* execute protocol initialization only once */
proto_register_lwres();
diff --git a/plugins/mate/Makefile.nmake b/plugins/mate/Makefile.nmake
index b08d92c111..c439e2ac5a 100644
--- a/plugins/mate/Makefile.nmake
+++ b/plugins/mate/Makefile.nmake
@@ -15,12 +15,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-mate.obj mate_setup.obj mate_runtime.obj mate_util.obj mate_plugin.obj
@@ -28,6 +25,8 @@ mate.dll mate.exp mate.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:mate.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) mate.dll mate.exp mate.lib *.pdb
diff --git a/plugins/megaco/Makefile.nmake b/plugins/megaco/Makefile.nmake
index 356d4bfbd5..f2d37a4f6d 100644
--- a/plugins/megaco/Makefile.nmake
+++ b/plugins/megaco/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-megaco.obj
@@ -24,6 +21,8 @@ megaco.dll megaco.exp megaco.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:megaco.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) megaco.dll megaco.exp megaco.lib *.pdb
diff --git a/plugins/megaco/packet-megaco.c b/plugins/megaco/packet-megaco.c
index 893f8dc77a..794fcc9be6 100644
--- a/plugins/megaco/packet-megaco.c
+++ b/plugins/megaco/packet-megaco.c
@@ -39,7 +39,6 @@
#include "config.h"
#endif
-#include "plugins/plugin_api.h"
#include "moduleinfo.h"
#include <stdio.h>
@@ -55,8 +54,6 @@
#include "sctpppids.h"
#include <epan/dissectors/packet-tpkt.h>
-#include "plugins/plugin_api_defs.h"
-
#ifndef ENABLE_STATIC
G_MODULE_EXPORT const gchar version[] = VERSION;
#endif
@@ -2743,13 +2740,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
- _U_
-#endif
- ){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_megaco == -1) { /* execute protocol initialization only once */
proto_register_megaco();
diff --git a/plugins/mgcp/Makefile.nmake b/plugins/mgcp/Makefile.nmake
index f44c35cf3f..4a7a74ef48 100644
--- a/plugins/mgcp/Makefile.nmake
+++ b/plugins/mgcp/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-mgcp.obj
@@ -24,6 +21,8 @@ mgcp.dll mgcp.exp mgcp.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:mgcp.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) mgcp.dll mgcp.exp mgcp.lib *.pdb
diff --git a/plugins/mgcp/packet-mgcp.c b/plugins/mgcp/packet-mgcp.c
index 3ff7bd6158..cc76d8211d 100644
--- a/plugins/mgcp/packet-mgcp.c
+++ b/plugins/mgcp/packet-mgcp.c
@@ -36,8 +36,6 @@
#include "config.h"
#endif
-#include "plugins/plugin_api.h"
-
#include "moduleinfo.h"
#include <stdio.h>
@@ -54,8 +52,6 @@
#include <epan/tap.h>
#include "packet-mgcp.h"
-#include "plugins/plugin_api_defs.h"
-
#ifndef ENABLE_STATIC
G_MODULE_EXPORT const gchar version[] = VERSION;
#endif
@@ -1759,14 +1755,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
-
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_mgcp == -1) { /* execute protocol initialization only once */
proto_register_mgcp();
diff --git a/plugins/opsi/Makefile.nmake b/plugins/opsi/Makefile.nmake
index 47f8cef88b..cabc2f44cd 100644
--- a/plugins/opsi/Makefile.nmake
+++ b/plugins/opsi/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-opsi.obj
@@ -24,6 +21,8 @@ opsi.dll opsi.exp opsi.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:opsi.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) opsi.dll opsi.exp opsi.lib *.pdb
diff --git a/plugins/opsi/packet-opsi.c b/plugins/opsi/packet-opsi.c
index 3d0cdd5a91..2fc4275951 100644
--- a/plugins/opsi/packet-opsi.c
+++ b/plugins/opsi/packet-opsi.c
@@ -27,10 +27,8 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
#include "moduleinfo.h"
#include <gmodule.h>
-#include "plugins/plugin_api_defs.h"
#include <stdio.h>
#include <stdlib.h>
@@ -808,15 +806,8 @@ proto_reg_handoff_opsi(void)
#ifndef ENABLE_STATIC
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-)
+new_plugin_init(void)
{
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
-
/* register the new protocol, protocol fields, and subtrees */
if (proto_opsi == -1) { /* execute protocol initialization only once */
proto_register_opsi();
diff --git a/plugins/pcli/Makefile.nmake b/plugins/pcli/Makefile.nmake
index 3e8119e05a..37b8d02965 100644
--- a/plugins/pcli/Makefile.nmake
+++ b/plugins/pcli/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-pcli.obj
@@ -24,6 +21,8 @@ pcli.dll pcli.exp pcli.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:pcli.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) pcli.dll pcli.exp pcli.lib *.pdb
diff --git a/plugins/pcli/packet-pcli.c b/plugins/pcli/packet-pcli.c
index 67d299ab4d..916e8a033a 100644
--- a/plugins/pcli/packet-pcli.c
+++ b/plugins/pcli/packet-pcli.c
@@ -32,9 +32,6 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-
-#include "plugins/plugin_api.h"
-
#include "moduleinfo.h"
#include <stdio.h>
@@ -48,8 +45,6 @@
#include <epan/prefs.h>
#include <epan/strutil.h>
-#include "plugins/plugin_api_defs.h"
-
/* Define version if we are not building ethereal statically */
#ifndef ENABLE_STATIC
@@ -185,13 +180,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_pcli == -1) { /* execute protocol initialization only once */
proto_register_pcli();
diff --git a/plugins/rdm/Makefile.nmake b/plugins/rdm/Makefile.nmake
index 541b4fae20..bd5ab123da 100644
--- a/plugins/rdm/Makefile.nmake
+++ b/plugins/rdm/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-rdm.obj
@@ -24,6 +21,8 @@ rdm.dll rdm.exp rdm.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:rdm.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) rdm.dll rdm.exp rdm.lib *.pdb
diff --git a/plugins/rdm/packet-rdm.c b/plugins/rdm/packet-rdm.c
index 079ed4985b..67fed61eab 100644
--- a/plugins/rdm/packet-rdm.c
+++ b/plugins/rdm/packet-rdm.c
@@ -30,8 +30,6 @@
#include "config.h"
#endif
-#include "plugins/plugin_api.h"
-
#include "moduleinfo.h"
#include <stdio.h>
@@ -45,8 +43,6 @@
#include "etypes.h"
#include <epan/strutil.h>
-#include "plugins/plugin_api_defs.h"
-
/* Define version if we are not building ethereal statically */
#ifndef ENABLE_STATIC
@@ -269,13 +265,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_rdm == -1) { /* execute protocol initialization only once */
proto_register_rdm();
diff --git a/plugins/rlm/Makefile.nmake b/plugins/rlm/Makefile.nmake
index 41c22fd2ed..11357bc078 100644
--- a/plugins/rlm/Makefile.nmake
+++ b/plugins/rlm/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-rlm.obj
@@ -24,6 +21,8 @@ rlm.dll rlm.exp rlm.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:rlm.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) rlm.dll rlm.exp rlm.lib *.pdb
diff --git a/plugins/rlm/packet-rlm.c b/plugins/rlm/packet-rlm.c
index 1b0fe320f0..aeee463172 100644
--- a/plugins/rlm/packet-rlm.c
+++ b/plugins/rlm/packet-rlm.c
@@ -62,8 +62,6 @@
#include <gmodule.h>
#include <epan/packet.h>
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
/* Define version if we are not building ethereal statically */
#include "moduleinfo.h"
@@ -244,15 +242,8 @@ proto_register_rlm(void)
#ifndef ENABLE_STATIC
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-)
+new_plugin_init(void)
{
-
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
/* register the new protocol, protocol fields, and subtrees */
if (proto_rlm == -1) { /* execute protocol initialization only once */
proto_register_rlm();
diff --git a/plugins/rtnet/Makefile.nmake b/plugins/rtnet/Makefile.nmake
index c91e3a98a1..ca1ff06ee8 100644
--- a/plugins/rtnet/Makefile.nmake
+++ b/plugins/rtnet/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-rtnet.obj
@@ -24,6 +21,8 @@ rtnet.dll rtnet.exp rtnet.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:rtnet.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) rtnet.dll rtnet.exp rtnet.lib *.pdb
diff --git a/plugins/rtnet/packet-rtnet.c b/plugins/rtnet/packet-rtnet.c
index 730650accc..10c204d297 100644
--- a/plugins/rtnet/packet-rtnet.c
+++ b/plugins/rtnet/packet-rtnet.c
@@ -31,8 +31,6 @@
#include "config.h"
#endif
-#include "plugins/plugin_api.h"
-
#include "moduleinfo.h"
#include <stdio.h>
@@ -46,8 +44,6 @@
#include "etypes.h"
#include <epan/strutil.h>
-#include "plugins/plugin_api_defs.h"
-
/* Define version if we are not building ethereal statically */
#ifndef ENABLE_STATIC
@@ -1413,13 +1409,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_rtmac == -1) { /* execute protocol initialization only once */
proto_register_rtmac();
diff --git a/plugins/rudp/Makefile.nmake b/plugins/rudp/Makefile.nmake
index db99178c7d..bbab9d2224 100644
--- a/plugins/rudp/Makefile.nmake
+++ b/plugins/rudp/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-rudp.obj
@@ -24,6 +21,8 @@ rudp.dll rudp.exp rudp.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:rudp.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) rudp.dll rudp.exp rudp.lib *.pdb
diff --git a/plugins/rudp/packet-rudp.c b/plugins/rudp/packet-rudp.c
index f01ca31ae4..e9f814ae2e 100644
--- a/plugins/rudp/packet-rudp.c
+++ b/plugins/rudp/packet-rudp.c
@@ -49,8 +49,6 @@
#include <gmodule.h>
#include <epan/packet.h>
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
/* Define version if we are not building ethereal statically */
#include "moduleinfo.h"
@@ -241,13 +239,8 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
-_U_
-#endif
-){
- /* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
+new_plugin_init(void)
+{
/* register the new protocol, protocol fields, and subtrees */
if (proto_rudp == -1) { /* execute protocol initialization only once */
proto_register_rudp();
diff --git a/plugins/v5ua/Makefile.nmake b/plugins/v5ua/Makefile.nmake
index cea88f8a12..3f246bb329 100644
--- a/plugins/v5ua/Makefile.nmake
+++ b/plugins/v5ua/Makefile.nmake
@@ -11,12 +11,9 @@ CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
-!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
+!IFDEF ENABLE_LIBETHEREAL
LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB /D_NEED_VAR_IMPORT_ $(CFLAGS)
-!ELSE
-LINK_PLUGIN_WITH=..\plugin_api.obj
-!ENDIF
OBJECTS=packet-v5ua.obj
@@ -24,6 +21,8 @@ v5ua.dll v5ua.exp v5ua.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
link -dll /out:v5ua.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
+!ENDIF
+
clean:
rm -f $(OBJECTS) v5ua.dll v5ua.exp v5ua.lib *.pdb
diff --git a/plugins/v5ua/packet-v5ua.c b/plugins/v5ua/packet-v5ua.c
index 2ff3a44971..ce5ba5bac7 100644
--- a/plugins/v5ua/packet-v5ua.c
+++ b/plugins/v5ua/packet-v5ua.c
@@ -29,9 +29,6 @@
# include "config.h"
#endif
-#include "plugins/plugin_api.h"
-#include "plugins/plugin_api_defs.h"
-
#include "moduleinfo.h"
#include <gmodule.h>
@@ -2380,14 +2377,9 @@ plugin_reg_handoff(void){
}
G_MODULE_EXPORT void
-plugin_init(plugin_address_table_t *pat
-#ifndef PLUGINS_NEED_ADDRESS_TABLE
- _U_
-#endif
- ){
-/* initialise the table of pointers needed in Win32 DLLs */
- plugin_address_table_init(pat);
-/* register the new protocol, protocol fields, and subtrees */
+new_plugin_init(void)
+{
+ /* register the new protocol, protocol fields, and subtrees */
if (proto_v5ua == -1) { /* execute protocol initialization only once */
proto_register_v5ua();
}