This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: getipnodebyname() is not exported from the shared library
- To: Andreas Jaeger <aj at suse dot de>
- Subject: Re: getipnodebyname() is not exported from the shared library
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- Date: Mon, 31 Jul 2000 18:50:33 +0200 (MET DST)
- cc: libc-alpha at sourceware dot cygnus dot com
- Organization: Technical University of Gdansk
On 31 Jul 2000, Andreas Jaeger wrote:
> Sorry, use getaddrinfo - there's a thread about this on libc-alpha
> just this weekend.
IIRC, I found getaddrinfo() and getipnodebyname() pretty complement to
each other. Using both of them allowed writing programs that would not
have to know anything about PF_INET vs PF_INET6 (no single occurence of
these within sources) -- only about PF_UNSPEC. Great for transparent
handling of programs started with a socket on a stdin/out (DECnet,
anyone?) which want to do NS lookups and for future portability. So far
I've successfully used this trick for modified tcp_wrappers.
> We'll remove getipnodebyname eventually...
I hope there are important reasons for doing this. Well, actually
getipnodebyname() may be implemented using gethostbyname() and
gethostbyname2() with some help from libresolv but that's disgusting (I
need to use it for glibc 2.1 anyway).
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +