mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 12:14:32 +01:00
Document Shorewall::Config::set_action_param().
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
eb20283a55
commit
7abebb72e4
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -1337,6 +1337,10 @@ SHELL cat /etc/shorewall/rules.d/*.rules 2> /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">
|
||||
|
Loading…
Reference in New Issue
Block a user