summaryrefslogtreecommitdiff
path: root/src/caches/shibari-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/caches/shibari-internal.h')
-rw-r--r--src/caches/shibari-internal.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/caches/shibari-internal.h b/src/caches/shibari-internal.h
new file mode 100644
index 0000000..048faa5
--- /dev/null
+++ b/src/caches/shibari-internal.h
@@ -0,0 +1,25 @@
+/* ISC license. */
+
+#ifndef S6DNS_SHIBARI_INTERNAL_H
+#define S6DNS_SHIBARI_INTERNAL_H
+
+#include <stdint.h>
+
+#include <skalibs/diuint32.h>
+#include <skalibs/genalloc.h>
+
+typedef struct shibari_ip6_s shibari_ip6_t, *shibari_ip6_t_ref ;
+struct shibari_ip6_s
+{
+ uint64_t addr0 ;
+ uint64_t addr1 ;
+ uint64_t mask0 ;
+ uint64_t mask1 ;
+} ;
+
+extern int shibari_whitelist_add6 (genalloc *g, char const *, uint16_t) ;
+extern int shibari_whitelist_read (char const *, genalloc *, genalloc *) ;
+extern int shibari_whitelist_ip4_match (diuint32 const *, size_t, char const *) ;
+extern int shibari_whitelist_ip6_match (shibari_ip6_t const *, size_t, char const *) ;
+
+#endif