Skip to contentSkip to conversation

src: move remaining cache in rule.c function to cache.c

PATCH New Pablo Neira Ayuso 1 participant 1 message Mar 11, 2021 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 src: move remaining cache in rule.c function to cache.c

Move all the cache logic to src/cache.c

---
 include/cache.h |   6 +-
 src/cache.c     | 207 +++++++++++++++++++++++++++++++++++++++++++++++-
 src/rule.c      | 201 ----------------------------------------------
 3 files changed, 209 insertions(+), 205 deletions(-)
include/cache.h +4 -2
index baa2bb29f1e7..a892b7fcdcb9 100644
@@ -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