From ded675121cac6877938148dc07e1653b58441864 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 20 Sep 2023 16:26:03 +0200 Subject: include: fix missing definitions in / The headers should be self-contained so they can be included in any order. With exception of , which any internal header can rely on. Some fixes for /. In case of , forward declare some of the structs instead of including the headers. uses struct in6_addr. Signed-off-by: Thomas Haller Signed-off-by: Pablo Neira Ayuso --- include/cache.h | 9 +++++++++ include/headers.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/include/cache.h b/include/cache.h index 934c3a74..e66b0af5 100644 --- a/include/cache.h +++ b/include/cache.h @@ -3,6 +3,8 @@ #include +#include + struct handle; enum cache_level_bits { @@ -66,6 +68,7 @@ struct nft_cache_filter { }; struct nft_cache; +struct nft_ctx; enum cmd_ops; int nft_cache_evaluate(struct nft_ctx *nft, struct list_head *cmds, @@ -97,6 +100,8 @@ void chain_cache_add(struct chain *chain, struct table *table); void chain_cache_del(struct chain *chain); struct chain *chain_cache_find(const struct table *table, const char *name); +struct set; + void set_cache_add(struct set *set, struct table *table); void set_cache_del(struct set *set); struct set *set_cache_find(const struct table *table, const char *name); @@ -121,6 +126,8 @@ void table_cache_del(struct table *table); struct table *table_cache_find(const struct cache *cache, const char *name, uint32_t family); +struct obj; + void obj_cache_add(struct obj *obj, struct table *table); void obj_cache_del(struct obj *obj); struct obj *obj_cache_find(const struct table *table, const char *name, @@ -138,6 +145,8 @@ struct nft_cache { uint32_t flags; }; +struct netlink_ctx; + void nft_chain_cache_update(struct netlink_ctx *ctx, struct table *table, const char *chain); diff --git a/include/headers.h b/include/headers.h index 759f93bf..13324c72 100644 --- a/include/headers.h +++ b/include/headers.h @@ -1,6 +1,8 @@ #ifndef NFTABLES_HEADERS_H #define NFTABLES_HEADERS_H +#include + #ifndef IPPROTO_UDPLITE # define IPPROTO_UDPLITE 136 #endif -- cgit v1.2.3