]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
doc: nft.8: Describe iface_type data type
authorPhil Sutter <phil@nwl.cc>
Thu, 18 Dec 2025 12:55:23 +0000 (13:55 +0100)
committerPhil Sutter <phil@nwl.cc>
Thu, 5 Feb 2026 15:15:10 +0000 (16:15 +0100)
An entry in data-types.txt offers space for a name-value table. Even if
one would refer to ARPHRD_*, some names are not derived from the
respective macro name and thus not intuitive.

Signed-off-by: Phil Sutter <phil@nwl.cc>
doc/data-types.txt
doc/primary-expression.txt

index e44308b5322cb3aa341b8051cc9646df7b600c3f..0b350effbea687b56261eb4ecea4d0207ac07194 100644 (file)
@@ -83,6 +83,33 @@ filter input iifname eth0
 filter input iifname "(eth0)"
 ----------------------------
 
+INTERFACE TYPE TYPE
+~~~~~~~~~~~~~~~~~~~
+[options="header"]
+|==================
+|Name | Keyword | Size | Base type
+|Interface type |
+iface_type|
+16 bit |
+integer
+|===================
+
+The interface type type is used with *meta iiftype/oiftype* expression. Its values correspond with respective ARPHRD_* defines in <linux/if_arp.h>.
+
+.The following keywords will automatically resolve into an interface type type with given value
+
+[options="header"]
+|==================
+|Keyword | Value
+| ether | 1
+| ppp | 512
+| ipip | 768
+| ipip6 | 769
+| loopback | 772
+| sit | 776
+| ipgre | 778
+|===================
+
 LINK LAYER ADDRESS TYPE
 ~~~~~~~~~~~~~~~~~~~~~~~
 [options="header"]
index d5495e2c862918237636a8de9bf4b6dc0daa4de0..bd80cd7f92fda5777eaed7b31ce2058c0788ef00 100644 (file)
@@ -149,8 +149,6 @@ String value in the form HH:MM or HH:MM:SS. Values are expected to be less than
 Interface index (32 bit number). Can be specified numerically or as name of an existing interface.
 |ifname|
 Interface name (16 byte string). Does not have to exist.
-|iface_type|
-Interface type (16 bit number).
 |uid|
 User ID (32 bit number). Can be specified numerically or as user name.
 |gid|