> On the other hand, introducing an new ai_ttl field at the end of struct
> addrinfo can be done without any effect on binaries (since the field offsets of
> the other fields do not change, and freeaddrinfo() will free the correct size
> structure). Applications which want to use ai_ttl would then do
>
> call getaddrinfo...
> #ifdef _GETADDRINFO_AI_TTL
> ttl = ai->ai_tll;
> #else
> ttl = 30; /* Or some other constant */
> #endif
>
> While this is more painful than if we'd included ai_ttl from the start,
> it seems to be less painful than standardizing getrrsetbyname() to
> ensure portability of that interface across platforms.
getaddrinfo() is not a DNS-only function; it can lookup hostname-to
address using /etc/hosts, NIS, LDAP, whatever you have. what value
would you put in to ai_ttl when the lookup is done by non-DNS method?
itojun
.
dnsop resources:_____________________________________________________
web user interface: http://darkwing.uoregon.edu/~llynch/dnsop.html
mhonarc archive: http://darkwing.uoregon.edu/~llynch/dnsop/index.html