Re: nslook problem?

Erik Schoenfelder (schoenfr@ibr.cs.tu-bs.de)
Fri, 24 Mar 1995 19:33:07 +0100

Hi!

James> Nslook returned an error message saying "can not lookup" this
James> device. But I wrote a small program to use gethostbyname() to
James> query the IP address and the program successfully got the IP
James> address.

Juergen> I don't think that there is anything in scotty that
Juergen> should be able to change the behaviour of
Juergen> gethostbyname().

James> Since I really want the functionality in tkined, I copied the
James> whole function into tkined and it worked all right there.

Lightbulb lit. Scotty links with -lresolv, tkined does not and i guess
your testprogram was linked without libresolv too.

gethostbyname() from your libc probably looks into /etc/hosts or do
NIS lookups (maybe in conjunction with DNS lookups, if not found in
local databases).

And i guess gethostbyname() from your libresolv always asks DNS.

Guess: maybe you are working with SunOS 4.1.x and a patched shared
libc (with resolv+-2.0 or alike) but not with a patched libresolv ?

Erik