summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-cache.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-12-23 19:06:36 +0100
committerLennart Poettering <lennart@poettering.net>2015-12-26 19:09:10 +0100
commita150ff5e4e2481eb28d6ed6e0d3e176623e25f5a (patch)
treed21c32a68262a5c7ea74c5dd36ad6f96f6138bd7 /src/resolve/resolved-dns-cache.h
parented29bfdce6ef8b1c6e14bb4e77e19e7048f35dd4 (diff)
resolved: gather statistics about resolved names
This collects statistical data about transactions, dnssec verifications and the cache, and exposes it over the bus. The systemd-resolve-host tool learns new options to query these statistics and reset them.
Diffstat (limited to 'src/resolve/resolved-dns-cache.h')
-rw-r--r--src/resolve/resolved-dns-cache.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-cache.h b/src/resolve/resolved-dns-cache.h
index 856c975299..9c85ca4c58 100644
--- a/src/resolve/resolved-dns-cache.h
+++ b/src/resolve/resolved-dns-cache.h
@@ -29,6 +29,8 @@
typedef struct DnsCache {
Hashmap *by_key;
Prioq *by_expiry;
+ unsigned n_hit;
+ unsigned n_miss;
} DnsCache;
#include "resolved-dns-answer.h"
@@ -47,4 +49,6 @@ int dns_cache_check_conflicts(DnsCache *cache, DnsResourceRecord *rr, int owner_
void dns_cache_dump(DnsCache *cache, FILE *f);
bool dns_cache_is_empty(DnsCache *cache);
+unsigned dns_cache_size(DnsCache *cache);
+
int dns_cache_export_shared_to_packet(DnsCache *cache, DnsPacket *p);