summaryrefslogtreecommitdiff
path: root/src/caches/dcache-internal.h
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-12-29 23:07:18 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-12-29 23:07:18 +0000
commite5f5b81d65a5ed9b34910a58707b870d677c6183 (patch)
tree6e87cfda96222560751e200ca5ef7dd8d7cd65f4 /src/caches/dcache-internal.h
parent5b063a4db3e631d40c05b77ecc7554ebdf5fff92 (diff)
downloads6-dns-e5f5b81d65a5ed9b34910a58707b870d677c6183.tar.xz
Refactor libdcache, expose dcache_clean_expired()
Diffstat (limited to 'src/caches/dcache-internal.h')
-rw-r--r--src/caches/dcache-internal.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/caches/dcache-internal.h b/src/caches/dcache-internal.h
new file mode 100644
index 0000000..4fdfa4c
--- /dev/null
+++ b/src/caches/dcache-internal.h
@@ -0,0 +1,18 @@
+/* ISC license. */
+
+#ifndef S6DNS_DCACHE_INTERNAL_H
+#define S6DNS_DCACHE_INTERNAL_H
+
+#include <stdint.h>
+
+#include <skalibs/avlnode.h>
+#include <skalibs/gensetdyn.h>
+
+#include <s6-dns/dcache.h>
+
+#define DNODE(z, i) GENSETDYN_P(dcache_node_t, &(z)->storage, i)
+#define DCACHE_NODE_OVERHEAD (32 + sizeof(dcache_node_t) + 3 * sizeof(avlnode))
+
+extern void dcache_delete (dcache_t *, uint32_t) ;
+
+#endif