path: root/doc/tshark.pod
diff options
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 /doc/tshark.pod
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 'doc/tshark.pod')
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/tshark.pod b/doc/tshark.pod
index 23f95f60e6..c195a87659 100644
--- a/doc/tshark.pod
+++ b/doc/tshark.pod
@@ -788,6 +788,13 @@ is in the form I<extension_key>B<:>I<value>, where I<extension_key> can be:
B<lua_script>:I<lua_script_filename> tells B<Wireshark> to load the given script in addition to the
default Lua scripts.
+B<lua_script>I<num>:I<argument> tells B<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'.
=item -y E<lt>capture link typeE<gt>
Set the data link type to use while capturing packets. The values