Wireshark-dev: Re: [Wireshark-dev] wiretap plugin

From: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Date: Tue, 9 May 2017 13:58:56 +0200
Hi Jaap,

2017-05-09 13:47 GMT+02:00 Jaap Keuter <jaap.keuter@xxxxxxxxx>:
Hi Anders,

Are you sure? I’m concerned about the generation of plugin.c. From reading plugins/Makefile.am.inc
it seems that it only generates for dissector plugins (keyword: plugin), not for wiretap plugins (keyword: plugins_wtap)

#
plugin.c: $(REGISTER_SRC_FILES) $(top_srcdir)/tools/make-dissector-reg.py
        @echo Making plugin.c
        @$(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
                plugin $(REGISTER_SRC_FILES)

I used to write a plugin that was both a dissector and a wiretap one. I'm not using it anymore, but it used to build fine with both CMake (for sure) and autofoo (I think...) so hopefully it still works.

In the CMakeLists.txt file located in my plugin folder, I ended adding those lines:

register_dissector_files(plugin.c
    plugin_wtap
    ${DISSECTOR_SRC}
)

In the Makefile.am file located in my plugin folder, I added the following lines (copy/pasted from Makefile.am.inc with plugin replaced by plugin_wtap):

plugin.c: $(REGISTER_SRC_FILES) $(top_srcdir)/tools/make-dissector-reg.py
    echo Making plugin.c with python ; \
    $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
        plugin_wtap $(REGISTER_SRC_FILES) ;

BR,
Pascal.



Thanks,
Jaap




> On 9 May 2017, at 12:08, Anders Broman <anders.broman@xxxxxxxxxxxx> wrote:
>
> Hi,
> It's in the same files as other custom plugins. Top level CMakeListCustom.txt etc
> Regards
> Anders
>
> -----Original Message-----
> From: Wireshark-dev [mailto:wireshark-dev-bounces@wireshark.org] On Behalf Of Jaap Keuter
> Sent: den 9 maj 2017 11:12
> To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
> Subject: [Wireshark-dev] wiretap plugin
>
> Hi list,
>
> Does anyone currently have a wiretap plugin setup for building in current master?
> It seems that the plugin Makefile abstractions (plugins/Makefile.am.inc) are geared to dissector plugins, while tools/make-dissector-reg is still capable of making a plugin_wtap as well. And I haven’t even looked at CMake yet.
> Can anyone share an example collection of current build files for a wiretap plugin?
>
> Thanks,
> Jaap

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe