[EMAIL PROTECTED] said:
> >>    I don't understand how can flags to getaddrinfo(3) affect source
> >>    address selection.  where does it take effect in the following code?
> >getaddrinfo implementation itself?  of course, then libc would have to 
> >aware of src addresses and such..
> 
>       getaddrinfo(3) does not open socket, so getaddrinfo(3) cannot perform
>       [gs]etsockopt.

This is how I understand the motivation behind these flags:

The destination address selection algorithm itself needs to compare each
destination with its chosen source address.  If the application has
input into the source address selection mechanism via the defined socket
options, then the application also needs to relay these source address
preferences to the destination address ordering algorithm so that it can
obtain accurate source address information for each destination.

If the destination ordering is implemented in the kernel, then
getaddrinfo() will need to pass the application's source address
preferences down with the list of destinations so that the algorithm can
accurately do its job.

It's still unclear to me if all of the newly defined AI_* flags are
really needed.  Do they each impact the ordering of the addresses in
cases that make a difference?  For example, there is no destination
address ordering rule that takes temporary source addresses into
account, so in what case would setting AI_PREFER_SRC_TMP change the
order of destinations?

-Seb

--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to