domain.h
Go to the documentation of this file.
/*
* Copyright (c) 2009 NLNet Labs. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef SIGNER_DOMAIN_H
#define SIGNER_DOMAIN_H
#include "config.h"
#include <ldns/ldns.h>
#include <time.h>
typedef struct domain_struct domain_type;
#include "status.h"
#include "signer/rrset.h"
#include "signer/signconf.h"
#include "signer/zone.h"
#define SE_NSEC_RDATA_NXT 0
#define SE_NSEC_RDATA_BITMAP 1
#define SE_NSEC3_RDATA_NSEC3PARAMS 4
#define SE_NSEC3_RDATA_NXT 4
#define SE_NSEC3_RDATA_BITMAP 5
struct domain_struct {
denial_type* denial;
zone_type* zone;
ldns_rbnode_t* node;
ldns_rdf* dname;
domain_type* parent;
rrset_type* rrsets;
unsigned is_new : 1;
unsigned is_apex : 1; /* apex */
};
void log_dname(ldns_rdf* rdf, const char* pre, int level);
domain_type* domain_create(zone_type* zone, ldns_rdf* dname);
size_t domain_count_rrset_is_added(domain_type* domain);
rrset_type* domain_lookup_rrset(domain_type* domain, ldns_rr_type rrtype);
void domain_add_rrset(domain_type* domain, rrset_type* rrset);
void domain_diff(domain_type* domain, unsigned is_ixfr, unsigned more_coming);
void domain_rollback(domain_type* domain, int keepsc);
int domain_ent2unsignedns(domain_type* domain);
ldns_rr_type domain_is_delegpt(domain_type* domain);
ldns_rr_type domain_is_occluded(domain_type* domain);
void domain_print(FILE* fd, domain_type* domain, ods_status* status);
void domain_cleanup(domain_type* domain);
void domain_backup2(FILE* fd, domain_type* domain, int sigs);
#endif /* SIGNER_DOMAIN_H */
denial_type
struct denial_struct denial_type
Definition denial.h:39
domain_create
domain_type * domain_create(zone_type *zone, ldns_rdf *dname)
Definition domain.c:88
domain_is_delegpt
ldns_rr_type domain_is_delegpt(domain_type *domain)
Definition domain.c:344
domain_type
struct domain_struct domain_type
Definition domain.h:35
domain_count_rrset_is_added
size_t domain_count_rrset_is_added(domain_type *domain)
Definition domain.c:118
domain_ent2unsignedns
int domain_ent2unsignedns(domain_type *domain)
Definition domain.c:310
domain_diff
void domain_diff(domain_type *domain, unsigned is_ixfr, unsigned more_coming)
Definition domain.c:190
domain_backup2
void domain_backup2(FILE *fd, domain_type *domain, int sigs)
Definition domain.c:481
domain_cleanup
void domain_cleanup(domain_type *domain)
Definition domain.c:465
domain_is_occluded
ldns_rr_type domain_is_occluded(domain_type *domain)
Definition domain.c:369
log_dname
void log_dname(ldns_rdf *rdf, const char *pre, int level)
Definition domain.c:48
domain_lookup_rrset
rrset_type * domain_lookup_rrset(domain_type *domain, ldns_rr_type rrtype)
Definition domain.c:141
domain_print
void domain_print(FILE *fd, domain_type *domain, ods_status *status)
Definition domain.c:398
domain_add_rrset
void domain_add_rrset(domain_type *domain, rrset_type *rrset)
Definition domain.c:160
domain_rollback
void domain_rollback(domain_type *domain, int keepsc)
Definition domain.c:241
rrset.h
rrset_type
struct rrset_struct rrset_type
Definition rrset.h:35
signconf.h
domain_struct
Definition domain.h:52
domain_struct::dname
ldns_rdf * dname
Definition domain.h:56
domain_struct::is_new
unsigned is_new
Definition domain.h:59
domain_struct::zone
zone_type * zone
Definition domain.h:54
domain_struct::rrsets
rrset_type * rrsets
Definition domain.h:58
domain_struct::denial
denial_type * denial
Definition domain.h:53
domain_struct::node
ldns_rbnode_t * node
Definition domain.h:55
domain_struct::is_apex
unsigned is_apex
Definition domain.h:60
domain_struct::parent
domain_type * parent
Definition domain.h:57
zone.h
zone_type
struct zone_struct zone_type
Definition zone.h:41