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_RRSET_H
00035 #define SIGNER_RRSET_H
00036
00037 #include "config.h"
00038 #include "daemon/worker.h"
00039 #include "scheduler/fifoq.h"
00040 #include "shared/allocator.h"
00041 #include "shared/hsm.h"
00042 #include "shared/locks.h"
00043 #include "shared/status.h"
00044 #include "signer/keys.h"
00045 #include "signer/rrsigs.h"
00046 #include "signer/signconf.h"
00047 #include "signer/stats.h"
00048
00049 #include <ldns/ldns.h>
00050
00051 #define COUNT_RR 0
00052 #define COUNT_ADD 1
00053 #define COUNT_DEL 2
00054
00055 typedef struct rrset_struct rrset_type;
00056 struct rrset_struct {
00057 allocator_type* allocator;
00058 ldns_rr_type rr_type;
00059 uint32_t rr_count;
00060 uint32_t add_count;
00061 uint32_t del_count;
00062 uint32_t rrsig_count;
00063 int needs_signing;
00064 ldns_dnssec_rrs* rrs;
00065 ldns_dnssec_rrs* add;
00066 ldns_dnssec_rrs* del;
00067 rrsigs_type* rrsigs;
00068 };
00069
00076 rrset_type* rrset_create(ldns_rr_type rrtype);
00077
00087 ods_status rrset_recover(rrset_type* rrset, ldns_rr* rrsig,
00088 const char* locator, uint32_t flags);
00089
00097 size_t rrset_count_rr(rrset_type* rrset, int which);
00098
00105 size_t rrset_count_RR(rrset_type* rrset);
00106
00114 ldns_rr* rrset_add_rr(rrset_type* rrset, ldns_rr* rr);
00115
00124 ldns_rr* rrset_del_rr(rrset_type* rrset, ldns_rr* rr, int dupallowed);
00125
00132 ods_status rrset_wipe_out(rrset_type* rrset);
00133
00141 ods_status rrset_diff(rrset_type* rrset, keylist_type* kl);
00142
00149 ods_status rrset_commit(rrset_type* rrset);
00150
00156 void rrset_rollback(rrset_type* rrset);
00157
00169 ods_status rrset_sign(hsm_ctx_t* ctx, rrset_type* rrset, ldns_rdf* owner,
00170 signconf_type* sc, time_t signtime, stats_type* stats);
00171
00180 ods_status rrset_queue(rrset_type* rrset, fifoq_type* q, worker_type* worker);
00181
00189 int rrset_examine_ns_rdata(rrset_type* rrset, ldns_rdf* nsdname);
00190
00196 void rrset_cleanup(rrset_type* rrset);
00197
00205 void log_rr(ldns_rr* rr, const char* pre, int level);
00206
00214 void rrset_print(FILE* fd, rrset_type* rrset, int skip_rrsigs);
00215
00222 void rrset_backup(FILE* fd, rrset_type* rrset);
00223
00224 #endif