chiark / gitweb /
resolved: rework logic so that we can share transactions between queries of different...
[elogind.git] / src / resolve / resolved-dns-cache.h
index 8d1cf95..1ede5bf 100644 (file)
@@ -36,6 +36,8 @@ typedef struct DnsCache {
 } DnsCache;
 
 #include "resolved-dns-rr.h"
 } DnsCache;
 
 #include "resolved-dns-rr.h"
+#include "resolved-dns-question.h"
+#include "resolved-dns-answer.h"
 
 typedef struct DnsCacheItem {
         DnsResourceRecord *rr;
 
 typedef struct DnsCacheItem {
         DnsResourceRecord *rr;
@@ -50,8 +52,6 @@ void dns_cache_prune(DnsCache *c);
 void dns_cache_remove(DnsCache *c, DnsResourceKey *key);
 
 int dns_cache_put(DnsCache *c, DnsResourceRecord *rr, usec_t timestamp);
 void dns_cache_remove(DnsCache *c, DnsResourceKey *key);
 
 int dns_cache_put(DnsCache *c, DnsResourceRecord *rr, usec_t timestamp);
-int dns_cache_put_rrs(DnsCache *c, DnsResourceRecord **rrs, unsigned n_rrs, usec_t timestamp);
+int dns_cache_put_answer(DnsCache *c, DnsAnswer *answer, usec_t timestamp);
 
 
-DnsCacheItem* dns_cache_lookup(DnsCache *c, DnsResourceKey *key);
-DnsCacheItem* dns_cache_get(DnsCache *c, DnsResourceRecord *rr);
-int dns_cache_lookup_many(DnsCache *c, DnsResourceKey *keys, unsigned n_keys, DnsResourceRecord ***rrs);
+int dns_cache_lookup(DnsCache *c, DnsQuestion *q, DnsAnswer **ret);