Execute Wireshark.exe from run is not loading custom dissectors

asked 2021-01-05 20:45:06 +0000

kirankumarg.81 gravatar image

I have written cusom dissector and added under plugins/ folder. Able to compile successfully, exe got generated under run/Release/ folder. But, when executed it is coming up but failing to load my custom dissector dll. I confirmed this from Help->About Wireshark->Plugins tab.

Would like to know what could be the issue for not loading the dlls. I am using Wireshark-3.2.7 code base, compiled on Windows 10.

I am doing this for quick debugging the things using my custom dissector, which helps me a lot during development.

Thank you.

edit retag flag offensive close merge delete


Check your build directory. If you've written a C-based plugin dissector, then the plugin.dll should be located in the build directory: run\Release\plugins\3.2\epan\. If it's not there, maybe [re]read through the doc\README.plugins file and/or compare your plugin-related dissector files with others, such as gryphon. Note that plugin directories used to be stored in plugins/, but they're now stored in plugins/epan/.

cmaynard gravatar imagecmaynard ( 2021-01-05 21:35:14 +0000 )edit

The "normal" path for a release build is run\RelWithDebInfo. If you're got things in run\Release then by definition you're doing something different that may be causing your issues.

grahamb gravatar imagegrahamb ( 2021-01-06 08:24:36 +0000 )edit

@cmaynard: plugin.dll is getting created under run\Release\plugins\3.2\my-plugin\plugin.dll. But, when Wireshark.exe is executed its not getting loaded. I have included my plugin under \plugins\my-plugin.

kirankumarg.81 gravatar imagekirankumarg.81 ( 2021-01-06 11:26:15 +0000 )edit

@grahamb: I ran the build command as "msbuild /p:Configuration=Release /p:Platform="Win32" Wireshark.sln" so its in Release, i tried with RelWithDebInfo as well, but the observation is same. If i build EXE and then get it installed, it is working fine, my plugin.dll gets loaded. The problem is observed when i run Wireshark.exe from Release or RelWithDebInfo local installation directory.

kirankumarg.81 gravatar imagekirankumarg.81 ( 2021-01-06 11:28:45 +0000 )edit

plugin.dll is getting created under run\Release\plugins\3.2\my-plugin\plugin.dll.

This is the issue, your plugin is appearing in a sub-directory that's not searched for plugins to load. Your plugin source should be in <source-root>\plugins\epan\my-plugin and should result in the build products (.dll, .obj and .pdb) being placed in the run\RelWithDebInfo\plugins\epan\3.2 directory.

I'm guessing this is an older plugin being updated to run with 3.2, you should check that you have all the correct incantations in the plugin CMakeLists.txt using the other plugins to compare.

grahamb gravatar imagegrahamb ( 2021-01-06 11:49:43 +0000 )edit