This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Can getaddrinfo() be extended to return the record TTL
- From: Eric Wong <normalperson at yhbt dot net>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: David Howells <dhowells at redhat dot com>, jlayton at redhat dot com, libc-alpha at sourceware dot org
- Date: Tue, 6 Aug 2019 15:16:32 +0000
- Subject: Re: Can getaddrinfo() be extended to return the record TTL
- References: <13914.1564764142@warthog.procyon.org.uk> <87v9vfcwkm.fsf@oldenburg2.str.redhat.com>
Florian Weimer <fweimer@redhat.com> wrote:
> * David Howells:
> > If it's not possible to extend getaddrinfo() in this way, would it be possible
> > to provide a getaddrinfo2() that returns this information through an
> > additional parameter?
>
> That definitely would be a new ABI.
>
> New ABIs have a lead time of around three years before productization.
> Is this something you could work with?
Fwiw, gaicb has an "int __glibc_reserved[5]" field; so it's
probably possible to extend the already-glibc-specific getaddrinfo_a(3)
to return the TTL.
I was looking into getting the TTL the other week for something
else, but settled on using a dedicated thread to call
getaddrinfo(3) every few seconds and publishing updates to other
threads via URCU.