Bug 77 - Use getaddrinfo instead of gethostbyname
: Use getaddrinfo instead of gethostbyname
Status: NEW
Product: TORQUE
libtorque
: 2.5.x
: PC Linux
: P5 enhancement
Assigned To: Glen
:
:
:
  Show dependency treegraph
 
Reported: 2010-08-16 06:42 MDT by Tobias Burnus
Modified: 2010-08-16 06:42 MDT (History)
1 user (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Tobias Burnus 2010-08-16 06:42:40 MDT
As Ulrich Drepper outlines in detail at
http://udrepper.livejournal.com/16116.html, one should use getaddrinfo instead
of gethostbyname.

The function is described in POSIX standard as:
http://www.opengroup.org/onlinepubs/009695399/functions/getaddrinfo.html


Note: Also POSIX writes:
"The getaddrinfo() and getnameinfo() functions are preferred over the
gethostbyaddr() and gethostbyname() functions." [...] "The gethostbyaddr() and
gethostbyname() functions may be withdrawn in a future version."
(http://www.opengroup.org/onlinepubs/009695399/functions/gethostbyname.html)