This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Update “old style” plugins

1
1

In the file Readme.Plugins it says:

Move relevant code from the blocks and delete these functions:

    #ifndef ENABLE_STATIC
    plugin_reg_handoff()
    ....
    #endif
#ifndef ENABLE_STATIC
plugin_register()
....
#endif</code></pre><p>Where would I move my code and what changes do I need to make. I currently have the following:</p><pre><code>#ifndef ENABLE_STATIC

G_MODULE_EXPORT void plugin_register(void) { /* register the new protocol, protocol fields, and subtrees */ if (proto_arr == -1) { /* execute protocol initialization only once */ proto_register_arr(); } }

G_MODULE_EXPORT void plugin_reg_handoff(void) { proto_reg_handoff_arr(); } #endif

asked 14 May ‘15, 07:18

XQW1123's gravatar image

XQW1123
4681014
accept rate: 0%


One Answer:

1

You have no 'relevant code' in the sense meant by README.plugins. This code can simply be dropped, because it will be properly generated during the build.

answered 16 May '15, 11:07

Jaap's gravatar image

Jaap ♦
11.7k16101
accept rate: 14%

I dropped the code, but now I get an error whenever I start wireshark... "The plugin 'xyz.dll' has no registration routines"

(19 May '15, 13:50) XQW1123
1

Clean your build of the plugin, before trying again. This triggers the necessary scripting to generate the required code.

(20 May '15, 11:23) Jaap ♦