path: root/doc
diff options
authorFlorian Westphal <>2019-10-13 00:17:52 +0200
committerFlorian Westphal <>2019-10-14 12:23:15 +0200
commit21cbab5b6ffec409d5677802bcd1172d0d1cd990 (patch)
tree6c1cc5466cea182c1c07d0670469771f6217e68f /doc
parent6450e36080e66e4edc90ea688ffb52c60e14f2cd (diff)
expression: extend 'nft describe' to allow listing data types
nft describe ct_status before: symbol expression, datatype invalid (invalid), 0 bits after: datatype ct_status (conntrack status) (basetype bitmask, integer), 32 bits pre-defined symbolic constants (in hexadecimal): expected 0x00000001 seen-reply 0x00000002 [..] Signed-off-by: Florian Westphal <> Acked-by: Pablo Neira Ayuso <>
Diffstat (limited to 'doc')
2 files changed, 16 insertions, 1 deletions
diff --git a/doc/nft.txt b/doc/nft.txt
index 8a49c2fe..9bc5986b 100644
--- a/doc/nft.txt
+++ b/doc/nft.txt
@@ -642,9 +642,11 @@ representation of symbolic values and type compatibility with other expressions.
-*describe* 'expression'
+*describe* 'expression' | 'data type'
The *describe* command shows information about the type of an expression and its data type.
+A data type may also be given, in which nft will display more information
+about the type.
.The describe command
@@ -670,6 +672,17 @@ and type compatibility of expressions. A number of global data types exist, in
addition some expression types define further data types specific to the
expression type. Most data types have a fixed size, some however may have a
dynamic size, f.i. the string type. +
+Some types also have predefined symbolic constants. Those can be listed
+using the nft *describe* command:
+$ nft describe ct_state
+datatype ct_state (conntrack state) (basetype bitmask, integer), 32 bits
+pre-defined symbolic constants (in hexadecimal):
+invalid 0x00000001
+new ...
Types may be derived from lower order types, f.i. the IPv4 address type is
derived from the integer type, meaning an IPv4 address can also be specified as
diff --git a/doc/primary-expression.txt b/doc/primary-expression.txt
index c5d25eee..0316a7e1 100644
--- a/doc/primary-expression.txt
+++ b/doc/primary-expression.txt
@@ -292,6 +292,8 @@ Address type |
+Use *nft* *describe* *fib_addrtype* to get a list of all address types.
.Using fib expressions
# drop packets without a reverse path