From 343a51702656a6476e37cfb84609a82155c7fc5e Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 16 Jul 2019 19:03:55 +0200 Subject: src: store expr, not dtype to track data in sets This will be needed once we add support for the 'typeof' keyword to handle maps that could e.g. store 'ct helper' "type" values. Instead of: set foo { type ipv4_addr . mark; this would allow set foo { typeof(ip saddr) . typeof(ct mark); (exact syntax TBD). This would be needed to allow sets that store variable-sized data types (string, integer and the like) that can't be used at at the moment. Adding special data types for everything is problematic due to the large amount of different types needed. For anonymous sets, e.g. "string" can be used because the needed size can be inferred from the statement, e.g. 'osf name { "Windows", "Linux }', but in case of named sets that won't work because 'type string' lacks the context needed to derive the size information. With 'typeof(osf name)' the context is there, but at the moment it won't help because the expression is discarded instantly and only the data type is retained. Signed-off-by: Florian Westphal --- include/datatype.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/datatype.h') diff --git a/include/datatype.h b/include/datatype.h index 49b8f608..04b4892b 100644 --- a/include/datatype.h +++ b/include/datatype.h @@ -293,7 +293,6 @@ concat_subtype_lookup(uint32_t type, unsigned int n) extern const struct datatype * set_datatype_alloc(const struct datatype *orig_dtype, unsigned int byteorder); -extern void set_datatype_destroy(const struct datatype *dtype); extern void time_print(uint64_t msec, struct output_ctx *octx); extern struct error_record *time_parse(const struct location *loc, -- cgit v1.2.3