diff options
| author | Florian Westphal <fw@strlen.de> | 2008-02-26 23:50:35 +0100 |
|---|---|---|
| committer | Florian Westphal <fw@strlen.de> | 2008-02-26 23:50:35 +0100 |
| commit | feb31e4200b42e0a5e9fb9637fa5f03c7ec05fcb (patch) | |
| tree | b572467ece1a378bc5939b7094c46f2e97fd1963 /src/tool | |
| parent | c31ad221a6cc48b709af056181d8d0be09898910 (diff) | |
| download | ngircd-feb31e4200b42e0a5e9fb9637fa5f03c7ec05fcb.tar.gz ngircd-feb31e4200b42e0a5e9fb9637fa5f03c7ec05fcb.zip | |
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.
Diffstat (limited to 'src/tool')
| -rw-r--r-- | src/tool/tool.c | 21 | ||||
| -rw-r--r-- | src/tool/tool.h | 4 |
2 files changed, 2 insertions, 23 deletions
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 <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- */ diff --git a/src/tool/tool.h b/src/tool/tool.h index 7ce3e2c8..9bb7983f 100644 --- a/src/tool/tool.h +++ b/src/tool/tool.h @@ -8,7 +8,7 @@ * (at your option) any later version. * Please read the file COPYING, README and AUTHORS for more information. * - * $Id: tool.h,v 1.5 2007/11/25 18:42:38 fw Exp $ + * $Id: tool.h,v 1.6 2008/02/26 22:04:18 fw Exp $ * * Tool functions (Header) */ @@ -29,8 +29,6 @@ GLOBAL void ngt_TrimLastChr PARAMS((char *String, const char Chr )); GLOBAL void ngt_TrimStr PARAMS((char *String )); GLOBAL char *ngt_LowerStr PARAMS((char *String )); - -GLOBAL bool ngt_IPStrToBin PARAMS((const char *ip_str, struct in_addr *inaddr)); #endif |