diff options
author | Varsha Rao <rvarsha016@gmail.com> | 2017-08-13 10:00:18 +0530 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-08-14 11:32:21 +0200 |
commit | 07b45939972eb81c3c3db21c8589b51a62f4843a (patch) | |
tree | b50dfd024653fd11f63821e2e7e4805dbb16036b /include/netlink.h | |
parent | bb8e9e84a1b537ccf1b7abbc9d11af0383801a0d (diff) |
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 <rvarsha016@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/netlink.h')
-rw-r--r-- | include/netlink.h | 4 |
1 files changed, 4 insertions, 0 deletions
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, |