Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00034 #ifndef SIGNER_ZONEDATA_H
00035 #define SIGNER_ZONEDATA_H
00036
00037 #include "config.h"
00038 #include "adapter/adapter.h"
00039 #include "daemon/worker.h"
00040 #include "scheduler/fifoq.h"
00041 #include "shared/allocator.h"
00042 #include "shared/status.h"
00043 #include "signer/denial.h"
00044 #include "signer/domain.h"
00045 #include "signer/keys.h"
00046 #include "signer/signconf.h"
00047 #include "signer/stats.h"
00048 #include "signer/nsec3params.h"
00049
00050 #include <ldns/ldns.h>
00051 #include <stdio.h>
00052
00053
00058 typedef struct zonedata_struct zonedata_type;
00059 struct zonedata_struct {
00060 allocator_type* allocator;
00061 ldns_rbtree_t* domains;
00062 ldns_rbtree_t* denial_chain;
00063 int initialized;
00064 uint32_t default_ttl;
00065 uint32_t inbound_serial;
00066 uint32_t internal_serial;
00067 uint32_t outbound_serial;
00068 };
00069
00075 void zonedata_init_denial(zonedata_type* zd);
00076
00083 zonedata_type* zonedata_create(allocator_type* allocator);
00084
00092 ods_status zonedata_recover(zonedata_type* zd, FILE* fd);
00093
00101
00102
00103
00104
00114
00115
00116
00117
00118
00126 domain_type* zonedata_lookup_domain(zonedata_type* zd, ldns_rdf* name);
00127
00135 domain_type* zonedata_add_domain(zonedata_type* zd, domain_type* domain);
00136
00144 domain_type* zonedata_del_domain(zonedata_type* zd, domain_type* domain);
00145
00153 denial_type* zonedata_lookup_denial(zonedata_type* zd, ldns_rdf* name);
00154
00164 ods_status zonedata_add_denial(zonedata_type* zd, domain_type* domain,
00165 ldns_rdf* apex, nsec3params_type* nsec3params);
00166
00174 denial_type* zonedata_del_denial(zonedata_type* zd, denial_type* denial);
00175
00184 ods_status zonedata_examine(zonedata_type* zd, ldns_rdf* apex,
00185 adapter_mode mode);
00186
00194 ods_status zonedata_diff(zonedata_type* zd, keylist_type* kl);
00195
00202 ods_status zonedata_commit(zonedata_type* zd);
00203
00209 void zonedata_rollback(zonedata_type* zd);
00210
00218 ods_status zonedata_entize(zonedata_type* zd, ldns_rdf* apex);
00219
00229 ods_status zonedata_nsecify(zonedata_type* zd, ldns_rr_class klass,
00230 uint32_t ttl, uint32_t* num_added);
00231
00242 ods_status zonedata_nsecify3(zonedata_type* zd, ldns_rr_class klass,
00243 uint32_t ttl, nsec3params_type* nsec3params, uint32_t* num_added);
00244
00252 ods_status zonedata_update_serial(zonedata_type* zd, signconf_type* sc);
00253
00262 ods_status zonedata_queue(zonedata_type* zd, fifoq_type* q,
00263 worker_type* worker);
00264
00270 void zonedata_wipe_denial(zonedata_type* zd);
00271
00277 void zonedata_cleanup_chain(zonedata_type* zd);
00278
00284 void zonedata_cleanup(zonedata_type* zd);
00285
00292 void zonedata_backup(FILE* fd, zonedata_type* zd);
00293
00301 ods_status zonedata_print(FILE* fd, zonedata_type* zd);
00302
00310 void log_rdf(ldns_rdf* rdf, const char* pre, int level);
00311
00312 #endif