|
Home > Archive > Unix Programming > January 2004 > addrinfo()
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Frank A. Uepping 2004-01-23, 5:18 pm |
| Does addrinfo() impose any order on the returned addrinfo list (E.g.: IPv6
before IPv4...)?
What says the POSIX standard?
/FAU
| |
| Frank A. Uepping 2004-01-23, 5:18 pm |
| Frank A. Uepping wrote:
quote:
> Does addrinfo() impose any order on the returned addrinfo list (E.g.: IPv6
> before IPv4...)?
> What says the POSIX standard?
>
> /FAU
I mean getaddrinfo( ;)
| |
| Michael Fuhr 2004-01-23, 5:18 pm |
| "Frank A. Uepping" <null.0.fau@spamgourmet.com> writes:
quote:
>
> I mean getaddrinfo( ;)
You can check out the standard yourself at:
http://www.unix-systems.org/version3/online.html
I just skimmed the getaddrinfo() and General Information -> Sockets
sections and didn't find any guarantee about the return order, but
my quick search could have missed something. In practice, on the
systems I've used, AF_INET6 addresses tend to come first.
Unless somebody can cite a guarantee about the return order, and
if the order is important to your application, then you might want
to loop through the addrinfo list looking for the address family
you prefer.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
| |
| Frederick Bruckman 2004-01-23, 5:18 pm |
| In article <brettq$obe$00$2@news.t-online.com>,
"Frank A. Uepping" <null.0.fau@spamgourmet.com> writes:quote:
> Frank A. Uepping wrote:
>
> I mean getaddrinfo( ;)
RFC 3484 says, among other things, that it should be host-wide
configurable, but it also specifies a default order that puts
the IPv4-mapped-IPv6 addresses at the bottom. As far as I know,
though, no particular platform (or even POSIX) has adopted the
policy table recommendation yet, though it is rumoured to be in
the development version of the KAME stack.
--
Frederick
|
|
|
|
|