📄 zone.h
字号:
/*%< * Requires: * \li 'zone' to be a valid zone. * * Returns: * \li number of seconds of idle time before we abort the transfer in. */voiddns_zone_setidlein(dns_zone_t *zone, isc_uint32_t idlein);/*%< * \li Set the idle timeout for transfer the. * \li Zero set the default value, 1 hour. * * Requires: * \li 'zone' to be a valid zone. */isc_uint32_tdns_zone_getidleout(dns_zone_t *zone);/*%< * * Requires: * \li 'zone' to be a valid zone. * * Returns: * \li number of seconds of idle time before we abort a transfer out. */voiddns_zone_setidleout(dns_zone_t *zone, isc_uint32_t idleout);/*%< * \li Set the idle timeout for transfers out. * \li Zero set the default value, 1 hour. * * Requires: * \li 'zone' to be a valid zone. */voiddns_zone_getssutable(dns_zone_t *zone, dns_ssutable_t **table);/*%< * Get the simple-secure-update policy table. * * Requires: * \li 'zone' to be a valid zone. */voiddns_zone_setssutable(dns_zone_t *zone, dns_ssutable_t *table);/*%< * Set / clear the simple-secure-update policy table. * * Requires: * \li 'zone' to be a valid zone. */isc_mem_t *dns_zone_getmctx(dns_zone_t *zone);/*%< * Get the memory context of a zone. * * Requires: * \li 'zone' to be a valid zone. */dns_zonemgr_t *dns_zone_getmgr(dns_zone_t *zone);/*%< * If 'zone' is managed return the zone manager otherwise NULL. * * Requires: * \li 'zone' to be a valid zone. */voiddns_zone_setsigvalidityinterval(dns_zone_t *zone, isc_uint32_t interval);/*%< * Set the zone's SIG validity interval. This is the length of time * for which DNSSEC signatures created as a result of dynamic updates * to secure zones will remain valid, in seconds. * * Requires: * \li 'zone' to be a valid zone. */isc_uint32_tdns_zone_getsigvalidityinterval(dns_zone_t *zone);/*%< * Get the zone's SIG validity interval. * * Requires: * \li 'zone' to be a valid zone. */voiddns_zone_setnotifytype(dns_zone_t *zone, dns_notifytype_t notifytype);/*%< * Sets zone notify method to "notifytype" */isc_result_tdns_zone_forwardupdate(dns_zone_t *zone, dns_message_t *msg, dns_updatecallback_t callback, void *callback_arg);/*%< * Forward 'msg' to each master in turn until we get an answer or we * have exausted the list of masters. 'callback' will be called with * ISC_R_SUCCESS if we get an answer and the returned message will be * passed as 'answer_message', otherwise a non ISC_R_SUCCESS result code * will be passed and answer_message will be NULL. The callback function * is responsible for destroying 'answer_message'. * (callback)(callback_arg, result, answer_message); * * Require: *\li 'zone' to be valid *\li 'msg' to be valid. *\li 'callback' to be non NULL. * Returns: *\li #ISC_R_SUCCESS if the message has been forwarded, *\li #ISC_R_NOMEMORY *\li Others */isc_result_tdns_zone_next(dns_zone_t *zone, dns_zone_t **next);/*%< * Find the next zone in the list of managed zones. * * Requires: *\li 'zone' to be valid *\li The zone manager for the indicated zone MUST be locked * by the caller. This is not checked. *\li 'next' be non-NULL, and '*next' be NULL. * * Ensures: *\li 'next' points to a valid zone (result ISC_R_SUCCESS) or to NULL * (result ISC_R_NOMORE). */isc_result_tdns_zone_first(dns_zonemgr_t *zmgr, dns_zone_t **first);/*%< * Find the first zone in the list of managed zones. * * Requires: *\li 'zonemgr' to be valid *\li The zone manager for the indicated zone MUST be locked * by the caller. This is not checked. *\li 'first' be non-NULL, and '*first' be NULL * * Ensures: *\li 'first' points to a valid zone (result ISC_R_SUCCESS) or to NULL * (result ISC_R_NOMORE). */isc_result_tdns_zone_setkeydirectory(dns_zone_t *zone, const char *directory);/*%< * Sets the name of the directory where private keys used for * online signing of dynamic zones are found. * * Require: *\li 'zone' to be a valid zone. * * Returns: *\li #ISC_R_NOMEMORY *\li #ISC_R_SUCCESS */const char *dns_zone_getkeydirectory(dns_zone_t *zone);/*%< * Gets the name of the directory where private keys used for * online signing of dynamic zones are found. * * Requires: *\li 'zone' to be valid initialised zone. * * Returns: * Pointer to null-terminated file name, or NULL. */isc_result_tdns_zonemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr, isc_timermgr_t *timermgr, isc_socketmgr_t *socketmgr, dns_zonemgr_t **zmgrp);/*%< * Create a zone manager. * * Requires: *\li 'mctx' to be a valid memory context. *\li 'taskmgr' to be a valid task manager. *\li 'timermgr' to be a valid timer manager. *\li 'zmgrp' to point to a NULL pointer. */isc_result_tdns_zonemgr_managezone(dns_zonemgr_t *zmgr, dns_zone_t *zone);/*%< * Bring the zone under control of a zone manager. * * Require: *\li 'zmgr' to be a valid zone manager. *\li 'zone' to be a valid zone. */isc_result_tdns_zonemgr_forcemaint(dns_zonemgr_t *zmgr);/*%< * Force zone maintenance of all zones managed by 'zmgr' at its * earliest conveniene. */voiddns_zonemgr_resumexfrs(dns_zonemgr_t *zmgr);/*%< * Attempt to start any stalled zone transfers. */voiddns_zonemgr_shutdown(dns_zonemgr_t *zmgr);/*%< * Shut down the zone manager. * * Requires: *\li 'zmgr' to be a valid zone manager. */voiddns_zonemgr_attach(dns_zonemgr_t *source, dns_zonemgr_t **target);/*%< * Attach '*target' to 'source' incrementing its external * reference count. * * Require: *\li 'zone' to be a valid zone. *\li 'target' to be non NULL and '*target' to be NULL. */voiddns_zonemgr_detach(dns_zonemgr_t **zmgrp);/*%< * Detach from a zone manager. * * Requires: *\li '*zmgrp' is a valid, non-NULL zone manager pointer. * * Ensures: *\li '*zmgrp' is NULL. */voiddns_zonemgr_releasezone(dns_zonemgr_t *zmgr, dns_zone_t *zone);/*%< * Release 'zone' from the managed by 'zmgr'. 'zmgr' is implicitly * detached from 'zone'. * * Requires: *\li 'zmgr' to be a valid zone manager. *\li 'zone' to be a valid zone. *\li 'zmgr' == 'zone->zmgr' * * Ensures: *\li 'zone->zmgr' == NULL; */voiddns_zonemgr_settransfersin(dns_zonemgr_t *zmgr, isc_uint32_t value);/*%< * Set the maximum number of simultaneous transfers in allowed by * the zone manager. * * Requires: *\li 'zmgr' to be a valid zone manager. */isc_uint32_tdns_zonemgr_getttransfersin(dns_zonemgr_t *zmgr);/*%< * Return the the maximum number of simultaneous transfers in allowed. * * Requires: *\li 'zmgr' to be a valid zone manager. */voiddns_zonemgr_settransfersperns(dns_zonemgr_t *zmgr, isc_uint32_t value);/*%< * Set the number of zone transfers allowed per nameserver. * * Requires: *\li 'zmgr' to be a valid zone manager */isc_uint32_tdns_zonemgr_getttransfersperns(dns_zonemgr_t *zmgr);/*%< * Return the number of transfers allowed per nameserver. * * Requires: *\li 'zmgr' to be a valid zone manager. */voiddns_zonemgr_setiolimit(dns_zonemgr_t *zmgr, isc_uint32_t iolimit);/*%< * Set the number of simultaneous file descriptors available for * reading and writing masterfiles. * * Requires: *\li 'zmgr' to be a valid zone manager. *\li 'iolimit' to be positive. */isc_uint32_tdns_zonemgr_getiolimit(dns_zonemgr_t *zmgr);/*%< * Get the number of simultaneous file descriptors available for * reading and writing masterfiles. * * Requires: *\li 'zmgr' to be a valid zone manager. */voiddns_zonemgr_setserialqueryrate(dns_zonemgr_t *zmgr, unsigned int value);/*%< * Set the number of SOA queries sent per second. * * Requires: *\li 'zmgr' to be a valid zone manager */unsigned intdns_zonemgr_getserialqueryrate(dns_zonemgr_t *zmgr);/*%< * Return the number of SOA queries sent per second. * * Requires: *\li 'zmgr' to be a valid zone manager. */unsigned intdns_zonemgr_getcount(dns_zonemgr_t *zmgr, int state);/*%< * Returns the number of zones in the specified state. * * Requires: *\li 'zmgr' to be a valid zone manager. *\li 'state' to be a valid DNS_ZONESTATE_ constant. */voiddns_zone_forcereload(dns_zone_t *zone);/*%< * Force a reload of specified zone. * * Requires: *\li 'zone' to be a valid zone. */isc_boolean_tdns_zone_isforced(dns_zone_t *zone);/*%< * Check if the zone is waiting a forced reload. * * Requires: * \li 'zone' to be a valid zone. */isc_result_tdns_zone_setstatistics(dns_zone_t *zone, isc_boolean_t on);/*%< * Make the zone keep or not keep an array of statistics * counter. * * Requires: * \li zone be a valid zone. */isc_uint64_t *dns_zone_getstatscounters(dns_zone_t *zone);/*%< * Requires: * zone be a valid zone. * * Returns: * \li A pointer to the zone's array of statistics counters, * or NULL if it has none. */voiddns_zone_dialup(dns_zone_t *zone);/*%< * Perform dialup-time maintenance on 'zone'. */voiddns_zone_setdialup(dns_zone_t *zone, dns_dialuptype_t dialup);/*%< * Set the dialup type of 'zone' to 'dialup'. * * Requires: * \li 'zone' to be valid initialised zone. *\li 'dialup' to be a valid dialup type. */voiddns_zone_log(dns_zone_t *zone, int level, const char *msg, ...) ISC_FORMAT_PRINTF(3, 4);/*%< * Log the message 'msg...' at 'level', including text that identifies * the message as applying to 'zone'. */voiddns_zone_logc(dns_zone_t *zone, isc_logcategory_t *category, int level, const char *msg, ...) ISC_FORMAT_PRINTF(4, 5);/*%< * Log the message 'msg...' at 'level', including text that identifies * the message as applying to 'zone'. */voiddns_zone_name(dns_zone_t *zone, char *buf, size_t len);/*%< * Return the name of the zone with class and view. * * Requires: *\li 'zone' to be valid. *\li 'buf' to be non NULL. */isc_result_tdns_zone_checknames(dns_zone_t *zone, dns_name_t *name, dns_rdata_t *rdata);/* * Check if this record meets the check-names policy. * * Requires: * 'zone' to be valid. * 'name' to be valid. * 'rdata' to be valid. * * Returns: * DNS_R_SUCCESS passed checks. * DNS_R_BADOWNERNAME failed ownername checks. * DNS_R_BADNAME failed rdata checks. */voiddns_zone_setacache(dns_zone_t *zone, dns_acache_t *acache);/* * Associate the zone with an additional cache. * * Require: * 'zone' to be a valid zone. * 'acache' to be a non NULL pointer. * * Ensures: * 'zone' will have a reference to 'acache' */voiddns_zone_setcheckmx(dns_zone_t *zone, dns_checkmxfunc_t checkmx);/* * Set the post load integrity callback function 'checkmx'. * 'checkmx' will be called if the MX is not within the zone. * * Require: * 'zone' to be a valid zone. */voiddns_zone_setchecksrv(dns_zone_t *zone, dns_checkmxfunc_t checksrv);/* * Set the post load integrity callback function 'checksrv'. * 'checksrv' will be called if the SRV TARGET is not within the zone. * * Require: * 'zone' to be a valid zone. */voiddns_zone_setcheckns(dns_zone_t *zone, dns_checknsfunc_t checkns);/* * Set the post load integrity callback function 'checkmx'. * 'checkmx' will be called if the MX is not within the zone. * * Require: * 'zone' to be a valid zone. */voiddns_zone_setnotifydelay(dns_zone_t *zone, isc_uint32_t delay);/* * Set the minimum delay between sets of notify messages. * * Requires: * 'zone' to be valid. */isc_uint32_tdns_zone_getnotifydelay(dns_zone_t *zone);/* * Get the minimum delay between sets of notify messages. * * Requires: * 'zone' to be valid. */voiddns_zone_setisself(dns_zone_t *zone, dns_isselffunc_t isself, void *arg);/* * Set the isself callback function and argument. * * isc_boolean_t * isself(dns_view_t *myview, dns_tsigkey_t *mykey, isc_netaddr_t *srcaddr, * isc_netaddr_t *destaddr, dns_rdataclass_t rdclass, void *arg); * * 'isself' returns ISC_TRUE if a non-recursive query from 'srcaddr' to * 'destaddr' with optional key 'mykey' for class 'rdclass' would be * delivered to 'myview'. */ISC_LANG_ENDDECLS#endif /* DNS_ZONE_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -