ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] What files are really necessary to modify to add a plug-in?

From: "J.C. Wren" <jcwren@xxxxxxxxxx>
Date: Tue, 5 Feb 2008 13:30:58 -0500
In the section of 3.2 of the documentation (shown below the ----'s),
the rule text to add is this:

  cd xxx
  $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake $(PLUGIN_TARGET)
  cd ..

  This replaces everything shown below.  The couple lines on adding
xcopy are still accurate.

  In section 3.3, plugin_libs no longer exists, only the plugin_ldadd
needs to be done.   The text

if ENABLE_STATIC
plugin_ldadd = (plugin_libs)

else          # ENABLE_STATIC
plugin_ldadd = \
        "-dlopen" self  \
        "-dlopen" plugins/gryphon/gryph
        "-dlopen" plugins/mgcp/mgcp.la
        "-dlopen" plugins/xxx/xxx.la

  should be replaced with

if HAVE_PLUGINS

plugin_ldadd = \
  -dlopen plugins/gryphon/gryph.la \
  -dlopen plugins/mgcp/mgcp.la \
  -dlopen plugins/xxx/xxx.la

The other portions of the documentation appear to be correct.

-------------

3.2 Changes to plugins/Makefile.nmake

To the Makefile.nmake you need to add your plugin to the all: rule

all: \
        gryphon \
        mgcp \
        xxx

then add a rule for your plugin:

xxx:
        cd xxx
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
        cd ..

and add to the clean rules support for cleaning up after your
plugin:

clean:  clean-local
        cd gryphon
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../mgcp
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ..
        cd xxx
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ..


distclean: distclean-local
        cd gryphon
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../mgcp
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ..
        cd xxx
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ..


maintainer-clean: maintainer-clean-local
        cd gryphon
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ../mgcp
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ..
        cd xxx
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean
        cd ..

On Feb 5, 2008 12:49 PM, Jaap Keuter <jaap.keuter@xxxxxxxxx> wrote:
> Hi,
>
> Is it? Then please elaborate.
>
>
> Thanx,
> Jaap
>
> J.C. Wren wrote:
> > Thanks.  It's helpful.  And also out of date.
> >
> > --jc
> >
> > On Feb 5, 2008 12:15 PM, Jaap Keuter <jaap.keuter@xxxxxxxxx> wrote:
> >> Hi,
> >>
> >> Carefully read README.plugins and all will be reveiled.
> >>
> >> Thanx,
> >> Jaap
> >>
> >>
> >>
> >> J.C. Wren wrote:
> >>> Perhaps I've overlooked this information in my reading, but I haven't
> >>> found a list of files that I need to modify when I add a plug-in.
> >>> When I unpacked the sources, I grepped everything for 'profinet', and
> >>> anywhere I found it (configure, configure.in, Makefile.in,
> >>> Makefile.am, etc), I added my dissector after it.  It builds just
> >>> fine, but it doesn't seem I should need to touch every file that I
> >>> did.  What are the minimum files that need to be modified to add a new
> >>> plug-in?  And could the docs be updated with this info (assuming I
> >>> didn't overlook it?).
> >>>
> >>> Under Linux I know that files like configure.in are created by the
> >>> ./configure process.  Under Windows, I have no clear idea what files
> >>> it's looking for when it builds (oh, if only my users were Linux users
> >>> instead of Windows, my life would be so much easier...)
> >>>
> >>> Thanks,
> >>> --jc
>
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev
>