Electroneum
Toggle main menu visibility
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
44
#include "
util/storage/lruhash.h
"
45
#include "
util/storage/slabhash.h
"
46
#include "
util/data/packed_rrset.h
"
47
struct
config_file
;
48
struct
alloc_cache
;
49
struct
rrset_ref
;
50
struct
regional
;
51
56
struct
rrset_cache
{
58
struct
slabhash
table
;
59
};
60
67
struct
rrset_cache
*
rrset_cache_create
(
struct
config_file
* cfg,
68
struct
alloc_cache
* alloc);
69
74
void
rrset_cache_delete
(
struct
rrset_cache
* r);
75
85
struct
rrset_cache
*
rrset_cache_adjust
(
struct
rrset_cache
* r,
86
struct
config_file
* cfg,
struct
alloc_cache
* alloc);
87
104
void
rrset_cache_touch
(
struct
rrset_cache
* r,
struct
ub_packed_rrset_key
*
key
,
105
hashvalue_type
hash,
rrset_id_type
id
);
106
133
int
rrset_cache_update
(
struct
rrset_cache
* r,
struct
rrset_ref
* ref,
134
struct
alloc_cache
* alloc, time_t timenow);
135
150
void
rrset_cache_update_wildcard
(
struct
rrset_cache
*
rrset_cache
,
151
struct
ub_packed_rrset_key
* rrset,
uint8_t
* ce,
size_t
ce_len,
152
struct
alloc_cache
* alloc, time_t timenow);
153
168
struct
ub_packed_rrset_key
*
rrset_cache_lookup
(
struct
rrset_cache
* r,
169
uint8_t
* qname,
size_t
qnamelen,
uint16_t
qtype,
uint16_t
qclass,
170
uint32_t
flags, time_t timenow,
int
wr);
171
184
int
rrset_array_lock
(
struct
rrset_ref
* ref,
size_t
count, time_t timenow);
185
192
void
rrset_array_unlock
(
struct
rrset_ref
* ref,
size_t
count);
193
206
void
rrset_array_unlock_touch
(
struct
rrset_cache
* r,
struct
regional
* scratch,
207
struct
rrset_ref
* ref,
size_t
count);
208
219
void
rrset_update_sec_status
(
struct
rrset_cache
* r,
220
struct
ub_packed_rrset_key
* rrset, time_t now);
221
231
void
rrset_check_sec_status
(
struct
rrset_cache
* r,
232
struct
ub_packed_rrset_key
* rrset, time_t now);
233
243
void
rrset_cache_remove
(
struct
rrset_cache
* r,
uint8_t
* nm,
size_t
nmlen,
244
uint16_t
type,
uint16_t
dclass,
uint32_t
flags);
245
247
void
rrset_markdel
(
void
*
key
);
248
249
#endif
/* SERVICES_CACHE_RRSET_H */
key
const char * key
Definition
hmac_keccak.cpp:39
lruhash.h
hashvalue_type
uint32_t hashvalue_type
Definition
lruhash.h:119
packed_rrset.h
rrset_id_type
uint64_t rrset_id_type
Definition
packed_rrset.h:50
rrset_array_unlock
void rrset_array_unlock(struct rrset_ref *ref, size_t count)
rrset_cache_lookup
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)
rrset_array_lock
int rrset_array_lock(struct rrset_ref *ref, size_t count, time_t timenow)
rrset_markdel
void rrset_markdel(void *key)
rrset_cache_update
int rrset_cache_update(struct rrset_cache *r, struct rrset_ref *ref, struct alloc_cache *alloc, time_t timenow)
rrset_array_unlock_touch
void rrset_array_unlock_touch(struct rrset_cache *r, struct regional *scratch, struct rrset_ref *ref, size_t count)
rrset_cache_delete
void rrset_cache_delete(struct rrset_cache *r)
rrset_cache_update_wildcard
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)
rrset_update_sec_status
void rrset_update_sec_status(struct rrset_cache *r, struct ub_packed_rrset_key *rrset, time_t now)
rrset_cache_remove
void rrset_cache_remove(struct rrset_cache *r, uint8_t *nm, size_t nmlen, uint16_t type, uint16_t dclass, uint32_t flags)
rrset_cache_touch
void rrset_cache_touch(struct rrset_cache *r, struct ub_packed_rrset_key *key, hashvalue_type hash, rrset_id_type id)
rrset_cache_create
struct rrset_cache * rrset_cache_create(struct config_file *cfg, struct alloc_cache *alloc)
rrset_cache_adjust
struct rrset_cache * rrset_cache_adjust(struct rrset_cache *r, struct config_file *cfg, struct alloc_cache *alloc)
rrset_check_sec_status
void rrset_check_sec_status(struct rrset_cache *r, struct ub_packed_rrset_key *rrset, time_t now)
slabhash.h
uint16_t
unsigned short uint16_t
Definition
stdint.h:125
uint32_t
unsigned int uint32_t
Definition
stdint.h:126
uint8_t
unsigned char uint8_t
Definition
stdint.h:124
alloc_cache
Definition
alloc.h:72
config_file
Definition
config_file.h:68
regional
Definition
regional.h:60
rrset_cache
Definition
rrset.h:56
rrset_cache::table
struct slabhash table
Definition
rrset.h:58
rrset_ref
Definition
msgreply.h:104
slabhash
Definition
slabhash.h:57
ub_packed_rrset_key
Definition
packed_rrset.h:107
external
unbound
services
cache
rrset.h
Generated on
for Electroneum by
1.17.0