K
kcw3388
Hi,
I have a SunOS TCP/IP client program worked fine for a long time
until yesterday.
Now, my TCP/IP server program is located on different
DNS server.
The gethostbyaddr ( ) is now returned NULL instead.
struct hostent *hp=gethostbyaddr (addr, len, type);
The nslookup of the server IP failed even thought I
added a correct entry to /etc/hosts file. I believed
this is the behavior of the SunOS nslookup not looking
into the /etc/hosts file.
But, "getent hosts serverName" worked fine.
Anyway, try to make my long story short.
I would like to fix the problem but I am not
how to make get the gethostbyaddr( ) work again
(if possible).
My second option is to change gethostbyaddr ( )
to something similar to "getent" but no ideas
about how to do so.
Any comments/suggestions are appreciated.
Thanks,
Kevin
I have a SunOS TCP/IP client program worked fine for a long time
until yesterday.
Now, my TCP/IP server program is located on different
DNS server.
The gethostbyaddr ( ) is now returned NULL instead.
struct hostent *hp=gethostbyaddr (addr, len, type);
The nslookup of the server IP failed even thought I
added a correct entry to /etc/hosts file. I believed
this is the behavior of the SunOS nslookup not looking
into the /etc/hosts file.
But, "getent hosts serverName" worked fine.
Anyway, try to make my long story short.
I would like to fix the problem but I am not
how to make get the gethostbyaddr( ) work again
(if possible).
My second option is to change gethostbyaddr ( )
to something similar to "getent" but no ideas
about how to do so.
Any comments/suggestions are appreciated.
Thanks,
Kevin