Wireshark mailing list archives

Re: enum preferences vs Go Fish


From: mmann78 () netscape net
Date: Fri, 3 Apr 2015 21:30:32 -0400


I may have gone a little overboard, but I tried to remove all enumerated preferences that really should be Decode As.  
There were enough nuances to each situation, that I made them all separate patches.
 
https://code.wireshark.org/review/7894 (ATM)
https://code.wireshark.org/review/7895 (EtherNet/IP)
https://code.wireshark.org/review/7896 (FLIP)
https://code.wireshark.org/review/7897 (I2C)
https://code.wireshark.org/review/7898 (L2TP)
https://code.wireshark.org/review/7899 (MPLS)
https://code.wireshark.org/review/7900 (NFS)
https://code.wireshark.org/review/7901 (P_MUL)
https://code.wireshark.org/review/7902 (RTAC Serial)

Users of these various dissectors can certainly weigh in on their usefulness, but I was trying for "GUI consistency in 
behavior".  It has been made easier by the fact that adding Decode As functionality doesn't require writing GUI code 
anymore.
 
 
-----Original Message-----
From: mmann78 <mmann78 () netscape net>
To: wireshark-dev <wireshark-dev () wireshark org>
Sent: Mon, Mar 16, 2015 4:19 pm
Subject: enum preferences vs Go Fish


    
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)  
 
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: