Wireshark mailing list archives

Re: Lua: condition on protocol preference


From: Tony Trinh <tony19 () gmail com>
Date: Tue, 5 Jun 2012 16:06:17 -0400

On Tue, Jun 5, 2012 at 3:19 PM, Joerg Mayer <jmayer () loplof de> wrote:

Just to make sure I understand you correctly: You have a Wireshark
dissector
that uses the normal Wireshark preferences infrastructure and you have a
Lua
program that needs to know about these preferences.
If that is correct, then you should be able to read those preferences from
the preferences file. On my system that would be ~/.wireshark/preferences,
the directory can be found in Wireshark menus: [Help] -> [About Wireshark]
-> [Folders]

Ciao
     Jörg


Just be aware that there's a preference file for each configuration profile
in Wireshark, and I don't believe there's a way for Lua to determine the
active Wireshark profile. Plus, the user may choose to override preferences
from the command line with the -o flag, and these overrides are not written
to the preferences file (thus not detectable in Lua); but the -o flag is
probably an advanced feature that most users don't use (or even know
about), so perhaps that's a non-issue.

See
http://ask.wireshark.org/questions/4770/setting-and-getting-a-preference-of-an-existing-protocol-from-lua

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

Current thread: