From 8c61fa70f3cebed06b23292a3467f1dbc1b96ce9 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Gonzalez Date: Sun, 25 Feb 2018 18:30:24 +0100 Subject: 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 Signed-off-by: Pablo Neira Ayuso --- include/datatype.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/datatype.h') 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) -- cgit v1.2.3