HOSTS file problem
Hi netters!
My program uses name resolution based on HOSTS file
(SYSTEM32\drivers\etc\hosts)
It looks like:
127.0.0.1 localhost
10.0.0.26 serviceapi
One can ping "serviceapi".
In the program gethostbyname("serviceapi") returns pointer to hostent
structure. All works fine for a couple of months (or more). Then with "no
declaration of war" the server on which program is running starts failing to
resolve the name. gethostbyname returns NULL ping utility prints "Unknown
host serviceapi". Only reboot helps.
I can't change the configuration method - do not have source code for this
program.
Does anybody know what really happens?
|