dnsproxy: Start tracking the end time of the TTL
authorArjan van de Ven <arjan@linux.intel.com>
Tue, 10 Jan 2012 00:08:29 +0000 (16:08 -0800)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 10 Jan 2012 12:43:57 +0000 (13:43 +0100)
commit007cf88321db75c5f86649b73d0376d7c0ae01a6
treeff1c1a3f197139cc901fa1d0506006bb5b794303
parent3d849d116f85c656a97d07937f73307399babc07
dnsproxy: Start tracking the end time of the TTL

In order to be able to report an accurate TTL to our client (see next patch
to actually do that), we are going to need to track the end point in time
for this TTL. This also allows us to track separately how long an entry
is valid versus how long we want to cache the entry.

This patch also adds some logic to group end times of the various
cache entries to logical boundaries (10 and 30 seconds); this will
cause cache entries to expire together, which is more efficient in
power/performance, and also later when we add refreshing logic.
src/dnsproxy.c