src: move remaining cache in rule.c function to cache.c
Pablo Neira Ayuso
maintainerPATCH 1/1 src: move remaining cache in rule.c function to cache.c
Move all the cache logic to src/cache.c
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- include/cache.h | 6 +- src/cache.c | 207 +++++++++++++++++++++++++++++++++++++++++++++++- src/rule.c | 201 ---------------------------------------------- 3 files changed, 209 insertions(+), 205 deletions(-)
include/cache.h +4 -2
@@ -52,9 +52,11 @@ struct table;struct chain ;struct handle ; +int cache_init (struct netlink_ctx *ctx,unsigned int flags); +int cache_update (struct nft_ctx *nft,unsigned int flags,struct list_head *msgs); +void cache_release (struct nft_cache *cache); +struct nftnl_chain_list *chain_cache_dump (struct netlink_ctx *ctx,int *err); -int chain_cache_init (struct netlink_ctx *ctx,struct table *table, -struct nftnl_chain_list *chain_cache);void chain_cache_add (struct chain *chain,struct table *table);struct chain *chain_cache_find (const struct table *table,const struct handle *handle);
src/cache.c +205 -2
222 lines not on this page · raw message
src/rule.c +0 -201
207 lines not on this page · raw message
Signature · 1 line
2.20.1