This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.
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

Where would I move my code and what changes do I need to make. I currently have the following:

#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%


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.

permanent link

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 ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1,620
×173
×3

question asked: 14 May '15, 07:18

question was seen: 1,342 times

last updated: 20 May '15, 11:23

p​o​w​e​r​e​d by O​S​Q​A