diff options
Diffstat (limited to 'src/caches/shibari_whitelist_ip6_match.c')
-rw-r--r-- | src/caches/shibari_whitelist_ip6_match.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/caches/shibari_whitelist_ip6_match.c b/src/caches/shibari_whitelist_ip6_match.c deleted file mode 100644 index c728081..0000000 --- a/src/caches/shibari_whitelist_ip6_match.c +++ /dev/null @@ -1,16 +0,0 @@ -/* ISC license. */ - -#include <stdint.h> - -#include <skalibs/uint64.h> - -#include "shibari-internal.h" - -int shibari_whitelist_ip6_match (shibari_ip6_t const *s, size_t len, char const *ip) -{ - uint64_t addr0, addr1 ; - uint64_unpack_big(ip, &addr0) ; - uint64_unpack_big(ip + 8, &addr1) ; - for (; len-- ; s++) if ((addr0 & s->mask0) == s->addr0 && (addr1 & s->mask1) == s->addr1) return 1 ; - return 0 ; -} |