aboutsummaryrefslogtreecommitdiffstats
path: root/docbook/wsug_src
diff options
context:
space:
mode:
authorHadriel Kaplan <hadrielk@yahoo.com>2014-02-09 14:27:51 -0500
committerEvan Huus <eapache@gmail.com>2014-02-13 22:32:58 +0000
commit58fe488822ef7e59b1f7e85f04d4a19876c39769 (patch)
tree7661e201e4d2c9194c16e6cff4b98a798b464cb5 /docbook/wsug_src
parent1eeb33a7b069311e62b7300b08eb9de5669e7e3f (diff)
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 <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'docbook/wsug_src')
-rw-r--r--docbook/wsug_src/WSUG_chapter_customize.xml8
1 files changed, 8 insertions, 0 deletions
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.
<para>
<command>lua_script</command>:lua_script_filename; Tells Wireshark to load the given script in addition to the default Lua scripts.
</para>
+ <para>
+ <command>lua_script[num]</command>: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'.
+ </para>
</listitem>
</varlistentry>
<varlistentry><term><command>-z &lt;statistics-string></command></term>