Wireshark-dev: Re: [Wireshark-dev] enum preferences vs Go Fish
From: Evan Huus <eapache@xxxxxxxxx>
Date: Mon, 16 Mar 2015 16:31:30 -0400
On Mon, Mar 16, 2015 at 4:19 PM,  <mmann78@xxxxxxxxxxxx> wrote:
> The SocketCan dissector has an enumerated preference to pick its
> subdissector, manually finding all enumerated options through
> find_dissector().  This doesn't work well for plugins and they are not going
> to modify enum preference source as the whole point is to not have to modify
> Wireshark source to get a plugin to work.
>
> So I feel I have a few choices:
> 1. Change enumeration to "string" preference to have user put it dissector
> by name.  I think this requires too much intimate knowledge of Wireshark and
> results in "Go Fish" (either to get the dissector name right or incorrectly
> trying to dissect protocols that don't run over CAN)
> 2. I'd like a dissector table with for the dissectors to register with
> dissector_add_for_decode_as (there is no "value" that distinguishes
> subdissectors), but that either leaves the enum preference "useless" or it
> just gets in the way of Decode As (which seems like the proper place for
> this all along).  And I can't seem to figure out how I would populate a enum
> list with the dissectors in time to register the preference.
>
> Is there a best/preferred solution for this?  I'm leaning towards just
> removing the enum preference in favor of strictly using Decode As (and using
> User Specific Decodes as any notion of a "saved" preference)

+1

If I remember correctly, Wireshark Qt saves Decode As settings by
default anyways.