Wireshark mailing list archives

Lua API - register_menu unavailable after launch?


From: Moshe Kaplan <mosheekaplan () gmail com>
Date: Sun, 23 Feb 2020 18:22:37 -0500

The register_menu function in Lua API can only be called when Wireshark is
first launched, as can be seen from how register_menu is replaced with
wslua_not_register_menu in init_wslua.c :
https://github.com/wireshark/wireshark/blob/20800366ddbbb2945491120afe7265796c26bf11/epan/wslua/init_wslua.c#L145

However, I don't see any documentation as to *why* register_menu is
unavailable after the application launch in either the developer guide
<https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_Gui.html#lua_fn_register_menu_name__action___group__>
or the Wiki
<https://wiki.wireshark.org/LuaAPI/GUI#register_menu.28name.2C_action_.5B.2Cgroup.5D.29>
(that
limitation isn't even mentioned!).

Why is  register_menu only available when Wireshark is first launched?

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

Current thread: