Added misc 'unset' functions

This commit is contained in:
James Brister
2000-04-05 15:22:51 +00:00
parent 212cbe386c
commit 64da53037f
+312 -282
View File
@@ -197,6 +197,7 @@ struct dns_c_options
dns_c_ipmatchlist_t *blackhole;
dns_c_ipmatchlist_t *topology;
dns_c_ipmatchlist_t *sortlist;
dns_c_ipmatchlist_t *allowupdateforwarding;
dns_c_lstnlist_t *listens;
dns_c_rrsolist_t *ordering;
@@ -224,23 +225,34 @@ void dns_c_ctx_optionsprint(FILE *fp, int indent,
void dns_c_ctx_forwarderprint(FILE *fp, int indent,
dns_c_options_t *options);
isc_result_t dns_c_ctx_getcontrols(dns_c_ctx_t *cfg,
dns_c_ctrllist_t **ctrls);
isc_result_t dns_c_ctx_setcontrols(dns_c_ctx_t *cfg,
dns_c_ctrllist_t *ctrls);
isc_result_t dns_c_ctx_setcurrzone(dns_c_ctx_t *cfg, dns_c_zone_t *zone);
dns_c_zone_t *dns_c_ctx_getcurrzone(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setcurrview(dns_c_ctx_t *cfg, dns_c_view_t *view);
dns_c_view_t *dns_c_ctx_getcurrview(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_getoptions(dns_c_ctx_t *cfg,
dns_c_options_t **options);
isc_result_t dns_c_ctx_unsetoptions(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_getcontrols(dns_c_ctx_t *cfg,
dns_c_ctrllist_t **ctrls);
isc_result_t dns_c_ctx_setcontrols(dns_c_ctx_t *cfg,
dns_c_ctrllist_t *ctrls);
/* XXX need unsetcontrols */
isc_result_t dns_c_ctx_setlogging(dns_c_ctx_t *cfg,
dns_c_logginglist_t *newval,
isc_boolean_t deepcopy);
isc_result_t dns_c_ctx_getlogging(dns_c_ctx_t *cfg,
dns_c_logginglist_t **retval);
isc_result_t dns_c_ctx_unsetlogging(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_getkdeflist(dns_c_ctx_t *cfg,
dns_c_kdeflist_t **retval);
isc_result_t dns_c_ctx_setkdeflist(dns_c_ctx_t *cfg,
dns_c_kdeflist_t *newval,
isc_boolean_t deepcopy);
isc_result_t dns_c_ctx_addfile_channel(dns_c_ctx_t *cfg, const char *name,
@@ -257,160 +269,38 @@ isc_result_t dns_c_ctx_currchannel(dns_c_ctx_t *cfg,
dns_c_logchan_t **channel);
isc_result_t dns_c_ctx_currcategory(dns_c_ctx_t *cfg,
dns_c_logcat_t **category);
isc_boolean_t dns_c_ctx_channeldefinedp(dns_c_ctx_t *cfg,
const char *name);
isc_result_t dns_c_ctx_getkdeflist(dns_c_ctx_t *cfg,
dns_c_kdeflist_t **retval);
isc_result_t dns_c_ctx_setkdeflist(dns_c_ctx_t *cfg,
dns_c_kdeflist_t *newval,
isc_boolean_t deepcopy);
/* XXX need unsetkdeflist */
isc_boolean_t dns_c_ctx_keydefinedp(dns_c_ctx_t *ctx, const char *keyname);
isc_boolean_t dns_c_ctx_channeldefinedp(dns_c_ctx_t *cfg,
const char *name);
isc_result_t dns_c_ctx_optionsnew(isc_mem_t *mem,
dns_c_options_t **options);
isc_result_t dns_c_ctx_optionsdelete(dns_c_options_t **options);
/* The modifier functions below all return ISC_R_SUCCESS when the value is
* successfully set. If the value had already been set, then the value
* ISC_R_EXISTS is returned (the value is still set).
*
* In a few functions there is a boolean parameter named 'copy'. If that is
* true, then a deep copy is made of the parameter and the parameter itself
* is not touched. If the value is false, then the parameter is stored
* directly in the dns_c_ctx_t structure, and the client looses ownership
* of it. ISC_R_NOMEMORY is a possible return value for many of these
* functions.
*
*/
isc_result_t dns_c_ctx_setcurrzone(dns_c_ctx_t *cfg, dns_c_zone_t *zone);
isc_result_t dns_c_ctx_setcurrview(dns_c_ctx_t *cfg, dns_c_view_t *view);
isc_result_t dns_c_ctx_settkeydomain(dns_c_ctx_t *cfg, const char *newval);
isc_result_t dns_c_ctx_settkeydhkey(dns_c_ctx_t *cfg,
const char *newcpval,
isc_int32_t newival);
isc_result_t dns_c_ctx_setchecknames(dns_c_ctx_t *cfg,
dns_c_trans_t transtype,
dns_severity_t newval);
isc_result_t dns_c_ctx_getchecknames(dns_c_ctx_t *cfg,
dns_c_trans_t transtype,
dns_severity_t *retval);
isc_result_t dns_c_ctx_unsetchecknames(dns_c_ctx_t *cfg,
dns_c_trans_t transtype);
isc_result_t dns_c_ctx_settransfersource(dns_c_ctx_t *ctx,
isc_sockaddr_t newval);
isc_result_t dns_c_ctx_settransfersourcev6(dns_c_ctx_t *ctx,
isc_sockaddr_t newval);
isc_result_t dns_c_ctx_settransferformat(dns_c_ctx_t *cfg,
dns_transfer_format_t newval);
isc_result_t dns_c_ctx_setqueryacl(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_settransferacl(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_setrecursionacl(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_setblackhole(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_settopology(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_setsortlist(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_setrrsetorderlist(dns_c_ctx_t *cfg,
isc_boolean_t copy,
dns_c_rrsolist_t *olist);
isc_result_t dns_c_ctx_addlisten_on(dns_c_ctx_t *cfg, int port,
dns_c_ipmatchlist_t *ml,
isc_boolean_t copy);
isc_result_t dns_c_ctx_settrustedkeys(dns_c_ctx_t *cfg,
dns_c_tkeylist_t *list,
isc_boolean_t copy);
/*
* Accessor functions for the various fields in the config structure. The
* value of the field is copied into the location pointed to by the RETVAL
* paramater and ISC_R_SUCCESS is returned. The caller must not modify the
* returned value, and should copy the value if it needs to hold on to it.
*
* If the value has not been set in the config structure, then
* ISC_R_NOTFOUND is returned and the location pointed to by the RETVAL
* paramater is not modified (i.e. the library assumes no particular
* defaults for any unset values).
*/
**
*/
dns_c_zone_t *dns_c_ctx_getcurrzone(dns_c_ctx_t *cfg);
dns_c_view_t *dns_c_ctx_getcurrview(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_gettkeydomain(dns_c_ctx_t *cfg, char **retval);
isc_result_t dns_c_ctx_gettkeydhkey(dns_c_ctx_t *cfg,
char **retcpval, isc_int32_t *retival);
isc_result_t dns_c_ctx_gettransfersource(dns_c_ctx_t *ctx,
isc_sockaddr_t *retval);
isc_result_t dns_c_ctx_gettransfersourcev6(dns_c_ctx_t *ctx,
isc_sockaddr_t *retval);
isc_result_t dns_c_ctx_getchecknames(dns_c_ctx_t *cfg,
dns_c_trans_t transtype,
dns_severity_t *sever);
isc_result_t dns_c_ctx_gettransferformat(dns_c_ctx_t *cfg,
dns_transfer_format_t *retval);
isc_result_t dns_c_ctx_getqueryacl(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
isc_result_t dns_c_ctx_gettransferacl(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
isc_result_t dns_c_ctx_getrecursionacl(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
isc_result_t dns_c_ctx_getblackhole(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
isc_result_t dns_c_ctx_gettopology(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
isc_result_t dns_c_ctx_getsortlist(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
isc_result_t dns_c_ctx_getlistenlist(dns_c_ctx_t *cfg,
dns_c_lstnlist_t **ll);
isc_result_t dns_c_ctx_getrrsetorderlist(dns_c_ctx_t *cfg,
dns_c_rrsolist_t **olist);
isc_result_t dns_c_ctx_gettrustedkeys(dns_c_ctx_t *cfg,
dns_c_tkeylist_t **retval);
isc_result_t dns_c_ctx_optionsnew(isc_mem_t *mem,
dns_c_options_t **options);
isc_result_t dns_c_ctx_optionsdelete(dns_c_options_t **options);
isc_result_t dns_c_ctx_setlogging(dns_c_ctx_t *cfg,
dns_c_logginglist_t *newval,
isc_boolean_t deepcopy);
isc_result_t dns_c_ctx_getlogging(dns_c_ctx_t *cfg,
dns_c_logginglist_t **retval);
isc_result_t dns_c_ctx_unsetlogging(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setforwarders(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_iplist_t *iml);
isc_result_t dns_c_ctx_getforwarders(dns_c_ctx_t *cfg,
dns_c_iplist_t **list);
isc_result_t dns_c_ctx_unsetforwarders(dns_c_ctx_t *cfg);
/* Prootypes for the functions defined via macros */
isc_result_t dns_c_ctx_setdirectory(dns_c_ctx_t *ctx, const char *newval);
isc_result_t dns_c_ctx_getdirectory(dns_c_ctx_t *ctx, char **retval);
@@ -458,126 +348,6 @@ isc_result_t dns_c_ctx_unsetnamedxfer(dns_c_ctx_t *ctx);
isc_result_t dns_c_ctx_setexpertmode(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getexpertmode(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetexpertmode(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setfakeiquery(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getfakeiquery(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetfakeiquery(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setrecursion(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getrecursion(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetrecursion(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setfetchglue(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getfetchglue(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetfetchglue(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setnotify(dns_c_ctx_t *cfg, isc_boolean_t newval);
isc_result_t dns_c_ctx_getnotify(dns_c_ctx_t *cfg, isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetnotify(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_sethoststatistics(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_gethoststatistics(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsethoststatistics(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setdealloconexit(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getdealloconexit(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetdealloconexit(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setuseixfr(dns_c_ctx_t *cfg, isc_boolean_t newval);
isc_result_t dns_c_ctx_getuseixfr(dns_c_ctx_t *cfg, isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetuseixfr(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setmaintainixfrbase(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getmaintainixfrbase(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetmaintainixfrbase(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_sethasoldclients(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_gethasoldclients(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsethasoldclients(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setauthnxdomain(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getauthnxdomain(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetauthnxdomain(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setmultiplecnames(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getmultiplecnames(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetmultiplecnames(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setuseidpool(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getuseidpool(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetuseidpool(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setdialup(dns_c_ctx_t *cfg, isc_boolean_t newval);
isc_result_t dns_c_ctx_getdialup(dns_c_ctx_t *cfg, isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetdialup(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setrfc2308type1(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getrfc2308type1(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetrfc2308type1(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setrequestixfr(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getrequestixfr(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetrequestixfr(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setprovideixfr(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getprovideixfr(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetprovideixfr(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setmaxncachettl(dns_c_ctx_t *cfg,
isc_uint32_t newval);
isc_result_t dns_c_ctx_getmaxncachettl(dns_c_ctx_t *cfg,
isc_uint32_t *retval);
isc_result_t dns_c_ctx_unsetmaxncachettl(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_settransfersin(dns_c_ctx_t *cfg,
isc_int32_t newval);
isc_result_t dns_c_ctx_gettransfersin(dns_c_ctx_t *cfg,
@@ -703,20 +473,126 @@ isc_result_t dns_c_ctx_getfiles(dns_c_ctx_t *cfg, isc_uint32_t *retval);
isc_result_t dns_c_ctx_unsetfiles(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setmaxncachettl(dns_c_ctx_t *cfg,
isc_uint32_t newval);
isc_result_t dns_c_ctx_getmaxncachettl(dns_c_ctx_t *cfg,
isc_uint32_t *retval);
isc_result_t dns_c_ctx_unsetmaxncachettl(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setquerysource(dns_c_ctx_t *ctx,
isc_sockaddr_t query_source);
isc_result_t dns_c_ctx_getquerysource(dns_c_ctx_t *ctx,
isc_sockaddr_t *query_source);
isc_result_t dns_c_ctx_unsetquerysource(dns_c_ctx_t *ctx);
isc_result_t dns_c_ctx_setexpertmode(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getexpertmode(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetexpertmode(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setquerysourcev6(dns_c_ctx_t *ctx,
isc_sockaddr_t query_source_v6);
isc_result_t dns_c_ctx_getquerysourcev6(dns_c_ctx_t *ctx,
isc_sockaddr_t *query_source_v6);
isc_result_t dns_c_ctx_unsetquerysourcev6(dns_c_ctx_t *ctx);
isc_result_t dns_c_ctx_setfakeiquery(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getfakeiquery(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetfakeiquery(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setrecursion(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getrecursion(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetrecursion(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setfetchglue(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getfetchglue(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetfetchglue(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setnotify(dns_c_ctx_t *cfg, isc_boolean_t newval);
isc_result_t dns_c_ctx_getnotify(dns_c_ctx_t *cfg, isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetnotify(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_sethoststatistics(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_gethoststatistics(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsethoststatistics(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setdealloconexit(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getdealloconexit(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetdealloconexit(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setuseixfr(dns_c_ctx_t *cfg, isc_boolean_t newval);
isc_result_t dns_c_ctx_getuseixfr(dns_c_ctx_t *cfg, isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetuseixfr(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setmaintainixfrbase(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getmaintainixfrbase(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetmaintainixfrbase(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_sethasoldclients(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_gethasoldclients(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsethasoldclients(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setauthnxdomain(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getauthnxdomain(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetauthnxdomain(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setmultiplecnames(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getmultiplecnames(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetmultiplecnames(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setuseidpool(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getuseidpool(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetuseidpool(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setdialup(dns_c_ctx_t *cfg, isc_boolean_t newval);
isc_result_t dns_c_ctx_getdialup(dns_c_ctx_t *cfg, isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetdialup(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setrfc2308type1(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getrfc2308type1(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetrfc2308type1(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setrequestixfr(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getrequestixfr(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetrequestixfr(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setprovideixfr(dns_c_ctx_t *cfg,
isc_boolean_t newval);
isc_result_t dns_c_ctx_getprovideixfr(dns_c_ctx_t *cfg,
isc_boolean_t *retval);
isc_result_t dns_c_ctx_unsetprovideixfr(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_settransfersource(dns_c_ctx_t *ctx,
@@ -733,16 +609,35 @@ isc_result_t dns_c_ctx_gettransfersourcev6(dns_c_ctx_t *ctx,
isc_result_t dns_c_ctx_unsettransfersourcev6(dns_c_ctx_t *ctx);
isc_result_t dns_c_ctx_setquerysource(dns_c_ctx_t *ctx,
isc_sockaddr_t query_source);
isc_result_t dns_c_ctx_getquerysource(dns_c_ctx_t *ctx,
isc_sockaddr_t *query_source);
isc_result_t dns_c_ctx_unsetquerysource(dns_c_ctx_t *ctx);
isc_result_t dns_c_ctx_setquerysourcev6(dns_c_ctx_t *ctx,
isc_sockaddr_t query_source_v6);
isc_result_t dns_c_ctx_getquerysourcev6(dns_c_ctx_t *ctx,
isc_sockaddr_t *query_source_v6);
isc_result_t dns_c_ctx_unsetquerysourcev6(dns_c_ctx_t *ctx);
isc_result_t dns_c_ctx_setforward(dns_c_ctx_t *cfg, dns_c_forw_t forward);
isc_result_t dns_c_ctx_getforward(dns_c_ctx_t *cfg, dns_c_forw_t *forward);
isc_result_t dns_c_ctx_unsetforward(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_settransferformat(dns_c_ctx_t *cfg,
dns_transfer_format_t tformat);
isc_result_t dns_c_ctx_gettransferformat(dns_c_ctx_t *cfg,
dns_transfer_format_t *tformat);
isc_result_t dns_c_ctx_unsettransferformat(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_settkeydomain(dns_c_ctx_t *cfg, const char *newval);
isc_result_t dns_c_ctx_settkeydhkey(dns_c_ctx_t *cfg,
const char *newcpval,
isc_int32_t newival);
isc_result_t dns_c_ctx_gettkeydomain(dns_c_ctx_t *cfg, char **retval);
isc_result_t dns_c_ctx_gettkeydhkey(dns_c_ctx_t *cfg,
char **retcpval, isc_int32_t *retival);
/* XXX need unset version */
isc_result_t dns_c_ctx_setalsonotify(dns_c_ctx_t *ctx,
@@ -753,5 +648,140 @@ isc_result_t dns_c_ctx_getalsonotify(dns_c_ctx_t *ctx,
isc_result_t dns_c_ctx_unsetalsonotify(dns_c_ctx_t *ctx);
isc_result_t dns_c_ctx_setchecknames(dns_c_ctx_t *cfg,
dns_c_trans_t transtype,
dns_severity_t newval);
isc_result_t dns_c_ctx_getchecknames(dns_c_ctx_t *cfg,
dns_c_trans_t transtype,
dns_severity_t *retval);
isc_result_t dns_c_ctx_unsetchecknames(dns_c_ctx_t *cfg,
dns_c_trans_t transtype);
isc_result_t dns_c_ctx_settransferformat(dns_c_ctx_t *cfg,
dns_transfer_format_t tformat);
isc_result_t dns_c_ctx_gettransferformat(dns_c_ctx_t *cfg,
dns_transfer_format_t *tformat);
isc_result_t dns_c_ctx_unsettransferformat(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setqueryacl(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_getqueryacl(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
isc_result_t dns_c_ctx_unsetqueryacl(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_settransferacl(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_gettransferacl(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
/* XXX need unset version */
isc_result_t dns_c_ctx_setrecursionacl(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_getrecursionacl(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
/* XXX need unset version */
isc_result_t dns_c_ctx_setblackhole(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_getblackhole(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
/* XXX need unset version */
isc_result_t dns_c_ctx_settopology(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_gettopology(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
/* XXX need unset version */
isc_result_t dns_c_ctx_setsortlist(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_getsortlist(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
/* XXX need unset version */
isc_result_t dns_c_ctx_setallowupdateforwarding(dns_c_ctx_t *cfg,
isc_boolean_t copy,
dns_c_ipmatchlist_t *iml);
isc_result_t dns_c_ctx_getallowupdateforwarding(dns_c_ctx_t *cfg,
dns_c_ipmatchlist_t **list);
isc_result_t dns_c_ctx_unsetallowupdateforwarding(dns_c_ctx_t *cfg);
isc_result_t dns_c_ctx_setforwarders(dns_c_ctx_t *cfg, isc_boolean_t copy,
dns_c_iplist_t *iml);
isc_result_t dns_c_ctx_getforwarders(dns_c_ctx_t *cfg,
dns_c_iplist_t **list);
isc_result_t dns_c_ctx_unsetforwarders(dns_c_ctx_t *cfg);
/* The modifier functions below all return ISC_R_SUCCESS when the value is
* successfully set. If the value had already been set, then the value
* ISC_R_EXISTS is returned (the value is still set).
*
* In a few functions there is a boolean parameter named 'copy'. If that is
* true, then a deep copy is made of the parameter and the parameter itself
* is not touched. If the value is false, then the parameter is stored
* directly in the dns_c_ctx_t structure, and the client looses ownership
* of it. ISC_R_NOMEMORY is a possible return value for many of these
* functions.
*
*/
isc_result_t dns_c_ctx_addlisten_on(dns_c_ctx_t *cfg, int port,
dns_c_ipmatchlist_t *ml,
isc_boolean_t copy);
isc_result_t dns_c_ctx_getlistenlist(dns_c_ctx_t *cfg,
dns_c_lstnlist_t **ll);
isc_result_t dns_c_ctx_setrrsetorderlist(dns_c_ctx_t *cfg,
isc_boolean_t copy,
dns_c_rrsolist_t *olist);
isc_result_t dns_c_ctx_getrrsetorderlist(dns_c_ctx_t *cfg,
dns_c_rrsolist_t **olist);
/*
* Accessor functions for the various fields in the config structure. The
* value of the field is copied into the location pointed to by the RETVAL
* paramater and ISC_R_SUCCESS is returned. The caller must not modify the
* returned value, and should copy the value if it needs to hold on to it.
*
* If the value has not been set in the config structure, then
* ISC_R_NOTFOUND is returned and the location pointed to by the RETVAL
* paramater is not modified (i.e. the library assumes no particular
* defaults for any unset values).
*/
isc_result_t dns_c_ctx_gettrustedkeys(dns_c_ctx_t *cfg,
dns_c_tkeylist_t **retval);
/* Prootypes for the functions defined via macros */
#endif /* DNS_CONFIG_CONFCTX_H */