OpenDNSSEC-signer  2.1.7
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 #include "signer/zone.h"
41 
42 #define SE_NSEC_RDATA_NXT 0
43 #define SE_NSEC_RDATA_BITMAP 1
44 #define SE_NSEC3_RDATA_NSEC3PARAMS 4
45 #define SE_NSEC3_RDATA_NXT 4
46 #define SE_NSEC3_RDATA_BITMAP 5
47 
52 struct domain_struct {
55  ldns_rbnode_t* node;
56  ldns_rdf* dname;
59  unsigned is_new : 1;
60  unsigned is_apex : 1; /* apex */
61 };
62 
70 void log_dname(ldns_rdf* rdf, const char* pre, int level);
71 
79 domain_type* domain_create(zone_type* zone, ldns_rdf* dname);
80 
88 
96 rrset_type* domain_lookup_rrset(domain_type* domain, ldns_rr_type rrtype);
97 
104 void domain_add_rrset(domain_type* domain, rrset_type* rrset);
105 
113 void domain_diff(domain_type* domain, unsigned is_ixfr, unsigned more_coming);
114 
121 void domain_rollback(domain_type* domain, int keepsc);
122 
130 
140 ldns_rr_type domain_is_delegpt(domain_type* domain);
141 
151 ldns_rr_type domain_is_occluded(domain_type* domain);
152 
160 void domain_print(FILE* fd, domain_type* domain, ods_status* status);
161 
167 void domain_cleanup(domain_type* domain);
168 
176 void domain_backup2(FILE* fd, domain_type* domain, int sigs);
177 
178 #endif /* SIGNER_DOMAIN_H */
domain_backup2
void domain_backup2(FILE *fd, domain_type *domain, int sigs)
Definition: domain.c:481
log_dname
void log_dname(ldns_rdf *rdf, const char *pre, int level)
Definition: domain.c:48
domain_struct::node
ldns_rbnode_t * node
Definition: domain.h:55
domain_struct::denial
denial_type * denial
Definition: domain.h:53
zone_struct
Definition: zone.h:60
domain_struct::rrsets
rrset_type * rrsets
Definition: domain.h:58
domain_is_occluded
ldns_rr_type domain_is_occluded(domain_type *domain)
Definition: domain.c:369
rrset_struct
Definition: rrset.h:59
zone.h
domain_diff
void domain_diff(domain_type *domain, unsigned is_ixfr, unsigned more_coming)
Definition: domain.c:190
signconf.h
domain_add_rrset
void domain_add_rrset(domain_type *domain, rrset_type *rrset)
Definition: domain.c:160
domain_ent2unsignedns
int domain_ent2unsignedns(domain_type *domain)
Definition: domain.c:310
domain_struct::parent
domain_type * parent
Definition: domain.h:57
rrset.h
domain_lookup_rrset
rrset_type * domain_lookup_rrset(domain_type *domain, ldns_rr_type rrtype)
Definition: domain.c:141
denial_struct
Definition: denial.h:50
domain_print
void domain_print(FILE *fd, domain_type *domain, ods_status *status)
Definition: domain.c:398
domain_cleanup
void domain_cleanup(domain_type *domain)
Definition: domain.c:465
domain_struct::is_new
unsigned is_new
Definition: domain.h:59
domain_struct::zone
zone_type * zone
Definition: domain.h:54
domain_struct
Definition: domain.h:52
domain_struct::is_apex
unsigned is_apex
Definition: domain.h:60
domain_struct::dname
ldns_rdf * dname
Definition: domain.h:56
domain_rollback
void domain_rollback(domain_type *domain, int keepsc)
Definition: domain.c:241
domain_is_delegpt
ldns_rr_type domain_is_delegpt(domain_type *domain)
Definition: domain.c:344
domain_create
domain_type * domain_create(zone_type *zone, ldns_rdf *dname)
Definition: domain.c:88
domain_count_rrset_is_added
size_t domain_count_rrset_is_added(domain_type *domain)
Definition: domain.c:118