Wireshark-dev: Re: [Wireshark-dev] How to get wireshark's plugins path with lua?

From: Hadriel Kaplan <hadriel.kaplan@xxxxxxxxxx>
Date: Tue, 25 Mar 2014 13:00:28 -0400

On Mar 25, 2014, at 11:00 AM, Nakayama Kenjiro <nakayamakenjiro@xxxxxxxxx> wrote:

I want to get the wireshark's plugins path.

eg)  /usr/local/lib/wireshark/plugins/1.11.3

That would be the global plugins path, yes?  Not the personal plugins path.


According to [1], there are no function to get it, nevertheless there are persconffile_path([filename]) and datafile_path([filename])

No function to get it?

Those two functions get the personal configuration directory, and the global configuration directory, as the wiki says.

You can probably parse/modify the returned global configuration file name to determine wireshark's global plugins path. (and you can use get_version() to get the version string if you need to append that)

But if you plan to give your Lua script to others you'll need to be careful as the global plugins directory path may change in the future, and it may also be different on different platforms. (in fact, I'm pretty sure it is different, since my Mac OSX 1.11.3 Wireshark doesn't use the same path structure as your example above)

If you do plan to share the script with others, and would like a better more-stable solution, please submit a bugzilla enhancement request. I've been implementing the Lua-based enhancement requests pretty quickly recently. (I'm not super-busy at work at the moment)

-hadriel


Kenjiro

--
Kenjiro NAKAYAMA <nakayamakenjiro@xxxxxxxxx>
GPG Key fingerprint = ED8F 049D E67A 727D 9A44  8E25 F44B E208 C946 5EB9
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe