📄 zone.h
字号:
* * If "dump" is ISC_TRUE, then the new zone contents are dumped * into to the zone's master file for persistence. When replacing * a zone database by one just loaded from a master file, set * "dump" to ISC_FALSE to avoid a redunant redump of the data just * loaded. Otherwise, it should be set to ISC_TRUE. * * If the "diff-on-reload" option is enabled in the configuration file, * the differences between the old and the new database are added to the * journal file, and the master file dump is postponed. * * Requires: * 'zone' to be a valid zone. * * Returns: * DNS_R_SUCCESS * DNS_R_BADZONE zone failed basic consistancy checks: * * a single SOA must exist * * some NS records must exist. * Others */isc_uint32_tdns_zone_getidlein(dns_zone_t *zone);/* * Requires: * 'zone' to be a valid zone. * * Returns: * number of seconds of idle time before we abort the transfer in. */voiddns_zone_setidlein(dns_zone_t *zone, isc_uint32_t idlein);/* * Set the idle timeout for transfer the. * Zero set the default value, 1 hour. * * Requires: * 'zone' to be a valid zone. */isc_uint32_tdns_zone_getidleout(dns_zone_t *zone);/* * * Requires: * 'zone' to be a valid zone. * * Returns: * number of seconds of idle time before we abort a transfer out. */voiddns_zone_setidleout(dns_zone_t *zone, isc_uint32_t idleout);/* * Set the idle timeout for transfers out. * Zero set the default value, 1 hour. * * Requires: * '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: * '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: * 'zone' to be a valid zone. */isc_mem_t *dns_zone_getmctx(dns_zone_t *zone);/* * Get the memory context of a zone. * * Requires: * '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: * '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: * 'zone' to be a valid zone. */isc_uint32_tdns_zone_getsigvalidityinterval(dns_zone_t *zone);/* * Get the zone's SIG validity interval. * * Requires: * '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: * 'zone' to be valid * 'msg' to be valid. * 'callback' to be non NULL. * Returns: * ISC_R_SUCCESS if the message has been forwarded, * ISC_R_NOMEMORY * 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: * 'zone' to be valid * The zone manager for the indicated zone MUST be locked * by the caller. This is not checked. * 'next' be non-NULL, and '*next' be NULL. * * Ensures: * '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: * 'zonemgr' to be valid * The zone manager for the indicated zone MUST be locked * by the caller. This is not checked. * 'first' be non-NULL, and '*first' be NULL * * Ensures: * '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: * 'zone' to be a valid zone. * * Returns: * ISC_R_NOMEMORY * 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: * '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: * 'mctx' to be a valid memory context. * 'taskmgr' to be a valid task manager. * 'timermgr' to be a valid timer manager. * '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: * 'zmgr' to be a valid zone manager. * '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: * '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: * 'zone' to be a valid zone. * 'target' to be non NULL and '*target' to be NULL. */voiddns_zonemgr_detach(dns_zonemgr_t **zmgrp);/* * Detach from a zone manager. * * Requires: * '*zmgrp' is a valid, non-NULL zone manager pointer. * * Ensures: * '*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: * 'zmgr' to be a valid zone manager. * 'zone' to be a valid zone. * 'zmgr' == 'zone->zmgr' * * Ensures: * 'zone->zmgr' == NULL; */voiddns_zonemgr_settransfersin(dns_zonemgr_t *zmgr, isc_uint32_t value);/* * Set the maximum number of simultanious transfers in allowed by * the zone manager. * * Requires: * 'zmgr' to be a valid zone manager. */isc_uint32_tdns_zonemgr_getttransfersin(dns_zonemgr_t *zmgr);/* * Return the the maximum number of simultanious transfers in allowed. * * Requires: * '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: * '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: * '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: * 'zmgr' to be a valid zone manager. * '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: * '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: * '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: * '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: * 'zmgr' to be a valid zone manager. * 'state' to be a valid DNS_ZONESTATE_ constant. */voiddns_zone_forcereload(dns_zone_t *zone);/* * Force a reload of specified zone. * * Requires: * '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: * '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: * zone be a valid zone. */isc_uint64_t *dns_zone_getstatscounters(dns_zone_t *zone);/* * Requires: * zone be a valid zone. * * Returns: * 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: * 'zone' to be valid initialised zone. * '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: * 'zone' to be valid. * '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. */ISC_LANG_ENDDECLS#endif /* DNS_ZONE_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -