This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: problems with getaddrinfo() and _res.options
- To: Arkadiusz Miskiewicz <misiek at pld dot org dot pl>
- Subject: Re: problems with getaddrinfo() and _res.options
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 27 May 2000 00:51:45 -0700
- Cc: GNU libc testers <libc-alpha at sourceware dot cygnus dot com>
- References: <20000522142656.A24360@ikar.t17.ds.pwr.wroc.pl>
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
I think I have fixed the program in glibc 2.2 now. It is a fairly
complicated change since the old handling of IPv4->IPv6 address
mapping was completely broken. The BIND code didn't make any sense.
Anyhow, I have cleaned it up now and probably changed the semantics a
bit. But to the better I think.
The RES_USE_INET6 bit now decides
- whether gethostbyname() returns an IPv6 address or not. This is the
original use
- whether IPv4 addresses are mapped to IPv6 addresses in situations
where only IPv6 addresses are requested (either in gethostbyname2
or getaddrinfo, not getipnodebyname)
In no other case is RES_USE_INET6 used. I think this is the only
possible way to make sense of this. If you disagree let me know.
As a consequence of these changes getaddrinfo() now does not return
the IPv4 and IPv6 address of a host if AF_UNSPEC is passed in as the
protocol. This is another change, but again a useful one.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------