[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comments on address selection API

I have an additional comment on the draft relating to the four new
AI_PREFER_* getaddrinfo() flags (new in version 1 of the draft).

	AI_PREFER_SRC_LARGESTSCOPE  /* Prefer largest scope */
	AI_PREFER_SRC_LOWERSCOPE	  /* Prefer lower than largest scope */
	AI_PREFER_SRC_TUNNEL	  /* Prefer address of tunnel interface */
	AI_PREFER_SRC_NATIVE	  /* Prefer native IPv6 address */

I don't know if this is the right place to be defining these
preferences.  By defining these flags, wouldn't we be suggesting that
the control of these two destination address selection rules (rules 7
and 8) belongs to application developers?  Preferring larger scope
destinations rather than smaller scope destinations seems like a
situational run-time preference, and same with preferring tunnel
output interfaces over native interfaces.  My initial though when I
saw these preferences was that we should be giving individuals running
applications the control, not individuals writing applications.

You could argue that applications could set these flags based on
additional input from the environment, but that seems ugly since every
application would need to be changed.  Otherwise some applications
would behave differently than others based on how or if they handle
this environmental input.  Instead, environmental input could be
handled directly by the library that implements the address ordering
mechanism.  I'm deliberatly not using the term "environment variable"
to stay OS neutral and to not directly suggest one method of
implementation in this context.


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 majordomo@sunroof.eng.sun.com