summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-rr.h
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-12-01 00:53:42 +0100
committerDaniel Mack <daniel@zonque.org>2015-12-08 16:51:41 +0100
commit7778dffff3d8bd7438fe19a248c16203668324c9 (patch)
tree85d0751d1764287abf73e3ec9376c8331b394004 /src/resolve/resolved-dns-rr.h
parent0afa57e2e7645f3a550729e4daadda419de179c5 (diff)
resolved: add dns_cache_export_to_packet()
This new functions exports cached records of type PTR, SRV and TXT into an existing DnsPacket. This is used in order to fill in known records to mDNS queries, for known answer supression.
Diffstat (limited to 'src/resolve/resolved-dns-rr.h')
-rw-r--r--src/resolve/resolved-dns-rr.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-rr.h b/src/resolve/resolved-dns-rr.h
index 5cbb927681..5c2306ba96 100644
--- a/src/resolve/resolved-dns-rr.h
+++ b/src/resolve/resolved-dns-rr.h
@@ -250,6 +250,10 @@ int dns_resource_key_match_cname(const DnsResourceKey *key, const DnsResourceRec
int dns_resource_key_to_string(const DnsResourceKey *key, char **ret);
DEFINE_TRIVIAL_CLEANUP_FUNC(DnsResourceKey*, dns_resource_key_unref);
+static inline bool dns_key_is_shared(const DnsResourceKey *key) {
+ return IN_SET(key->type, DNS_TYPE_PTR);
+}
+
DnsResourceRecord* dns_resource_record_new(DnsResourceKey *key);
DnsResourceRecord* dns_resource_record_new_full(uint16_t class, uint16_t type, const char *name);
DnsResourceRecord* dns_resource_record_ref(DnsResourceRecord *rr);