Electroneum
Loading...
Searching...
No Matches
rrset.h
Go to the documentation of this file.
1/*
2 * services/cache/rrset.h - Resource record set cache.
3 *
4 * Copyright (c) 2007, NLnet Labs. All rights reserved.
5 *
6 * This software is open source.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 *
19 * Neither the name of the NLNET LABS nor the names of its contributors may
20 * be used to endorse or promote products derived from this software without
21 * specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
29 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */
35
41
42#ifndef SERVICES_CACHE_RRSET_H
43#define SERVICES_CACHE_RRSET_H
47struct config_file;
48struct alloc_cache;
49struct rrset_ref;
50struct regional;
51
59};
60
68 struct alloc_cache* alloc);
69
75
86 struct config_file* cfg, struct alloc_cache* alloc);
87
106
133int rrset_cache_update(struct rrset_cache* r, struct rrset_ref* ref,
134 struct alloc_cache* alloc, time_t timenow);
135
151 struct ub_packed_rrset_key* rrset, uint8_t* ce, size_t ce_len,
152 struct alloc_cache* alloc, time_t timenow);
153
169 uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
170 uint32_t flags, time_t timenow, int wr);
171
184int rrset_array_lock(struct rrset_ref* ref, size_t count, time_t timenow);
185
192void rrset_array_unlock(struct rrset_ref* ref, size_t count);
193
206void rrset_array_unlock_touch(struct rrset_cache* r, struct regional* scratch,
207 struct rrset_ref* ref, size_t count);
208
220 struct ub_packed_rrset_key* rrset, time_t now);
221
232 struct ub_packed_rrset_key* rrset, time_t now);
233
243void rrset_cache_remove(struct rrset_cache* r, uint8_t* nm, size_t nmlen,
244 uint16_t type, uint16_t dclass, uint32_t flags);
245
247void rrset_markdel(void* key);
248
249#endif /* SERVICES_CACHE_RRSET_H */
const char * key
uint32_t hashvalue_type
Definition lruhash.h:119
uint64_t rrset_id_type
void rrset_array_unlock(struct rrset_ref *ref, size_t count)
struct ub_packed_rrset_key * rrset_cache_lookup(struct rrset_cache *r, uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint32_t flags, time_t timenow, int wr)
int rrset_array_lock(struct rrset_ref *ref, size_t count, time_t timenow)
void rrset_markdel(void *key)
int rrset_cache_update(struct rrset_cache *r, struct rrset_ref *ref, struct alloc_cache *alloc, time_t timenow)
void rrset_array_unlock_touch(struct rrset_cache *r, struct regional *scratch, struct rrset_ref *ref, size_t count)
void rrset_cache_delete(struct rrset_cache *r)
void rrset_cache_update_wildcard(struct rrset_cache *rrset_cache, struct ub_packed_rrset_key *rrset, uint8_t *ce, size_t ce_len, struct alloc_cache *alloc, time_t timenow)
void rrset_update_sec_status(struct rrset_cache *r, struct ub_packed_rrset_key *rrset, time_t now)
void rrset_cache_remove(struct rrset_cache *r, uint8_t *nm, size_t nmlen, uint16_t type, uint16_t dclass, uint32_t flags)
void rrset_cache_touch(struct rrset_cache *r, struct ub_packed_rrset_key *key, hashvalue_type hash, rrset_id_type id)
struct rrset_cache * rrset_cache_create(struct config_file *cfg, struct alloc_cache *alloc)
struct rrset_cache * rrset_cache_adjust(struct rrset_cache *r, struct config_file *cfg, struct alloc_cache *alloc)
void rrset_check_sec_status(struct rrset_cache *r, struct ub_packed_rrset_key *rrset, time_t now)
unsigned short uint16_t
Definition stdint.h:125
unsigned int uint32_t
Definition stdint.h:126
unsigned char uint8_t
Definition stdint.h:124
struct slabhash table
Definition rrset.h:58