OpenDNSSEC-signer  1.3.14
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 
61  ldns_rbtree_t* domains;
62  ldns_rbtree_t* denial_chain;
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 
76 
84 
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 
136 
145 
153 denial_type* zonedata_lookup_denial(zonedata_type* zd, ldns_rdf* name);
154 
165  ldns_rdf* apex, nsec3params_type* nsec3params);
166 
175 
184 ods_status zonedata_examine(zonedata_type* zd, ldns_rdf* apex,
185  adapter_mode mode);
186 
195 
203 
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 
253 
263  worker_type* worker);
264 
271 
278 
285 
292 void zonedata_backup(FILE* fd, zonedata_type* zd);
293 
302 
310 void log_rdf(ldns_rdf* rdf, const char* pre, int level);
311 
312 #endif /* SIGNER_ZONEDATA_H */