OpenDNSSEC-signer
1.3.15
Main Page
Data Structures
Files
File List
Globals
signer
src
signer
zonedata.h
Go to the documentation of this file.
1
/*
2
* $Id: zonedata.h 7161 2013-06-18 09:59:05Z matthijs $
3
*
4
* Copyright (c) 2009 NLNet Labs. All rights reserved.
5
*
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions
8
* are met:
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* 2. Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution.
14
*
15
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
21
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
25
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*
27
*/
28
34
#ifndef SIGNER_ZONEDATA_H
35
#define SIGNER_ZONEDATA_H
36
37
#include "config.h"
38
#include "
adapter/adapter.h
"
39
#include "
daemon/worker.h
"
40
#include "
scheduler/fifoq.h
"
41
#include "
shared/allocator.h
"
42
#include "
shared/status.h
"
43
#include "
signer/denial.h
"
44
#include "
signer/domain.h
"
45
#include "
signer/keys.h
"
46
#include "
signer/signconf.h
"
47
#include "
signer/stats.h
"
48
#include "
signer/nsec3params.h
"
49
50
#include <ldns/ldns.h>
51
#include <stdio.h>
52
53
58
typedef
struct
zonedata_struct
zonedata_type
;
59
struct
zonedata_struct
{
60
allocator_type
*
allocator
;
61
ldns_rbtree_t*
domains
;
62
ldns_rbtree_t*
denial_chain
;
63
int
initialized
;
64
int
force_serial
;
65
uint32_t
default_ttl
;
/* fallback ttl */
66
uint32_t
inbound_serial
;
/* last seen inbound soa serial */
67
uint32_t
internal_serial
;
/* latest internal soa serial */
68
uint32_t
outbound_serial
;
/* last written outbound soa serial */
69
uint32_t
enforced_serial
;
/* enforce this serial */
70
};
71
77
void
zonedata_init_denial
(
zonedata_type
* zd);
78
85
zonedata_type
*
zonedata_create
(
allocator_type
* allocator);
86
94
ods_status
zonedata_recover
(
zonedata_type
* zd, FILE* fd);
95
103
/*
104
int zonedata_recover_rr_from_backup(zonedata_type* zd, ldns_rr* rr);
105
*/
106
116
/*
117
int zonedata_recover_rrsig_from_backup(zonedata_type* zd, ldns_rr* rrsig,
118
const char* locator, uint32_t flags);
119
*/
120
128
domain_type
*
zonedata_lookup_domain
(
zonedata_type
* zd, ldns_rdf* name);
129
137
domain_type
*
zonedata_add_domain
(
zonedata_type
* zd,
domain_type
* domain);
138
146
domain_type
*
zonedata_del_domain
(
zonedata_type
* zd,
domain_type
* domain);
147
155
denial_type
*
zonedata_lookup_denial
(
zonedata_type
* zd, ldns_rdf* name);
156
166
ods_status
zonedata_add_denial
(
zonedata_type
* zd,
domain_type
* domain,
167
ldns_rdf* apex,
nsec3params_type
* nsec3params);
168
176
denial_type
*
zonedata_del_denial
(
zonedata_type
* zd,
denial_type
* denial);
177
186
ods_status
zonedata_examine
(
zonedata_type
* zd, ldns_rdf* apex,
187
adapter_mode
mode);
188
196
ods_status
zonedata_diff
(
zonedata_type
* zd,
keylist_type
* kl);
197
204
ods_status
zonedata_commit
(
zonedata_type
* zd);
205
211
void
zonedata_rollback
(
zonedata_type
* zd);
212
220
ods_status
zonedata_entize
(
zonedata_type
* zd, ldns_rdf* apex);
221
231
ods_status
zonedata_nsecify
(
zonedata_type
* zd, ldns_rr_class klass,
232
uint32_t ttl, uint32_t* num_added);
233
244
ods_status
zonedata_nsecify3
(
zonedata_type
* zd, ldns_rr_class klass,
245
uint32_t ttl,
nsec3params_type
* nsec3params, uint32_t* num_added);
246
255
ods_status
zonedata_update_serial
(
zonedata_type
* zd,
signconf_type
* sc,
256
const
char
* zone_name);
257
266
ods_status
zonedata_queue
(
zonedata_type
* zd,
fifoq_type
* q,
267
worker_type
* worker);
268
274
void
zonedata_wipe_denial
(
zonedata_type
* zd);
275
281
void
zonedata_cleanup_chain
(
zonedata_type
* zd);
282
288
void
zonedata_cleanup
(
zonedata_type
* zd);
289
296
void
zonedata_backup
(FILE* fd,
zonedata_type
* zd);
297
305
ods_status
zonedata_print
(FILE* fd,
zonedata_type
* zd);
306
314
void
log_rdf
(ldns_rdf* rdf,
const
char
* pre,
int
level);
315
316
#endif
/* SIGNER_ZONEDATA_H */
Generated on Fri Sep 27 2013 06:39:28 for OpenDNSSEC-signer by
1.8.4