custom C/C++ plugin will not load - no indication why

asked 2018-04-12 18:26:06 +0000

Nathan Ernst gravatar image

updated 2018-04-12 18:27:38 +0000

I inherited a custom dissector written in C & C++ from a former coworker. Basically it decodes our internal protobuf messages and a few other internal custom formatted messages. Short of it is, my plugin is not loading, and I'm not receiving any errors or indication that it's trying.

I'm building on 64-bit Windows 10 with VS2015 Professional. I followed the build instructions here to build Wireshark 2.9. I also built protobuf 3.5.1 as a DLL. I reconfigured my dissector to utilize all of the libs that my WS build pulled down and configured. I placed my plugin DLL & the protobuf DLLs in ./run/RelWithDebInfo/plugins/2.9/mydissector.

After all of this, I run WS from ./run/RelWithDebInfo/Wireshark.exe. When I go to the menu Help -> About Wireshark, and select the Plugins tab, I do not see my plugin listed.

I've scoured the documentation, but I don't see any indication of how to go about debugging or tracing this.

Is there a way to turn on some logging or tracing to determine what DLLs WS considered and if/why a DLL was not loaded? I've not found a way to configure it to load a particular plugin DLL and force a report of an error.

edit retag flag offensive close merge delete

Comments

Can you try placing the plugins in ./run/RelWithDebInfo/plugins/2.9/epan/ with the rest of the dissector plugins?

cmaynard gravatar imagecmaynard ( 2018-04-12 19:38:01 +0000 )edit

That's progress... I actually get an error now: The program can't start because libprotobuf.dll is missing from your computer. This leads me to another question: where should dependencies live? I wasn't able to statically link protobuf into my DLL, so do I need to put protobuf in the wireshark root? Add the location to PATH?

Nathan Ernst gravatar imageNathan Ernst ( 2018-04-12 19:44:35 +0000 )edit

Answered my own question on where the dependencies should live, as it seems if they're in the same folder as wireshark.exe, they're picked up automatically.

Nathan Ernst gravatar imageNathan Ernst ( 2018-04-12 19:48:04 +0000 )edit

Also had to rename a symbol; extern "C" const gchar version[] -> extern "C" const gchar plugin_version[]. Also had to add extern "C" const gchar plugin_release[] = "2.9"; This has gotten me to the point where my DLL now loads again, however my protocol is not showing up.

Nathan Ernst gravatar imageNathan Ernst ( 2018-04-12 20:05:58 +0000 )edit

I would suggest a careful (re-)reading of README.plugins, as well as comparing your plugin with any of the other plugins provided with Wireshark.

cmaynard gravatar imagecmaynard ( 2018-04-12 20:53:33 +0000 )edit