diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2017-06-16 20:16:05 +1000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2017-06-17 23:04:00 +1000 |
commit | a85b5759f34c0c4110a479a8b5fa606f15ed9b23 (patch) | |
tree | 518cb8346249a42fd2aa8a78c09c3631e14db6aa /external/unbound/util/data/packed_rrset.h | |
parent | Merge pull request #2059 (diff) | |
download | monero-a85b5759f34c0c4110a479a8b5fa606f15ed9b23.tar.xz |
Upgrade unbound library
These files were pulled from the 1.6.3 release tarball.
This new version builds against OpenSSL version 1.1 which will be
the default in the new Debian Stable which is due to be released
RealSoonNow (tm).
Diffstat (limited to 'external/unbound/util/data/packed_rrset.h')
-rw-r--r-- | external/unbound/util/data/packed_rrset.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/external/unbound/util/data/packed_rrset.h b/external/unbound/util/data/packed_rrset.h index 6039aef24..28f603d6f 100644 --- a/external/unbound/util/data/packed_rrset.h +++ b/external/unbound/util/data/packed_rrset.h @@ -47,7 +47,7 @@ struct regional; /** type used to uniquely identify rrsets. Cannot be reused without * clearing the cache. */ -typedef uint64_t rrset_id_t; +typedef uint64_t rrset_id_type; /** this rrset is NSEC and is at zone apex (at child side of zonecut) */ #define PACKED_RRSET_NSEC_AT_APEX 0x1 @@ -57,6 +57,10 @@ typedef uint64_t rrset_id_t; * this is set on SOA rrsets in the authority section, to keep its TTL separate * from the SOA in the answer section from a direct SOA query or ANY query. */ #define PACKED_RRSET_SOA_NEG 0x4 +/** This rrset is considered to have a fixed TTL; its TTL doesn't have to be + * updated on encoding in a reply. This flag is not expected to be set in + * cached data. */ +#define PACKED_RRSET_FIXEDTTL 0x80000000 /** number of rrs and rrsets for integer overflow protection. More than * this is not really possible (64K packet has much less RRs and RRsets) in @@ -83,6 +87,7 @@ struct packed_rrset_key { * o PACKED_RRSET_NSEC_AT_APEX * o PACKED_RRSET_PARENT_SIDE * o PACKED_RRSET_SOA_NEG + * o PACKED_RRSET_FIXEDTTL (not supposed to be cached) */ uint32_t flags; /** the rrset type in network format */ @@ -114,7 +119,7 @@ struct ub_packed_rrset_key { * The other values in this struct may only be altered after changing * the id (which needs a writelock on entry.lock). */ - rrset_id_t id; + rrset_id_type id; /** key data: dname, type and class */ struct packed_rrset_key rk; }; @@ -191,6 +196,12 @@ enum sec_status { * RRset data. * * The data is packed, stored contiguously in memory. + * + * It is not always stored contiguously, in that case, an unpacked-packed + * rrset has the arrays separate. A bunch of routines work on that, but + * the packed rrset that is contiguous is for the rrset-cache and the + * cache-response routines in daemon/worker.c. + * * memory layout: * o base struct * o rr_len size_t array @@ -334,7 +345,7 @@ void rrset_data_delete(void* data, void* userdata); * @param key: the rrset key with name, type, class, flags. * @return hash value. */ -hashvalue_t rrset_key_hash(struct packed_rrset_key* key); +hashvalue_type rrset_key_hash(struct packed_rrset_key* key); /** * Fixup pointers in fixed data packed_rrset_data blob. |