summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArturo Borrero Gonzalez <arturo@netfilter.org>2018-02-25 18:30:24 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2018-02-25 23:09:02 +0100
commit8c61fa70f3cebed06b23292a3467f1dbc1b96ce9 (patch)
tree46f4550c256a590094c0e732077675d40a73051a /include
parentba00c6b18ee2bf3bc100226ecc2e6bfd779eb482 (diff)
meta: introduce datatype ifname_type
This new datatype is a string subtype. It will allow us to build named maps/sets using meta keys like 'iifname', 'oifname', 'ibriport' or 'obriport'. Example: table inet t { set s { type ifname elements = { "eth0", "eth1" } } chain c { iifname @s accept oifname @s accept } } Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/datatype.h2
-rw-r--r--include/meta.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/datatype.h b/include/datatype.h
index cc4cb078..3f612e52 100644
--- a/include/datatype.h
+++ b/include/datatype.h
@@ -41,6 +41,7 @@
* @TYPE_ICMPX_CODE: icmpx code (integer subtype)
* @TYPE_DEVGROUP: devgroup code (integer subtype)
* @TYPE_DSCP: Differentiated Services Code Point (integer subtype)
+ * @TYPE_IFNAME: interface name (string subtype)
*/
enum datatypes {
TYPE_INVALID,
@@ -84,6 +85,7 @@ enum datatypes {
TYPE_FIB_ADDR,
TYPE_BOOLEAN,
TYPE_CT_EVENTBIT,
+ TYPE_IFNAME,
__TYPE_MAX
};
#define TYPE_MAX (__TYPE_MAX - 1)
diff --git a/include/meta.h b/include/meta.h
index 47b16c4b..6086a71c 100644
--- a/include/meta.h
+++ b/include/meta.h
@@ -38,5 +38,6 @@ extern const struct datatype gid_type;
extern const struct datatype uid_type;
extern const struct datatype devgroup_type;
extern const struct datatype pkttype_type;
+extern const struct datatype ifname_type;
#endif /* NFTABLES_META_H */