From 673d82af234e24ef841e8409426d5f082f9ea59e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 31 Mar 2020 13:36:16 +0200 Subject: rule: add hook_spec Store location of chain hook definition. Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include/rule.h') diff --git a/include/rule.h b/include/rule.h index db11b1d6..06fefef8 100644 --- a/include/rule.h +++ b/include/rule.h @@ -189,6 +189,12 @@ struct prio_spec { struct expr *expr; }; +struct hook_spec { + struct location loc; + const char *name; + unsigned int num; +}; + /** * struct chain - nftables chain * @@ -211,9 +217,8 @@ struct chain { struct location location; unsigned int refcnt; uint32_t flags; - const char *hookstr; - unsigned int hooknum; struct prio_spec priority; + struct hook_spec hook; struct expr *policy; const char *type; const char **dev_array; @@ -485,8 +490,7 @@ struct flowtable { struct handle handle; struct scope scope; struct location location; - const char * hookstr; - unsigned int hooknum; + struct hook_spec hook; struct prio_spec priority; const char **dev_array; struct expr *dev_expr; -- cgit v1.2.3