addns.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 ADAPTER_ADDNS_H
#define ADAPTER_ADDNS_H
#include "config.h"
#include "status.h"
#include "wire/acl.h"
#include "wire/tsig.h"
#include <ldns/ldns.h>
#include <stdio.h>
#include <time.h>
typedef struct dnsin_struct dnsin_type;
struct dnsin_struct {
acl_type* request_xfr;
acl_type* allow_notify;
tsig_type* tsig;
time_t last_modified;
};
typedef struct dnsout_struct dnsout_type;
struct dnsout_struct {
acl_type* provide_xfr;
acl_type* do_notify;
tsig_type* tsig;
time_t last_modified;
};
extern dnsin_type* dnsin_create(void);
extern dnsout_type* dnsout_create(void);
extern ods_status dnsin_update(dnsin_type** addns, const char* filename,
time_t* last_mod);
extern ods_status dnsout_update(dnsout_type** addns, const char* filename,
time_t* last_mod);
extern ldns_rr* addns_read_rr(FILE* fd, char* line, ldns_rdf** orig, ldns_rdf** prev,
uint32_t* ttl, ldns_status* status, unsigned int* l);
extern ods_status addns_read(void* zone);
extern ods_status addns_write(void* zone);
extern void dnsin_cleanup(dnsin_type* addns);
extern void dnsout_cleanup(dnsout_type* addns);
#endif /* ADAPTER_ADDNS_H */
acl.h
acl_type
struct acl_struct acl_type
Definition acl.h:57
dnsout_cleanup
void dnsout_cleanup(dnsout_type *addns)
Definition addns.c:910
addns_read
ods_status addns_read(void *zone)
Definition addns.c:685
dnsout_update
ods_status dnsout_update(dnsout_type **addns, const char *filename, time_t *last_mod)
Definition addns.c:627
dnsin_cleanup
void dnsin_cleanup(dnsin_type *addns)
Definition addns.c:893
dnsout_create
dnsout_type * dnsout_create(void)
Definition addns.c:518
dnsin_type
struct dnsin_struct dnsin_type
Definition addns.h:48
addns_write
ods_status addns_write(void *zone)
Definition addns.c:768
dnsin_update
ods_status dnsin_update(dnsin_type **addns, const char *filename, time_t *last_mod)
Definition addns.c:568
dnsin_create
dnsin_type * dnsin_create(void)
Definition addns.c:502
dnsout_type
struct dnsout_struct dnsout_type
Definition addns.h:60
addns_read_rr
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
dnsin_struct
Definition addns.h:49
dnsin_struct::allow_notify
acl_type * allow_notify
Definition addns.h:51
dnsin_struct::last_modified
time_t last_modified
Definition addns.h:53
dnsin_struct::tsig
tsig_type * tsig
Definition addns.h:52
dnsin_struct::request_xfr
acl_type * request_xfr
Definition addns.h:50
dnsout_struct
Definition addns.h:61
dnsout_struct::do_notify
acl_type * do_notify
Definition addns.h:63
dnsout_struct::last_modified
time_t last_modified
Definition addns.h:65
dnsout_struct::provide_xfr
acl_type * provide_xfr
Definition addns.h:62
dnsout_struct::tsig
tsig_type * tsig
Definition addns.h:64
tsig.h
tsig_type
struct tsig_struct tsig_type
Definition tsig.h:109