[erlang-questions] IPv6 support in inet_gethost

Jani Hakala jahakala@REDACTED
Tue Nov 21 15:41:50 CET 2006

"Sergei Golovan" <sgolovan@REDACTED> writes:

> Hi!
> As far as I understand, inet_gethost uses getipnodebyname and
> getipnodebyaddr functions.
> It seems that both functions aren't implemented in Linux (probably
> they require some unusual libraries?).
The man page says that
 "These functions are deprecated. Use getaddrinfo(3)  and getnameinfo(3)

    These functions have been present in glibc 2.1.91-95, but were removed
    again. Several Unix-like systems support them, but all call them 

> Mikael Magnusson has sent a patch (attached, patch is for R11B-2) to
> Debian bugs database. It adds IPv6 addresses resolution using
> gethostbyname2 and gethostbyaddr.
gethostbyname2 is a GNU extension.

> I hope it will be useful not only for Debian users.
Using getaddrinfo and getnameinfo might be a better idea then?

Jani Hakala

More information about the erlang-questions mailing list