#include "config.h"
#include "client.h"
#include "ircd.h"
-#include "irc_string.h"
+#include "match.h"
/*
* Compare if a given string (name) matches the given
iaddr = &((struct sockaddr_in *)addr)->sin_addr;
idest = &((struct sockaddr_in *)dest)->sin_addr;
}
-#ifdef IPV6
+#ifdef RB_IPV6
else
{
iaddr = &((struct sockaddr_in6 *)addr)->sin6_addr;
if (cidrlen == 0)
return 0;
-#ifdef IPV6
+#ifdef RB_IPV6
if (strchr(mask, ':') && strchr(address, ':'))
{
aftype = AF_INET6;
else
return 0;
- inetpton(aftype, address, ipptr);
- inetpton(aftype, mask, maskptr);
+ rb_inet_pton(aftype, address, ipptr);
+ rb_inet_pton(aftype, mask, maskptr);
if (comp_with_mask(ipptr, maskptr, cidrlen))
return 1;
else
if (cidrlen == 0)
return 0;
-#ifdef IPV6
+#ifdef RB_IPV6
if (strchr(ip, ':') && strchr(ipmask, ':'))
{
aftype = AF_INET6;
else
return 0;
- inetpton(aftype, ip, ipptr);
- inetpton(aftype, ipmask, maskptr);
+ rb_inet_pton(aftype, ip, ipptr);
+ rb_inet_pton(aftype, ipmask, maskptr);
if (comp_with_mask(ipptr, maskptr, cidrlen) && match(mask, address))
return 1;
else