OpenDNSSEC-signer
1.4.1
Main Page
Data Structures
Files
File List
Globals
signer
src
signer
zone.h
Go to the documentation of this file.
1
/*
2
* $Id: zone.h 6577 2012-08-29 07:41:11Z jerry $
3
*
4
* Copyright (c) 2009 NLNet Labs. All rights reserved.
5
*
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions
8
* are met:
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* 2. Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution.
14
*
15
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
21
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
25
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*
27
*/
28
34
#ifndef SIGNER_ZONE_H
35
#define SIGNER_ZONE_H
36
37
#include "config.h"
38
#include "
adapter/adapter.h
"
39
#include "
scheduler/schedule.h
"
40
#include "
shared/allocator.h
"
41
#include "
shared/locks.h
"
42
#include "
shared/status.h
"
43
#include "
signer/ixfr.h
"
44
#include "
signer/namedb.h
"
45
#include "
signer/signconf.h
"
46
#include "
signer/stats.h
"
47
#include "
wire/buffer.h
"
48
#include "
wire/notify.h
"
49
#include "
wire/xfrd.h
"
50
51
#include <ldns/ldns.h>
52
53
struct
schedule_struct
;
54
55
enum
zone_zl_status_enum
{
56
ZONE_ZL_OK
= 0,
57
ZONE_ZL_ADDED
,
58
ZONE_ZL_UPDATED
,
59
ZONE_ZL_REMOVED
60
};
61
typedef
enum
zone_zl_status_enum
zone_zl_status
;
62
67
typedef
struct
zone_struct
zone_type
;
68
struct
zone_struct
{
69
allocator_type
*
allocator
;
/* memory allocator */
70
ldns_rdf*
apex
;
/* wire format zone name */
71
ldns_rr_class
klass
;
/* class */
72
uint32_t
default_ttl
;
/* ttl */
73
/* from conf.xml */
74
char
*
notify_command
;
/* placeholder for the whole notify command */
75
const
char
*
notify_ns
;
/* master name server reload command */
76
char
**
notify_args
;
/* reload command arguments */
77
/* from zonelist.xml */
78
const
char
*
name
;
/* string format zone name */
79
const
char
*
policy_name
;
/* policy identifier */
80
const
char
*
signconf_filename
;
/* signconf filename */
81
zone_zl_status
zl_status
;
/* zonelist status */
82
/* adapters */
83
adapter_type
*
adinbound
;
/* inbound adapter */
84
adapter_type
*
adoutbound
;
/* outbound adapter */
85
/* from signconf.xml */
86
signconf_type
*
signconf
;
/* signer configuration values */
87
/* zone data */
88
namedb_type
*
db
;
89
ixfr_type
*
ixfr
;
90
/* zone transfers */
91
xfrd_type
*
xfrd
;
92
notify_type
*
notify
;
93
/* worker variables */
94
void
*
task
;
/* next assigned task */
95
/* statistics */
96
stats_type
*
stats
;
97
lock_basic_type
zone_lock
;
98
lock_basic_type
xfr_lock
;
99
};
100
108
zone_type
*
zone_create
(
char
* name, ldns_rr_class klass);
109
120
ods_status
zone_load_signconf
(
zone_type
* zone,
signconf_type
** new_signconf);
121
130
ods_status
zone_reschedule_task
(
zone_type
* zone,
schedule_type
* taskq,
131
task_id
what);
132
139
ods_status
zone_publish_dnskeys
(
zone_type
* zone);
140
146
void
zone_rollback_dnskeys
(
zone_type
* zone);
147
154
ods_status
zone_publish_nsec3param
(
zone_type
* zone);
155
161
void
zone_rollback_nsec3param
(
zone_type
* zone);
162
169
ods_status
zone_update_serial
(
zone_type
* zone);
170
179
rrset_type
*
zone_lookup_rrset
(
zone_type
* zone, ldns_rdf* owner,
180
ldns_rr_type type);
181
193
ods_status
zone_add_rr
(
zone_type
* zone, ldns_rr* rr,
int
do_stats);
194
206
ods_status
zone_del_rr
(
zone_type
* zone, ldns_rr* rr,
int
do_stats);
207
218
void
zone_merge
(
zone_type
* z1,
zone_type
* z2);
219
225
void
zone_cleanup
(
zone_type
* zone);
226
233
ods_status
zone_backup2
(
zone_type
* zone);
234
240
ods_status
zone_recover2
(
zone_type
* zone);
241
242
#endif
/* SIGNER_ZONE_H */
Generated on Wed Jul 17 2013 07:14:23 for OpenDNSSEC-signer by
1.8.4