1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-10-18 08:07:39 +00:00

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.
This commit is contained in:
Florian Westphal
2008-02-26 23:50:35 +01:00
parent c31ad221a6
commit feb31e4200
18 changed files with 826 additions and 288 deletions

View File

@@ -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 <assert.h>
@@ -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- */