OpenDNSSEC-signer  1.3.15
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 
61  ldns_rbtree_t* domains;
62  ldns_rbtree_t* denial_chain;
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 
78 
86 
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 
138 
147 
155 denial_type* zonedata_lookup_denial(zonedata_type* zd, ldns_rdf* name);
156 
167  ldns_rdf* apex, nsec3params_type* nsec3params);
168 
177 
186 ods_status zonedata_examine(zonedata_type* zd, ldns_rdf* apex,
187  adapter_mode mode);
188 
197 
205 
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 
256  const char* zone_name);
257 
267  worker_type* worker);
268 
275 
282 
289 
296 void zonedata_backup(FILE* fd, zonedata_type* zd);
297 
306 
314 void log_rdf(ldns_rdf* rdf, const char* pre, int level);
315 
316 #endif /* SIGNER_ZONEDATA_H */