Ethereal-dev: RE: [Ethereal-dev] Windows only builds plugins if ENABLE_LIBETHEREALdefined
Hi,
Perhaps the followuing information from /etehreal/doc/readme.plugins can be of use?
Best regards
Anders
--- snip ---
6 How to update an "old style" plugin (using plugin_init function)
The plugin registering has changed between 0.10.9 and 0.10.10; everyone
is encouraged to update their plugins as outlined below:
--- Remove following include statements from all plugin sources ---
#include "plugins/plugin_api.h"
#include "plugins/plugin_api_defs.h"
--- Change init function from this ---
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 */
if (proto_xxx == -1) { /* execute protocol initialization only once */
proto_register_xxx();
}
}
------ to this ------
G_MODULE_EXPORT void
plugin_register(void)
{
/* register the new protocol, protocol fields, and subtrees */
if (proto_xxx == -1) { /* execute protocol initialization only once */
proto_register_xxx();
}
}
--- Changes to plugin's Makefile.nmake ---
change
!IFDEF LINK_PLUGINS_WITH_LIBETHEREAL
to
!IFDEF ENABLE_LIBETHEREAL
remove
!ELSE
LINK_PLUGIN_WITH=..\plugin_api.obj
move
!ENDIF
to the line just before the clean target
--- snip ---
-----Original Message-----
From: ethereal-dev-bounces@xxxxxxxxxxxx
[mailto:ethereal-dev-bounces@xxxxxxxxxxxx]On Behalf Of Neil Piercy
Sent: den 27 maj 2005 13:01
To: ethereal-dev@xxxxxxxxxxxx
Subject: Re: [Ethereal-dev] Windows only builds plugins if
ENABLE_LIBETHEREALdefined
> Neil Piercy wrote:
>
> > It looks like the recent plugins API changes have stopped the use of
> > plugins under Windows unless ENABLE_LIBETHEREAL=USE is defined in
> > config.nmake, as the plugins makefiles now have all the "normal"
> > targets enclosed by "!IFDEF ENABLE_LIBETHEREAL" - is this deliberate
> > ? If not, any clues what the correct targets are for the plugin DLLs
> > now the plugin_api.? files have gone ?
> >
> I'm not the person made it, but as I remember these changes were caused
> by constant maintaining trouble of the plugin_api stuff. So yes, these
> changes were intended, the files were removed permanently.
>
> Is there any problem for you?
>
> Regards, ULFL
Its a problem for me now at least because my code doesnt currently work
with ENABLE_LIBETHEREAL=USE defined (my problem ;-).
More generally, this makes the inclusion of the option to
ENABLE_LIBETHEREAL=USE or not silly - AFAIK I haven't seen a statement that
you must define this if you want plugins to work!
I'll try to fix/work round, but if anyone knows a way of making plugins
build with ENABLE_LIBETHEREAL=USE not defined, I'd love to hear about it.
Neil
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev