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