OpenDNSSEC-signer  2.0.4
domain.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 
27 #ifndef SIGNER_DOMAIN_H
28 #define SIGNER_DOMAIN_H
29 
30 #include "config.h"
31 #include <ldns/ldns.h>
32 #include <time.h>
33 
34 
35 typedef struct domain_struct domain_type;
36 
37 #include "status.h"
38 #include "signer/rrset.h"
39 #include "signer/signconf.h"
40 
41 #define SE_NSEC_RDATA_NXT 0
42 #define SE_NSEC_RDATA_BITMAP 1
43 #define SE_NSEC3_RDATA_NSEC3PARAMS 4
44 #define SE_NSEC3_RDATA_NXT 4
45 #define SE_NSEC3_RDATA_BITMAP 5
46 
51 struct domain_struct {
54  ldns_rbnode_t* node;
55  ldns_rdf* dname;
58  unsigned is_new : 1;
59  unsigned is_apex : 1; /* apex */
60 };
61 
69 void log_dname(ldns_rdf* rdf, const char* pre, int level);
70 
79 
87 
95 rrset_type* domain_lookup_rrset(domain_type* domain, ldns_rr_type rrtype);
96 
103 void domain_add_rrset(domain_type* domain, rrset_type* rrset);
104 
112 void domain_diff(domain_type* domain, unsigned is_ixfr, unsigned more_coming);
113 
120 void domain_rollback(domain_type* domain, int keepsc);
121 
129 
139 ldns_rr_type domain_is_delegpt(domain_type* domain);
140 
150 ldns_rr_type domain_is_occluded(domain_type* domain);
151 
159 void domain_print(FILE* fd, domain_type* domain, ods_status* status);
160 
166 void domain_cleanup(domain_type* domain);
167 
175 void domain_backup2(FILE* fd, domain_type* domain, int sigs);
176 
177 #endif /* SIGNER_DOMAIN_H */
ldns_rr_type domain_is_delegpt(domain_type *domain)
Definition: domain.c:348
void log_dname(ldns_rdf *rdf, const char *pre, int level)
Definition: domain.c:48
void domain_rollback(domain_type *domain, int keepsc)
Definition: domain.c:241
denial_type * denial
Definition: domain.h:52
void domain_cleanup(domain_type *domain)
Definition: domain.c:469
domain_type * parent
Definition: domain.h:56
void domain_add_rrset(domain_type *domain, rrset_type *rrset)
Definition: domain.c:160
rrset_type * domain_lookup_rrset(domain_type *domain, ldns_rr_type rrtype)
Definition: domain.c:141
unsigned is_apex
Definition: domain.h:59
void domain_print(FILE *fd, domain_type *domain, ods_status *status)
Definition: domain.c:402
unsigned is_new
Definition: domain.h:58
zone_type * zone
Definition: domain.h:53
void domain_backup2(FILE *fd, domain_type *domain, int sigs)
Definition: domain.c:485
void domain_diff(domain_type *domain, unsigned is_ixfr, unsigned more_coming)
Definition: domain.c:190
ldns_rr_type domain_is_occluded(domain_type *domain)
Definition: domain.c:373
size_t domain_count_rrset_is_added(domain_type *domain)
Definition: domain.c:118
ldns_rbnode_t * node
Definition: domain.h:54
rrset_type * rrsets
Definition: domain.h:57
int domain_ent2unsignedns(domain_type *domain)
Definition: domain.c:314
domain_type * domain_create(zone_type *zone, ldns_rdf *dname)
Definition: domain.c:88
ldns_rdf * dname
Definition: domain.h:55