diff mbox

[nft,3/3] doc: Document add / delete element operations of sets and maps

Message ID 20170317150448.GA1318@lennorien.com
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Elise Lennion March 17, 2017, 3:04 p.m. UTC
The add / delete operations weren't documented yet. They fit better
in the sets and maps blocks since these operations are used to directly
modify their content.

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
---
 doc/nft.xml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

Comments

Pablo Neira Ayuso March 20, 2017, 10:16 a.m. UTC | #1
On Fri, Mar 17, 2017 at 12:04:48PM -0300, Elise Lennion wrote:
> The add / delete operations weren't documented yet. They fit better
> in the sets and maps blocks since these operations are used to directly
> modify their content.

Applied, thanks.

A couple requests:

1) Could you check that flow table flush command doesn't flush
   sets/maps too? This should be selective.

2) Could you add shell tests for this?

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/doc/nft.xml b/doc/nft.xml
index a63b4c2..9624703 100644
--- a/doc/nft.xml
+++ b/doc/nft.xml
@@ -697,6 +697,19 @@  filter input iif $int_ifs accept
 				<arg choice="req"><replaceable>table</replaceable></arg>
 				<arg choice="req"><replaceable>set</replaceable></arg>
 			</cmdsynopsis>
+			<cmdsynopsis>
+				<group choice="req">
+					<arg>add</arg>
+					<arg>delete</arg>
+				</group>
+				<command> element</command>
+				<arg choice="opt"><replaceable>family</replaceable></arg>
+				<arg choice="req"><replaceable>table</replaceable></arg>
+				<arg choice="req"><replaceable>set</replaceable></arg>
+				{
+				<arg choice="req"><replaceable>elements</replaceable></arg>
+				}
+			</cmdsynopsis>
 		</para>
 		<para>
 			Sets are elements containers of an user-defined data type, they are uniquely identified by an user-defined name and attached to tables.
@@ -735,6 +748,22 @@  filter input iif $int_ifs accept
 					</para>
 				</listitem>
 			</varlistentry>
+			<varlistentry>
+				<term><option>add element</option></term>
+				<listitem>
+					<para>
+						Comma-separated list of elements to add into the specified set.
+					</para>
+				</listitem>
+			</varlistentry>
+			<varlistentry>
+				<term><option>delete element</option></term>
+				<listitem>
+					<para>
+						Comma-separated list of elements to delete from the specified set.
+					</para>
+				</listitem>
+			</varlistentry>
 		</variablelist>
 
 		<table frame="all">
@@ -819,6 +848,19 @@  filter input iif $int_ifs accept
 				<arg choice="req"><replaceable>table</replaceable></arg>
 				<arg choice="req"><replaceable>map</replaceable></arg>
 			</cmdsynopsis>
+			<cmdsynopsis>
+				<group choice="req">
+					<arg>add</arg>
+					<arg>delete</arg>
+				</group>
+				<command> element</command>
+				<arg choice="opt"><replaceable>family</replaceable></arg>
+				<arg choice="req"><replaceable>table</replaceable></arg>
+				<arg choice="req"><replaceable>map</replaceable></arg>
+				{
+				<arg choice="req"><replaceable>elements</replaceable></arg>
+				}
+			</cmdsynopsis>
 		</para>
 		<para>
 			Maps store data based on some specific key used as input, they are uniquely identified by an user-defined name and attached to tables.
@@ -857,6 +899,22 @@  filter input iif $int_ifs accept
 					</para>
 				</listitem>
 			</varlistentry>
+			<varlistentry>
+				<term><option>add element</option></term>
+				<listitem>
+					<para>
+						Comma-separated list of elements to add into the specified map.
+					</para>
+				</listitem>
+			</varlistentry>
+			<varlistentry>
+				<term><option>delete element</option></term>
+				<listitem>
+					<para>
+						Comma-separated list of element keys to delete from the specified map.
+					</para>
+				</listitem>
+			</varlistentry>
 		</variablelist>
 
 		<table frame="all">