OpenDNSSEC-signer
1.3.9
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 4574 2011-03-16 09:21:02Z 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
uint32_t
default_ttl
;
/* fallback ttl */
65
uint32_t
inbound_serial
;
/* last seen inbound soa serial */
66
uint32_t
internal_serial
;
/* latest internal soa serial */
67
uint32_t
outbound_serial
;
/* last written outbound soa serial */
68
};
69
75
void
zonedata_init_denial
(
zonedata_type
* zd);
76
83
zonedata_type
*
zonedata_create
(
allocator_type
* allocator);
84
92
ods_status
zonedata_recover
(
zonedata_type
* zd, FILE* fd);
93
101
/*
102
int zonedata_recover_rr_from_backup(zonedata_type* zd, ldns_rr* rr);
103
*/
104
114
/*
115
int zonedata_recover_rrsig_from_backup(zonedata_type* zd, ldns_rr* rrsig,
116
const char* locator, uint32_t flags);
117
*/
118
126
domain_type
*
zonedata_lookup_domain
(
zonedata_type
* zd, ldns_rdf* name);
127
135
domain_type
*
zonedata_add_domain
(
zonedata_type
* zd,
domain_type
* domain);
136
144
domain_type
*
zonedata_del_domain
(
zonedata_type
* zd,
domain_type
* domain);
145
153
denial_type
*
zonedata_lookup_denial
(
zonedata_type
* zd, ldns_rdf* name);
154
164
ods_status
zonedata_add_denial
(
zonedata_type
* zd,
domain_type
* domain,
165
ldns_rdf* apex,
nsec3params_type
* nsec3params);
166
174
denial_type
*
zonedata_del_denial
(
zonedata_type
* zd,
denial_type
* denial);
175
184
ods_status
zonedata_examine
(
zonedata_type
* zd, ldns_rdf* apex,
185
adapter_mode
mode);
186
194
ods_status
zonedata_diff
(
zonedata_type
* zd,
keylist_type
* kl);
195
202
ods_status
zonedata_commit
(
zonedata_type
* zd);
203
209
void
zonedata_rollback
(
zonedata_type
* zd);
210
218
ods_status
zonedata_entize
(
zonedata_type
* zd, ldns_rdf* apex);
219
229
ods_status
zonedata_nsecify
(
zonedata_type
* zd, ldns_rr_class klass,
230
uint32_t ttl, uint32_t* num_added);
231
242
ods_status
zonedata_nsecify3
(
zonedata_type
* zd, ldns_rr_class klass,
243
uint32_t ttl,
nsec3params_type
* nsec3params, uint32_t* num_added);
244
252
ods_status
zonedata_update_serial
(
zonedata_type
* zd,
signconf_type
* sc);
253
262
ods_status
zonedata_queue
(
zonedata_type
* zd,
fifoq_type
* q,
263
worker_type
* worker);
264
270
void
zonedata_wipe_denial
(
zonedata_type
* zd);
271
277
void
zonedata_cleanup_chain
(
zonedata_type
* zd);
278
284
void
zonedata_cleanup
(
zonedata_type
* zd);
285
292
void
zonedata_backup
(FILE* fd,
zonedata_type
* zd);
293
301
ods_status
zonedata_print
(FILE* fd,
zonedata_type
* zd);
302
310
void
log_rdf
(ldns_rdf* rdf,
const
char
* pre,
int
level);
311
312
#endif
/* SIGNER_ZONEDATA_H */
Generated on Mon Oct 15 2012 22:17:14 for OpenDNSSEC-signer by
1.8.1.2