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] Duplicate dissectors error

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 29 Aug 2016 19:05:30 -0700
On Aug 29, 2016, at 6:09 PM, Michael Mann <mmann78@xxxxxxxxxxxx> wrote:

> Yes, that's the main side effect, and if all the registering is with proprietary dissectors, it's your users that have to deal with it.
> Solutions are:
> 1. Change dissector table to allow duplicates.
> 2. Create "placeholder" protocols (you'll see a few examples in native Wireshark dissectors) so that each can show up differently in Decode As.

Or

3. In dissector_add_for_decode_as(), if you find an entry in the list of "for decode as" handles for the same handle it was asked to add, just silent ignore the request to add it.

That way, if the same handle is added multiple times - for example, if that handle is used for multiple different keys in a dissector table, so that dissector_add_for_decode_as() is called multiple times for that handle and that dissector table - there's never any output.

If that means we can get rid of the allow_dup_proto flag, great!