]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/resolve/resolved-dns-cache.h
3231998c13e2df441bd4760a34044cc6030a2c83
1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 Copyright 2014 Lennart Poettering
11 #include "time-util.h"
13 typedef struct DnsCache
{
20 #include "resolved-dns-answer.h"
21 #include "resolved-dns-packet.h"
22 #include "resolved-dns-question.h"
23 #include "resolved-dns-rr.h"
25 void dns_cache_flush(DnsCache
*c
);
26 void dns_cache_prune(DnsCache
*c
);
28 int dns_cache_put(DnsCache
*c
, DnsResourceKey
*key
, int rcode
, DnsAnswer
*answer
, bool authenticated
, uint32_t nsec_ttl
, usec_t timestamp
, int owner_family
, const union in_addr_union
*owner_address
);
29 int dns_cache_lookup(DnsCache
*c
, DnsResourceKey
*key
, bool clamp_ttl
, int *rcode
, DnsAnswer
**answer
, bool *authenticated
);
31 int dns_cache_check_conflicts(DnsCache
*cache
, DnsResourceRecord
*rr
, int owner_family
, const union in_addr_union
*owner_address
);
33 void dns_cache_dump(DnsCache
*cache
, FILE *f
);
34 bool dns_cache_is_empty(DnsCache
*cache
);
36 unsigned dns_cache_size(DnsCache
*cache
);
38 int dns_cache_export_shared_to_packet(DnsCache
*cache
, DnsPacket
*p
);