X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fresolve%2Fresolved-dns-cache.h;h=8a9b3d459dc2ec1becd66b877e004d852e7f0107;hb=32a568fb90bf0a22a3007fa670305403a5d0bb72;hp=1ede5bfd81cab9fd01d17bbaa8e48d163fde70a8;hpb=faa133f3aa7a18f26563dc5d6b95898cb315c37a;p=elogind.git
diff --git a/src/resolve/resolved-dns-cache.h b/src/resolve/resolved-dns-cache.h
index 1ede5bfd8..8a9b3d459 100644
--- a/src/resolve/resolved-dns-cache.h
+++ b/src/resolve/resolved-dns-cache.h
@@ -21,37 +21,25 @@
along with systemd; If not, see .
***/
-#include
#include "hashmap.h"
#include "prioq.h"
#include "time-util.h"
#include "list.h"
-typedef struct DnsCacheItem DnsCacheItem;
-
typedef struct DnsCache {
- Hashmap *rrsets;
- Prioq *expire;
+ Hashmap *by_key;
+ Prioq *by_expiry;
} DnsCache;
#include "resolved-dns-rr.h"
#include "resolved-dns-question.h"
#include "resolved-dns-answer.h"
-typedef struct DnsCacheItem {
- DnsResourceRecord *rr;
- usec_t timestamp;
- unsigned expire_prioq_idx;
- LIST_FIELDS(DnsCacheItem, rrsets);
-} DnsCacheItem;
-
void dns_cache_flush(DnsCache *c);
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);
-int dns_cache_put_answer(DnsCache *c, DnsAnswer *answer, usec_t timestamp);
+int dns_cache_put(DnsCache *c, DnsQuestion *q, int rcode, DnsAnswer *answer, unsigned max_rrs, usec_t timestamp, int owner_family, const union in_addr_union *owner_address);
+int dns_cache_lookup(DnsCache *c, DnsQuestion *q, int *rcode, DnsAnswer **answer);
-int dns_cache_lookup(DnsCache *c, DnsQuestion *q, DnsAnswer **ret);
+int dns_cache_check_conflicts(DnsCache *cache, DnsResourceRecord *rr, int owner_family, const union in_addr_union *owner_address);