Collin Funk wrote:
> Is it okay if I add inet_ntoa? It is "obsolete" in this latest revision
> but it is used everywhere including GNU Inetutils [1] [2]. FWIW I don't
> think its usage is bad as long as you don't have plans to make your
> program multithreaded.

The problems of inet_ntoa are summarized in our documentation
(doc/posix-functions/inet_ntoa.texi). The biggest problem is that
it does not support IPv6. IPv6 is everywhere nowadays: internet
providers give out IPv6 addresses to their customers, and probably
2/3 of the websites I usually connect to have both an IPv6 and
an IPv4 address.

Therefore, it makes no sense to maintain programs that work
only with IPv4 and not with IPv6.

While it is - in theory - possible that a program has different
code paths for IPv4 and IPv6 and uses inet_ntoa for the former one,
this is probably a small minority. Most programs will want to
handle IPv4 and IPv6 through the same code, and inet_ntop is the
function to use.

So, I don't think adding an inet_ntoa module to Gnulib would really
help anyone.

Bruno




Reply via email to