On Wed, Sep 30, 2009 at 08:31, Rainer Gerhards <[email protected]> wrote:
> After my bughunt looks almost completed, I have come back to implementing the
> name lookup cache. However, I just found out that obtaining the expiration
> period of the name lookup seems not to be covered by the "usual" socket
> calls. Or did I just miss them?

Unfortunately not - most resolver libraries provide only what the
programmer usually wants - the symbolic (name) or numeric (IP) result
of a query.  I've not looked carefully at APIs like res_query, though,
and that might bring what you need.

> Any advise, comments and hints regarding name caching and expiration would
> deeply be appreciated.

This was my greatest concern with doing *good* internal caching in
rsyslog - you're almost guaranteed to use and/or implement a large
chunk of proper resolver functionality.  Depending on how readable you
find Perl, the Net::DNS infrastructure may provide some good pointers
on implementing custom resolution toolkits.  The djbdns 'dnscache'
program (and perhaps the djbdns client resolver library itself) could
also be good pointers.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to