On 22/12/2011 04:17, Chris Maynard wrote:
> Reinhold Kainhofer <lists@...> writes:
>
>> Although most wireshark plugin tutorials tell you to develop
>> your plugin inside the wireshark source code,
>> it it possible to develop a plugin in a separate directory.
>>
>> I have created a simple template and a corresponding
>> makefile for cmake to develop a plugin in a separate,
>> external directory, link it to the installed wireshark
>> library and install it to a wireshark plugin directory.
>>
>> You can find the template (and some basic instructions)
>> on gitorious:
>>
>> https://gitorious.org/wireshark-dissector-template/pages/Home
> I haven't looked at the template, but I did just notice bug1199 and thought how
> the goals seem to be the same. Maybe you want to have a look at it and see how
> it compares to your template? Keep in mind that the patch was submitted quite
> awhile ago, so it's likely out of date by now.
>
> https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1199
Thanks for the pointer! The purpose of that patch is indeed similar to
my goal.
Unfortunately, the patch in that bug report seems to be missing all aded
files (i.e. the make_plugin script, the Makefile.plugin_... etc.), which
are similar to my template.
On the other hand, I'm already building on the (lib)wireshark-dev
package provided/installed by ubuntu, while that patch 1199 tries to
create those development files on fedora/suse. Basically, Ubuntu seems
to have done part of that patch already in their libwireshark-dev build
scripts.
Judging from the comments to the report, I suppose the whole issue
really boils down to: Is there a (reasonably) stable API for plugin
development? (apparently that is not yet the case).
That API (in the form of the appropriate headers and the wireshark
library) needs to be installed. As soon as that's the case, external
plugin development is really straightforward as my template shows.
I suppose that not all functions declared in any epan/*.h file are
really meant to be public API, so installing all epan/*.h headers like
Ubuntu does exposes too much. That's what wireshark is still missing: a
cleanup of public (=stable) plugin API and private helper function for
internal use only.
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, reinhold@xxxxxxxxxxxxx, http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org