From: Elise Lennion Subject: [PATCH nft] doc: Document stateful objects Date: Wed, 8 Feb 2017 17:30:55 -0200 Message-ID: <20170208193055.GA16329@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-f195.google.com ([209.85.220.195]:34885 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751055AbdBHT6f (ORCPT ); Wed, 8 Feb 2017 14:58:35 -0500 Received: by mail-qk0-f195.google.com with SMTP id u25so19291941qki.2 for ; Wed, 08 Feb 2017 11:58:34 -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 --- doc/nft.xml | 134 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 133 insertions(+), 1 deletion(-) diff --git a/doc/nft.xml b/doc/nft.xml index 78e112f..9c2fe78 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,138 @@ 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 + + + + + + + + + + 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 + + + + + + + + + + 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