From feb31e4200b42e0a5e9fb9637fa5f03c7ec05fcb Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 26 Feb 2008 23:50:35 +0100 Subject: IPv6 support. all references to struct sockaddr/in_addr have been removed from src/ngircd. libngipaddr (in src/ipaddr/) hides all the gory details. See src/ipaddr/ng_ipaddr.h for API description. --- src/tool/tool.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'src/tool/tool.c') diff --git a/src/tool/tool.c b/src/tool/tool.c index 52d7be88..1e723773 100644 --- a/src/tool/tool.c +++ b/src/tool/tool.c @@ -14,7 +14,7 @@ #include "portab.h" -static char UNUSED id[] = "$Id: tool.c,v 1.8 2007/11/25 18:42:38 fw Exp $"; +static char UNUSED id[] = "$Id: tool.c,v 1.9 2008/02/26 22:04:18 fw Exp $"; #include "imp.h" #include @@ -106,23 +106,4 @@ ngt_TrimLastChr( char *String, const char Chr) if( String[len] == Chr ) String[len] = '\0'; } /* ngt_TrimLastChr */ - -GLOBAL bool -ngt_IPStrToBin(const char *ip_str, struct in_addr *inaddr) -{ - /* AF is always AF_INET for now */ -#ifdef HAVE_INET_ATON - if (inet_aton(ip_str, inaddr) == 0) - return false; -#else - inaddr->s_addr = inet_addr(ip_str); - if (inaddr->s_addr == (unsigned)-1) - return false; -#endif - return true; -} - - - - /* -eof- */ -- cgit 1.4.1