* Mark Andrews:

> getaddrinfo was designed to extended.  It wouldn't be hard to add ttl
> information to getaddrinfo, just add a ai_ttl to the structure at the
> end and define a flag to say whether it is valid.  

struct addrinfo cannot be extended in this way because its size is
part of the ABI, and callers are even encouraged to allocate struct
addrinfo objects to pass the hints.

I've already found one Debian package which embeds a struct addrinfo
field in the middle of a struct defined in a header file (the shishi
Kerberos implementation).  Unfortunately, changing struct addrinfo in
the way you propose has an extremely high risk of breaking
applications.

It is possible to extend getaddrinfo without change the size of struct
addrinfo, but this will require accessor functions for the new fields.
_______________________________________________
dns-operations mailing list
[email protected]
https://lists.dns-oarc.net/mailman/listinfo/dns-operations
dns-jobs mailing list
https://lists.dns-oarc.net/mailman/listinfo/dns-jobs

Reply via email to