Wireshark-dev: Re: [Wireshark-dev] what are the steps needed to add a plugin

From: "yin sun" <sunyin51@xxxxxxxxx>
Date: Fri, 9 Nov 2007 17:05:30 -0500
If you have many plugins to develop, you can create your own Makefile
to do everything you need in one file.
The steps can be automated with shell scripts, and they are only
necessary if you want to blend in your build into the whole wireshark
building process.
That means you don't need to build wireshark first then build your
plugin (But it is a good practice to make sure the environment is
setup right through building the whole program).

Usually, if you have your first plugin built, you can use the Makefile
under plugins/<your_pliguin_name>/Makefile, replace the plugin_name
into other name you want to create. This may same your some minutes.

thanks,
/Yin

On Nov 6, 2007 4:48 PM, Pascal Heude <pascalheude@xxxxxxxxxxx> wrote:
>
>  Hello,
>
> I have written 2 plugins and I did exactly the same way twice.
> I don't think there is another possibility.
>
> Pascal
>
> ________________________________
> Date: Tue, 6 Nov 2007 11:42:14 -0800
> From: chokshi.jaydeep@xxxxxxxxx
> To: wireshark-dev@xxxxxxxxxxxxx
> Subject: [Wireshark-dev] what are the steps needed to add a plugin
>
>
>
> Greeting folks,
>
> I am a newbie to the wireshark development. I created a plugin foo (in
> Linux) that comes into action after Ethernet header has been dissected.
>
> In order to compile wireshark with the plugin, I had to make following
> additions/changes,
>
> 1. In the foo directory,
>    1.1 Edit Makefile.common to add entries of sources and headers.
>    1.2 Edit the Makefile.in to add entries of *.lo in "am_objects_x"
>    1.3 Add plugin entry in Makefile.am
>
> 2. In plugin (../foo) directory,
>    2.1 Edit Makefile to add an entry of foo
>    2.2 Edit the Makefile.in to add an entry of foo
>    2.3 Edit the Makefile.am to add an entry of foo
>
> 3. In wireshark (../plugin) directory,
>    3.1 Edit Makefile to add an entry of foo in "am_DEPENDENCIES_2" variable.
>    3.2 Edit Makefile.in  to add an entry of foo in "am_DEPENDENCIES_1"
> variable.
>    3.3 Edit configure script to add entry of foo in "ac_config_files"
> variable.
>     3.4 Edit configure.in script to add entry of foo in "AC_OUTPUT("
> variable.
>
>
> Having done all the above changes, I managed to attach the plugin to
> wireshark binary.
>
> My question cum confusion is, do we have to go through all the pain in order
> to make a plugin work?
> I mean, do we need to edit these many Makefiles every single time we add a
> new plugin?
>
> Let me know if I am doing something wrong here. I greatly appreciate it.
>
>
> Thanks,
>
> JD
>
>
> ________________________________
> Besoin d'un e-mail ? Créez gratuitement un compte Windows Live Hotmail, la
> boîte e-mail entièrement personnalisable ! Windows Live Hotmail
>
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev
>
>