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.
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
|