diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-03-30 13:25:10 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-03-30 13:29:08 +0200 |
commit | 5db9dc9292d30a3672b691e4a8a6cd49daa47b71 (patch) | |
tree | 7de2873260087f51c76943e6febb0efa34d388ed /include | |
parent | 89e3001be44aa2f25e51b139f044328230cbb098 (diff) |
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 <pablo@netfilter.org>
Acked-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/rule.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/include/rule.h b/include/rule.h index c848f0fc..cfe33a73 100644 --- a/include/rule.h +++ b/include/rule.h @@ -6,6 +6,28 @@ #include <list.h> /** + * 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 * * @family: protocol family @@ -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; }; |