From da06a74244cbe4b02431ea2c34b8299f3562c9ff Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 14 Sep 2017 22:59:13 +0200 Subject: src: store expression as set key instead of data type Doing so retains legth information in case of unqualified data types, e.g. we now have 'meta iifname' expression instead of an (unqualified) string type. This allows to eventually use iifnames as set keys without adding yet another special data type for them. Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso --- include/rule.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/rule.h b/include/rule.h index 89a6da68..e2a5c87b 100644 --- a/include/rule.h +++ b/include/rule.h @@ -212,8 +212,7 @@ extern struct rule *rule_lookup(const struct chain *chain, uint64_t handle); * @flags: bitmask of set flags * @gc_int: garbage collection interval * @timeout: default timeout value - * @keytype: key data type - * @keylen: key length + * @key: key expression (data type, length)) * @datatype: mapping data type * @datalen: mapping data len * @objtype: mapping object type @@ -230,8 +229,7 @@ struct set { uint32_t flags; uint32_t gc_int; uint64_t timeout; - const struct datatype *keytype; - unsigned int keylen; + struct expr *key; const struct datatype *datatype; unsigned int datalen; uint32_t objtype; -- cgit v1.2.3