On Wed, 26 Jul 2000 15:26:20 Guy Harris wrote:
>
>
> > I have developed a plugin for ethereal on Linux. Can somebody give me a
> > brief description on how to port my plugin to ethereal on win32?
>
> 1) Put your plugin into a subdirectory of "plugins", as is the
> case for the Gryphon plugin.
>
> 2) Make sure you include "plugins/plugin_api.h".
>
> 3) If your plugin has a "Makefile.am" file similar to the one
> for Gryphon, give it a "Makefile.nmake" similar to the one
> for Gryphon as well.
>
> 4) Don't use any functions present in UNIXes but not present in
> Win32 (and for which we don't provide a substitute function
> in Ethereal itself).
>
> Rules 1, 2, and 3 could perhaps be summarized as "set up your plugin
> just the way the Gryphon plugin is set up".
On Win32, plugin_api.obj is linked into your plugin DLL because it has
some routines in there to allow you to call functions in the ethereal
executable. This is not a problem on Unix, but on Windows a DLL
loaded at run-time cannot access the symbols in the program from which
it was loaded. We get around this by passing in a table of function
pointers, and plugin_api.h defines macros so that the calls to
particular functions use these function pointers.
We've provided function pointers for most of the relevant functions.
If it turns out that your plugin uses a function which is not available
in this function-pointer table, feel free to add the appropriate pointer
and send us the patch.
--gilbert