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_DOMAIN_H
00035 #define SIGNER_DOMAIN_H
00036
00037 #include "config.h"
00038 #include "daemon/worker.h"
00039 #include "scheduler/fifoq.h"
00040 #include "shared/allocator.h"
00041 #include "shared/status.h"
00042 #include "signer/denial.h"
00043 #include "signer/keys.h"
00044 #include "signer/rrset.h"
00045
00046 #include <ldns/ldns.h>
00047 #include <time.h>
00048
00049 enum domain_status_enum {
00050 DOMAIN_STATUS_NONE = 0,
00051 DOMAIN_STATUS_APEX,
00052 DOMAIN_STATUS_AUTH,
00053 DOMAIN_STATUS_NS,
00054 DOMAIN_STATUS_DS,
00055 DOMAIN_STATUS_ENT,
00056 DOMAIN_STATUS_OCCLUDED
00057 };
00058 typedef enum domain_status_enum domain_status;
00059
00060 #define SE_NSEC_RDATA_NXT 0
00061 #define SE_NSEC_RDATA_BITMAP 1
00062 #define SE_NSEC3_RDATA_NSEC3PARAMS 4
00063 #define SE_NSEC3_RDATA_NXT 4
00064 #define SE_NSEC3_RDATA_BITMAP 5
00065
00070 typedef struct domain_struct domain_type;
00071 struct domain_struct {
00072
00073 ldns_rdf* dname;
00074 domain_status dstatus;
00075 allocator_type* allocator;
00076
00077
00078 domain_type* parent;
00079
00080
00081 denial_type* denial;
00082
00083
00084 ldns_rbtree_t* rrsets;
00085 };
00086
00093 domain_type* domain_create(ldns_rdf* dname);
00094
00103 ods_status domain_recover(domain_type* domain, FILE* fd,
00104 domain_status dstatus);
00105
00113
00114
00115
00116
00127
00128
00129
00130
00131
00138 size_t domain_count_rrset(domain_type* domain);
00139
00147 rrset_type* domain_lookup_rrset(domain_type* domain, ldns_rr_type rrtype);
00148
00156 rrset_type* domain_add_rrset(domain_type* domain, rrset_type* rrset);
00157
00165 rrset_type* domain_del_rrset(domain_type* domain, rrset_type* rrset);
00166
00174 ods_status domain_diff(domain_type* domain, keylist_type* kl);
00175
00184 int domain_examine_data_exists(domain_type* domain, ldns_rr_type rrtype,
00185 int skip_glue);
00186
00194 int domain_examine_ns_rdata(domain_type* domain, ldns_rdf* nsdname);
00195
00202 int domain_examine_valid_zonecut(domain_type* domain);
00203
00211 int domain_examine_rrset_is_alone(domain_type* domain, ldns_rr_type rrtype);
00212
00220 int domain_examine_rrset_is_singleton(domain_type* domain, ldns_rr_type rrtype);
00221
00228 ods_status domain_commit(domain_type* domain);
00229
00235 void domain_rollback(domain_type* domain);
00236
00242 void domain_dstatus(domain_type* domain);
00243
00252 ods_status domain_queue(domain_type* domain, fifoq_type* q,
00253 worker_type* worker);
00254
00260 void domain_cleanup(domain_type* domain);
00261
00268 void domain_print(FILE* fd, domain_type* domain);
00269
00276 void domain_backup(FILE* fd, domain_type* domain);
00277
00278 #endif