gethostbyaddr vs getaddrinfo and getnameinfo
Why gethostbyaddr treated as obsolete and getaddrinfo and getnameinfo should be used instead, if unde latter one i'm unable to get aliases from /etc/hosts while in case gethostbyaddr i will?
|
The gethostbyaddr performs netbios lookup. It is very slow when the host can't be found. The getnameinfo only contact DNS server, should be faster.
|
Thanks, what about aliases in /etc/hosts? Why they become unavailable under DNS?
|
In general, the file is for domain name and static host name. Some distribution could change file name to another one. It look like no affaction.
|
All times are GMT -5. The time now is 08:30 AM. |