Well I thought of something similar to this solution as well for some
time. And yes it is somewhat complex but not *so much*.
Having variuos directories like today's user_dir (from now on a
prefset) in a meta-user_dir (from now on the prefsets_dir) and being
able to switch between them, by loading the prefset from these dirs at
any given time.
the functions to be implemented would be few:
- Duplicate the current prefset (easy),
- Save to disk the current prefset (easier),
- Load a prefset (switching... this is the complex one)
as per the use of this the interfaces would be two:
a -option prefset_name for the command line (ws and ts),
and a drop down menu in the top of the preferences dialog with a
"save as..." item and a listing the existing prefsets.
other than the prefsets in the prefset_dir there would be a file
containing a pointer to the "default" prefset.
Implementing the switching operation would be the most complex part of
this, most probably there are many caveats. But there's a simpler
solution for this
save the current state (file open, marked packets, cureently
selected packet, ...) to file.
fork(), exec() with the new prefset loading the saved state and exit()
Overall it looks like a feasable project not something *very* complex
to implement.
Luis
PS. Don't count on me for implementing it I'm already over-threaded as
it is right now.
On 2/15/07, Ulf Lamping <ulf.lamping@xxxxxx> wrote:
Joerg Mayer wrote:
> On Thu, Feb 15, 2007 at 09:56:56AM -0800, Guy Harris wrote:
>
>> Douglas Pratley wrote:
>>
>>
>>> Following on from recent comments about being able to save "user
>>> decodes", has anyone been working on being able to save Wireshark
>>> settings under different "profiles"? There's some discussion of this on
>>> the Wiki, and it would obviously be a very useful feature if user
>>> decodes are persisted. Or is there a feeling that this question is best
>>> left until there is the next generation PCAP file format to play with,
>>> as settings could be embedded in that?
>>>
>> Given that Wireshark can read files other than libpcap files, and will
>> continue to be able to read them, and that this is probably considered a
>> significant feature (as it means you can use Wireshark even on media on
>> which it can't capture), whilst it might be useful to allow various
>> Wireshark settings to be put into pcap-NG files, it wouldn't be
>> *sufficient* to allow that.
>>
>> 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.
>>
>
> Hmm, maybe just adding some files to the config directory and taring
> them would be an option (and of course accessing them from the tar file
> instead of the normal file later on).
>
Sorry, that all sounds like a *very* complicated way ...
I would like to hear more about the specific problem (what settings are
actually affected and why) before thinking about a solution.
Implementing a solution without really understanding the underlying
problem is just a bad way to solve things ...
Regards, ULFL
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev
--
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan