Version 0.0

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@387 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Unknown User d91-jda
1996-04-08 22:51:40 +00:00
parent fae6f2292a
commit 7686c38ea0
47 changed files with 3872 additions and 360 deletions

View File

@@ -0,0 +1,23 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <netinet/in.h>
#include <netdb.h>
RCSID("$Id$");
int inet_aton(char *cp, struct in_addr *adr)
{
int a, b, c, d;
if(sscanf(cp, "%d.%d.%d.%d", &a, &b, &c, &d) != 4)
return 0;
if(a < 0 || a > 255 ||
b < 0 || b > 255 ||
c < 0 || c > 255 ||
d < 0 || d > 255)
return 0;
adr->s_addr = htonl((a << 24) | (b << 16) | (c << 8) | d);
return 1;
}