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;
};
dnsin_type* dnsin_create(void);
dnsout_type* dnsout_create(void);
ods_status dnsin_update(dnsin_type** addns, const char* filename,
time_t* last_mod);
ods_status dnsout_update(dnsout_type** addns, const char* filename,
time_t* last_mod);
ldns_rr* addns_read_rr(FILE* fd, char* line, ldns_rdf** orig, ldns_rdf** prev,
uint32_t* ttl, ldns_status* status, unsigned int* l);
ods_status addns_read(void* zone);
ods_status addns_write(void* zone);
void dnsin_cleanup(dnsin_type* addns);
void dnsout_cleanup(dnsout_type* addns);
#endif /* ADAPTER_ADDNS_H */
dnsout_cleanup
void dnsout_cleanup(dnsout_type *addns)
Definition: addns.c:910
dnsin_struct
Definition: addns.h:49
tsig_struct
Definition: tsig.h:110
dnsout_update
ods_status dnsout_update(dnsout_type **addns, const char *filename, time_t *last_mod)
Definition: addns.c:627
tsig.h
dnsout_create
dnsout_type * dnsout_create(void)
Definition: addns.c:518
dnsin_struct::last_modified
time_t last_modified
Definition: addns.h:53
acl.h
dnsout_struct::provide_xfr
acl_type * provide_xfr
Definition: addns.h:62
addns_write
ods_status addns_write(void *zone)
Definition: addns.c:768
dnsout_struct::tsig
tsig_type * tsig
Definition: addns.h:64
dnsin_struct::allow_notify
acl_type * allow_notify
Definition: addns.h:51
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
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
dnsout_struct::last_modified
time_t last_modified
Definition: addns.h:65
dnsin_create
dnsin_type * dnsin_create(void)
Definition: addns.c:502
dnsin_update
ods_status dnsin_update(dnsin_type **addns, const char *filename, time_t *last_mod)
Definition: addns.c:568
addns_read
ods_status addns_read(void *zone)
Definition: addns.c:685
dnsin_cleanup
void dnsin_cleanup(dnsin_type *addns)
Definition: addns.c:893
acl_struct
Definition: acl.h:58