OpenDNSSEC-signer  2.0.2
addns.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 ADAPTER_ADDNS_H
33 #define ADAPTER_ADDNS_H
34 
35 #include "config.h"
36 #include "status.h"
37 #include "wire/acl.h"
38 #include "wire/tsig.h"
39 
40 #include <ldns/ldns.h>
41 #include <stdio.h>
42 #include <time.h>
43 
48 typedef struct dnsin_struct dnsin_type;
49 struct dnsin_struct {
53  time_t last_modified;
54 };
55 
60 typedef struct dnsout_struct dnsout_type;
61 struct dnsout_struct {
65  time_t last_modified;
66 };
67 
74 
81 
90 ods_status dnsin_update(dnsin_type** addns, const char* filename,
91  time_t* last_mod);
92 
101 ods_status dnsout_update(dnsout_type** addns, const char* filename,
102  time_t* last_mod);
103 
116 ldns_rr* addns_read_rr(FILE* fd, char* line, ldns_rdf** orig, ldns_rdf** prev,
117  uint32_t* ttl, ldns_status* status, unsigned int* l);
118 
119 
126 ods_status addns_read(void* zone);
127 
134 ods_status addns_write(void* zone);
135 
141 void dnsin_cleanup(dnsin_type* addns);
142 
148 void dnsout_cleanup(dnsout_type* addns);
149 
150 #endif /* ADAPTER_ADDNS_H */
void dnsout_cleanup(dnsout_type *addns)
Definition: addns.c:910
ods_status dnsout_update(dnsout_type **addns, const char *filename, time_t *last_mod)
Definition: addns.c:627
dnsout_type * dnsout_create(void)
Definition: addns.c:518
time_t last_modified
Definition: addns.h:53
acl_type * provide_xfr
Definition: addns.h:62
ods_status addns_write(void *zone)
Definition: addns.c:768
tsig_type * tsig
Definition: addns.h:64
acl_type * allow_notify
Definition: addns.h:51
tsig_type * tsig
Definition: addns.h:52
acl_type * request_xfr
Definition: addns.h:50
acl_type * do_notify
Definition: addns.h:63
ldns_rr * addns_read_rr(FILE *fd, char *line, ldns_rdf **orig, ldns_rdf **prev, uint32_t *ttl, ldns_status *status, unsigned int *l)
Definition: addns.c:62
time_t last_modified
Definition: addns.h:65
dnsin_type * dnsin_create(void)
Definition: addns.c:502
ods_status dnsin_update(dnsin_type **addns, const char *filename, time_t *last_mod)
Definition: addns.c:568
ods_status addns_read(void *zone)
Definition: addns.c:685
void dnsin_cleanup(dnsin_type *addns)
Definition: addns.c:893
Definition: acl.h:58