char *host;
u_char *addr;
{
struct hostent *he = gethostbyname2(host, family);
struct hostent *he;
if (!he)
if (inet_pton(family, host, &addr) == 1)
return 0;
if (!(he = gethostbyname2(host, family)))
return(-1);
memcpy(addr, he->h_addr_list[0], he->h_length);