diff options
Diffstat (limited to 'services/cache/dns.h')
-rw-r--r-- | services/cache/dns.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/services/cache/dns.h b/services/cache/dns.h index 9e10f437f1b49..78f81e7995225 100644 --- a/services/cache/dns.h +++ b/services/cache/dns.h @@ -159,13 +159,16 @@ struct dns_msg* tomsg(struct module_env* env, struct query_info* q, * @param flags: flags with BIT_CD for AAAA queries in dns64 translation. * @param region: where to allocate result. * @param scratch: where to allocate temporary data. + * @param no_partial: if true, only complete messages and not a partial + * one (with only the start of the CNAME chain and not the rest). * @return new response message (alloced in region, rrsets do not have IDs). * or NULL on error or if not found in cache. * TTLs are made relative to the current time. */ struct dns_msg* dns_cache_lookup(struct module_env* env, uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, - uint16_t flags, struct regional* region, struct regional* scratch); + uint16_t flags, struct regional* region, struct regional* scratch, + int no_partial); /** * find and add A and AAAA records for missing nameservers in delegpt @@ -205,6 +208,18 @@ int dns_msg_authadd(struct dns_msg* msg, struct regional* region, struct ub_packed_rrset_key* rrset, time_t now); /** + * Add rrset to authority section in unpacked dns_msg message. Must have enough + * space left, does not grow the array. + * @param msg: msg to put it in. + * @param region: region to alloc in + * @param rrset: to add in authority section + * @param now: now. + * @return true if worked, false on fail + */ +int dns_msg_ansadd(struct dns_msg* msg, struct regional* region, + struct ub_packed_rrset_key* rrset, time_t now); + +/** * Adjust the prefetch_ttl for a cached message. This adds a value to the * prefetch ttl - postponing the time when it will be prefetched for future * incoming queries. |