• Main Page
  • Data Structures
  • Files
  • File List
  • Globals

/srv/bpo/opendnssec/opendnssec-1.3.2/signer/src/signer/rrset.h

Go to the documentation of this file.
00001 /*
00002  * $Id: rrset.h 5408 2011-08-16 08:15:16Z matthijs $
00003  *
00004  * Copyright (c) 2009 NLNet Labs. All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions
00008  * are met:
00009  * 1. Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  * 2. Redistributions in binary form must reproduce the above copyright
00012  *    notice, this list of conditions and the following disclaimer in the
00013  *    documentation and/or other materials provided with the distribution.
00014  *
00015  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00016  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00017  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
00019  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00020  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
00021  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
00023  * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00024  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
00025  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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 /* SIGNER_RRSET_H */

Generated on Mon Oct 31 2011 14:38:45 for OpenDNSSEC-signer by  doxygen 1.7.1