[Unbound-users] get ttl in libunbound?

Ondřej Surý ondrej at sury.org
Fri Nov 13 23:10:54 UTC 2009


On Fri, Nov 13, 2009 at 23:55, David Hubbard <david.c.hubbard at gmail.com> wrote:
> Hi all,
>
> I'd like to get the TTL value for a DNS request. I looked at what it
> would take to add this to struct ub_result and it doesn't look too
> difficult - patch attached.

Please don't change the existing API. In this case it could be solved
just by recompiling all dependant programs, but generally changing
existing API causes a lot of troubles (beware not adding new functions
and data types - but really changing existing functions).

> Is this the right approach? Or should I use ldns to parse the raw
> packet bytes to get the ttl?

That depends on what your needs are? Do you need full validating
resolver (libunbound) or you just want to play around with DNS packets
(libldns)?

Ondrej
-- 
Ondřej Surý <ondrej at sury.org>
http://blog.rfc1925.org/



More information about the Unbound-users mailing list