From 07b45939972eb81c3c3db21c8589b51a62f4843a Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Sun, 13 Aug 2017 10:00:18 +0530 Subject: src: introduce struct nft_cache Pass variable cache_initialized and structure list_head as members of structure nft_cache. Joint work with Pablo Neira. Signed-off-by: Varsha Rao Signed-off-by: Pablo Neira Ayuso --- include/netlink.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/netlink.h') diff --git a/include/netlink.h b/include/netlink.h index 47ecef38..37261714 100644 --- a/include/netlink.h +++ b/include/netlink.h @@ -39,6 +39,7 @@ extern const struct location netlink_location; * @data: pointer to pass data to callback * @seqnum: sequence number * @octx: output context + * @cache: cache context */ struct netlink_ctx { struct mnl_socket *nf_sock; @@ -50,6 +51,7 @@ struct netlink_ctx { struct nftnl_batch *batch; bool batch_supported; struct output_ctx *octx; + struct nft_cache *cache; }; extern struct nftnl_table *alloc_nftnl_table(const struct handle *h); @@ -162,6 +164,7 @@ extern int netlink_get_set(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc); extern struct stmt *netlink_parse_set_expr(const struct set *set, + const struct nft_cache *cache, const struct nftnl_expr *nle); extern int netlink_add_setelems(struct netlink_ctx *ctx, const struct handle *h, @@ -216,6 +219,7 @@ struct netlink_mon_handler { struct netlink_ctx *ctx; const struct location *loc; bool cache_needed; + struct nft_cache *cache; }; extern int netlink_monitor(struct netlink_mon_handler *monhandler, -- cgit v1.2.3