Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] how to remove/unregister a dissector?

From: George Nychis <gnychis@xxxxxxxxx>
Date: Wed, 27 Apr 2011 11:27:43 -0400
This type of functionality would be great.  For example, I am building this for Android and I only need basic parsing of radiotap and IP.  However, with all of the other dissectors, this blows the size of libwireshark up (to what actually gets linked) to over 80MB.  

On Wed, Apr 27, 2011 at 6:39 AM, Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx> wrote:
On Wed, Apr 27, 2011 at 12:20:43PM +0200, Anders Broman wrote:
> On Tue, Apr 26, 2011 at 06:57:07PM +0000, Chris Maynard wrote:
> > In most cases, to remove unwanted protocol dissectors from the build,
> > delete the relevant packet-*.c files from epan/dissectors/Makefile.common's DISSECTOR_SRC.
>
> I've always wanted to configure DISSECTOR_SRC using some user-friendly tool, maybe something like make *config from Linux kernel.
>
> Config tree might looks like:
>
> -TCP dissectors [X]
>  |- 23: Telnet                [X]
>  |- 25: Simple Mail Transfer Protocol [X]
>  |- 110: Post Office Protocol [X]
>  |- 9418: Git Smart Protocol  [ ]
>  |- ....
>  |
>  - SSL dissectors [X]
>   |- 465: Simple Mail Transfer Protocol [X]
>   |- 995: Post Office Protocol [X]
>   |- ...
>
> - UDP dissectors [ ]
> - ...
>
> Perhaps the menu Internal->dissector tables could be used for something like that.

Yeah initial version might use it, but it won't solve all problems, for example:
pop3s should force (at least compiling) of pop3 dissector.

It'd work with #ifdef-ing whole file (which I think is the most portable way of implementing it) with:
#if defined(CONFIG_POP3) || defined(CONFIG_POP3_SSL)

But I think it's good idea to show user that this dissector is forced by another dependency (in menuconfig it's shown as -*-),
and in future it'll be required to don't compile empty files.

Another problem is with generating register.c, cause dissector files are not preprocessered (or they are?).
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe