mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 12:30:00 -04:00
145. [cleanup] Added <isc/lang.h> and ISC_LANG_BEGINDECLS/
ISC_LANG_ENDDECLS to header files that had function
prototypes, and removed it from those that did not.
This commit is contained in:
parent
d086365f39
commit
b09983678f
28 changed files with 1990 additions and 1464 deletions
4
CHANGES
4
CHANGES
|
|
@ -1,3 +1,7 @@
|
|||
145. [cleanup] Added <isc/lang.h> and ISC_LANG_BEGINDECLS/
|
||||
ISC_LANG_ENDDECLS to header files that had function
|
||||
prototypes, and removed it from those that did not.
|
||||
|
||||
144. [cleanup] libdns header files too numerous to name were made
|
||||
to conform to the same style for multiple inclusion
|
||||
protection.
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
#ifndef DNS_ACLCONF_H
|
||||
#define DNS_ACLCONF_H 1
|
||||
|
||||
#include <isc/lang.h>
|
||||
|
||||
#include <dns/acl.h>
|
||||
#include <dns/confacl.h>
|
||||
#include <dns/confctx.h>
|
||||
|
|
@ -33,9 +35,11 @@ typedef struct {
|
|||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
void dns_aclconfctx_init(dns_aclconfctx_t *ctx);
|
||||
void
|
||||
dns_aclconfctx_init(dns_aclconfctx_t *ctx);
|
||||
|
||||
void dns_aclconfctx_destroy(dns_aclconfctx_t *ctx);
|
||||
void
|
||||
dns_aclconfctx_destroy(dns_aclconfctx_t *ctx);
|
||||
|
||||
isc_result_t
|
||||
dns_acl_fromconfig(dns_c_ipmatchlist_t *caml,
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include <isc/boolean.h>
|
||||
#include <isc/lang.h>
|
||||
|
||||
#define isc_commandline_parse getopt
|
||||
#define isc_commandline_argument optarg
|
||||
|
|
@ -43,6 +44,8 @@ typedef struct {
|
|||
char *filename;
|
||||
} isc_dir_t;
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
static isc_boolean_t
|
||||
start_directory(const char *path, isc_dir_t *dir) {
|
||||
dir->handle = opendir(path);
|
||||
|
|
@ -80,4 +83,6 @@ end_directory(isc_dir_t *dir) {
|
|||
dir->handle = NULL;
|
||||
}
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_GEN_UNIX_H */
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/* $Id: gen-win32.h,v 1.3 2000/04/29 02:01:07 tale Exp $ */
|
||||
/* $Id: gen-win32.h,v 1.4 2000/05/01 17:59:02 tale Exp $ */
|
||||
|
||||
/*
|
||||
* Principal Authors: Computer Systems Research Group at UC Berkeley
|
||||
|
|
@ -83,6 +83,7 @@
|
|||
#include <isc/assertions.h>
|
||||
#include <isc/boolean.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/lang.h>
|
||||
|
||||
int isc_commandline_index = 1; /* Index into parent argv vector. */
|
||||
int isc_commandline_option; /* Character checked for validity. */
|
||||
|
|
@ -97,6 +98,8 @@ isc_boolean_t isc_commandline_reset = ISC_TRUE; /* Reset processing. */
|
|||
#define BADARG ':'
|
||||
#define ENDOPT ""
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
/*
|
||||
* getopt --
|
||||
* Parse argc/argv argument vector.
|
||||
|
|
@ -284,4 +287,6 @@ end_directory(isc_dir_t *dir) {
|
|||
FindClose(dir->handle);
|
||||
}
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_GEN_WIN32_H */
|
||||
|
|
|
|||
|
|
@ -30,9 +30,11 @@
|
|||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/netaddr.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
#include <dns/name.h>
|
||||
#include <isc/netaddr.h>
|
||||
|
||||
/***
|
||||
*** Types
|
||||
|
|
@ -86,41 +88,51 @@ struct dns_aclenv {
|
|||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target);
|
||||
isc_result_t
|
||||
dns_acl_create(isc_mem_t *mctx, int n, dns_acl_t **target);
|
||||
/*
|
||||
* Create a new ACL with room for 'n' elements.
|
||||
* The elements are uninitialized and the length is 0.
|
||||
*/
|
||||
|
||||
isc_result_t dns_acl_appendelement(dns_acl_t *acl, dns_aclelement_t *elt);
|
||||
isc_result_t
|
||||
dns_acl_appendelement(dns_acl_t *acl, dns_aclelement_t *elt);
|
||||
/*
|
||||
* Append an element to an existing ACL.
|
||||
*/
|
||||
|
||||
isc_result_t dns_acl_any(isc_mem_t *mctx, dns_acl_t **target);
|
||||
isc_result_t
|
||||
dns_acl_any(isc_mem_t *mctx, dns_acl_t **target);
|
||||
/*
|
||||
* Create a new ACL that matches everything.
|
||||
*/
|
||||
|
||||
isc_result_t dns_acl_none(isc_mem_t *mctx, dns_acl_t **target);
|
||||
isc_result_t
|
||||
dns_acl_none(isc_mem_t *mctx, dns_acl_t **target);
|
||||
/*
|
||||
* Create a new ACL that matches nothing.
|
||||
*/
|
||||
|
||||
void dns_acl_attach(dns_acl_t *source, dns_acl_t **target);
|
||||
void
|
||||
dns_acl_attach(dns_acl_t *source, dns_acl_t **target);
|
||||
|
||||
void dns_acl_detach(dns_acl_t **aclp);
|
||||
void
|
||||
dns_acl_detach(dns_acl_t **aclp);
|
||||
|
||||
isc_boolean_t
|
||||
dns_aclelement_equal(dns_aclelement_t *ea, dns_aclelement_t *eb);
|
||||
|
||||
isc_boolean_t dns_acl_equal(dns_acl_t *a, dns_acl_t *b);
|
||||
isc_boolean_t
|
||||
dns_acl_equal(dns_acl_t *a, dns_acl_t *b);
|
||||
|
||||
isc_result_t dns_aclenv_init(isc_mem_t *mctx, dns_aclenv_t *env);
|
||||
isc_result_t
|
||||
dns_aclenv_init(isc_mem_t *mctx, dns_aclenv_t *env);
|
||||
|
||||
void dns_aclenv_copy(dns_aclenv_t *t, dns_aclenv_t *s);
|
||||
void
|
||||
dns_aclenv_copy(dns_aclenv_t *t, dns_aclenv_t *s);
|
||||
|
||||
void dns_aclenv_destroy(dns_aclenv_t *env);
|
||||
void
|
||||
dns_aclenv_destroy(dns_aclenv_t *env);
|
||||
|
||||
isc_result_t
|
||||
dns_acl_match(isc_netaddr_t *reqaddr,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
#ifndef DNS_ACLCONF_H
|
||||
#define DNS_ACLCONF_H 1
|
||||
|
||||
#include <isc/lang.h>
|
||||
|
||||
#include <dns/acl.h>
|
||||
#include <dns/confacl.h>
|
||||
#include <dns/confctx.h>
|
||||
|
|
@ -33,9 +35,11 @@ typedef struct {
|
|||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
void dns_aclconfctx_init(dns_aclconfctx_t *ctx);
|
||||
void
|
||||
dns_aclconfctx_init(dns_aclconfctx_t *ctx);
|
||||
|
||||
void dns_aclconfctx_destroy(dns_aclconfctx_t *ctx);
|
||||
void
|
||||
dns_aclconfctx_destroy(dns_aclconfctx_t *ctx);
|
||||
|
||||
isc_result_t
|
||||
dns_acl_fromconfig(dns_c_ipmatchlist_t *caml,
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/list.h>
|
||||
#include <isc/mem.h>
|
||||
|
||||
|
|
@ -108,9 +109,10 @@ struct dns_c_acl_table
|
|||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t dns_c_acltable_new(isc_mem_t *mem,
|
||||
dns_c_acltable_t **newtable);
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_c_acltable_new(isc_mem_t *mem, dns_c_acltable_t **newtable);
|
||||
/*
|
||||
* Creates a new ACL table. Returns pointer to the new table through
|
||||
* NEWTABLE paramater. The memory is allocated from the MEM memory pool.
|
||||
|
|
@ -127,8 +129,8 @@ isc_result_t dns_c_acltable_new(isc_mem_t *mem,
|
|||
*/
|
||||
|
||||
|
||||
isc_result_t dns_c_acltable_delete(dns_c_acltable_t **table);
|
||||
|
||||
isc_result_t
|
||||
dns_c_acltable_delete(dns_c_acltable_t **table);
|
||||
/*
|
||||
* Destroys the table pointed to by *TABLE and all the ACLs in it. The
|
||||
* value of *TABLE can be NULL.
|
||||
|
|
@ -143,10 +145,9 @@ isc_result_t dns_c_acltable_delete(dns_c_acltable_t **table);
|
|||
*/
|
||||
|
||||
|
||||
isc_result_t dns_c_acltable_getacl(dns_c_acltable_t *table,
|
||||
const char *aclname,
|
||||
dns_c_acl_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_acltable_getacl(dns_c_acltable_t *table, const char *aclname,
|
||||
dns_c_acl_t **retval);
|
||||
/*
|
||||
* Looks up an ACL by name in the given table. The result is returned
|
||||
* through the parameter RETVAL. The returned ACL must not be modified.
|
||||
|
|
@ -160,9 +161,8 @@ isc_result_t dns_c_acltable_getacl(dns_c_acltable_t *table,
|
|||
*
|
||||
*/
|
||||
|
||||
isc_result_t dns_c_acltable_removeacl(dns_c_acltable_t *table,
|
||||
const char *aclname);
|
||||
|
||||
isc_result_t
|
||||
dns_c_acltable_removeacl(dns_c_acltable_t *table, const char *aclname);
|
||||
/*
|
||||
* Removes an acl from a table. The acl is looked up by name.
|
||||
*
|
||||
|
|
@ -176,8 +176,8 @@ isc_result_t dns_c_acltable_removeacl(dns_c_acltable_t *table,
|
|||
*
|
||||
*/
|
||||
|
||||
void dns_c_acltable_print(FILE *fp, int indent,
|
||||
dns_c_acltable_t *table);
|
||||
void
|
||||
dns_c_acltable_print(FILE *fp, int indent, dns_c_acltable_t *table);
|
||||
/*
|
||||
* Prints the ACL table and the ACLs in it to the give stdio stream.
|
||||
* indent is the indentation level (number of tabs) printed before
|
||||
|
|
@ -188,11 +188,10 @@ void dns_c_acltable_print(FILE *fp, int indent,
|
|||
* indent be a non-negative number
|
||||
* table be a valid acl table.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
isc_result_t dns_c_acltable_clear(dns_c_acltable_t *table);
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
dns_c_acltable_clear(dns_c_acltable_t *table);
|
||||
/*
|
||||
* Deletes all the acls from the table.
|
||||
*
|
||||
|
|
@ -204,12 +203,9 @@ isc_result_t dns_c_acltable_clear(dns_c_acltable_t *table);
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
isc_result_t dns_c_acl_new(dns_c_acltable_t *table,
|
||||
const char *aclname,
|
||||
isc_boolean_t isspecial,
|
||||
dns_c_acl_t **newacl);
|
||||
isc_result_t
|
||||
dns_c_acl_new(dns_c_acltable_t *table, const char *aclname,
|
||||
isc_boolean_t isspecial, dns_c_acl_t **newacl);
|
||||
/*
|
||||
* Creates a new ACL. The acl is placed in the given table. If isspecial is
|
||||
* true then the acl is not printed by dns_c_acl_print. The new acl is
|
||||
|
|
@ -227,8 +223,8 @@ isc_result_t dns_c_acl_new(dns_c_acltable_t *table,
|
|||
*/
|
||||
|
||||
|
||||
void dns_c_acl_print(FILE *fp, int indent,
|
||||
dns_c_acl_t *acl);
|
||||
void
|
||||
dns_c_acl_print(FILE *fp, int indent, dns_c_acl_t *acl);
|
||||
/*
|
||||
* Prints out the acl to the stdio stream. The outupt is indented by INDENT
|
||||
* tabs.
|
||||
|
|
@ -240,11 +236,9 @@ void dns_c_acl_print(FILE *fp, int indent,
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
isc_result_t dns_c_acl_setipml(dns_c_acl_t *acl,
|
||||
dns_c_ipmatchlist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_acl_setipml(dns_c_acl_t *acl, dns_c_ipmatchlist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
/*
|
||||
* Sets the ipmatch list of the ACL to the IPML. If DEEPCOPY is true, then
|
||||
* a full copy of IPML is made using the MEM memory pool. In which case the
|
||||
|
|
@ -264,10 +258,9 @@ isc_result_t dns_c_acl_setipml(dns_c_acl_t *acl,
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
isc_result_t dns_c_acl_getipmlexpanded(isc_mem_t *mem, dns_c_acl_t *acl,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_acl_getipmlexpanded(isc_mem_t *mem, dns_c_acl_t *acl,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
/*
|
||||
* Retuns a copy through the RETVAL parameter (the caller is responsible
|
||||
* for deleting the returned value) of the given ACLs ipmatch list. Any
|
||||
|
|
@ -287,11 +280,8 @@ isc_result_t dns_c_acl_getipmlexpanded(isc_mem_t *mem, dns_c_acl_t *acl,
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
isc_result_t dns_c_acl_expandacls(dns_c_acltable_t *table,
|
||||
dns_c_ipmatchlist_t *list);
|
||||
|
||||
isc_result_t
|
||||
dns_c_acl_expandacls(dns_c_acltable_t *table, dns_c_ipmatchlist_t *list);
|
||||
/*
|
||||
* Goes through all the entires (direct and indirect) of LIST and
|
||||
* expands all references to ACLs using the definitions in TABLE
|
||||
|
|
@ -304,4 +294,7 @@ isc_result_t dns_c_acl_expandacls(dns_c_acltable_t *table,
|
|||
* ISC_R_SUCCESS -- all is well
|
||||
* ISC_R_FAILURE -- some acl(s) couldn't be resolved.
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFACL_H */
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
|
||||
|
|
@ -66,14 +67,14 @@ struct dns_c_cache
|
|||
/* XXX need this fleshed out */
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t dns_c_cache_new(isc_mem_t *mem, dns_c_cache_t **cfgres);
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_c_cache_new(isc_mem_t *mem, dns_c_cache_t **cfgres);
|
||||
/*
|
||||
* Creates a new cache-config object.
|
||||
*
|
||||
|
|
@ -87,7 +88,8 @@ isc_result_t dns_c_cache_new(isc_mem_t *mem, dns_c_cache_t **cfgres);
|
|||
*
|
||||
*/
|
||||
|
||||
isc_result_t dns_c_cache_delete(dns_c_cache_t **cfgres);
|
||||
isc_result_t
|
||||
dns_c_cache_delete(dns_c_cache_t **cfgres);
|
||||
/*
|
||||
* Deletes the config-cache object and its contents.
|
||||
*
|
||||
|
|
@ -100,5 +102,6 @@ isc_result_t dns_c_cache_delete(dns_c_cache_t **cfgres);
|
|||
*
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFCACHE_H */
|
||||
|
|
|
|||
|
|
@ -61,15 +61,18 @@
|
|||
#include <limits.h>
|
||||
|
||||
#include <isc/int.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/types.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
|
||||
/* Constants used in the defintions of default logging channels and
|
||||
categories */
|
||||
/*
|
||||
* Constants used in the defintions of default logging channels and
|
||||
* categories.
|
||||
*/
|
||||
#define DNS_C_DEFAULT_SYSLOG "default_syslog"
|
||||
#define DNS_C_DEFAULT_DEBUG "default_debug"
|
||||
#define DNS_C_DEFAULT_DEBUG_PATH "named.run"
|
||||
|
|
@ -253,6 +256,8 @@ extern FILE *debug_mem_print_stream; /* NULL means stderr */
|
|||
*** Functions
|
||||
***/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
/* The following dns_c_xxx2string() functions convert the first argument into
|
||||
* a string value and returns that value. If the first argument is not a
|
||||
* legal value, then NULL is returned, unless PRINTABLE is true, in which
|
||||
|
|
@ -263,20 +268,26 @@ extern FILE *debug_mem_print_stream; /* NULL means stderr */
|
|||
* dns_c_ordering2string((dns_c_ordering_t)0xffff,ISC_TRUE) returns the
|
||||
* value "UNKNOWN_ORDERING"
|
||||
*/
|
||||
const char * dns_c_ordering2string(dns_c_ordering_t ordering,
|
||||
isc_boolean_t printable);
|
||||
const char * dns_c_logseverity2string(dns_c_logseverity_t level,
|
||||
isc_boolean_t printable);
|
||||
const char * dns_c_facility2string(int facility,
|
||||
isc_boolean_t printable);
|
||||
const char * dns_c_transformat2string(dns_transfer_format_t tform,
|
||||
isc_boolean_t printable);
|
||||
const char * dns_c_transport2string(dns_c_trans_t transport,
|
||||
isc_boolean_t printable);
|
||||
const char * dns_c_nameseverity2string(dns_severity_t severity,
|
||||
isc_boolean_t printable);
|
||||
const char * dns_c_forward2string(dns_c_forw_t forw,
|
||||
isc_boolean_t printable);
|
||||
const char *
|
||||
dns_c_ordering2string(dns_c_ordering_t ordering, isc_boolean_t printable);
|
||||
|
||||
const char *
|
||||
dns_c_logseverity2string(dns_c_logseverity_t level, isc_boolean_t printable);
|
||||
|
||||
const char *
|
||||
dns_c_facility2string(int facility, isc_boolean_t printable);
|
||||
|
||||
const char *
|
||||
dns_c_transformat2string(dns_transfer_format_t tform, isc_boolean_t printable);
|
||||
|
||||
const char *
|
||||
dns_c_transport2string(dns_c_trans_t transport, isc_boolean_t printable);
|
||||
|
||||
const char *
|
||||
dns_c_nameseverity2string(dns_severity_t severity, isc_boolean_t printable);
|
||||
|
||||
const char *
|
||||
dns_c_forward2string(dns_c_forw_t forw, isc_boolean_t printable);
|
||||
|
||||
/*
|
||||
* The following dns_c_string2xxx() functions will look up the string
|
||||
|
|
@ -284,43 +295,59 @@ const char * dns_c_forward2string(dns_c_forw_t forw,
|
|||
* through the second argument and ISC_R_SUCCESS is returned. If the string
|
||||
* doesn't match a valid value then ISC_R_FAILURE is returned.
|
||||
*/
|
||||
isc_result_t dns_c_string2ordering(char *name,
|
||||
dns_c_ordering_t *ordering);
|
||||
isc_result_t dns_c_string2logseverity(const char *string,
|
||||
dns_c_logseverity_t *result);
|
||||
isc_result_t dns_c_string2facility(const char *string, int *res);
|
||||
isc_result_t
|
||||
dns_c_string2ordering(char *name, dns_c_ordering_t *ordering);
|
||||
|
||||
isc_result_t
|
||||
dns_c_string2logseverity(const char *string, dns_c_logseverity_t *result);
|
||||
|
||||
isc_result_t
|
||||
dns_c_string2facility(const char *string, int *res);
|
||||
|
||||
int dns_c_isanyaddr(isc_sockaddr_t *inaddr);
|
||||
void dns_c_print_ipaddr(FILE *fp, isc_sockaddr_t *addr);
|
||||
isc_boolean_t dns_c_need_quote(const char *string);
|
||||
int
|
||||
dns_c_isanyaddr(isc_sockaddr_t *inaddr);
|
||||
|
||||
void dns_c_printtabs(FILE *fp, int count);
|
||||
void dns_c_printinunits(FILE *fp, isc_uint32_t val);
|
||||
void
|
||||
dns_c_print_ipaddr(FILE *fp, isc_sockaddr_t *addr);
|
||||
|
||||
void dns_c_dataclass_tostream(FILE *fp,
|
||||
dns_rdataclass_t rclass);
|
||||
void dns_c_datatype_tostream(FILE *fp,
|
||||
dns_rdatatype_t rtype);
|
||||
isc_boolean_t
|
||||
dns_c_need_quote(const char *string);
|
||||
|
||||
void
|
||||
dns_c_printtabs(FILE *fp, int count);
|
||||
|
||||
isc_boolean_t dns_c_netaddrisanyaddr(isc_netaddr_t *inaddr);
|
||||
void dns_c_netaddrprint(FILE *fp, isc_netaddr_t *inaddr);
|
||||
isc_result_t dns_c_charptoname(isc_mem_t *mem, const char *keyval,
|
||||
dns_name_t **name);
|
||||
void dns_c_peer_print(FILE *fp, int indent,
|
||||
dns_peer_t *peer);
|
||||
void dns_c_peerlist_print(FILE *fp, int indent,
|
||||
dns_peerlist_t *peers);
|
||||
void dns_c_ssutable_print(FILE *fp, int indent,
|
||||
dns_ssutable_t *ssutable);
|
||||
void
|
||||
dns_c_printinunits(FILE *fp, isc_uint32_t val);
|
||||
|
||||
void
|
||||
dns_c_dataclass_tostream(FILE *fp, dns_rdataclass_t rclass);
|
||||
|
||||
void
|
||||
dns_c_datatype_tostream(FILE *fp, dns_rdatatype_t rtype);
|
||||
|
||||
isc_result_t dns_c_checkcategory(const char *name);
|
||||
isc_result_t dns_c_checkmodule(const char *name);
|
||||
isc_boolean_t
|
||||
dns_c_netaddrisanyaddr(isc_netaddr_t *inaddr);
|
||||
|
||||
void
|
||||
dns_c_netaddrprint(FILE *fp, isc_netaddr_t *inaddr);
|
||||
|
||||
isc_result_t
|
||||
dns_c_charptoname(isc_mem_t *mem, const char *keyval, dns_name_t **name);
|
||||
|
||||
void
|
||||
dns_c_peer_print(FILE *fp, int indent, dns_peer_t *peer);
|
||||
|
||||
void
|
||||
dns_c_peerlist_print(FILE *fp, int indent, dns_peerlist_t *peers);
|
||||
|
||||
void
|
||||
dns_c_ssutable_print(FILE *fp, int indent, dns_ssutable_t *ssutable);
|
||||
|
||||
isc_result_t
|
||||
dns_c_checkcategory(const char *name);
|
||||
|
||||
isc_result_t
|
||||
dns_c_checkmodule(const char *name);
|
||||
/*
|
||||
* Checks the argument is a known category or module name.
|
||||
*
|
||||
|
|
@ -329,5 +356,6 @@ isc_result_t dns_c_checkmodule(const char *name);
|
|||
* ISC_R_FAILURE if it isn't.
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFCOMMON_H */
|
||||
|
|
|
|||
|
|
@ -57,12 +57,12 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/net.h>
|
||||
|
||||
#include <dns/confip.h>
|
||||
|
||||
|
||||
#define DNS_C_CONFCTL_MAGIC 0x4363746cU
|
||||
#define DNS_C_CONFCTLLIST_MAGIC 0x4354424cU
|
||||
|
||||
|
|
@ -71,8 +71,6 @@
|
|||
#define DNS_C_CONFCTL_VALID(ptr) \
|
||||
ISC_MAGIC_VALID(ptr, DNS_C_CONFCTL_MAGIC)
|
||||
|
||||
|
||||
|
||||
/***
|
||||
*** Types
|
||||
***/
|
||||
|
|
@ -80,8 +78,7 @@
|
|||
typedef struct dns_c_ctrl dns_c_ctrl_t;
|
||||
typedef struct dns_c_ctrl_list dns_c_ctrllist_t;
|
||||
|
||||
struct dns_c_ctrl
|
||||
{
|
||||
struct dns_c_ctrl {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem; /* where it's memory came from */
|
||||
|
||||
|
|
@ -104,25 +101,23 @@ struct dns_c_ctrl
|
|||
};
|
||||
|
||||
|
||||
struct dns_c_ctrl_list
|
||||
{
|
||||
struct dns_c_ctrl_list {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
|
||||
ISC_LIST(dns_c_ctrl_t) elements;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t dns_c_ctrlinet_new(isc_mem_t *mem, dns_c_ctrl_t **control,
|
||||
isc_sockaddr_t addr, in_port_t port,
|
||||
dns_c_ipmatchlist_t *iml,
|
||||
isc_boolean_t copy);
|
||||
isc_result_t
|
||||
dns_c_ctrlinet_new(isc_mem_t *mem, dns_c_ctrl_t **control,
|
||||
isc_sockaddr_t addr, in_port_t port,
|
||||
dns_c_ipmatchlist_t *iml, isc_boolean_t copy);
|
||||
/*
|
||||
* Creates a new INET control object. If COPY is true then a deep copy is
|
||||
* made of IML, otherwise the value of IML is stored directly in the new
|
||||
|
|
@ -137,10 +132,9 @@ isc_result_t dns_c_ctrlinet_new(isc_mem_t *mem, dns_c_ctrl_t **control,
|
|||
* ISC_R_NOMEMORY -- insufficient memory available
|
||||
*/
|
||||
|
||||
|
||||
isc_result_t dns_c_ctrlunix_new(isc_mem_t *mem, dns_c_ctrl_t **control,
|
||||
const char *path,
|
||||
int perm, uid_t uid, gid_t gid);
|
||||
isc_result_t
|
||||
dns_c_ctrlunix_new(isc_mem_t *mem, dns_c_ctrl_t **control, const char *path,
|
||||
int perm, uid_t uid, gid_t gid);
|
||||
/*
|
||||
* Creates a new UNIX control object. A copy is made of the PATH argument.
|
||||
*
|
||||
|
|
@ -154,8 +148,8 @@ isc_result_t dns_c_ctrlunix_new(isc_mem_t *mem, dns_c_ctrl_t **control,
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
isc_result_t dns_c_ctrl_delete(dns_c_ctrl_t **control);
|
||||
isc_result_t
|
||||
dns_c_ctrl_delete(dns_c_ctrl_t **control);
|
||||
/*
|
||||
* Deletes the object pointed to by *CONTROL. *CONTROL may be NULL.
|
||||
*
|
||||
|
|
@ -166,8 +160,8 @@ isc_result_t dns_c_ctrl_delete(dns_c_ctrl_t **control);
|
|||
* ISC_R_SUCCESS
|
||||
*/
|
||||
|
||||
|
||||
void dns_c_ctrl_print(FILE *fp, int indent, dns_c_ctrl_t *ctl);
|
||||
void
|
||||
dns_c_ctrl_print(FILE *fp, int indent, dns_c_ctrl_t *ctl);
|
||||
/*
|
||||
* Prints the control object ctl in standard named.conf format. The output
|
||||
* is indented by indent number of tabs.
|
||||
|
|
@ -178,8 +172,8 @@ void dns_c_ctrl_print(FILE *fp, int indent, dns_c_ctrl_t *ctl);
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
isc_result_t dns_c_ctrllist_new(isc_mem_t *mem, dns_c_ctrllist_t **newlist);
|
||||
isc_result_t
|
||||
dns_c_ctrllist_new(isc_mem_t *mem, dns_c_ctrllist_t **newlist);
|
||||
/*
|
||||
* Creates a new control object list using the MEM memory manager.
|
||||
*
|
||||
|
|
@ -192,8 +186,8 @@ isc_result_t dns_c_ctrllist_new(isc_mem_t *mem, dns_c_ctrllist_t **newlist);
|
|||
* ISC_R_NOMEMORY -- insufficient memory available.
|
||||
*/
|
||||
|
||||
|
||||
isc_result_t dns_c_ctrllist_delete(dns_c_ctrllist_t **list);
|
||||
isc_result_t
|
||||
dns_c_ctrllist_delete(dns_c_ctrllist_t **list);
|
||||
/*
|
||||
* Deletes the control list. The value of *list may be NULL. Sets *list to
|
||||
* NULL when done.
|
||||
|
|
@ -206,8 +200,8 @@ isc_result_t dns_c_ctrllist_delete(dns_c_ctrllist_t **list);
|
|||
*
|
||||
*/
|
||||
|
||||
void dns_c_ctrllist_print(FILE *fp, int indent,
|
||||
dns_c_ctrllist_t *cl);
|
||||
void
|
||||
dns_c_ctrllist_print(FILE *fp, int indent, dns_c_ctrllist_t *cl);
|
||||
/*
|
||||
* Prints the control objects inside the list. The output is indented with
|
||||
* indent number of tabs.
|
||||
|
|
@ -217,5 +211,6 @@ void dns_c_ctrllist_print(FILE *fp, int indent,
|
|||
*
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFCTL_H */
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -53,11 +53,12 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <isc/region.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/list.h>
|
||||
#include <isc/magic.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/region.h>
|
||||
|
||||
#include <dns/confcommon.h>
|
||||
|
||||
|
|
@ -75,14 +76,10 @@
|
|||
#define DNS_C_IPMELEM_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_IPMELEM_MAGIC)
|
||||
#define DNS_C_IPMLIST_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_IPMLIST_MAGIC)
|
||||
|
||||
|
||||
|
||||
|
||||
/***
|
||||
*** Types
|
||||
***/
|
||||
|
||||
|
||||
typedef struct dns_c_iplist dns_c_iplist_t;
|
||||
typedef struct dns_c_ipmatch_direct dns_c_ipmatch_direct_t ;
|
||||
typedef struct dns_c_ipmatch_indirect dns_c_ipmatch_indirect_t;
|
||||
|
|
@ -104,8 +101,7 @@ struct dns_c_iplist {
|
|||
|
||||
|
||||
|
||||
struct dns_c_ipmatch_direct
|
||||
{
|
||||
struct dns_c_ipmatch_direct {
|
||||
isc_uint32_t magic;
|
||||
|
||||
isc_sockaddr_t address; /* XXX IPv6??? */
|
||||
|
|
@ -114,8 +110,7 @@ struct dns_c_ipmatch_direct
|
|||
|
||||
|
||||
|
||||
struct dns_c_ipmatch_indirect
|
||||
{
|
||||
struct dns_c_ipmatch_indirect {
|
||||
isc_uint32_t magic;
|
||||
|
||||
isc_textregion_t refname; /* for acls, mostly. */
|
||||
|
|
@ -124,8 +119,7 @@ struct dns_c_ipmatch_indirect
|
|||
|
||||
|
||||
|
||||
struct dns_c_ipmatch_element
|
||||
{
|
||||
struct dns_c_ipmatch_element {
|
||||
isc_uint32_t magic;
|
||||
|
||||
dns_c_ipmatch_type_t type;
|
||||
|
|
@ -141,8 +135,7 @@ struct dns_c_ipmatch_element
|
|||
};
|
||||
|
||||
|
||||
struct dns_c_ipmatch_list
|
||||
{
|
||||
struct dns_c_ipmatch_list {
|
||||
isc_uint32_t magic;
|
||||
|
||||
isc_mem_t *mem;
|
||||
|
|
@ -156,82 +149,113 @@ struct dns_c_ipmatch_list
|
|||
*** Functions
|
||||
***/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
/*
|
||||
* In all the functions below where an isc_mem_t is a parameter, that
|
||||
* paramater will be used for all memory allocation.
|
||||
*/
|
||||
|
||||
|
||||
isc_result_t dns_c_ipmatchelement_new(isc_mem_t *mem,
|
||||
dns_c_ipmatchelement_t **result);
|
||||
isc_result_t dns_c_ipmatchelement_delete(isc_mem_t *mem,
|
||||
dns_c_ipmatchelement_t **ipme);
|
||||
isc_result_t dns_c_ipmatchelement_copy(isc_mem_t *mem,
|
||||
dns_c_ipmatchelement_t **dest,
|
||||
dns_c_ipmatchelement_t *src);
|
||||
isc_result_t dns_c_ipmatchelement_print(FILE *fp, int indent,
|
||||
dns_c_ipmatchelement_t *ime);
|
||||
isc_boolean_t dns_c_ipmatchelement_isneg(dns_c_ipmatchelement_t *elem);
|
||||
isc_result_t
|
||||
dns_c_ipmatchelement_new(isc_mem_t *mem, dns_c_ipmatchelement_t **result);
|
||||
|
||||
isc_result_t dns_c_ipmatch_negate(dns_c_ipmatchelement_t *ipe);
|
||||
isc_result_t dns_c_ipmatch_aclnew(isc_mem_t *mem,
|
||||
dns_c_ipmatchelement_t **result,
|
||||
const char *aclname);
|
||||
isc_result_t dns_c_ipmatchkey_new(isc_mem_t *mem,
|
||||
dns_c_ipmatchelement_t **result,
|
||||
const char *key);
|
||||
isc_result_t dns_c_ipmatchany_new(isc_mem_t *mem,
|
||||
dns_c_ipmatchelement_t **result);
|
||||
isc_result_t dns_c_ipmatchlocalhost_new(isc_mem_t *mem,
|
||||
dns_c_ipmatchelement_t **result);
|
||||
isc_result_t dns_c_ipmatchlocalnets_new(isc_mem_t *mem,
|
||||
dns_c_ipmatchelement_t **result);
|
||||
isc_result_t dns_c_ipmatchpattern_new(isc_mem_t *mem,
|
||||
dns_c_ipmatchelement_t **result,
|
||||
isc_sockaddr_t address,
|
||||
isc_uint32_t maskbits);
|
||||
isc_result_t dns_c_ipmatchindirect_new(isc_mem_t *mem,
|
||||
dns_c_ipmatchelement_t **result,
|
||||
dns_c_ipmatchlist_t *iml,
|
||||
const char *name);
|
||||
isc_result_t
|
||||
dns_c_ipmatchelement_delete(isc_mem_t *mem, dns_c_ipmatchelement_t **ipme);
|
||||
|
||||
isc_result_t dns_c_ipmatchlist_new(isc_mem_t *mem,
|
||||
dns_c_ipmatchlist_t **ptr);
|
||||
isc_result_t dns_c_ipmatchlist_detach(dns_c_ipmatchlist_t **ml);
|
||||
void dns_c_ipmatchlist_attach(dns_c_ipmatchlist_t *source,
|
||||
dns_c_ipmatchlist_t **target);
|
||||
isc_result_t dns_c_ipmatchlist_copy(isc_mem_t *mem,
|
||||
dns_c_ipmatchlist_t **dest,
|
||||
dns_c_ipmatchlist_t *src);
|
||||
isc_result_t dns_c_ipmatchlist_empty(dns_c_ipmatchlist_t *ipml);
|
||||
isc_result_t dns_c_ipmatchlist_append(dns_c_ipmatchlist_t *dest,
|
||||
dns_c_ipmatchlist_t *src,
|
||||
isc_boolean_t negate);
|
||||
isc_result_t dns_c_ipmatchlist_print(FILE *fp, int indent,
|
||||
dns_c_ipmatchlist_t *iml);
|
||||
isc_result_t
|
||||
dns_c_ipmatchelement_copy(isc_mem_t *mem, dns_c_ipmatchelement_t **dest,
|
||||
dns_c_ipmatchelement_t *src);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ipmatchelement_print(FILE *fp, int indent, dns_c_ipmatchelement_t *ime);
|
||||
|
||||
isc_boolean_t
|
||||
dns_c_ipmatchelement_isneg(dns_c_ipmatchelement_t *elem);
|
||||
|
||||
isc_result_t dns_c_iplist_new(isc_mem_t *mem, int length,
|
||||
dns_c_iplist_t **newlist);
|
||||
isc_result_t dns_c_iplist_detach(dns_c_iplist_t **list);
|
||||
isc_result_t dns_c_iplist_copy(isc_mem_t *mem, dns_c_iplist_t **dest,
|
||||
dns_c_iplist_t *src);
|
||||
void dns_c_iplist_attach(dns_c_iplist_t *source,
|
||||
dns_c_iplist_t **target);
|
||||
isc_result_t dns_c_iplist_append(dns_c_iplist_t *list,
|
||||
isc_sockaddr_t newaddr);
|
||||
isc_result_t dns_c_iplist_remove(dns_c_iplist_t *list,
|
||||
isc_sockaddr_t newaddr);
|
||||
void dns_c_iplist_print(FILE *fp, int indent,
|
||||
dns_c_iplist_t *list);
|
||||
isc_boolean_t dns_c_iplist_equal(dns_c_iplist_t *list1,
|
||||
dns_c_iplist_t *list2);
|
||||
isc_result_t
|
||||
dns_c_ipmatch_negate(dns_c_ipmatchelement_t *ipe);
|
||||
|
||||
isc_boolean_t dns_c_ipmatchelement_equal(dns_c_ipmatchelement_t *e1,
|
||||
dns_c_ipmatchelement_t *e2);
|
||||
isc_result_t
|
||||
dns_c_ipmatch_aclnew(isc_mem_t *mem, dns_c_ipmatchelement_t **result,
|
||||
const char *aclname);
|
||||
|
||||
isc_boolean_t dns_c_ipmatchlist_equal(dns_c_ipmatchlist_t *l1,
|
||||
dns_c_ipmatchlist_t *l2);
|
||||
isc_result_t
|
||||
dns_c_ipmatchkey_new(isc_mem_t *mem, dns_c_ipmatchelement_t **result,
|
||||
const char *key);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ipmatchany_new(isc_mem_t *mem, dns_c_ipmatchelement_t **result);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ipmatchlocalhost_new(isc_mem_t *mem, dns_c_ipmatchelement_t **result);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ipmatchlocalnets_new(isc_mem_t *mem, dns_c_ipmatchelement_t **result);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ipmatchpattern_new(isc_mem_t *mem, dns_c_ipmatchelement_t **result,
|
||||
isc_sockaddr_t address, isc_uint32_t maskbits);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ipmatchindirect_new(isc_mem_t *mem, dns_c_ipmatchelement_t **result,
|
||||
dns_c_ipmatchlist_t *iml, const char *name);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ipmatchlist_new(isc_mem_t *mem, dns_c_ipmatchlist_t **ptr);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ipmatchlist_detach(dns_c_ipmatchlist_t **ml);
|
||||
|
||||
void
|
||||
dns_c_ipmatchlist_attach(dns_c_ipmatchlist_t *source,
|
||||
dns_c_ipmatchlist_t **target);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ipmatchlist_copy(isc_mem_t *mem, dns_c_ipmatchlist_t **dest,
|
||||
dns_c_ipmatchlist_t *src);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ipmatchlist_empty(dns_c_ipmatchlist_t *ipml);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ipmatchlist_append(dns_c_ipmatchlist_t *dest, dns_c_ipmatchlist_t *src,
|
||||
isc_boolean_t negate);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ipmatchlist_print(FILE *fp, int indent, dns_c_ipmatchlist_t *iml);
|
||||
|
||||
isc_result_t
|
||||
dns_c_iplist_new(isc_mem_t *mem, int length, dns_c_iplist_t **newlist);
|
||||
|
||||
isc_result_t
|
||||
dns_c_iplist_detach(dns_c_iplist_t **list);
|
||||
|
||||
isc_result_t
|
||||
dns_c_iplist_copy(isc_mem_t *mem, dns_c_iplist_t **dest, dns_c_iplist_t *src);
|
||||
|
||||
void
|
||||
dns_c_iplist_attach(dns_c_iplist_t *source, dns_c_iplist_t **target);
|
||||
|
||||
isc_result_t
|
||||
dns_c_iplist_append(dns_c_iplist_t *list, isc_sockaddr_t newaddr);
|
||||
|
||||
isc_result_t
|
||||
dns_c_iplist_remove(dns_c_iplist_t *list, isc_sockaddr_t newaddr);
|
||||
|
||||
void
|
||||
dns_c_iplist_print(FILE *fp, int indent, dns_c_iplist_t *list);
|
||||
|
||||
isc_boolean_t
|
||||
dns_c_iplist_equal(dns_c_iplist_t *list1, dns_c_iplist_t *list2);
|
||||
|
||||
isc_boolean_t
|
||||
dns_c_ipmatchelement_equal(dns_c_ipmatchelement_t *e1,
|
||||
dns_c_ipmatchelement_t *e2);
|
||||
|
||||
isc_boolean_t
|
||||
dns_c_ipmatchlist_equal(dns_c_ipmatchlist_t *l1, dns_c_ipmatchlist_t *l2);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFIP_H */
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/types.h>
|
||||
#include <isc/list.h>
|
||||
|
||||
|
||||
#define DNS_C_TKEY_MAGIC 0x544b4559 /* TKEY */
|
||||
|
|
@ -77,13 +77,10 @@
|
|||
#define DNS_C_KEYID_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_KEYID_MAGIC)
|
||||
#define DNS_C_KEYIDLIST_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_KEYIDLIST_MAGIC)
|
||||
|
||||
|
||||
|
||||
/***
|
||||
*** Types
|
||||
***/
|
||||
|
||||
|
||||
typedef struct dns_c_pubkey dns_c_pubkey_t;
|
||||
typedef struct dns_c_pklist dns_c_pklist_t;
|
||||
typedef struct dns_c_tkey dns_c_tkey_t;
|
||||
|
|
@ -93,10 +90,10 @@ typedef struct dns_c_kdef_list dns_c_kdeflist_t;
|
|||
typedef struct dns_c_kid dns_c_kid_t;
|
||||
typedef struct dns_c_kid_list dns_c_kidlist_t;
|
||||
|
||||
|
||||
/* The type for holding a trusted key value. */
|
||||
struct dns_c_tkey
|
||||
{
|
||||
/*
|
||||
* The type for holding a trusted key value.
|
||||
*/
|
||||
struct dns_c_tkey {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
|
||||
|
|
@ -106,9 +103,10 @@ struct dns_c_tkey
|
|||
ISC_LINK(dns_c_tkey_t) next;
|
||||
};
|
||||
|
||||
/* A list of trusted keys. */
|
||||
struct dns_c_tkey_list
|
||||
{
|
||||
/*
|
||||
* A list of trusted keys.
|
||||
*/
|
||||
struct dns_c_tkey_list {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
|
||||
|
|
@ -116,9 +114,10 @@ struct dns_c_tkey_list
|
|||
};
|
||||
|
||||
|
||||
/* A public key value */
|
||||
struct dns_c_pubkey
|
||||
{
|
||||
/*
|
||||
* A public key value.
|
||||
*/
|
||||
struct dns_c_pubkey {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
isc_int32_t flags;
|
||||
|
|
@ -129,9 +128,10 @@ struct dns_c_pubkey
|
|||
ISC_LINK(dns_c_pubkey_t) next;
|
||||
};
|
||||
|
||||
/* A list of pubkeys */
|
||||
struct dns_c_pklist
|
||||
{
|
||||
/*
|
||||
* A list of pubkeys.
|
||||
*/
|
||||
struct dns_c_pklist {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
|
||||
|
|
@ -139,9 +139,10 @@ struct dns_c_pklist
|
|||
};
|
||||
|
||||
|
||||
/* A private key definition from a 'key' statement */
|
||||
struct dns_c_kdef
|
||||
{
|
||||
/*
|
||||
* A private key definition from a 'key' statement.
|
||||
*/
|
||||
struct dns_c_kdef {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
|
||||
|
|
@ -152,10 +153,10 @@ struct dns_c_kdef
|
|||
ISC_LINK(dns_c_kdef_t) next;
|
||||
};
|
||||
|
||||
|
||||
/* A list of private keys */
|
||||
struct dns_c_kdef_list
|
||||
{
|
||||
/*
|
||||
* A list of private keys.
|
||||
*/
|
||||
struct dns_c_kdef_list {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
|
||||
|
|
@ -163,9 +164,10 @@ struct dns_c_kdef_list
|
|||
};
|
||||
|
||||
|
||||
/* A key id for in a server statement 'keys' list */
|
||||
struct dns_c_kid
|
||||
{
|
||||
/*
|
||||
* A key id for in a server statement 'keys' list.
|
||||
*/
|
||||
struct dns_c_kid {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
char *keyid;
|
||||
|
|
@ -174,134 +176,169 @@ struct dns_c_kid
|
|||
};
|
||||
|
||||
|
||||
/* List of key ids for a 'server' statement */
|
||||
struct dns_c_kid_list
|
||||
{
|
||||
/*
|
||||
* List of key ids for a 'server' statement.
|
||||
*/
|
||||
struct dns_c_kid_list {
|
||||
isc_mem_t *mem;
|
||||
isc_uint32_t magic;
|
||||
|
||||
ISC_LIST(dns_c_kid_t) keyids;
|
||||
};
|
||||
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t dns_c_pklist_new(isc_mem_t *mem,
|
||||
dns_c_pklist_t **pklist);
|
||||
isc_result_t dns_c_pklist_delete(dns_c_pklist_t **list);
|
||||
isc_result_t dns_c_pklist_addpubkey(dns_c_pklist_t *list,
|
||||
dns_c_pubkey_t *pkey,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_pklist_findpubkey(dns_c_pklist_t *list,
|
||||
dns_c_pubkey_t **pubkey,
|
||||
isc_int32_t flags,
|
||||
isc_int32_t protocol,
|
||||
isc_int32_t algorithm,
|
||||
const char *key);
|
||||
isc_result_t dns_c_pklist_rmpubkey(dns_c_pklist_t *list,
|
||||
isc_int32_t flags,
|
||||
isc_int32_t protocol,
|
||||
isc_int32_t algorithm,
|
||||
const char *key);
|
||||
void dns_c_pklist_print(FILE *fp, int indent,
|
||||
dns_c_pklist_t *pubkey);
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_c_pklist_new(isc_mem_t *mem, dns_c_pklist_t **pklist);
|
||||
|
||||
isc_result_t
|
||||
dns_c_pklist_delete(dns_c_pklist_t **list);
|
||||
|
||||
isc_result_t dns_c_pubkey_new(isc_mem_t *mem, isc_int32_t flags,
|
||||
isc_int32_t protocol,
|
||||
isc_int32_t algorithm,
|
||||
const char *key, dns_c_pubkey_t **pubkey);
|
||||
isc_result_t dns_c_pubkey_delete(dns_c_pubkey_t **pubkey);
|
||||
isc_result_t dns_c_pubkey_copy(isc_mem_t *mem, dns_c_pubkey_t **dest,
|
||||
dns_c_pubkey_t *src);
|
||||
isc_boolean_t dns_c_pubkey_equal(dns_c_pubkey_t *k1, dns_c_pubkey_t *k2);
|
||||
void dns_c_pubkey_print(FILE *fp, int indent,
|
||||
dns_c_pubkey_t *pubkey);
|
||||
isc_result_t
|
||||
dns_c_pklist_addpubkey(dns_c_pklist_t *list, dns_c_pubkey_t *pkey,
|
||||
isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_pklist_findpubkey(dns_c_pklist_t *list, dns_c_pubkey_t **pubkey,
|
||||
isc_int32_t flags, isc_int32_t protocol,
|
||||
isc_int32_t algorithm, const char *key);
|
||||
|
||||
isc_result_t dns_c_kidlist_new(isc_mem_t *mem,
|
||||
dns_c_kidlist_t **list);
|
||||
isc_result_t dns_c_kidlist_delete(dns_c_kidlist_t **list);
|
||||
isc_result_t dns_c_kidlist_undef(dns_c_kidlist_t *list,
|
||||
const char *keyid);
|
||||
isc_result_t dns_c_kidlist_find(dns_c_kidlist_t *list,
|
||||
const char *keyid,
|
||||
dns_c_kid_t **retval);
|
||||
void dns_c_kidlist_append(dns_c_kidlist_t *list,
|
||||
dns_c_kid_t *keyid);
|
||||
void dns_c_kidlist_print(FILE *fp, int indent,
|
||||
dns_c_kidlist_t *list);
|
||||
isc_result_t dns_c_kid_new(isc_mem_t *mem, const char *name,
|
||||
dns_c_kid_t **keyid);
|
||||
isc_result_t
|
||||
dns_c_pklist_rmpubkey(dns_c_pklist_t *list, isc_int32_t flags,
|
||||
isc_int32_t protocol, isc_int32_t algorithm,
|
||||
const char *key);
|
||||
|
||||
void
|
||||
dns_c_pklist_print(FILE *fp, int indent, dns_c_pklist_t *pubkey);
|
||||
|
||||
isc_result_t
|
||||
dns_c_pubkey_new(isc_mem_t *mem, isc_int32_t flags, isc_int32_t protocol,
|
||||
isc_int32_t algorithm, const char *key,
|
||||
dns_c_pubkey_t **pubkey);
|
||||
|
||||
isc_result_t
|
||||
dns_c_pubkey_delete(dns_c_pubkey_t **pubkey);
|
||||
|
||||
isc_result_t dns_c_kdeflist_new(isc_mem_t *mem,
|
||||
dns_c_kdeflist_t **list);
|
||||
isc_result_t dns_c_kdeflist_delete(dns_c_kdeflist_t **list);
|
||||
isc_result_t dns_c_kdeflist_copy(isc_mem_t *mem,
|
||||
dns_c_kdeflist_t **dest,
|
||||
dns_c_kdeflist_t *src);
|
||||
isc_result_t dns_c_kdeflist_append(dns_c_kdeflist_t *list,
|
||||
dns_c_kdef_t *key, isc_boolean_t copy);
|
||||
isc_result_t
|
||||
dns_c_pubkey_copy(isc_mem_t *mem, dns_c_pubkey_t **dest, dns_c_pubkey_t *src);
|
||||
|
||||
isc_result_t dns_c_kdeflist_undef(dns_c_kdeflist_t *list,
|
||||
const char *keyid);
|
||||
isc_result_t dns_c_kdeflist_find(dns_c_kdeflist_t *list,
|
||||
const char *keyid,
|
||||
dns_c_kdef_t **retval);
|
||||
void dns_c_kdeflist_print(FILE *fp, int indent,
|
||||
dns_c_kdeflist_t *list);
|
||||
isc_boolean_t
|
||||
dns_c_pubkey_equal(dns_c_pubkey_t *k1, dns_c_pubkey_t *k2);
|
||||
|
||||
isc_result_t dns_c_kdef_new(isc_mem_t *mem, const char *name,
|
||||
dns_c_kdef_t **keyid);
|
||||
isc_result_t dns_c_kdef_delete(dns_c_kdef_t **keydef);
|
||||
isc_result_t dns_c_kdef_copy(isc_mem_t *mem,
|
||||
dns_c_kdef_t **dest, dns_c_kdef_t *src);
|
||||
void
|
||||
dns_c_pubkey_print(FILE *fp, int indent, dns_c_pubkey_t *pubkey);
|
||||
|
||||
void dns_c_kdef_print(FILE *fp, int indent, dns_c_kdef_t *keydef);
|
||||
isc_result_t
|
||||
dns_c_kidlist_new(isc_mem_t *mem, dns_c_kidlist_t **list);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kidlist_delete(dns_c_kidlist_t **list);
|
||||
|
||||
isc_result_t dns_c_kdef_setalgorithm(dns_c_kdef_t *elem,
|
||||
const char *algorithm);
|
||||
isc_result_t dns_c_kdef_setsecret(dns_c_kdef_t *elem,
|
||||
const char *secret);
|
||||
isc_result_t
|
||||
dns_c_kidlist_undef(dns_c_kidlist_t *list, const char *keyid);
|
||||
|
||||
isc_result_t dns_c_tkeylist_new(isc_mem_t *mem,
|
||||
dns_c_tkeylist_t **newlist);
|
||||
isc_result_t dns_c_tkeylist_delete(dns_c_tkeylist_t **list);
|
||||
isc_result_t dns_c_tkeylist_copy(isc_mem_t *mem,
|
||||
dns_c_tkeylist_t **dest,
|
||||
dns_c_tkeylist_t *src);
|
||||
void dns_c_tkeylist_print(FILE *fp, int indent,
|
||||
dns_c_tkeylist_t *list);
|
||||
isc_result_t dns_c_tkeylist_append(dns_c_tkeylist_t *list,
|
||||
dns_c_tkey_t *element,
|
||||
isc_boolean_t copy);
|
||||
isc_result_t
|
||||
dns_c_kidlist_find(dns_c_kidlist_t *list, const char *keyid,
|
||||
dns_c_kid_t **retval);
|
||||
|
||||
isc_result_t dns_c_tkey_new(isc_mem_t *mem, const char *domain,
|
||||
isc_int32_t flags,
|
||||
isc_int32_t protocol,
|
||||
isc_int32_t algorithm,
|
||||
const char *key, dns_c_tkey_t **newkey);
|
||||
isc_result_t dns_c_tkey_delete(dns_c_tkey_t **tkey);
|
||||
isc_result_t dns_c_tkey_copy(isc_mem_t *mem,
|
||||
dns_c_tkey_t **dest, dns_c_tkey_t *src);
|
||||
void
|
||||
dns_c_kidlist_append(dns_c_kidlist_t *list, dns_c_kid_t *keyid);
|
||||
|
||||
isc_result_t dns_c_tkey_getflags(dns_c_tkey_t *tkey,
|
||||
isc_int32_t *flags);
|
||||
isc_result_t dns_c_tkey_getprotocol(dns_c_tkey_t *tkey,
|
||||
isc_int32_t *protocol);
|
||||
isc_result_t dns_c_tkey_getalgorithm(dns_c_tkey_t *tkey,
|
||||
isc_int32_t *algorithm);
|
||||
isc_result_t dns_c_tkey_getkey(dns_c_tkey_t *tkey,
|
||||
const char **key);
|
||||
void dns_c_tkey_print(FILE *fp, int indent, dns_c_tkey_t *tkey);
|
||||
void
|
||||
dns_c_kidlist_print(FILE *fp, int indent, dns_c_kidlist_t *list);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kid_new(isc_mem_t *mem, const char *name, dns_c_kid_t **keyid);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kdeflist_new(isc_mem_t *mem, dns_c_kdeflist_t **list);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kdeflist_delete(dns_c_kdeflist_t **list);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kdeflist_copy(isc_mem_t *mem, dns_c_kdeflist_t **dest,
|
||||
dns_c_kdeflist_t *src);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kdeflist_append(dns_c_kdeflist_t *list, dns_c_kdef_t *key,
|
||||
isc_boolean_t copy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kdeflist_undef(dns_c_kdeflist_t *list, const char *keyid);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kdeflist_find(dns_c_kdeflist_t *list, const char *keyid,
|
||||
dns_c_kdef_t **retval);
|
||||
|
||||
void
|
||||
dns_c_kdeflist_print(FILE *fp, int indent, dns_c_kdeflist_t *list);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kdef_new(isc_mem_t *mem, const char *name, dns_c_kdef_t **keyid);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kdef_delete(dns_c_kdef_t **keydef);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kdef_copy(isc_mem_t *mem, dns_c_kdef_t **dest, dns_c_kdef_t *src);
|
||||
|
||||
void
|
||||
dns_c_kdef_print(FILE *fp, int indent, dns_c_kdef_t *keydef);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kdef_setalgorithm(dns_c_kdef_t *elem, const char *algorithm);
|
||||
|
||||
isc_result_t
|
||||
dns_c_kdef_setsecret(dns_c_kdef_t *elem, const char *secret);
|
||||
|
||||
isc_result_t
|
||||
dns_c_tkeylist_new(isc_mem_t *mem, dns_c_tkeylist_t **newlist);
|
||||
|
||||
isc_result_t
|
||||
dns_c_tkeylist_delete(dns_c_tkeylist_t **list);
|
||||
|
||||
isc_result_t
|
||||
dns_c_tkeylist_copy(isc_mem_t *mem, dns_c_tkeylist_t **dest,
|
||||
dns_c_tkeylist_t *src);
|
||||
|
||||
void
|
||||
dns_c_tkeylist_print(FILE *fp, int indent, dns_c_tkeylist_t *list);
|
||||
|
||||
isc_result_t
|
||||
dns_c_tkeylist_append(dns_c_tkeylist_t *list, dns_c_tkey_t *element,
|
||||
isc_boolean_t copy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_tkey_new(isc_mem_t *mem, const char *domain, isc_int32_t flags,
|
||||
isc_int32_t protocol, isc_int32_t algorithm,
|
||||
const char *key, dns_c_tkey_t **newkey);
|
||||
|
||||
isc_result_t
|
||||
dns_c_tkey_delete(dns_c_tkey_t **tkey);
|
||||
|
||||
isc_result_t
|
||||
dns_c_tkey_copy(isc_mem_t *mem, dns_c_tkey_t **dest, dns_c_tkey_t *src);
|
||||
|
||||
isc_result_t
|
||||
dns_c_tkey_getflags(dns_c_tkey_t *tkey, isc_int32_t *flags);
|
||||
|
||||
isc_result_t
|
||||
dns_c_tkey_getprotocol(dns_c_tkey_t *tkey, isc_int32_t *protocol);
|
||||
|
||||
isc_result_t
|
||||
dns_c_tkey_getalgorithm(dns_c_tkey_t *tkey, isc_int32_t *algorithm);
|
||||
|
||||
isc_result_t
|
||||
dns_c_tkey_getkey(dns_c_tkey_t *tkey, const char **key);
|
||||
|
||||
void
|
||||
dns_c_tkey_print(FILE *fp, int indent, dns_c_tkey_t *tkey);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFKEYS_H */
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/mem.h>
|
||||
|
||||
#include <dns/confcommon.h>
|
||||
|
|
@ -76,9 +77,10 @@ typedef struct dns_c_logchan dns_c_logchan_t;
|
|||
typedef struct dns_c_logcat dns_c_logcat_t;
|
||||
typedef struct dns_c_logging_list dns_c_logginglist_t;
|
||||
|
||||
/* The structure that holds the list of channel and category definitions */
|
||||
struct dns_c_logging_list
|
||||
{
|
||||
/*
|
||||
* The structure that holds the list of channel and category definitions.
|
||||
*/
|
||||
struct dns_c_logging_list {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
|
||||
|
|
@ -116,8 +118,9 @@ struct dns_c_logchan
|
|||
isc_boolean_t print_severity;
|
||||
isc_boolean_t print_time;
|
||||
|
||||
/* Some channels are predefined e.g. default_syslog, in which case
|
||||
* this is true
|
||||
/*
|
||||
* Some channels are predefined e.g. default_syslog, in which case
|
||||
* this is true.
|
||||
*/
|
||||
isc_boolean_t predefined;
|
||||
|
||||
|
|
@ -125,10 +128,10 @@ struct dns_c_logchan
|
|||
dns_c_setbits_t setflags;
|
||||
};
|
||||
|
||||
|
||||
/* Structure for holding a category definition */
|
||||
struct dns_c_logcat
|
||||
{
|
||||
/*
|
||||
* Structure for holding a category definition.
|
||||
*/
|
||||
struct dns_c_logcat {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
|
||||
|
|
@ -146,112 +149,153 @@ struct dns_c_logcat
|
|||
ISC_LINK(dns_c_logcat_t) next;
|
||||
};
|
||||
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t dns_c_logginglist_new(isc_mem_t *mem,
|
||||
dns_c_logginglist_t **list);
|
||||
isc_result_t dns_c_logginglist_delete(dns_c_logginglist_t **list);
|
||||
void dns_c_logginglist_print(FILE *fp, int indent,
|
||||
dns_c_logginglist_t *ll,
|
||||
isc_boolean_t if_predef_too);
|
||||
isc_result_t dns_c_logginglist_copy(isc_mem_t *mem,
|
||||
dns_c_logginglist_t **dest,
|
||||
dns_c_logginglist_t *src);
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t dns_c_logginglist_addchannel(dns_c_logginglist_t *list,
|
||||
dns_c_logchan_t *newchan,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_logginglist_addcategory(dns_c_logginglist_t *list,
|
||||
dns_c_logcat_t *newcat,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_logginglist_delchannel(dns_c_logginglist_t *list,
|
||||
const char *name);
|
||||
isc_result_t dns_c_logginglist_delcategory(dns_c_logginglist_t *list,
|
||||
const char *name);
|
||||
isc_result_t
|
||||
dns_c_logginglist_new(isc_mem_t *mem, dns_c_logginglist_t **list);
|
||||
|
||||
isc_result_t dns_c_logginglist_chanbyname(dns_c_logginglist_t *list,
|
||||
const char *name,
|
||||
dns_c_logchan_t **chan);
|
||||
isc_result_t dns_c_logginglist_catbyname(dns_c_logginglist_t *list,
|
||||
const char *name,
|
||||
dns_c_logcat_t **cat);
|
||||
isc_result_t
|
||||
dns_c_logginglist_delete(dns_c_logginglist_t **list);
|
||||
|
||||
isc_result_t dns_c_logchan_new(isc_mem_t *mem, const char *name,
|
||||
dns_c_logchantype_t ctype,
|
||||
dns_c_logchan_t **newchan);
|
||||
isc_result_t dns_c_logchan_delete(dns_c_logchan_t **channel);
|
||||
isc_result_t dns_c_logchan_copy(isc_mem_t *mem, dns_c_logchan_t **dest,
|
||||
dns_c_logchan_t *src);
|
||||
void dns_c_logchan_print(FILE *fp, int indent,
|
||||
dns_c_logchan_t *logchan,
|
||||
isc_boolean_t if_predef_too);
|
||||
void
|
||||
dns_c_logginglist_print(FILE *fp, int indent, dns_c_logginglist_t *ll,
|
||||
isc_boolean_t if_predef_too);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logginglist_copy(isc_mem_t *mem, dns_c_logginglist_t **dest,
|
||||
dns_c_logginglist_t *src);
|
||||
|
||||
isc_result_t dns_c_logchan_setpath(dns_c_logchan_t *channel,
|
||||
const char *path);
|
||||
isc_result_t dns_c_logchan_setversions(dns_c_logchan_t *channel,
|
||||
isc_uint32_t versions);
|
||||
isc_result_t dns_c_logchan_setsize(dns_c_logchan_t *channel,
|
||||
isc_uint32_t size);
|
||||
isc_result_t dns_c_logchan_setfacility(dns_c_logchan_t *channel,
|
||||
int facility);
|
||||
isc_result_t dns_c_logchan_setseverity(dns_c_logchan_t *channel,
|
||||
dns_c_logseverity_t severity);
|
||||
isc_result_t dns_c_logchan_setdebuglevel(dns_c_logchan_t *channel,
|
||||
isc_int32_t level);
|
||||
isc_result_t dns_c_logchan_setprintcat(dns_c_logchan_t *channel,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_logchan_setprintsev(dns_c_logchan_t *channel,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_logchan_setprinttime(dns_c_logchan_t *channel,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_logchan_setpredef(dns_c_logchan_t *channel,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t
|
||||
dns_c_logginglist_addchannel(dns_c_logginglist_t *list,
|
||||
dns_c_logchan_t *newchan, isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t dns_c_logchan_getpath(dns_c_logchan_t *channel,
|
||||
const char **path);
|
||||
isc_result_t dns_c_logchan_getversions(dns_c_logchan_t *channel,
|
||||
isc_uint32_t *versions);
|
||||
isc_result_t dns_c_logchan_getsize(dns_c_logchan_t *channel,
|
||||
isc_uint32_t *size);
|
||||
isc_result_t dns_c_logchan_getfacility(dns_c_logchan_t *channel,
|
||||
int *facility);
|
||||
isc_result_t dns_c_logchan_getseverity(dns_c_logchan_t *channel,
|
||||
dns_c_logseverity_t *severity);
|
||||
isc_result_t dns_c_logchan_getdebuglevel(dns_c_logchan_t *channel,
|
||||
isc_int32_t *level);
|
||||
isc_result_t dns_c_logchan_getprintcat(dns_c_logchan_t *channel,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_logchan_getprintsev(dns_c_logchan_t *channel,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_logchan_getprinttime(dns_c_logchan_t *channel,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_logchan_getpredef(dns_c_logchan_t *channel,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t
|
||||
dns_c_logginglist_addcategory(dns_c_logginglist_t *list,
|
||||
dns_c_logcat_t *newcat, isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logginglist_delchannel(dns_c_logginglist_t *list, const char *name);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logginglist_delcategory(dns_c_logginglist_t *list, const char *name);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logginglist_chanbyname(dns_c_logginglist_t *list, const char *name,
|
||||
dns_c_logchan_t **chan);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logginglist_catbyname(dns_c_logginglist_t *list, const char *name,
|
||||
dns_c_logcat_t **cat);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_new(isc_mem_t *mem, const char *name, dns_c_logchantype_t ctype,
|
||||
dns_c_logchan_t **newchan);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_delete(dns_c_logchan_t **channel);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_copy(isc_mem_t *mem, dns_c_logchan_t **dest,
|
||||
dns_c_logchan_t *src);
|
||||
|
||||
void
|
||||
dns_c_logchan_print(FILE *fp, int indent, dns_c_logchan_t *logchan,
|
||||
isc_boolean_t if_predef_too);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_setpath(dns_c_logchan_t *channel, const char *path);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_setversions(dns_c_logchan_t *channel, isc_uint32_t versions);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_setsize(dns_c_logchan_t *channel, isc_uint32_t size);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_setfacility(dns_c_logchan_t *channel, int facility);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_setseverity(dns_c_logchan_t *channel,
|
||||
dns_c_logseverity_t severity);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_setdebuglevel(dns_c_logchan_t *channel, isc_int32_t level);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_setprintcat(dns_c_logchan_t *channel, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_setprintsev(dns_c_logchan_t *channel, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_setprinttime(dns_c_logchan_t *channel, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_setpredef(dns_c_logchan_t *channel, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_getpath(dns_c_logchan_t *channel, const char **path);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_getversions(dns_c_logchan_t *channel, isc_uint32_t *versions);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_getsize(dns_c_logchan_t *channel, isc_uint32_t *size);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_getfacility(dns_c_logchan_t *channel, int *facility);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_getseverity(dns_c_logchan_t *channel,
|
||||
dns_c_logseverity_t *severity);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_getdebuglevel(dns_c_logchan_t *channel, isc_int32_t *level);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_getprintcat(dns_c_logchan_t *channel, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_getprintsev(dns_c_logchan_t *channel, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_getprinttime(dns_c_logchan_t *channel, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logchan_getpredef(dns_c_logchan_t *channel, isc_boolean_t *retval);
|
||||
|
||||
/*
|
||||
* Logging category
|
||||
*/
|
||||
isc_result_t dns_c_logcat_new(isc_mem_t *mem, const char *name,
|
||||
dns_c_logcat_t **newlc);
|
||||
isc_result_t dns_c_logcat_delete(dns_c_logcat_t **logcat);
|
||||
void dns_c_logcat_print(FILE *fp, int indent,
|
||||
dns_c_logcat_t *logcat,
|
||||
isc_boolean_t if_predef_too);
|
||||
isc_result_t dns_c_logcat_copy(isc_mem_t *mem, dns_c_logcat_t **dest,
|
||||
dns_c_logcat_t *src);
|
||||
isc_result_t dns_c_logcat_addname(dns_c_logcat_t *logcat,
|
||||
const char *name);
|
||||
isc_result_t dns_c_logcat_delname(dns_c_logcat_t *logcat,
|
||||
const char *name);
|
||||
isc_result_t dns_c_logcat_setpredef(dns_c_logcat_t *logcat,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_logcat_getpredef(dns_c_logcat_t *logcat,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t
|
||||
dns_c_logcat_new(isc_mem_t *mem, const char *name, dns_c_logcat_t **newlc);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logcat_delete(dns_c_logcat_t **logcat);
|
||||
|
||||
void
|
||||
dns_c_logcat_print(FILE *fp, int indent, dns_c_logcat_t *logcat,
|
||||
isc_boolean_t if_predef_too);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logcat_copy(isc_mem_t *mem, dns_c_logcat_t **dest, dns_c_logcat_t *src);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logcat_addname(dns_c_logcat_t *logcat, const char *name);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logcat_delname(dns_c_logcat_t *logcat, const char *name);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logcat_setpredef(dns_c_logcat_t *logcat, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_logcat_getpredef(dns_c_logcat_t *logcat, isc_boolean_t *retval);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFLOG_H */
|
||||
|
|
|
|||
|
|
@ -55,19 +55,18 @@
|
|||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/int.h>
|
||||
#include <isc/mem.h>
|
||||
|
||||
#include <dns/confip.h>
|
||||
|
||||
#define DNS_C_LISTEN_MAGIC 0x4c49534eU /* LISN */
|
||||
#define DNS_C_LISTEN_MAGIC 0x4c49534eU /* LISN */
|
||||
#define DNS_C_LLIST_MAGIC 0x4c6c6973U /* Llis */
|
||||
|
||||
#define DNS_C_LISTEN_VALID(l) ISC_MAGIC_VALID(l, DNS_C_LISTEN_MAGIC)
|
||||
#define DNS_C_LISTENLIST_VALID(l) ISC_MAGIC_VALID(l, DNS_C_LLIST_MAGIC)
|
||||
|
||||
|
||||
|
||||
/***
|
||||
*** Types
|
||||
***/
|
||||
|
|
@ -75,10 +74,10 @@
|
|||
typedef struct dns_c_lstn_on dns_c_lstnon_t;
|
||||
typedef struct dns_c_lstn_list dns_c_lstnlist_t;
|
||||
|
||||
|
||||
/* Structure for holing value of a single listen-on statement. */
|
||||
struct dns_c_lstn_on
|
||||
{
|
||||
/*
|
||||
* Structure for holing value of a single listen-on statement.
|
||||
*/
|
||||
struct dns_c_lstn_on {
|
||||
isc_mem_t *mem;
|
||||
isc_uint32_t magic;
|
||||
|
||||
|
|
@ -89,22 +88,24 @@ struct dns_c_lstn_on
|
|||
};
|
||||
|
||||
|
||||
/* A list of listen-on statements */
|
||||
struct dns_c_lstn_list
|
||||
{
|
||||
/*
|
||||
* A list of listen-on statements.
|
||||
*/
|
||||
struct dns_c_lstn_list {
|
||||
isc_mem_t *mem;
|
||||
isc_uint32_t magic;
|
||||
|
||||
ISC_LIST(dns_c_lstnon_t) elements;
|
||||
};
|
||||
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t dns_c_lstnlist_new(isc_mem_t *mem,
|
||||
dns_c_lstnlist_t **llist);
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_c_lstnlist_new(isc_mem_t *mem, dns_c_lstnlist_t **llist);
|
||||
/*
|
||||
* Creates a new dns_c_lstnlist_t structure from the allocator pointed to
|
||||
* by MEM, and stores the pointer to the new structure in *LLIST.
|
||||
|
|
@ -118,7 +119,8 @@ isc_result_t dns_c_lstnlist_new(isc_mem_t *mem,
|
|||
* ISC_R_NOMEMORY on allocation failure.
|
||||
*/
|
||||
|
||||
isc_result_t dns_c_lstnlist_delete(dns_c_lstnlist_t **llist);
|
||||
isc_result_t
|
||||
dns_c_lstnlist_delete(dns_c_lstnlist_t **llist);
|
||||
/*
|
||||
* Deletes the list pointed to by **LLIST, and all the elements in it.
|
||||
* Sets *LLIST to NULL when done.
|
||||
|
|
@ -131,8 +133,8 @@ isc_result_t dns_c_lstnlist_delete(dns_c_lstnlist_t **llist);
|
|||
*/
|
||||
|
||||
|
||||
isc_result_t dns_c_lstnlist_print(FILE *fp, int indent,
|
||||
dns_c_lstnlist_t *ll);
|
||||
isc_result_t
|
||||
dns_c_lstnlist_print(FILE *fp, int indent, dns_c_lstnlist_t *ll);
|
||||
/*
|
||||
* Prints the given the list LL to the stream FP. INDENT number of tabs
|
||||
* preceed each line of output.
|
||||
|
|
@ -144,8 +146,8 @@ isc_result_t dns_c_lstnlist_print(FILE *fp, int indent,
|
|||
*/
|
||||
|
||||
|
||||
isc_result_t dns_c_lstnon_new(isc_mem_t *mem,
|
||||
dns_c_lstnon_t **listen);
|
||||
isc_result_t
|
||||
dns_c_lstnon_new(isc_mem_t *mem, dns_c_lstnon_t **listen);
|
||||
/*
|
||||
* Creates a new dns_c_lstnon_t structure and stores the pointer
|
||||
* in *LISTEN.
|
||||
|
|
@ -159,7 +161,8 @@ isc_result_t dns_c_lstnon_new(isc_mem_t *mem,
|
|||
* ISC_R_NOMEMORY on allocation failure.
|
||||
*/
|
||||
|
||||
isc_result_t dns_c_lstnon_delete(dns_c_lstnon_t **listen);
|
||||
isc_result_t
|
||||
dns_c_lstnon_delete(dns_c_lstnon_t **listen);
|
||||
/*
|
||||
* Deletes the dns_c_lstnon_t structure pointed to by *LISTEN.
|
||||
*
|
||||
|
|
@ -170,9 +173,9 @@ isc_result_t dns_c_lstnon_delete(dns_c_lstnon_t **listen);
|
|||
* Returns:
|
||||
*/
|
||||
|
||||
isc_result_t dns_c_lstnon_setiml(dns_c_lstnon_t *listen,
|
||||
dns_c_ipmatchlist_t *iml,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t
|
||||
dns_c_lstnon_setiml(dns_c_lstnon_t *listen, dns_c_ipmatchlist_t *iml,
|
||||
isc_boolean_t deepcopy);
|
||||
/*
|
||||
* Sets the iml field of the structure to the value of the IML
|
||||
* parameter. If deepcopy paramater is true the structure field is
|
||||
|
|
@ -186,10 +189,9 @@ isc_result_t dns_c_lstnon_setiml(dns_c_lstnon_t *listen,
|
|||
* ISC_R_NOMEMORY on allocation failure.
|
||||
*/
|
||||
|
||||
isc_result_t dns_c_lstnon_print(FILE *fp, int indent,
|
||||
dns_c_lstnon_t *lo);
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_lstnon_print(FILE *fp, int indent, dns_c_lstnon_t *lo);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFLSN_H */
|
||||
|
|
|
|||
|
|
@ -18,14 +18,16 @@
|
|||
#ifndef DNS_CONFNDC_H
|
||||
#define DNS_CONFNDC_H 1
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/magic.h>
|
||||
#include <isc/mem.h>
|
||||
|
||||
#include <dns/confkeys.h>
|
||||
|
||||
#define DNS_C_NDCCTX_MAGIC 0xabcdef01
|
||||
#define DNS_C_NDCSERVERLIST_MAGIC 0x12345678
|
||||
#define DNS_C_NDCOPTIONS_MAGIC 0x2468ace1
|
||||
#define DNS_C_NDCSERVER_MAGIC 0xaaabbbcc
|
||||
#define DNS_C_NDCCTX_MAGIC 0xabcdef01
|
||||
#define DNS_C_NDCSERVERLIST_MAGIC 0x12345678
|
||||
#define DNS_C_NDCOPTIONS_MAGIC 0x2468ace1
|
||||
#define DNS_C_NDCSERVER_MAGIC 0xaaabbbcc
|
||||
|
||||
#define DNS_C_NDCCTX_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_NDCCTX_MAGIC)
|
||||
#define DNS_C_NDCOPTIONS_VALID(ptr) \
|
||||
|
|
@ -35,7 +37,6 @@
|
|||
#define DNS_C_NDCSERVER_VALID(ptr) \
|
||||
ISC_MAGIC_VALID(ptr, DNS_C_NDCSERVER_MAGIC)
|
||||
|
||||
|
||||
typedef struct dns_c_ndcctx dns_c_ndcctx_t;
|
||||
typedef struct dns_c_ndcopts dns_c_ndcopts_t;
|
||||
typedef struct dns_c_ndcserver dns_c_ndcserver_t;
|
||||
|
|
@ -76,81 +77,123 @@ struct dns_c_ndcserver {
|
|||
ISC_LINK(dns_c_ndcserver_t) next;
|
||||
};
|
||||
|
||||
/* All the 'set' functions do not delete the replaced value if one exists,
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
/*
|
||||
* All the 'set' functions do not delete the replaced value if one exists,
|
||||
* so if setting a value for a second time, be sure to 'get' the original
|
||||
* value first and do something with it
|
||||
*/
|
||||
|
||||
isc_result_t dns_c_ndcctx_new(isc_mem_t *mem, dns_c_ndcctx_t **ctx);
|
||||
isc_result_t dns_c_ndcctx_destroy(dns_c_ndcctx_t **ctx);
|
||||
isc_result_t dns_c_ndcctx_setoptions(dns_c_ndcctx_t *ctx,
|
||||
dns_c_ndcopts_t *opts);
|
||||
isc_result_t dns_c_ndcctx_getoptions(dns_c_ndcctx_t *ctx,
|
||||
dns_c_ndcopts_t **opts);
|
||||
isc_result_t dns_c_ndcctx_setservers(dns_c_ndcctx_t *ctx,
|
||||
dns_c_ndcserverlist_t *servers);
|
||||
isc_result_t dns_c_ndcctx_getservers(dns_c_ndcctx_t *ctx,
|
||||
dns_c_ndcserverlist_t **servers);
|
||||
isc_result_t dns_c_ndcctx_addserver(dns_c_ndcctx_t *ctx,
|
||||
dns_c_ndcserver_t **server);
|
||||
isc_result_t dns_c_ndcctx_getserver(dns_c_ndcctx_t *ctx, const char *name,
|
||||
dns_c_ndcserver_t **server);
|
||||
isc_result_t dns_c_ndcctx_getkeys(dns_c_ndcctx_t *ctx,
|
||||
dns_c_kdeflist_t **list);
|
||||
isc_result_t dns_c_ndcctx_setkeys(dns_c_ndcctx_t *ctx,
|
||||
dns_c_kdeflist_t *list);
|
||||
isc_result_t dns_c_ndcctx_addkey(dns_c_ndcctx_t *ctx,
|
||||
dns_c_kdef_t **key);
|
||||
isc_result_t
|
||||
dns_c_ndcctx_new(isc_mem_t *mem, dns_c_ndcctx_t **ctx);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcctx_destroy(dns_c_ndcctx_t **ctx);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcctx_setoptions(dns_c_ndcctx_t *ctx, dns_c_ndcopts_t *opts);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcctx_getoptions(dns_c_ndcctx_t *ctx, dns_c_ndcopts_t **opts);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcctx_setservers(dns_c_ndcctx_t *ctx, dns_c_ndcserverlist_t *servers);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcctx_getservers(dns_c_ndcctx_t *ctx, dns_c_ndcserverlist_t **servers);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcctx_addserver(dns_c_ndcctx_t *ctx, dns_c_ndcserver_t **server);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcctx_getserver(dns_c_ndcctx_t *ctx, const char *name,
|
||||
dns_c_ndcserver_t **server);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcctx_getkeys(dns_c_ndcctx_t *ctx, dns_c_kdeflist_t **list);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcctx_setkeys(dns_c_ndcctx_t *ctx, dns_c_kdeflist_t *list);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcctx_addkey(dns_c_ndcctx_t *ctx, dns_c_kdef_t **key);
|
||||
|
||||
/* SERVER LIST */
|
||||
isc_result_t dns_c_ndcserverlist_new(isc_mem_t *mem,
|
||||
dns_c_ndcserverlist_t **servers);
|
||||
isc_result_t dns_c_ndcserverlist_destroy(dns_c_ndcserverlist_t **servers);
|
||||
dns_c_ndcserver_t *dns_c_ndcserverlist_first(dns_c_ndcserverlist_t *servers);
|
||||
dns_c_ndcserver_t *dns_c_ndcserverlist_next(dns_c_ndcserver_t *servers);
|
||||
isc_result_t
|
||||
dns_c_ndcserverlist_new(isc_mem_t *mem, dns_c_ndcserverlist_t **servers);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcserverlist_destroy(dns_c_ndcserverlist_t **servers);
|
||||
|
||||
dns_c_ndcserver_t *
|
||||
dns_c_ndcserverlist_first(dns_c_ndcserverlist_t *servers);
|
||||
|
||||
dns_c_ndcserver_t *
|
||||
dns_c_ndcserverlist_next(dns_c_ndcserver_t *servers);
|
||||
|
||||
/* SERVER */
|
||||
isc_result_t dns_c_ndcserver_new(isc_mem_t *mem,
|
||||
dns_c_ndcserver_t **server);
|
||||
isc_result_t dns_c_ndcserver_destroy(dns_c_ndcserver_t **server);
|
||||
isc_result_t dns_c_ndcserver_setkey(dns_c_ndcserver_t *server,
|
||||
const char *val);
|
||||
isc_result_t dns_c_ndcserver_sethost(dns_c_ndcserver_t *server,
|
||||
const char *val);
|
||||
isc_result_t dns_c_ndcserver_setname(dns_c_ndcserver_t *server,
|
||||
const char *val);
|
||||
isc_result_t dns_c_ndcserver_getkey(dns_c_ndcserver_t *server,
|
||||
const char **val);
|
||||
isc_result_t dns_c_ndcserver_gethost(dns_c_ndcserver_t *server,
|
||||
const char **val);
|
||||
isc_result_t dns_c_ndcserver_getname(dns_c_ndcserver_t *server,
|
||||
const char **val);
|
||||
isc_result_t
|
||||
dns_c_ndcserver_new(isc_mem_t *mem, dns_c_ndcserver_t **server);
|
||||
isc_result_t
|
||||
dns_c_ndcserver_destroy(dns_c_ndcserver_t **server);
|
||||
isc_result_t
|
||||
dns_c_ndcserver_setkey(dns_c_ndcserver_t *server, const char *val);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcserver_sethost(dns_c_ndcserver_t *server, const char *val);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcserver_setname(dns_c_ndcserver_t *server, const char *val);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcserver_getkey(dns_c_ndcserver_t *server, const char **val);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcserver_gethost(dns_c_ndcserver_t *server, const char **val);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcserver_getname(dns_c_ndcserver_t *server, const char **val);
|
||||
|
||||
/* OPTIONS */
|
||||
isc_result_t dns_c_ndcopts_new(isc_mem_t *mem, dns_c_ndcopts_t **opts);
|
||||
isc_result_t dns_c_ndcopts_destroy(dns_c_ndcopts_t **opts);
|
||||
isc_result_t dns_c_ndcopts_getdefserver(dns_c_ndcopts_t *opts,
|
||||
const char **retval);
|
||||
isc_result_t dns_c_ndcopts_getdefkey(dns_c_ndcopts_t *opts,
|
||||
const char **retval);
|
||||
isc_result_t
|
||||
dns_c_ndcopts_new(isc_mem_t *mem, dns_c_ndcopts_t **opts);
|
||||
|
||||
isc_result_t dns_c_ndcopts_setdefserver(dns_c_ndcopts_t *opts,
|
||||
const char *newval);
|
||||
isc_result_t dns_c_ndcopts_setdefkey(dns_c_ndcopts_t *opts,
|
||||
const char *newval);
|
||||
isc_result_t
|
||||
dns_c_ndcopts_destroy(dns_c_ndcopts_t **opts);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcopts_getdefserver(dns_c_ndcopts_t *opts, const char **retval);
|
||||
|
||||
isc_result_t dns_c_ndcparseconf(const char *filename, isc_mem_t *mem,
|
||||
dns_c_ndcctx_t **ndcctx);
|
||||
isc_result_t
|
||||
dns_c_ndcopts_getdefkey(dns_c_ndcopts_t *opts, const char **retval);
|
||||
|
||||
void dns_c_ndcctx_print(FILE *fp, dns_c_ndcctx_t *ctx);
|
||||
void dns_c_ndcopts_print(FILE *fp, dns_c_ndcopts_t *opts);
|
||||
void dns_c_ndcserverlist_print(FILE *fp,
|
||||
dns_c_ndcserverlist_t *servers);
|
||||
void dns_c_ndcserver_print(FILE *fp, dns_c_ndcserver_t *server);
|
||||
isc_result_t
|
||||
dns_c_ndcopts_setdefserver(dns_c_ndcopts_t *opts, const char *newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcopts_setdefkey(dns_c_ndcopts_t *opts, const char *newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_ndcparseconf(const char *filename, isc_mem_t *mem,
|
||||
dns_c_ndcctx_t **ndcctx);
|
||||
|
||||
void
|
||||
dns_c_ndcctx_print(FILE *fp, dns_c_ndcctx_t *ctx);
|
||||
|
||||
void
|
||||
dns_c_ndcopts_print(FILE *fp, dns_c_ndcopts_t *opts);
|
||||
|
||||
void
|
||||
dns_c_ndcserverlist_print(FILE *fp, dns_c_ndcserverlist_t *servers);
|
||||
|
||||
void
|
||||
dns_c_ndcserver_print(FILE *fp, dns_c_ndcserver_t *server);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFNDC_H */
|
||||
|
|
|
|||
|
|
@ -54,15 +54,11 @@
|
|||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/confctx.h>
|
||||
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
/*
|
||||
* Typedefs for the callbacks done while parsing. If the callback functions
|
||||
* return anything other than ISC_R_SUCCESS, then the parse routine
|
||||
|
|
@ -75,8 +71,7 @@ typedef isc_result_t (*dns_c_zonecbk_t)(dns_c_ctx_t *ctx,
|
|||
void *uap);
|
||||
typedef isc_result_t (*dns_c_optscbk_t)(dns_c_ctx_t *ctx, void *uap);
|
||||
|
||||
typedef struct dns_c_cbks
|
||||
{
|
||||
typedef struct dns_c_cbks {
|
||||
dns_c_zonecbk_t zonecbk;
|
||||
void *zonecbkuap;
|
||||
|
||||
|
|
@ -84,10 +79,15 @@ typedef struct dns_c_cbks
|
|||
void *optscbkuap;
|
||||
} dns_c_cbks_t;
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t dns_c_parse_namedconf(const char *filename, isc_mem_t *mem,
|
||||
dns_c_ctx_t **configctx,
|
||||
dns_c_cbks_t *callbacks);
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_c_parse_namedconf(const char *filename, isc_mem_t *mem,
|
||||
dns_c_ctx_t **configctx, dns_c_cbks_t *callbacks);
|
||||
|
||||
/*
|
||||
* Parse a named confile file. Fills up a new config context with the config
|
||||
|
|
@ -111,4 +111,6 @@ isc_result_t dns_c_parse_namedconf(const char *filename, isc_mem_t *mem,
|
|||
* ISC_R_FAILURE file contains errors.
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFPARSER_H */
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
/***
|
||||
|
|
@ -58,21 +59,20 @@
|
|||
|
||||
typedef struct dns_c_resolv dns_c_resolv_t;
|
||||
|
||||
struct dns_c_resolv
|
||||
{
|
||||
struct dns_c_resolv {
|
||||
isc_mem_t *mem;
|
||||
|
||||
/* XXX need this fleshed out */
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t dns_c_resolv_new(isc_mem_t *mem, dns_c_resolv_t **cfgres);
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_c_resolv_new(isc_mem_t *mem, dns_c_resolv_t **cfgres);
|
||||
/*
|
||||
* Creates a new resolver-config object.
|
||||
*
|
||||
|
|
@ -86,7 +86,8 @@ isc_result_t dns_c_resolv_new(isc_mem_t *mem, dns_c_resolv_t **cfgres);
|
|||
*
|
||||
*/
|
||||
|
||||
isc_result_t dns_c_resolv_delete(dns_c_resolv_t **cfgres);
|
||||
isc_result_t
|
||||
dns_c_resolv_delete(dns_c_resolv_t **cfgres);
|
||||
/*
|
||||
* Deletes the config-resolv object and its contents.
|
||||
*
|
||||
|
|
@ -99,5 +100,6 @@ isc_result_t dns_c_resolv_delete(dns_c_resolv_t **cfgres);
|
|||
*
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFRESOLV_H */
|
||||
|
|
|
|||
|
|
@ -44,13 +44,11 @@
|
|||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/mem.h>
|
||||
|
||||
/* XXX these next two are needed by rdatatype.h. It should be fixed to
|
||||
* include them itself.
|
||||
*/
|
||||
#include <isc/buffer.h>
|
||||
#include <dns/result.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/mem.h>
|
||||
|
||||
#include <dns/rdatatype.h>
|
||||
|
||||
|
|
@ -58,24 +56,20 @@
|
|||
|
||||
|
||||
#define DNS_C_RRSOLIST_MAGIC 0x5252534c /* RRSL */
|
||||
#define DNS_C_RRSO_MAGIC 0x7272736f /* rrso */
|
||||
#define DNS_C_RRSO_MAGIC 0x7272736f /* rrso */
|
||||
|
||||
#define DNS_C_RRSOLIST_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_RRSOLIST_MAGIC)
|
||||
#define DNS_C_RRSO_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_RRSO_MAGIC)
|
||||
|
||||
|
||||
#define DNS_C_RRSO_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_RRSO_MAGIC)
|
||||
|
||||
/***
|
||||
*** Types
|
||||
***/
|
||||
|
||||
|
||||
typedef struct dns_c_rrso dns_c_rrso_t;
|
||||
typedef struct dns_c_rrso_list dns_c_rrsolist_t;
|
||||
|
||||
|
||||
struct dns_c_rrso
|
||||
{
|
||||
struct dns_c_rrso {
|
||||
isc_uint32_t magic;
|
||||
|
||||
isc_mem_t *mem;
|
||||
|
|
@ -88,9 +82,7 @@ struct dns_c_rrso
|
|||
ISC_LINK(dns_c_rrso_t) next;
|
||||
};
|
||||
|
||||
|
||||
struct dns_c_rrso_list
|
||||
{
|
||||
struct dns_c_rrso_list {
|
||||
isc_uint32_t magic;
|
||||
|
||||
isc_mem_t *mem;
|
||||
|
|
@ -99,36 +91,44 @@ struct dns_c_rrso_list
|
|||
|
||||
};
|
||||
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t dns_c_rrsolist_new(isc_mem_t *mem,
|
||||
dns_c_rrsolist_t **rval);
|
||||
isc_result_t dns_c_rrsolist_delete(dns_c_rrsolist_t **list);
|
||||
isc_result_t dns_c_rrsolist_copy(isc_mem_t *mem,
|
||||
dns_c_rrsolist_t **dest,
|
||||
dns_c_rrsolist_t *source);
|
||||
isc_result_t dns_c_rrsolist_clear(dns_c_rrsolist_t *olist);
|
||||
isc_result_t dns_c_rrsolist_append(dns_c_rrsolist_t *dest,
|
||||
dns_c_rrsolist_t *src);
|
||||
isc_result_t
|
||||
dns_c_rrsolist_new(isc_mem_t *mem, dns_c_rrsolist_t **rval);
|
||||
|
||||
isc_result_t dns_c_rrso_new(isc_mem_t *mem,
|
||||
dns_c_rrso_t **res,
|
||||
dns_rdataclass_t oclass,
|
||||
dns_rdatatype_t otype,
|
||||
char *name,
|
||||
dns_c_ordering_t ordering);
|
||||
isc_result_t dns_c_rrso_delete(dns_c_rrso_t **order);
|
||||
isc_result_t dns_c_rrso_copy(isc_mem_t *mem,
|
||||
dns_c_rrso_t **dest,
|
||||
dns_c_rrso_t *source);
|
||||
void dns_c_rrsolist_print(FILE *fp, int indent,
|
||||
dns_c_rrsolist_t *rrlist);
|
||||
void dns_c_rrso_print(FILE *fp, int indent,
|
||||
dns_c_rrso_t *rrlist);
|
||||
isc_result_t
|
||||
dns_c_rrsolist_delete(dns_c_rrsolist_t **list);
|
||||
|
||||
isc_result_t
|
||||
dns_c_rrsolist_copy(isc_mem_t *mem, dns_c_rrsolist_t **dest,
|
||||
dns_c_rrsolist_t *source);
|
||||
|
||||
isc_result_t
|
||||
dns_c_rrsolist_clear(dns_c_rrsolist_t *olist);
|
||||
|
||||
isc_result_t
|
||||
dns_c_rrsolist_append(dns_c_rrsolist_t *dest, dns_c_rrsolist_t *src);
|
||||
|
||||
isc_result_t
|
||||
dns_c_rrso_new(isc_mem_t *mem, dns_c_rrso_t **res, dns_rdataclass_t oclass,
|
||||
dns_rdatatype_t otype, char *name, dns_c_ordering_t ordering);
|
||||
|
||||
isc_result_t
|
||||
dns_c_rrso_delete(dns_c_rrso_t **order);
|
||||
|
||||
isc_result_t
|
||||
dns_c_rrso_copy(isc_mem_t *mem, dns_c_rrso_t **dest, dns_c_rrso_t *source);
|
||||
|
||||
void
|
||||
dns_c_rrsolist_print(FILE *fp, int indent, dns_c_rrsolist_t *rrlist);
|
||||
|
||||
void
|
||||
dns_c_rrso_print(FILE *fp, int indent, dns_c_rrso_t *rrlist);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFRRSET_H */
|
||||
|
|
|
|||
|
|
@ -53,11 +53,9 @@
|
|||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/mem.h>
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dns/rdatatype.h>
|
||||
|
||||
#include <dns/confcommon.h>
|
||||
|
|
@ -87,8 +85,7 @@ typedef struct dns_c_view dns_c_view_t;
|
|||
typedef struct dns_c_viewtable dns_c_viewtable_t;
|
||||
|
||||
|
||||
struct dns_c_viewtable
|
||||
{
|
||||
struct dns_c_viewtable {
|
||||
isc_uint32_t magic;
|
||||
|
||||
isc_mem_t *mem;
|
||||
|
|
@ -96,9 +93,7 @@ struct dns_c_viewtable
|
|||
ISC_LIST(dns_c_view_t) views;
|
||||
};
|
||||
|
||||
|
||||
struct dns_c_view
|
||||
{
|
||||
struct dns_c_view {
|
||||
isc_uint32_t magic;
|
||||
isc_mem_t *mem;
|
||||
|
||||
|
|
@ -165,33 +160,42 @@ struct dns_c_view
|
|||
ISC_LINK(dns_c_view_t) next;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t dns_c_viewtable_new(isc_mem_t *mem,
|
||||
dns_c_viewtable_t **viewtable);
|
||||
isc_result_t dns_c_viewtable_delete(dns_c_viewtable_t **viewtable);
|
||||
void dns_c_viewtable_print(FILE *fp, int indent,
|
||||
dns_c_viewtable_t *table);
|
||||
void dns_c_viewtable_addview(dns_c_viewtable_t *viewtable,
|
||||
dns_c_view_t *view);
|
||||
void dns_c_viewtable_rmview(dns_c_viewtable_t *viewtable,
|
||||
dns_c_view_t *view);
|
||||
isc_result_t dns_c_viewtable_clear(dns_c_viewtable_t *table);
|
||||
isc_result_t dns_c_viewtable_viewbyname(dns_c_viewtable_t *viewtable,
|
||||
const char *viewname,
|
||||
dns_c_view_t **retval);
|
||||
isc_result_t dns_c_viewtable_rmviewbyname(dns_c_viewtable_t *viewtable,
|
||||
const char *name);
|
||||
isc_result_t dns_c_viewtable_checkviews(dns_c_viewtable_t *viewtable);
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_c_viewtable_new(isc_mem_t *mem, dns_c_viewtable_t **viewtable);
|
||||
|
||||
isc_result_t
|
||||
dns_c_viewtable_delete(dns_c_viewtable_t **viewtable);
|
||||
|
||||
void
|
||||
dns_c_viewtable_print(FILE *fp, int indent, dns_c_viewtable_t *table);
|
||||
|
||||
void
|
||||
dns_c_viewtable_addview(dns_c_viewtable_t *viewtable, dns_c_view_t *view);
|
||||
|
||||
void
|
||||
dns_c_viewtable_rmview(dns_c_viewtable_t *viewtable, dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_viewtable_clear(dns_c_viewtable_t *table);
|
||||
|
||||
isc_result_t
|
||||
dns_c_viewtable_viewbyname(dns_c_viewtable_t *viewtable, const char *viewname,
|
||||
dns_c_view_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_viewtable_rmviewbyname(dns_c_viewtable_t *viewtable, const char *name);
|
||||
|
||||
isc_result_t
|
||||
dns_c_viewtable_checkviews(dns_c_viewtable_t *viewtable);
|
||||
|
||||
/* NOTE: For the various get* functions. The caller must not delete the
|
||||
* refutned value.
|
||||
* returned value.
|
||||
*
|
||||
* - For functions where retval is a dns_c_ipmatchlist_t
|
||||
* (e.g. dns_c_view_getallowquery) the caller must call
|
||||
|
|
@ -199,259 +203,335 @@ isc_result_t dns_c_viewtable_checkviews(dns_c_viewtable_t *viewtable);
|
|||
*
|
||||
*/
|
||||
|
||||
isc_result_t dns_c_view_new(isc_mem_t *mem, const char *name,
|
||||
dns_rdataclass_t viewclass,
|
||||
dns_c_view_t **newview);
|
||||
isc_result_t
|
||||
dns_c_view_new(isc_mem_t *mem, const char *name, dns_rdataclass_t viewclass,
|
||||
dns_c_view_t **newview);
|
||||
|
||||
isc_result_t dns_c_view_delete(dns_c_view_t **viewptr);
|
||||
void dns_c_view_print(FILE *fp, int indent, dns_c_view_t *view);
|
||||
isc_boolean_t dns_c_view_keydefinedp(dns_c_view_t *view,
|
||||
const char *keyname);
|
||||
isc_result_t
|
||||
dns_c_view_delete(dns_c_view_t **viewptr);
|
||||
|
||||
void
|
||||
dns_c_view_print(FILE *fp, int indent, dns_c_view_t *view);
|
||||
|
||||
isc_result_t dns_c_view_getname(dns_c_view_t *view,
|
||||
const char **retval);
|
||||
isc_result_t dns_c_view_addzone(dns_c_view_t *view, dns_c_zone_t *zone);
|
||||
isc_boolean_t
|
||||
dns_c_view_keydefinedp(dns_c_view_t *view, const char *keyname);
|
||||
|
||||
isc_result_t dns_c_view_getzonelist(dns_c_view_t *view,
|
||||
dns_c_zonelist_t **zonelist);
|
||||
isc_result_t dns_c_view_unsetzonelist(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_getname(dns_c_view_t *view, const char **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_addzone(dns_c_view_t *view, dns_c_zone_t *zone);
|
||||
|
||||
isc_result_t dns_c_view_getviewclass(dns_c_view_t *view,
|
||||
dns_rdataclass_t *retval);
|
||||
isc_result_t
|
||||
dns_c_view_getzonelist(dns_c_view_t *view, dns_c_zonelist_t **zonelist);
|
||||
|
||||
isc_result_t dns_c_view_getforward(dns_c_view_t *view,
|
||||
dns_c_forw_t *retval);
|
||||
isc_result_t dns_c_view_setforward(dns_c_view_t *view,
|
||||
dns_c_forw_t newval);
|
||||
isc_result_t dns_c_view_unsetforward(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_unsetzonelist(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getviewclass(dns_c_view_t *view, dns_rdataclass_t *retval);
|
||||
|
||||
isc_result_t dns_c_view_setforwarders(dns_c_view_t *view,
|
||||
dns_c_iplist_t *ipl,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_view_unsetforwarders(dns_c_view_t *view);
|
||||
isc_result_t dns_c_view_getforwarders(dns_c_view_t *view,
|
||||
dns_c_iplist_t **ipl);
|
||||
isc_result_t
|
||||
dns_c_view_getforward(dns_c_view_t *view, dns_c_forw_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setforward(dns_c_view_t *view, dns_c_forw_t newval);
|
||||
|
||||
isc_result_t dns_c_view_getallowquery(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
isc_result_t dns_c_view_setallowquery(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t *newval);
|
||||
isc_result_t dns_c_view_unsetallowquery(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_unsetforward(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setforwarders(dns_c_view_t *view, dns_c_iplist_t *ipl,
|
||||
isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t dns_c_view_getallowupdateforwarding(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
isc_result_t dns_c_view_setallowupdateforwarding(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t *newval);
|
||||
isc_result_t dns_c_view_unsetallowupdateforwarding(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_unsetforwarders(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getforwarders(dns_c_view_t *view, dns_c_iplist_t **ipl);
|
||||
|
||||
isc_result_t dns_c_view_gettransferacl(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
isc_result_t dns_c_view_settransferacl(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t *newval);
|
||||
isc_result_t dns_c_view_unsettransferacl(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_getallowquery(dns_c_view_t *view, dns_c_ipmatchlist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setallowquery(dns_c_view_t *view, dns_c_ipmatchlist_t *newval);
|
||||
|
||||
isc_result_t dns_c_view_getrecursionacl(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
isc_result_t dns_c_view_setrecursionacl(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t *newval);
|
||||
isc_result_t dns_c_view_unsetrecursionacl(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_unsetallowquery(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getallowupdateforwarding(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
|
||||
isc_result_t dns_c_view_getsortlist(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
isc_result_t dns_c_view_setsortlist(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t *newval);
|
||||
isc_result_t dns_c_view_unsetsortlist(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_setallowupdateforwarding(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t *newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetallowupdateforwarding(dns_c_view_t *view);
|
||||
|
||||
isc_result_t dns_c_view_gettopology(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
isc_result_t dns_c_view_settopology(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t *newval);
|
||||
isc_result_t dns_c_view_unsettopology(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_gettransferacl(dns_c_view_t *view, dns_c_ipmatchlist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_settransferacl(dns_c_view_t *view, dns_c_ipmatchlist_t *newval);
|
||||
|
||||
isc_result_t dns_c_view_getmatchclients(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
isc_result_t dns_c_view_setmatchclients(dns_c_view_t *view,
|
||||
dns_c_ipmatchlist_t *newval);
|
||||
isc_result_t dns_c_view_unsetmatchclients(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_unsettransferacl(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getrecursionacl(dns_c_view_t *view, dns_c_ipmatchlist_t **retval);
|
||||
|
||||
isc_result_t dns_c_view_getordering(dns_c_view_t *view,
|
||||
dns_c_rrsolist_t **olist);
|
||||
isc_result_t dns_c_view_setordering(dns_c_view_t *view,
|
||||
isc_boolean_t copy,
|
||||
dns_c_rrsolist_t *olist);
|
||||
isc_result_t dns_c_view_unsetordering(dns_c_view_t *view,
|
||||
dns_c_rrsolist_t **olist);
|
||||
isc_result_t
|
||||
dns_c_view_setrecursionacl(dns_c_view_t *view, dns_c_ipmatchlist_t *newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetrecursionacl(dns_c_view_t *view);
|
||||
|
||||
isc_result_t dns_c_view_setchecknames(dns_c_view_t *view,
|
||||
dns_c_trans_t transtype,
|
||||
dns_severity_t newval);
|
||||
isc_result_t dns_c_view_getchecknames(dns_c_view_t *view,
|
||||
dns_c_trans_t transtype,
|
||||
dns_severity_t *retval);
|
||||
isc_result_t dns_c_view_unsetchecknames(dns_c_view_t *view,
|
||||
dns_c_trans_t transtype);
|
||||
isc_result_t
|
||||
dns_c_view_getsortlist(dns_c_view_t *view, dns_c_ipmatchlist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setsortlist(dns_c_view_t *view, dns_c_ipmatchlist_t *newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetsortlist(dns_c_view_t *view);
|
||||
|
||||
isc_result_t dns_c_view_getauthnxdomain(dns_c_view_t *view,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_view_setauthnxdomain(dns_c_view_t *view,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_view_unsetauthnxdomain(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_gettopology(dns_c_view_t *view, dns_c_ipmatchlist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_settopology(dns_c_view_t *view, dns_c_ipmatchlist_t *newval);
|
||||
|
||||
isc_result_t dns_c_view_getrecursion(dns_c_view_t *view,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_view_setrecursion(dns_c_view_t *view,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_view_unsetrecursion(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_unsettopology(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getmatchclients(dns_c_view_t *view, dns_c_ipmatchlist_t **retval);
|
||||
|
||||
isc_result_t dns_c_view_getprovideixfr(dns_c_view_t *view,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_view_setprovideixfr(dns_c_view_t *view,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_view_unsetprovideixfr(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_setmatchclients(dns_c_view_t *view, dns_c_ipmatchlist_t *newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetmatchclients(dns_c_view_t *view);
|
||||
|
||||
isc_result_t dns_c_view_getrequestixfr(dns_c_view_t *view,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_view_setrequestixfr(dns_c_view_t *view,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_view_unsetrequestixfr(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_getordering(dns_c_view_t *view, dns_c_rrsolist_t **olist);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setordering(dns_c_view_t *view, isc_boolean_t copy,
|
||||
dns_c_rrsolist_t *olist);
|
||||
|
||||
isc_result_t dns_c_view_getfetchglue(dns_c_view_t *view,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_view_setfetchglue(dns_c_view_t *view,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_view_unsetfetchglue(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_unsetordering(dns_c_view_t *view, dns_c_rrsolist_t **olist);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setchecknames(dns_c_view_t *view, dns_c_trans_t transtype,
|
||||
dns_severity_t newval);
|
||||
|
||||
isc_result_t dns_c_view_getnotify(dns_c_view_t *view,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_view_setnotify(dns_c_view_t *view,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_view_unsetnotify(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_getchecknames(dns_c_view_t *view, dns_c_trans_t transtype,
|
||||
dns_severity_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetchecknames(dns_c_view_t *view, dns_c_trans_t transtype);
|
||||
|
||||
isc_result_t dns_c_view_getrfc2308type1(dns_c_view_t *view,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_view_setrfc2308type1(dns_c_view_t *view,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_view_unsetrfc2308type1(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_getauthnxdomain(dns_c_view_t *view, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setauthnxdomain(dns_c_view_t *view, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetauthnxdomain(dns_c_view_t *view);
|
||||
|
||||
isc_result_t dns_c_view_settransfersource(dns_c_view_t *view,
|
||||
isc_sockaddr_t transfer_source);
|
||||
isc_result_t dns_c_view_gettransfersource(dns_c_view_t *view,
|
||||
isc_sockaddr_t *transfer_source);
|
||||
isc_result_t dns_c_view_unsettransfersource(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_getrecursion(dns_c_view_t *view, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setrecursion(dns_c_view_t *view, isc_boolean_t newval);
|
||||
|
||||
isc_result_t dns_c_view_settransfersourcev6(dns_c_view_t *view,
|
||||
isc_sockaddr_t transfer_source_v6);
|
||||
isc_result_t dns_c_view_gettransfersourcev6(dns_c_view_t *view,
|
||||
isc_sockaddr_t *transfer_source_v6);
|
||||
isc_result_t dns_c_view_unsettransfersourcev6(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_unsetrecursion(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getprovideixfr(dns_c_view_t *view, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t dns_c_view_setquerysource(dns_c_view_t *view,
|
||||
isc_sockaddr_t query_source);
|
||||
isc_result_t dns_c_view_getquerysource(dns_c_view_t *view,
|
||||
isc_sockaddr_t *query_source);
|
||||
isc_result_t dns_c_view_unsetquerysource(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_setprovideixfr(dns_c_view_t *view, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetprovideixfr(dns_c_view_t *view);
|
||||
|
||||
isc_result_t dns_c_view_setquerysourcev6(dns_c_view_t *view,
|
||||
isc_sockaddr_t query_source_v6);
|
||||
isc_result_t dns_c_view_getquerysourcev6(dns_c_view_t *view,
|
||||
isc_sockaddr_t *query_source_v6);
|
||||
isc_result_t dns_c_view_unsetquerysourcev6(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_getrequestixfr(dns_c_view_t *view, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setrequestixfr(dns_c_view_t *view, isc_boolean_t newval);
|
||||
|
||||
isc_result_t dns_c_view_getmaxtransferidleout(dns_c_view_t *view,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_view_setmaxtransferidleout(dns_c_view_t *view,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_view_unsetmaxtransferidleout(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_unsetrequestixfr(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getfetchglue(dns_c_view_t *view, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t dns_c_view_getmaxtransfertimeout(dns_c_view_t *view,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_view_setmaxtransfertimeout(dns_c_view_t *view,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_view_unsetmaxtransfertimeout(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_setfetchglue(dns_c_view_t *view, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetfetchglue(dns_c_view_t *view);
|
||||
|
||||
isc_result_t dns_c_view_getcleaninterval(dns_c_view_t *view,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_view_setcleaninterval(dns_c_view_t *view,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_view_unsetcleaninterval(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_getnotify(dns_c_view_t *view, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setnotify(dns_c_view_t *view, isc_boolean_t newval);
|
||||
|
||||
isc_result_t dns_c_view_getminroots(dns_c_view_t *view,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_view_setminroots(dns_c_view_t *view,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_view_unsetminroots(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_unsetnotify(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getrfc2308type1(dns_c_view_t *view, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t dns_c_view_getlamettl(dns_c_view_t *view,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_view_setlamettl(dns_c_view_t *view,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_view_unsetlamettl(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_setrfc2308type1(dns_c_view_t *view, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetrfc2308type1(dns_c_view_t *view);
|
||||
|
||||
isc_result_t dns_c_view_getmaxncachettl(dns_c_view_t *view,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_view_setmaxncachettl(dns_c_view_t *view,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_view_unsetmaxncachettl(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_settransfersource(dns_c_view_t *view,
|
||||
isc_sockaddr_t transfer_source);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_gettransfersource(dns_c_view_t *view,
|
||||
isc_sockaddr_t *transfer_source);
|
||||
|
||||
isc_result_t dns_c_view_settransferformat(dns_c_view_t *view,
|
||||
dns_transfer_format_t tformat);
|
||||
isc_result_t dns_c_view_gettransferformat(dns_c_view_t *view,
|
||||
dns_transfer_format_t *tformat);
|
||||
isc_result_t dns_c_view_unsettransferformat(dns_c_view_t *cfg);
|
||||
isc_result_t
|
||||
dns_c_view_unsettransfersource(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_settransfersourcev6(dns_c_view_t *view,
|
||||
isc_sockaddr_t transfer_source_v6);
|
||||
|
||||
/* Caller must not delete retval */
|
||||
isc_result_t dns_c_view_getkeydefs(dns_c_view_t *view,
|
||||
dns_c_kdeflist_t **retval);
|
||||
isc_result_t dns_c_view_setkeydefs(dns_c_view_t *view,
|
||||
dns_c_kdeflist_t *newval);
|
||||
isc_result_t dns_c_view_unsetkeydefs(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_gettransfersourcev6(dns_c_view_t *view,
|
||||
isc_sockaddr_t *transfer_source_v6);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsettransfersourcev6(dns_c_view_t *view);
|
||||
|
||||
/* detach when done with retval */
|
||||
isc_result_t dns_c_view_getpeerlist(dns_c_view_t *cfg,
|
||||
dns_peerlist_t **retval);
|
||||
/* cfg will attach to newval */
|
||||
isc_result_t dns_c_view_setpeerlist(dns_c_view_t *cfg,
|
||||
dns_peerlist_t *newval);
|
||||
isc_result_t dns_c_view_unsetpeerlist(dns_c_view_t *cfg);
|
||||
isc_result_t
|
||||
dns_c_view_setquerysource(dns_c_view_t *view, isc_sockaddr_t query_source);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getquerysource(dns_c_view_t *view, isc_sockaddr_t *query_source);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetquerysource(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setquerysourcev6(dns_c_view_t *view,
|
||||
isc_sockaddr_t query_source_v6);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getquerysourcev6(dns_c_view_t *view,
|
||||
isc_sockaddr_t *query_source_v6);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetquerysourcev6(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getmaxtransferidleout(dns_c_view_t *view, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setmaxtransferidleout(dns_c_view_t *view, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetmaxtransferidleout(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getmaxtransfertimeout(dns_c_view_t *view, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setmaxtransfertimeout(dns_c_view_t *view, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetmaxtransfertimeout(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getcleaninterval(dns_c_view_t *view, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setcleaninterval(dns_c_view_t *view, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetcleaninterval(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getminroots(dns_c_view_t *view, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setminroots(dns_c_view_t *view, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetminroots(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getlamettl(dns_c_view_t *view, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setlamettl(dns_c_view_t *view, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetlamettl(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getmaxncachettl(dns_c_view_t *view, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setmaxncachettl(dns_c_view_t *view, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetmaxncachettl(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_settransferformat(dns_c_view_t *view,
|
||||
dns_transfer_format_t tformat);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_gettransferformat(dns_c_view_t *view,
|
||||
dns_transfer_format_t *tformat);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsettransferformat(dns_c_view_t *cfg);
|
||||
|
||||
/*
|
||||
* Caller must not delete retval.
|
||||
*/
|
||||
isc_result_t
|
||||
dns_c_view_getkeydefs(dns_c_view_t *view, dns_c_kdeflist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setkeydefs(dns_c_view_t *view, dns_c_kdeflist_t *newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetkeydefs(dns_c_view_t *view);
|
||||
|
||||
/*
|
||||
* Detach when done with retval.
|
||||
*/
|
||||
isc_result_t
|
||||
dns_c_view_getpeerlist(dns_c_view_t *cfg, dns_peerlist_t **retval);
|
||||
|
||||
/*
|
||||
* cfg will attach to newval.
|
||||
*/
|
||||
isc_result_t
|
||||
dns_c_view_setpeerlist(dns_c_view_t *cfg, dns_peerlist_t *newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetpeerlist(dns_c_view_t *cfg);
|
||||
|
||||
#if 0
|
||||
|
||||
|
|
@ -459,38 +539,44 @@ isc_result_t dns_c_view_unsetpeerlist(dns_c_view_t *cfg);
|
|||
* XXX waiting to server to implement these items before enabling them
|
||||
*/
|
||||
|
||||
isc_result_t dns_c_view_getmaxtransfertimein(dns_c_view_t *view,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_view_setmaxtransfertimein(dns_c_view_t *view,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_view_unsetmaxtransfertimein(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_getmaxtransfertimein(dns_c_view_t *view, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setmaxtransfertimein(dns_c_view_t *view, isc_int32_t newval);
|
||||
|
||||
isc_result_t dns_c_view_getmaxtransferidlein(dns_c_view_t *view,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_view_setmaxtransferidlein(dns_c_view_t *view,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_view_unsetmaxtransferidlein(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_unsetmaxtransfertimein(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getmaxtransferidlein(dns_c_view_t *view, isc_int32_t *retval);
|
||||
|
||||
isc_result_t dns_c_view_gettransfersperns(dns_c_view_t *view,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_view_settransfersperns(dns_c_view_t *view,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_view_unsettransfersperns(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_setmaxtransferidlein(dns_c_view_t *view, isc_int32_t newval);
|
||||
|
||||
isc_result_t dns_c_view_getserialqueries(dns_c_view_t *view,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_view_setserialqueries(dns_c_view_t *view,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_view_unsetserialqueries(dns_c_view_t *view);
|
||||
isc_result_t
|
||||
dns_c_view_unsetmaxtransferidlein(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_gettransfersperns(dns_c_view_t *view, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_settransfersperns(dns_c_view_t *view, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsettransfersperns(dns_c_view_t *view);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_getserialqueries(dns_c_view_t *view, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_setserialqueries(dns_c_view_t *view, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_view_unsetserialqueries(dns_c_view_t *view);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFVIEW_H */
|
||||
|
|
|
|||
|
|
@ -53,14 +53,9 @@
|
|||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/mem.h>
|
||||
|
||||
/* XXX these next two are needed by rdatatype.h. It should be fixed to
|
||||
* include them itself.
|
||||
*/
|
||||
#include <isc/buffer.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dns/rdatatype.h>
|
||||
|
||||
#include <dns/confcommon.h>
|
||||
|
|
@ -71,8 +66,7 @@
|
|||
#define DNS_C_ZONE_MAGIC 0x7a4f6e45 /* zOnE */
|
||||
|
||||
#define DNS_C_ZONELIST_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_ZONELIST_MAGIC)
|
||||
#define DNS_C_ZONE_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_ZONE_MAGIC)
|
||||
|
||||
#define DNS_C_ZONE_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_C_ZONE_MAGIC)
|
||||
|
||||
/***
|
||||
*** Types
|
||||
|
|
@ -93,25 +87,19 @@ typedef struct dns_c_zonelem dns_c_zonelem_t;
|
|||
typedef struct dns_c_zone_list dns_c_zonelist_t;
|
||||
#endif
|
||||
|
||||
|
||||
struct dns_c_zonelem
|
||||
{
|
||||
struct dns_c_zonelem {
|
||||
dns_c_zone_t *thezone;
|
||||
ISC_LINK(dns_c_zonelem_t) next;
|
||||
};
|
||||
|
||||
|
||||
struct dns_c_zone_list
|
||||
{
|
||||
struct dns_c_zone_list {
|
||||
isc_int32_t magic;
|
||||
isc_mem_t *mem;
|
||||
|
||||
ISC_LIST(dns_c_zonelem_t) zones;
|
||||
};
|
||||
|
||||
|
||||
struct dns_c_master_zone
|
||||
{
|
||||
struct dns_c_master_zone {
|
||||
char *file;
|
||||
dns_severity_t check_names;
|
||||
dns_c_ipmatchlist_t *allow_update;
|
||||
|
|
@ -136,9 +124,7 @@ struct dns_c_master_zone
|
|||
dns_c_setbits_t setflags;
|
||||
};
|
||||
|
||||
|
||||
struct dns_c_slave_zone
|
||||
{
|
||||
struct dns_c_slave_zone {
|
||||
char *file;
|
||||
dns_severity_t check_names;
|
||||
dns_c_ipmatchlist_t *allow_update;
|
||||
|
|
@ -168,9 +154,7 @@ struct dns_c_slave_zone
|
|||
dns_c_setbits_t setflags;
|
||||
};
|
||||
|
||||
|
||||
struct dns_c_stub_zone
|
||||
{
|
||||
struct dns_c_stub_zone {
|
||||
char *file;
|
||||
dns_severity_t check_names;
|
||||
dns_c_ipmatchlist_t *allow_update; /* should be here??? */
|
||||
|
|
@ -192,10 +176,7 @@ struct dns_c_stub_zone
|
|||
dns_c_setbits_t setflags;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct dns_c_forward_zone
|
||||
{
|
||||
struct dns_c_forward_zone {
|
||||
dns_severity_t check_names;
|
||||
dns_c_forw_t forward;
|
||||
dns_c_iplist_t *forwarders;
|
||||
|
|
@ -203,9 +184,7 @@ struct dns_c_forward_zone
|
|||
dns_c_setbits_t setflags;
|
||||
};
|
||||
|
||||
|
||||
struct dns_c_hint_zone
|
||||
{
|
||||
struct dns_c_hint_zone {
|
||||
char *file;
|
||||
dns_severity_t check_names;
|
||||
dns_c_pklist_t *pubkeylist;
|
||||
|
|
@ -213,9 +192,7 @@ struct dns_c_hint_zone
|
|||
dns_c_setbits_t setflags;
|
||||
};
|
||||
|
||||
|
||||
struct dns_c_zone
|
||||
{
|
||||
struct dns_c_zone {
|
||||
isc_int32_t magic;
|
||||
|
||||
isc_mem_t *mem;
|
||||
|
|
@ -239,165 +216,238 @@ struct dns_c_zone
|
|||
isc_boolean_t afteropts;
|
||||
};
|
||||
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t dns_c_zonelist_new(isc_mem_t *mem,
|
||||
dns_c_zonelist_t **zlist);
|
||||
isc_result_t dns_c_zonelist_delete(dns_c_zonelist_t **zlist);
|
||||
isc_result_t dns_c_zonelist_checkzones(dns_c_zonelist_t *zlist);
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
|
||||
isc_result_t
|
||||
dns_c_zonelist_new(isc_mem_t *mem, dns_c_zonelist_t **zlist);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zonelist_delete(dns_c_zonelist_t **zlist);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zonelist_checkzones(dns_c_zonelist_t *zlist);
|
||||
|
||||
#if 0
|
||||
dns_c_zone_t *dns_c_zonelist_currzone(dns_c_zonelist_t *zlist);
|
||||
dns_c_zone_t *
|
||||
dns_c_zonelist_currzone(dns_c_zonelist_t *zlist);
|
||||
#endif
|
||||
|
||||
isc_result_t dns_c_zonelist_find(dns_c_zonelist_t *zlist,
|
||||
const char *name, dns_c_zone_t **retval);
|
||||
isc_result_t dns_c_zonelist_rmbyname(dns_c_zonelist_t *zlist,
|
||||
const char *name);
|
||||
isc_result_t dns_c_zonelist_addzone(dns_c_zonelist_t *zlist,
|
||||
dns_c_zone_t *zone);
|
||||
isc_result_t dns_c_zonelist_rmzone(dns_c_zonelist_t *zlist,
|
||||
dns_c_zone_t *zone);
|
||||
void dns_c_zonelist_print(FILE *fp, int indent,
|
||||
dns_c_zonelist_t *list);
|
||||
void dns_c_zonelist_printpostopts(FILE *fp,
|
||||
int indent,
|
||||
dns_c_zonelist_t *list);
|
||||
void dns_c_zonelist_printpreopts(FILE *fp,
|
||||
int indent,
|
||||
dns_c_zonelist_t *list);
|
||||
isc_result_t
|
||||
dns_c_zonelist_find(dns_c_zonelist_t *zlist, const char *name,
|
||||
dns_c_zone_t **retval);
|
||||
|
||||
dns_c_zone_t *dns_c_zonelist_firstzone(dns_c_zonelist_t *list);
|
||||
dns_c_zone_t *dns_c_zonelist_nextzone(dns_c_zonelist_t *list,
|
||||
dns_c_zone_t *thezone);
|
||||
isc_result_t
|
||||
dns_c_zonelist_rmbyname(dns_c_zonelist_t *zlist, const char *name);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zonelist_addzone(dns_c_zonelist_t *zlist, dns_c_zone_t *zone);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zonelist_rmzone(dns_c_zonelist_t *zlist, dns_c_zone_t *zone);
|
||||
|
||||
isc_result_t dns_c_zone_new(isc_mem_t *mem,
|
||||
dns_c_zonetype_t ztype, dns_rdataclass_t zclass,
|
||||
const char *name, const char *internalname,
|
||||
dns_c_zone_t **zone);
|
||||
isc_result_t dns_c_zone_detach(dns_c_zone_t **zone);
|
||||
void dns_c_zone_attach(dns_c_zone_t *source,
|
||||
dns_c_zone_t **target);
|
||||
void dns_c_zone_print(FILE *fp, int indent,
|
||||
dns_c_zone_t *zone);
|
||||
isc_result_t dns_c_zone_setfile(dns_c_zone_t *zone,
|
||||
const char *newfile);
|
||||
isc_result_t dns_c_zone_setchecknames(dns_c_zone_t *zone,
|
||||
dns_severity_t severity);
|
||||
isc_result_t dns_c_zone_setallowupdateforwarding(dns_c_zone_t *zone,
|
||||
dns_c_ipmatchlist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_zone_setssuauth(dns_c_zone_t *zone,
|
||||
dns_ssutable_t *ssutable);
|
||||
isc_result_t dns_c_zone_setallowquery(dns_c_zone_t *zone,
|
||||
dns_c_ipmatchlist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_zone_setallowtransfer(dns_c_zone_t *zone,
|
||||
dns_c_ipmatchlist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_zone_setdialup(dns_c_zone_t *zone,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_zone_setnotify(dns_c_zone_t *zone,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_zone_setmaintixfrbase(dns_c_zone_t *zone,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_c_zone_setalsonotify(dns_c_zone_t *zone,
|
||||
dns_c_iplist_t *newval,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_zone_setixfrbase(dns_c_zone_t *zone,
|
||||
const char *newval);
|
||||
isc_result_t dns_c_zone_setixfrtmp(dns_c_zone_t *zone,
|
||||
const char *newval);
|
||||
isc_result_t dns_c_zone_addpubkey(dns_c_zone_t *zone,
|
||||
dns_c_pubkey_t *pubkey,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_zone_setmasterport(dns_c_zone_t *zone,
|
||||
in_port_t port);
|
||||
isc_result_t dns_c_zone_setmasterips(dns_c_zone_t *zone,
|
||||
dns_c_iplist_t *newval,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_zone_settransfersource(dns_c_zone_t *zone,
|
||||
isc_sockaddr_t newval);
|
||||
isc_result_t dns_c_zone_settransfersourcev6(dns_c_zone_t *zone,
|
||||
isc_sockaddr_t newval);
|
||||
isc_result_t dns_c_zone_setmaxtranstimein(dns_c_zone_t *zone,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_zone_setmaxtranstimeout(dns_c_zone_t *zone,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_zone_setmaxtransidlein(dns_c_zone_t *zone,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_zone_setmaxtransidleout(dns_c_zone_t *zone,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_zone_setmaxixfrlog(dns_c_zone_t *zone,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_c_zone_setforward(dns_c_zone_t *zone,
|
||||
dns_c_forw_t newval);
|
||||
isc_result_t dns_c_zone_setforwarders(dns_c_zone_t *zone,
|
||||
dns_c_iplist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_zone_getname(dns_c_zone_t *zone,
|
||||
const char **retval);
|
||||
isc_result_t dns_c_zone_getinternalname(dns_c_zone_t *zone,
|
||||
const char **retval);
|
||||
isc_result_t dns_c_zone_getfile(dns_c_zone_t *zone,
|
||||
const char **retval);
|
||||
isc_result_t dns_c_zone_getchecknames(dns_c_zone_t *zone,
|
||||
dns_severity_t *retval);
|
||||
isc_result_t dns_c_zone_getssuauth(dns_c_zone_t *zone,
|
||||
dns_ssutable_t **ssutable);
|
||||
isc_result_t dns_c_zone_getallowupdateforwarding(dns_c_zone_t *zone,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
isc_result_t dns_c_zone_getallowquery(dns_c_zone_t *zone,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
isc_result_t dns_c_zone_getallowtransfer(dns_c_zone_t *zone,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
isc_result_t dns_c_zone_getdialup(dns_c_zone_t *zone,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_zone_getnotify(dns_c_zone_t *zone,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_zone_getmaintixfrbase(dns_c_zone_t *zone,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_c_zone_getalsonotify(dns_c_zone_t *zone,
|
||||
dns_c_iplist_t **retval);
|
||||
isc_result_t dns_c_zone_getixfrbase(dns_c_zone_t *zone,
|
||||
const char **retval);
|
||||
isc_result_t dns_c_zone_getixfrtmp(dns_c_zone_t *zone,
|
||||
const char **retval);
|
||||
isc_result_t dns_c_zone_getpubkeylist(dns_c_zone_t *zone,
|
||||
dns_c_pklist_t **retval);
|
||||
isc_result_t dns_c_zone_getmasterport(dns_c_zone_t *zone,
|
||||
in_port_t *retval);
|
||||
isc_result_t dns_c_zone_getmasterips(dns_c_zone_t *zone,
|
||||
dns_c_iplist_t **retval);
|
||||
isc_result_t dns_c_zone_gettransfersource(dns_c_zone_t *zone,
|
||||
isc_sockaddr_t *retval);
|
||||
isc_result_t dns_c_zone_gettransfersourcev6(dns_c_zone_t *zone,
|
||||
isc_sockaddr_t *retval);
|
||||
isc_result_t dns_c_zone_getmaxtranstimein(dns_c_zone_t *zone,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_zone_getmaxtranstimeout(dns_c_zone_t *zone,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_zone_getmaxtransidlein(dns_c_zone_t *zone,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_zone_getmaxtransidleout(dns_c_zone_t *zone,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_zone_getmaxixfrlog(dns_c_zone_t *zone,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_c_zone_getforward(dns_c_zone_t *zone,
|
||||
dns_c_forw_t *retval);
|
||||
isc_result_t dns_c_zone_getforwarders(dns_c_zone_t *zone,
|
||||
dns_c_iplist_t **retval);
|
||||
void
|
||||
dns_c_zonelist_print(FILE *fp, int indent, dns_c_zonelist_t *list);
|
||||
|
||||
void
|
||||
dns_c_zonelist_printpostopts(FILE *fp, int indent, dns_c_zonelist_t *list);
|
||||
|
||||
isc_result_t dns_c_zone_setallowupd(dns_c_zone_t *zone,
|
||||
dns_c_ipmatchlist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
isc_result_t dns_c_zone_getallowupd(dns_c_zone_t *zone,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
isc_result_t dns_c_zone_unsetallowupd(dns_c_zone_t *zone);
|
||||
void
|
||||
dns_c_zonelist_printpreopts(FILE *fp, int indent, dns_c_zonelist_t *list);
|
||||
|
||||
dns_c_zone_t *
|
||||
dns_c_zonelist_firstzone(dns_c_zonelist_t *list);
|
||||
|
||||
dns_c_zone_t *
|
||||
dns_c_zonelist_nextzone(dns_c_zonelist_t *list, dns_c_zone_t *thezone);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_new(isc_mem_t *mem, dns_c_zonetype_t ztype,
|
||||
dns_rdataclass_t zclass, const char *name,
|
||||
const char *internalname, dns_c_zone_t **zone);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_detach(dns_c_zone_t **zone);
|
||||
|
||||
void
|
||||
dns_c_zone_attach(dns_c_zone_t *source, dns_c_zone_t **target);
|
||||
|
||||
void
|
||||
dns_c_zone_print(FILE *fp, int indent, dns_c_zone_t *zone);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setfile(dns_c_zone_t *zone, const char *newfile);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setchecknames(dns_c_zone_t *zone, dns_severity_t severity);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setallowupdateforwarding(dns_c_zone_t *zone,
|
||||
dns_c_ipmatchlist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setssuauth(dns_c_zone_t *zone, dns_ssutable_t *ssutable);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setallowquery(dns_c_zone_t *zone, dns_c_ipmatchlist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setallowtransfer(dns_c_zone_t *zone, dns_c_ipmatchlist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setdialup(dns_c_zone_t *zone, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setnotify(dns_c_zone_t *zone, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setmaintixfrbase(dns_c_zone_t *zone, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setalsonotify(dns_c_zone_t *zone, dns_c_iplist_t *newval,
|
||||
isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setixfrbase(dns_c_zone_t *zone, const char *newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setixfrtmp(dns_c_zone_t *zone, const char *newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_addpubkey(dns_c_zone_t *zone, dns_c_pubkey_t *pubkey,
|
||||
isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setmasterport(dns_c_zone_t *zone, in_port_t port);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setmasterips(dns_c_zone_t *zone, dns_c_iplist_t *newval,
|
||||
isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_settransfersource(dns_c_zone_t *zone, isc_sockaddr_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_settransfersourcev6(dns_c_zone_t *zone, isc_sockaddr_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setmaxtranstimein(dns_c_zone_t *zone, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setmaxtranstimeout(dns_c_zone_t *zone, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setmaxtransidlein(dns_c_zone_t *zone, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setmaxtransidleout(dns_c_zone_t *zone, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setmaxixfrlog(dns_c_zone_t *zone, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setforward(dns_c_zone_t *zone, dns_c_forw_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setforwarders(dns_c_zone_t *zone, dns_c_iplist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getname(dns_c_zone_t *zone, const char **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getinternalname(dns_c_zone_t *zone, const char **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getfile(dns_c_zone_t *zone, const char **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getchecknames(dns_c_zone_t *zone, dns_severity_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getssuauth(dns_c_zone_t *zone, dns_ssutable_t **ssutable);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getallowupdateforwarding(dns_c_zone_t *zone,
|
||||
dns_c_ipmatchlist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getallowquery(dns_c_zone_t *zone, dns_c_ipmatchlist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getallowtransfer(dns_c_zone_t *zone, dns_c_ipmatchlist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getdialup(dns_c_zone_t *zone, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getnotify(dns_c_zone_t *zone, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getmaintixfrbase(dns_c_zone_t *zone, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getalsonotify(dns_c_zone_t *zone, dns_c_iplist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getixfrbase(dns_c_zone_t *zone, const char **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getixfrtmp(dns_c_zone_t *zone, const char **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getpubkeylist(dns_c_zone_t *zone, dns_c_pklist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getmasterport(dns_c_zone_t *zone, in_port_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getmasterips(dns_c_zone_t *zone, dns_c_iplist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_gettransfersource(dns_c_zone_t *zone, isc_sockaddr_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_gettransfersourcev6(dns_c_zone_t *zone, isc_sockaddr_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getmaxtranstimein(dns_c_zone_t *zone, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getmaxtranstimeout(dns_c_zone_t *zone, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getmaxtransidlein(dns_c_zone_t *zone, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getmaxtransidleout(dns_c_zone_t *zone, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getmaxixfrlog(dns_c_zone_t *zone, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getforward(dns_c_zone_t *zone, dns_c_forw_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getforwarders(dns_c_zone_t *zone, dns_c_iplist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_setallowupd(dns_c_zone_t *zone, dns_c_ipmatchlist_t *ipml,
|
||||
isc_boolean_t deepcopy);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_getallowupd(dns_c_zone_t *zone, dns_c_ipmatchlist_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_c_zone_unsetallowupd(dns_c_zone_t *zone);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_CONFZONE_H */
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
* None.
|
||||
*/
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/mem.h>
|
||||
|
||||
#include <dns/result.h>
|
||||
|
|
@ -51,6 +52,8 @@
|
|||
|
||||
#define DNS_DBTABLEFIND_NOEXACT 0x01
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_dbtable_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
|
||||
dns_dbtable_t **dbtablep);
|
||||
|
|
@ -156,4 +159,6 @@ dns_dbtable_find(dns_dbtable_t *dbtable, dns_name_t *name,
|
|||
* <something else> no default and match
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_DBTABLE_H */
|
||||
|
|
|
|||
|
|
@ -19,14 +19,11 @@
|
|||
#define DNS_EVENTS_H 1
|
||||
|
||||
#include <isc/eventclass.h>
|
||||
#include <isc/lang.h>
|
||||
|
||||
/*
|
||||
* Registry of DNS event numbers.
|
||||
*/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
#define DNS_EVENT_FETCHCONTROL (ISC_EVENTCLASS_DNS + 0)
|
||||
#define DNS_EVENT_FETCHDONE (ISC_EVENTCLASS_DNS + 1)
|
||||
#define DNS_EVENT_VIEWRESSHUTDOWN (ISC_EVENTCLASS_DNS + 2)
|
||||
|
|
@ -54,6 +51,4 @@ ISC_LANG_BEGINDECLS
|
|||
#define DNS_EVENT_FIRSTEVENT (ISC_EVENTCLASS_DNS + 0)
|
||||
#define DNS_EVENT_LASTEVENT (ISC_EVENTCLASS_DNS + 65535)
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_EVENTS_H */
|
||||
|
|
|
|||
|
|
@ -51,14 +51,11 @@
|
|||
*****/
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/lang.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
/*****
|
||||
***** Types
|
||||
*****/
|
||||
|
|
@ -82,6 +79,4 @@ struct dns_fixedname {
|
|||
|
||||
#define dns_fixedname_name(fn) (&((fn)->name))
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_FIXEDNAME_H */
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/result.h>
|
||||
|
|
@ -41,8 +42,6 @@
|
|||
*** Types
|
||||
***/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
/*
|
||||
* A dns_difftuple_t represents a single RR being added or deleted.
|
||||
* The RR type and class are in the 'rdata' member; the class is always
|
||||
|
|
@ -118,6 +117,8 @@ typedef struct dns_journal dns_journal_t;
|
|||
*** Functions
|
||||
***/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
/**************************************************************************/
|
||||
/*
|
||||
* Maniuplation of diffs and tuples.
|
||||
|
|
@ -162,7 +163,8 @@ dns_difftuple_copy(dns_difftuple_t *orig, dns_difftuple_t **copyp);
|
|||
* copyp != NULL && *copyp == NULL
|
||||
*/
|
||||
|
||||
void dns_diff_init(isc_mem_t *mctx, dns_diff_t *diff);
|
||||
void
|
||||
dns_diff_init(isc_mem_t *mctx, dns_diff_t *diff);
|
||||
/*
|
||||
* Initialize a diff.
|
||||
*
|
||||
|
|
@ -174,7 +176,8 @@ void dns_diff_init(isc_mem_t *mctx, dns_diff_t *diff);
|
|||
* '*diff' is a valid, empty diff.
|
||||
*/
|
||||
|
||||
void dns_diff_clear(dns_diff_t *diff);
|
||||
void
|
||||
dns_diff_clear(dns_diff_t *diff);
|
||||
/*
|
||||
* Clear a diff, destroying all its tuples.
|
||||
*
|
||||
|
|
@ -284,7 +287,8 @@ dns_diff_print(dns_diff_t *diff, FILE *file);
|
|||
* XXX these belong in a general-purpose DNS library
|
||||
*/
|
||||
|
||||
isc_uint32_t dns_soa_getserial(dns_rdata_t *rdata);
|
||||
isc_uint32_t
|
||||
dns_soa_getserial(dns_rdata_t *rdata);
|
||||
/*
|
||||
* Extract the serial number from the rdata of a SOA record.
|
||||
*
|
||||
|
|
@ -292,7 +296,8 @@ isc_uint32_t dns_soa_getserial(dns_rdata_t *rdata);
|
|||
* rdata refers to the rdata of a well-formed SOA record.
|
||||
*/
|
||||
|
||||
void dns_soa_setserial(isc_uint32_t val, dns_rdata_t *rdata);
|
||||
void
|
||||
dns_soa_setserial(isc_uint32_t val, dns_rdata_t *rdata);
|
||||
/*
|
||||
* Change the serial number of a SOA record by modifying the
|
||||
* rdata in-place.
|
||||
|
|
@ -413,8 +418,10 @@ dns_journal_write_transaction(dns_journal_t *j, dns_diff_t *diff);
|
|||
* Reading transactions from journals.
|
||||
*/
|
||||
|
||||
isc_uint32_t dns_journal_first_serial(dns_journal_t *j);
|
||||
isc_uint32_t dns_journal_last_serial(dns_journal_t *j);
|
||||
isc_uint32_t
|
||||
dns_journal_first_serial(dns_journal_t *j);
|
||||
isc_uint32_t
|
||||
dns_journal_last_serial(dns_journal_t *j);
|
||||
/*
|
||||
* Get the first and last addressable serial number in the journal.
|
||||
*/
|
||||
|
|
@ -434,8 +441,10 @@ dns_journal_iter_init(dns_journal_t *j,
|
|||
* DNS_R_RANGE begin_serial is outside the addressable range.
|
||||
*/
|
||||
|
||||
isc_result_t dns_journal_first_rr(dns_journal_t *j);
|
||||
isc_result_t dns_journal_next_rr(dns_journal_t *j);
|
||||
isc_result_t
|
||||
dns_journal_first_rr(dns_journal_t *j);
|
||||
isc_result_t
|
||||
dns_journal_next_rr(dns_journal_t *j);
|
||||
/*
|
||||
* Position the iterator at the first/next RR in a journal
|
||||
* transaction sequence established using dns_journal_iter_init().
|
||||
|
|
@ -445,8 +454,9 @@ isc_result_t dns_journal_next_rr(dns_journal_t *j);
|
|||
*
|
||||
*/
|
||||
|
||||
void dns_journal_current_rr(dns_journal_t *j, dns_name_t **name,
|
||||
isc_uint32_t *ttl, dns_rdata_t **rdata);
|
||||
void
|
||||
dns_journal_current_rr(dns_journal_t *j, dns_name_t **name, isc_uint32_t *ttl,
|
||||
dns_rdata_t **rdata);
|
||||
/*
|
||||
* Get the name, ttl, and rdata of the current journal RR.
|
||||
*
|
||||
|
|
@ -480,7 +490,8 @@ dns_journal_rollforward(isc_mem_t *mctx, dns_db_t *db, const char *filename);
|
|||
* others
|
||||
*/
|
||||
|
||||
isc_result_t dns_journal_print(isc_mem_t *mctx, const char *filename, FILE *file);
|
||||
isc_result_t
|
||||
dns_journal_print(isc_mem_t *mctx, const char *filename, FILE *file);
|
||||
/* For debugging not general use */
|
||||
|
||||
isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,19 +15,18 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: log.h,v 1.15 2000/04/29 00:45:26 explorer Exp $ */
|
||||
/* $Id: log.h,v 1.16 2000/05/01 17:59:09 tale Exp $ */
|
||||
|
||||
/* Principal Authors: DCL */
|
||||
|
||||
#ifndef DNS_LOG_H
|
||||
#define DNS_LOG_H 1
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/log.h>
|
||||
|
||||
#include <dns/result.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
extern isc_log_t *dns_lctx;
|
||||
extern isc_logcategory_t dns_categories[];
|
||||
extern isc_logmodule_t dns_modules[];
|
||||
|
|
@ -64,6 +63,8 @@ extern isc_logmodule_t dns_modules[];
|
|||
#define DNS_LOGMODULE_VALIDATOR (&dns_modules[16])
|
||||
#define DNS_LOGMODULE_DISPATCH (&dns_modules[17])
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
void
|
||||
dns_log_init(isc_log_t *lctx);
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -22,10 +22,11 @@
|
|||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/magic.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/bufferlist.h>
|
||||
#include <isc/magic.h>
|
||||
#include <isc/mem.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
#include <dns/result.h>
|
||||
|
|
@ -93,8 +94,6 @@
|
|||
* move rdata from one section to another, remove rdata, etc.
|
||||
*/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
#define DNS_MESSAGEFLAG_QR 0x8000U
|
||||
#define DNS_MESSAGEFLAG_AA 0x0400U
|
||||
#define DNS_MESSAGEFLAG_TC 0x0200U
|
||||
|
|
@ -206,9 +205,14 @@ struct dns_message {
|
|||
isc_region_t *saved;
|
||||
};
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
dns_message_create(isc_mem_t *mctx, unsigned int intent,
|
||||
dns_message_t **msgp);
|
||||
dns_message_create(isc_mem_t *mctx, unsigned int intent, dns_message_t **msgp);
|
||||
|
||||
/*
|
||||
* Create msg structure.
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/net.h>
|
||||
#include <isc/netaddr.h>
|
||||
|
|
@ -47,13 +48,11 @@
|
|||
#define DNS_PEERLIST_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_PEERLIST_MAGIC)
|
||||
#define DNS_PEER_VALID(ptr) ISC_MAGIC_VALID(ptr, DNS_PEER_MAGIC)
|
||||
|
||||
|
||||
/***
|
||||
*** Types
|
||||
***/
|
||||
|
||||
struct dns_peerlist
|
||||
{
|
||||
struct dns_peerlist {
|
||||
isc_uint32_t magic;
|
||||
isc_uint32_t refs;
|
||||
|
||||
|
|
@ -62,9 +61,7 @@ struct dns_peerlist
|
|||
ISC_LIST(dns_peer_t) elements;
|
||||
};
|
||||
|
||||
|
||||
struct dns_peer
|
||||
{
|
||||
struct dns_peer {
|
||||
isc_uint32_t magic;
|
||||
isc_uint32_t refs;
|
||||
|
||||
|
|
@ -84,66 +81,93 @@ struct dns_peer
|
|||
ISC_LINK(dns_peer_t) next;
|
||||
};
|
||||
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t dns_peerlist_new(isc_mem_t *mem,
|
||||
dns_peerlist_t **list);
|
||||
void dns_peerlist_attach(dns_peerlist_t *source,
|
||||
dns_peerlist_t **target);
|
||||
void dns_peerlist_detach(dns_peerlist_t **list);
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
/* After return caller still holds a reference to peer. */
|
||||
void dns_peerlist_addpeer(dns_peerlist_t *peers,
|
||||
dns_peer_t *peer);
|
||||
isc_result_t
|
||||
dns_peerlist_new(isc_mem_t *mem, dns_peerlist_t **list);
|
||||
|
||||
/* ditto */
|
||||
isc_result_t dns_peerlist_peerbyaddr(dns_peerlist_t *peers,
|
||||
isc_netaddr_t *addr,
|
||||
dns_peer_t **retval);
|
||||
void
|
||||
dns_peerlist_attach(dns_peerlist_t *source, dns_peerlist_t **target);
|
||||
|
||||
/* what he said. */
|
||||
isc_result_t dns_peerlist_currpeer(dns_peerlist_t *peers,
|
||||
dns_peer_t **retval);
|
||||
void
|
||||
dns_peerlist_detach(dns_peerlist_t **list);
|
||||
|
||||
/*
|
||||
* After return caller still holds a reference to peer.
|
||||
*/
|
||||
void
|
||||
dns_peerlist_addpeer(dns_peerlist_t *peers, dns_peer_t *peer);
|
||||
|
||||
/*
|
||||
* Ditto. */
|
||||
isc_result_t
|
||||
dns_peerlist_peerbyaddr(dns_peerlist_t *peers, isc_netaddr_t *addr,
|
||||
dns_peer_t **retval);
|
||||
|
||||
isc_result_t dns_peer_new(isc_mem_t *mem,
|
||||
isc_netaddr_t *ipaddr,
|
||||
dns_peer_t **peer);
|
||||
isc_result_t dns_peer_attach(dns_peer_t *source, dns_peer_t **target);
|
||||
isc_result_t dns_peer_detach(dns_peer_t **list);
|
||||
/*
|
||||
* What he said.
|
||||
*/
|
||||
isc_result_t
|
||||
dns_peerlist_currpeer(dns_peerlist_t *peers, dns_peer_t **retval);
|
||||
|
||||
isc_result_t dns_peer_setbogus(dns_peer_t *peer,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_peer_getbogus(dns_peer_t *peer,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_peer_setsupportixfr(dns_peer_t *peer,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_peer_getsupportixfr(dns_peer_t *peer,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_peer_setrequestixfr(dns_peer_t *peer,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_peer_getrequestixfr(dns_peer_t *peer,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_peer_setprovideixfr(dns_peer_t *peer,
|
||||
isc_boolean_t newval);
|
||||
isc_result_t dns_peer_getprovideixfr(dns_peer_t *peer,
|
||||
isc_boolean_t *retval);
|
||||
isc_result_t dns_peer_settransfers(dns_peer_t *peer,
|
||||
isc_int32_t newval);
|
||||
isc_result_t dns_peer_gettransfers(dns_peer_t *peer,
|
||||
isc_int32_t *retval);
|
||||
isc_result_t dns_peer_settransferformat(dns_peer_t *peer,
|
||||
dns_transfer_format_t newval);
|
||||
isc_result_t dns_peer_gettransferformat(dns_peer_t *peer,
|
||||
dns_transfer_format_t *retval);
|
||||
isc_result_t dns_peer_setkeybycharp(dns_peer_t *peer,
|
||||
const char *keyval);
|
||||
isc_result_t dns_peer_getkey(dns_peer_t *peer, dns_name_t **retval);
|
||||
isc_result_t dns_peer_setkey(dns_peer_t *peer, dns_name_t **keyval);
|
||||
isc_result_t
|
||||
dns_peer_new(isc_mem_t *mem, isc_netaddr_t *ipaddr, dns_peer_t **peer);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_attach(dns_peer_t *source, dns_peer_t **target);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_detach(dns_peer_t **list);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_setbogus(dns_peer_t *peer, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_getbogus(dns_peer_t *peer, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_setsupportixfr(dns_peer_t *peer, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_getsupportixfr(dns_peer_t *peer, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_setrequestixfr(dns_peer_t *peer, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_getrequestixfr(dns_peer_t *peer, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_setprovideixfr(dns_peer_t *peer, isc_boolean_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_getprovideixfr(dns_peer_t *peer, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_settransfers(dns_peer_t *peer, isc_int32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_gettransfers(dns_peer_t *peer, isc_int32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_settransferformat(dns_peer_t *peer, dns_transfer_format_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_gettransferformat(dns_peer_t *peer, dns_transfer_format_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_setkeybycharp(dns_peer_t *peer, const char *keyval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_getkey(dns_peer_t *peer, dns_name_t **retval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_setkey(dns_peer_t *peer, dns_name_t **keyval);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_PEER_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue