From 58fe488822ef7e59b1f7e85f04d4a19876c39769 Mon Sep 17 00:00:00 2001 From: Hadriel Kaplan Date: Sun, 9 Feb 2014 14:27:51 -0500 Subject: Lua: add ability for scripts loaded from command-line to be passed arguments This change adds the ability to pass on to lua scripts loaded from the command-line (tshark or wireshark) additional arguments supplied by the command-line. This will help us in our testsuites, but also might be useful for user-created scripts. The additional arguments are passed in using the '-X' eXtension switch. Change-Id: Ib94cdf1ffd194ca84692fee7816665e4ff95efbd Reviewed-on: https://code.wireshark.org/review/156 Reviewed-by: Evan Huus Tested-by: Evan Huus --- docbook/wsug_src/WSUG_chapter_customize.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docbook/wsug_src') diff --git a/docbook/wsug_src/WSUG_chapter_customize.xml b/docbook/wsug_src/WSUG_chapter_customize.xml index 9076ac8ec4..46f5d51ac5 100644 --- a/docbook/wsug_src/WSUG_chapter_customize.xml +++ b/docbook/wsug_src/WSUG_chapter_customize.xml @@ -585,6 +585,14 @@ standard libpcap format. lua_script:lua_script_filename; Tells Wireshark to load the given script in addition to the default Lua scripts. + + lua_script[num]:argument; Tells Wireshark to pass the given argument + to the lua script identified by 'num', which is the number indexed order of the 'lua_script' command. + For example, if only one script was loaded with '-X lua_script:my.lua', then '-X lua_script1:foo' + will pass the string 'foo' to the 'my.lua' script. If two scripts were loaded, such as '-X lua_script:my.lua' and + '-X lua_script:other.lua' in that order, then a '-X lua_script2:bar' would pass the string 'bar' to the second lua + script, namely 'other.lua'. + -z <statistics-string> -- cgit v1.2.3