Document Shorewall::Config::set_action_param().

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-12-21 15:13:51 -08:00
parent eb20283a55
commit 7abebb72e4
3 changed files with 31 additions and 1 deletions

View File

@ -403,6 +403,10 @@ REDIRECT net - tcp 80 - 1.2.3.4</programlisting>
<para>The DEFAULTS directive also determines the maximum number of
parameters that an action may have. If more parameters are passed than
have default values, an error message is issued.</para>
<para>For additional information about actions, see the <ulink
url="configuration_file_basics.htm#ActionVariables">Action Variables
section</ulink> of the Configuration Basics article.</para>
</section>
<section>
@ -661,7 +665,7 @@ bar:debug</programlisting>
</orderedlist>
</section>
<section>
<section id="Embedded">
<title>Using Embedded Perl in an Action</title>
<para>There may be cases where you wish to create a chain with rules that
@ -691,6 +695,22 @@ bar:debug</programlisting>
</listitem>
</varlistentry>
<varlistentry>
<term>Shorewall::Config::set_action_param(
<replaceable>$ordinal</replaceable>, <replaceable>$value</replaceable>
)</term>
<listitem>
<para>Set the value of parameter <replaceable>$ordinal</replaceable>
to <replaceable>$value</replaceable>. Care must be take when using
this function such that for a given set of parameters actually
passed to the action, the same rules are created. That is because
the compiler assumes that all invocations of an action with the same
parameters, log level and log tag can share the same action
chain.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Shorewall::Config::get_action_chain()</term>

View File

@ -801,5 +801,11 @@ bar:debug</programlisting>
in what you want to do then a macro is more efficient.</para>
</listitem>
</orderedlist>
<para>In-line actions, introduced in Shorewall 4.5.10, are very similar to
macros. The advantage of in-line actions is that they may have parameters
and can use the other <ulink
url="configuration_file_basics.htm#ActionVariables">action
variables</ulink>.</para>
</section>
</article>

View File

@ -1337,6 +1337,10 @@ SHELL cat /etc/shorewall/rules.d/*.rules 2&gt; /dev/null || true</programlisting
</listitem>
</varlistentry>
</variablelist>
<para>Action variables are read only and cannot be ?SET (although you can
change their values <ulink url="Actions.html#Embedded">using embedded
Perl</ulink>).</para>
</section>
<section id="AddressVariables">