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