summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/cache.h10
-rw-r--r--include/netlink.h3
-rw-r--r--include/rule.h1
3 files changed, 14 insertions, 0 deletions
diff --git a/include/cache.h b/include/cache.h
index 213a6eaf..b9db1a8f 100644
--- a/include/cache.h
+++ b/include/cache.h
@@ -35,4 +35,14 @@ enum cache_level_flags {
NFT_CACHE_FLUSHED = (1 << 31),
};
+static inline uint32_t djb_hash(const char *key)
+{
+ uint32_t i, hash = 5381;
+
+ for (i = 0; i < strlen(key); i++)
+ hash = ((hash << 5) + hash) + key[i];
+
+ return hash;
+}
+
#endif /* _NFT_CACHE_H_ */
diff --git a/include/netlink.h b/include/netlink.h
index 1077096e..ad2247e9 100644
--- a/include/netlink.h
+++ b/include/netlink.h
@@ -213,4 +213,7 @@ int netlink_events_trace_cb(const struct nlmsghdr *nlh, int type,
enum nft_data_types dtype_map_to_kernel(const struct datatype *dtype);
+void expr_handler_init(void);
+void expr_handler_exit(void);
+
#endif /* NFTABLES_NETLINK_H */
diff --git a/include/rule.h b/include/rule.h
index caca63d0..f2f82cc0 100644
--- a/include/rule.h
+++ b/include/rule.h
@@ -7,6 +7,7 @@
#include <netinet/in.h>
#include <libnftnl/object.h> /* For NFTNL_CTTIMEOUT_ARRAY_MAX. */
#include <linux/netfilter/nf_tables.h>
+#include <string.h>
/**
* struct handle_spec - handle ID