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

/build/buildd-opendnssec_1.3.2-1~bpo60+1-amd64-DfhaW2/opendnssec-1.3.2/signer/src/signer/zone.h

Go to the documentation of this file.
00001 /*
00002  * $Id: zone.h 5432 2011-08-22 12:55:04Z 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_ZONE_H
00035 #define SIGNER_ZONE_H
00036 
00037 #include "config.h"
00038 #include "adapter/adapter.h"
00039 #include "scheduler/task.h"
00040 #include "shared/allocator.h"
00041 #include "shared/locks.h"
00042 #include "shared/status.h"
00043 #include "signer/nsec3params.h"
00044 #include "signer/signconf.h"
00045 #include "signer/stats.h"
00046 #include "signer/zonedata.h"
00047 
00048 #include <ldns/ldns.h>
00049 
00050 struct schedule_struct;
00051 
00056 typedef struct zone_struct zone_type;
00057 struct zone_struct {
00058     allocator_type* allocator; /* memory allocator */
00059     ldns_rdf* dname; /* wire format zone name */
00060     ldns_rr_class klass; /* class */
00061 
00062     /* from conf.xml */
00063     const char* notify_ns; /* master name server reload command */
00064     int fetch; /* zone fetcher enabled */
00065 
00066     /* from zonelist.xml */
00067     const char* name; /* string format zone name */
00068     const char* policy_name; /* policy identifier */
00069     const char* signconf_filename; /* signconf filename */
00070     int just_added;
00071     int just_updated;
00072     int tobe_removed;
00073     int processed;
00074     int prepared;
00075 
00076     /* adapters */
00077     adapter_type* adinbound; /* inbound adapter */
00078     adapter_type* adoutbound; /* outbound adapter */
00079 
00080     /* from signconf.xml */
00081     signconf_type* signconf; /* signer configuration values */
00082     nsec3params_type* nsec3params; /* NSEC3 parameters */
00083 
00084     /* zone data */
00085     zonedata_type* zonedata;
00086 
00087     /* worker variables */
00088     void* task; /* next assigned task */
00089 
00090     /* statistics */
00091     stats_type* stats;
00092 
00093     lock_basic_type zone_lock;
00094 };
00095 
00103 zone_type* zone_create(char* name, ldns_rr_class klass);
00104 
00116 ods_status zone_add_rr(zone_type* zone, ldns_rr* rr, int do_stats);
00117 
00129 ods_status zone_del_rr(zone_type* zone, ldns_rr* rr, int do_stats);
00130 
00141 ods_status zone_load_signconf(zone_type* zone, task_id* tbs);
00142 
00150 ods_status zone_publish_dnskeys(zone_type* zone, int recover);
00151 
00159 ods_status zone_prepare_nsec3(zone_type* zone, int recover);
00160 
00167 ods_status zone_backup(zone_type* zone);
00168 
00174 ods_status zone_recover(zone_type* zone);
00175 
00186 void zone_merge(zone_type* z1, zone_type* z2);
00187 
00194 ods_status zone_update_serial(zone_type* zone);
00195 
00202 ods_status zone_print(FILE* fd, zone_type* zone);
00203 
00210 ods_status zone_examine(zone_type* zone);
00211 
00217 void zone_cleanup(zone_type* zone);
00218 
00219 #endif /* SIGNER_ZONE_H */

Generated on Sat Dec 17 2011 09:59:39 for OpenDNSSEC-signer by  doxygen 1.7.1