Wireshark-dev: Re: [Wireshark-dev] Saving settings as "Profiles"
From: "Douglas Pratley" <Douglas.pratley@xxxxxxxxxx>
Date: Fri, 16 Feb 2007 09:44:13 -0000
I'd recommend tackling it in two stages:

(a) Do it the "normal" Wireshark way, with a "user_decodes" file being
read from both the user settings directory and global settings directory
at startup (see Appendix A.2 of the users guide), and any changes being
saved to the user directory "user_decodes" file.

(b) Solve the "per-file" settings issue by getting profiles working for
all settings, not just user decodes.

This is probably more work, but I think that having a special "per-file"
mechanism just for user decodes would be bad.

I'm going to take a think about the "profiles" problem and put any ideas
back on this thread, but I'd treat that and the decodes as two separate
issues for now.

As for the user decodes themselves, there are two things that might make
life a little difficult:

(a) I can't see a good "key" for dissectors that you could persist to
file. All the dissectors displayed in the Decode As lists have an
associated protocol, and thus a "name" that is displayed, but the
relationship between protocols and dissectors is not one-to-one, so I
don't think you can use the protocol as the key.

(b) I submitted a patch a few weeks ago ("User can select dissector
based on packet matching display filter") that might make your life more
complicated - it allows any of a wide range of dissectors to be added to
the available lists in the Decode As dialog. When / if this patch is
processed, the sub-dissector selected for a port might not be one that
is not by default in the list of available dissectors for the table, but
one that was added by the user through the "more protocols" dialog.


I looked at tackling persisting the user decodes as part of my patch,
but decided that it was too complex to do until I had more time...

Cheers

Doug


 

> -----Original Message-----
> From: wireshark-dev-bounces@xxxxxxxxxxxxx 
> [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Andy Howell
> Sent: 15 February 2007 21:23
> To: Developer support list for Wireshark
> Subject: Re: [Wireshark-dev] Saving settings as "Profiles"
> 
> Guy Harris wrote:
> 
> > One feature that might be useful would be support for a "Wireshark 
> > settings file" that could be associated with a capture, so 
> that if a  
> > file named foo.{pcap,cap,...} were opened, Wireshark could 
> look for  
> > foo.wssettings, or something such as that, and, if it 
> finds, load it.
> 
> Saving setting based on just the file name would not work for 
> me, as I often have files with the same name but different 
> settings. The files end up in different directories.
> 
> >> Or is the suggestion on the  Wiki  that profiles could be 
> implemented 
> >> as sub-directories of the user's settings directory better? That 
> >> would mean profiles could be applied to different files 
> and different 
> >> live captures.
> 
> That seems better, but a bit more complicated.
> 
> Its probably a bit soon to go into detail, but I had a look 
> at gtk/decode_as_dlg.c to see what it would take to just save 
> the settings.
> I was thinking I could add save & load buttons to the 
> Alalyze/User Specified Decode... dialog. I haven't done any 
> Wireshark development other than some dissectors, but it does 
> not seem too difficult.
> 
> I think having two sets of settings would be useful. Global 
> ones saved under Edit->Preferences and per-file ones. Guess 
> the trick would be not having the per-file ones saved over 
> the top of the file specific ones.
> 
> Thanks,
> 
> 	Andy
> 
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev
> 



This message should be regarded as confidential. If you have received this email in error please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard copy by an authorised signatory.  The contents of this email may relate to dealings with other companies within the Detica Group plc group of companies.

Detica Limited is registered in England under No: 1337451.

Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.