X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fresolve%2Fresolved-dns-cache.h;h=e92280c31957b19e3f3645a1b36c3111e67fac4f;hp=6f5bf45a38c2c802eff0662bd6d7978f71ee132c;hb=de45d726034f33afdb0a185e62fc61bf10a0acd2;hpb=7e8e0422aeb16f2a09a40546c61df753d10029b6 diff --git a/src/resolve/resolved-dns-cache.h b/src/resolve/resolved-dns-cache.h index 6f5bf45a3..e92280c31 100644 --- a/src/resolve/resolved-dns-cache.h +++ b/src/resolve/resolved-dns-cache.h @@ -28,8 +28,6 @@ #include "time-util.h" #include "list.h" -typedef struct DnsCacheItem DnsCacheItem; - typedef struct DnsCache { Hashmap *by_key; Prioq *by_expiry; @@ -39,23 +37,10 @@ typedef struct DnsCache { #include "resolved-dns-question.h" #include "resolved-dns-answer.h" -typedef enum DnsCacheItemType { - DNS_CACHE_POSITIVE, - DNS_CACHE_NODATA, - DNS_CACHE_NXDOMAIN, -} DnsCacheItemType; - -typedef struct DnsCacheItem { - DnsResourceKey *key; - DnsResourceRecord *rr; - usec_t until; - DnsCacheItemType type; - unsigned prioq_idx; - LIST_FIELDS(DnsCacheItem, by_key); -} DnsCacheItem; - void dns_cache_flush(DnsCache *c); void dns_cache_prune(DnsCache *c); -int dns_cache_put(DnsCache *c, DnsQuestion *q, int rcode, 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_check_conflicts(DnsCache *cache, DnsResourceRecord *rr, int owner_family, const union in_addr_union *owner_address);