diff options
Diffstat (limited to 'src/libs6net/s6net_accessrules_keycheck_ip6.c')
-rw-r--r-- | src/libs6net/s6net_accessrules_keycheck_ip6.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/libs6net/s6net_accessrules_keycheck_ip6.c b/src/libs6net/s6net_accessrules_keycheck_ip6.c deleted file mode 100644 index c2ee5ae..0000000 --- a/src/libs6net/s6net_accessrules_keycheck_ip6.c +++ /dev/null @@ -1,27 +0,0 @@ -/* ISC license. */ - -#include <skalibs/uint.h> -#include <skalibs/bytestr.h> -#include <skalibs/bitarray.h> -#include <skalibs/fmtscan.h> -#include <s6-networking/accessrules.h> - -s6net_accessrules_result_t s6net_accessrules_keycheck_ip6 (void const *key, void *data, s6net_accessrules_params_t *params, s6net_accessrules_backend_func_t_ref check1) -{ - char fmt[IP6_FMT + UINT_FMT + 6] = "ip6/" ; - char ip6[16] ; - unsigned int i = 0 ; - byte_copy(ip6, 16, (char const *)key) ; - for (; i <= 128 ; i++) - { - unsigned int len ; - register s6net_accessrules_result_t r ; - if (i) bitarray_clear(ip6, 128 - i) ; - len = 4 + ip6_fmt(fmt+4, ip6) ; - fmt[len++] = '_' ; - len += uint_fmt(fmt + len, 128 - i) ; - r = (*check1)(fmt, len, data, params) ; - if (r != S6NET_ACCESSRULES_NOTFOUND) return r ; - } - return S6NET_ACCESSRULES_NOTFOUND ; -} |