version 1.3, 1997/04/07 19:55:26 |
version 1.4, 1999/06/05 19:33:49 |
|
|
Maybe that's why my C code reads like assembler half the time... */ |
Maybe that's why my C code reads like assembler half the time... */ |
|
|
/* If we want to see all the DNS stuff, do the following hair -- |
/* If we want to see all the DNS stuff, do the following hair -- |
if inet_addr, do reverse and forward with any warnings; otherwise try |
if inet_aton, do reverse and forward with any warnings; otherwise try |
to do forward and reverse with any warnings. In other words, as long |
to do forward and reverse with any warnings. In other words, as long |
as we're here, do a complete DNS check on these clowns. Yes, it slows |
as we're here, do a complete DNS check on these clowns. Yes, it slows |
things down a bit for a first run, but once it's cached, who cares? */ |
things down a bit for a first run, but once it's cached, who cares? */ |
|
|
poop = (HINF *) Hmalloc (sizeof (HINF)); |
poop = (HINF *) Hmalloc (sizeof (HINF)); |
if (! poop) |
if (! poop) |
bail ("gethostpoop fuxored"); |
bail ("gethostpoop fuxored"); |
strcpy (poop->name, unknown); /* preload it */ |
strlcpy (poop->name, unknown, sizeof(poop->name)); /* preload it */ |
/* see wzv:workarounds.c for dg/ux return-a-struct inet_addr lossage */ |
if (inet_aton (name, &iaddr) == 0) { /* here's the great split: names... */ |
iaddr.s_addr = inet_addr (name); |
|
|
|
if (iaddr.s_addr == INADDR_NONE) { /* here's the great split: names... */ |
|
if (numeric) |
if (numeric) |
bail ("Can't parse %s as an IP address", name); |
bail ("Can't parse %s as an IP address", name); |
hostent = gethostbyname (name); |
hostent = gethostbyname (name); |