diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-06-24 12:42:28 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-06-24 12:42:29 +0200 |
commit | 389cd6c466486e670e6f9cd74d2cfdf46f392340 (patch) | |
tree | c4b10fac237c407badc8300b2d6116fe6a1ce7cb /external/unbound/services/cache/dns.h | |
parent | Merge pull request #2073 (diff) | |
parent | Upgrade unbound library (diff) | |
download | monero-389cd6c466486e670e6f9cd74d2cfdf46f392340.tar.xz |
Merge pull request #2089
a85b5759 Upgrade unbound library (Erik de Castro Lopo)
Diffstat (limited to '')
-rw-r--r-- | external/unbound/services/cache/dns.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/external/unbound/services/cache/dns.h b/external/unbound/services/cache/dns.h index 69796c2eb..0dfb68874 100644 --- a/external/unbound/services/cache/dns.h +++ b/external/unbound/services/cache/dns.h @@ -106,7 +106,7 @@ int dns_cache_store(struct module_env* env, struct query_info* qinf, * @param region: to allocate into for qmsg. */ void dns_cache_store_msg(struct module_env* env, struct query_info* qinfo, - hashvalue_t hash, struct reply_info* rep, time_t leeway, int pside, + hashvalue_type hash, struct reply_info* rep, time_t leeway, int pside, struct reply_info* qrep, struct regional* region); /** @@ -126,6 +126,20 @@ struct delegpt* dns_cache_find_delegation(struct module_env* env, uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, struct regional* region, struct dns_msg** msg, time_t timenow); +/** + * generate dns_msg from cached message + * @param env: module environment with the DNS cache. NULL if the LRU from cache + * does not need to be touched. + * @param q: query info, contains qname that will make up the dns message. + * @param r: reply info that, together with qname, will make up the dns message. + * @param region: where to allocate dns message. + * @param now: the time now, for check if TTL on cache entry is ok. + * @param scratch: where to allocate temporary data. + * */ +struct dns_msg* tomsg(struct module_env* env, struct query_info* q, + struct reply_info* r, struct regional* region, time_t now, + struct regional* scratch); + /** * Find cached message * @param env: module environment with the DNS cache. |