From 5db9dc9292d30a3672b691e4a8a6cd49daa47b71 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 30 Mar 2016 13:25:10 +0200 Subject: src: store parser location for handle and position specifiers Store the parser location structure for handle and position IDs so we can use this information from the evaluation step, to provide better error reporting. Signed-off-by: Pablo Neira Ayuso Acked-by: Arturo Borrero Gonzalez --- include/rule.h | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'include/rule.h') diff --git a/include/rule.h b/include/rule.h index c848f0fc..cfe33a73 100644 --- a/include/rule.h +++ b/include/rule.h @@ -5,6 +5,28 @@ #include #include +/** + * struct handle_spec - handle ID + * + * @location: location this handle was defined at + * @id: handle ID value + */ +struct handle_spec { + struct location location; + uint64_t id; +}; + +/** + * struct position_spec - position ID + * + * @location: location this position was defined at + * @id: position ID value + */ +struct position_spec { + struct location location; + uint64_t id; +}; + /** * struct handle - handle for tables, chains, rules and sets * @@ -21,8 +43,8 @@ struct handle { const char *table; const char *chain; const char *set; - uint64_t handle; - uint64_t position; + struct handle_spec handle; + struct position_spec position; uint32_t set_id; }; -- cgit v1.2.3