From: Elise Lennion Subject: [PATCH v2 nft] doc: Document stateful objects Date: Thu, 9 Feb 2017 11:48:16 -0200 Message-ID: <20170209134816.GA7092@lennorien.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netfilter-devel@vger.kernel.org To: pablo@netfilter.org Return-path: Received: from mail-qk0-f193.google.com ([209.85.220.193]:33845 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752383AbdBINsX (ORCPT ); Thu, 9 Feb 2017 08:48:23 -0500 Received: by mail-qk0-f193.google.com with SMTP id e1so629137qkh.1 for ; Thu, 09 Feb 2017 05:48:22 -0800 (PST) Content-Disposition: inline Sender: netfilter-devel-owner@vger.kernel.org List-ID: This patch adds documentation for stateful objects and updates tables description to mention them. Signed-off-by: Elise Lennion --- v2: Added a title to counter and quota tables. doc/nft.xml | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 135 insertions(+), 1 deletion(-) diff --git a/doc/nft.xml b/doc/nft.xml index 78e112f..ac31c3b 100644 --- a/doc/nft.xml +++ b/doc/nft.xml @@ -453,7 +453,7 @@ filter input iif $int_ifs accept - Tables are containers for chains and sets. They are identified by their address family + Tables are containers for chains, sets and stateful objects. They are identified by their address family and their name. The address family must be one of @@ -668,6 +668,140 @@ filter input iif $int_ifs accept + Stateful objects + + + + add + delete + list + reset + + type + family + table + object + + + + Stateful objects are attached to tables and are identified by an unique name. They group stateful information from rules, to reference them in rules the keywords "type name" are used e.g. "counter name". + + + + + + + + Add a new stateful object in the specified table. + + + + + + + + Delete the specified object. + + + + + + + + Display stateful information the object holds. + + + + + + + + List-and-reset stateful object. + + + + + + + Counter + + + counter + packets bytes + + + + Counter specifications + + + + + + + Keyword + Description + Type + + + + + packets + initial count of packets + unsigned integer (64 bit) + + + bytes + initial count of bytes + unsigned integer (64 bit) + + + +
+
+ + + Quota + + + quota + + over + until + + used + + + + Quota specifications + + + + + + + Keyword + Description + Type + + + + + quota + quota limit, used as the quota name + Two arguments, unsigned interger (64 bit) and string: bytes, kbytes, mbytes. "over" and "until" go before these arguments + + + used + initial value of used quota + Two arguments, unsigned interger (64 bit) and string: bytes, kbytes, mbytes + + + +
+
+
+ + Expressions Expressions represent values, either constants like network addresses, port numbers etc. or data -- 2.7.4