#include <stdio.h>
#include <isc/formatcheck.h>
#include <isc/lang.h>
#include <isc/rwlock.h>
#include <dns/master.h>
#include <dns/masterdump.h>
#include <dns/rdatastruct.h>
#include <dns/rpz.h>
#include <dns/types.h>
#include <dns/zt.h>
Go to the source code of this file.
Defines | |
#define | DNS_ZONE_H 1 |
#define | DNS_ZONEOPT_SERVERS 0x00000001U |
perform server checks | |
#define | DNS_ZONEOPT_PARENTS 0x00000002U |
perform parent checks | |
#define | DNS_ZONEOPT_CHILDREN 0x00000004U |
perform child checks | |
#define | DNS_ZONEOPT_NOTIFY 0x00000008U |
perform NOTIFY | |
#define | DNS_ZONEOPT_MANYERRORS 0x00000010U |
return many errors on load | |
#define | DNS_ZONEOPT_IXFRFROMDIFFS 0x00000020U |
calculate differences | |
#define | DNS_ZONEOPT_NOMERGE 0x00000040U |
don't merge journal | |
#define | DNS_ZONEOPT_CHECKNS 0x00000080U |
check if NS's are addresses | |
#define | DNS_ZONEOPT_FATALNS 0x00000100U |
DNS_ZONEOPT_CHECKNS is fatal. | |
#define | DNS_ZONEOPT_MULTIMASTER 0x00000200U |
this zone has multiple masters | |
#define | DNS_ZONEOPT_USEALTXFRSRC 0x00000400U |
use alternate transfer sources | |
#define | DNS_ZONEOPT_CHECKNAMES 0x00000800U |
check-names | |
#define | DNS_ZONEOPT_CHECKNAMESFAIL 0x00001000U |
fatal check-name failures | |
#define | DNS_ZONEOPT_CHECKWILDCARD 0x00002000U |
check for internal wildcards | |
#define | DNS_ZONEOPT_CHECKMX 0x00004000U |
check-mx | |
#define | DNS_ZONEOPT_CHECKMXFAIL 0x00008000U |
fatal check-mx failures | |
#define | DNS_ZONEOPT_CHECKINTEGRITY 0x00010000U |
perform integrity checks | |
#define | DNS_ZONEOPT_CHECKSIBLING 0x00020000U |
perform sibling glue checks | |
#define | DNS_ZONEOPT_NOCHECKNS 0x00040000U |
disable IN NS address checks | |
#define | DNS_ZONEOPT_WARNMXCNAME 0x00080000U |
warn on MX CNAME check | |
#define | DNS_ZONEOPT_IGNOREMXCNAME 0x00100000U |
ignore MX CNAME check | |
#define | DNS_ZONEOPT_WARNSRVCNAME 0x00200000U |
warn on SRV CNAME check | |
#define | DNS_ZONEOPT_IGNORESRVCNAME 0x00400000U |
ignore SRV CNAME check | |
#define | DNS_ZONEOPT_UPDATECHECKKSK 0x00800000U |
check dnskey KSK flag | |
#define | DNS_ZONEOPT_TRYTCPREFRESH 0x01000000U |
try tcp refresh on udp failure | |
#define | DNS_ZONEOPT_NOTIFYTOSOA 0x02000000U |
Notify the SOA MNAME. | |
#define | DNS_ZONEOPT_NSEC3TESTZONE 0x04000000U |
nsec3-test-zone | |
#define | DNS_ZONEOPT_SECURETOINSECURE 0x08000000U |
dnssec-secure-to-insecure | |
#define | DNS_ZONEOPT_DNSKEYKSKONLY 0x10000000U |
dnssec-dnskey-kskonly | |
#define | DNS_ZONEOPT_CHECKDUPRR 0x20000000U |
check-dup-records | |
#define | DNS_ZONEOPT_CHECKDUPRRFAIL 0x40000000U |
fatal check-dup-records failures | |
#define | DNS_ZONEOPT_CHECKSPF 0x80000000U |
check SPF records | |
#define | DNS_ZONEOPT2_CHECKTTL 0x00000001 |
check max-zone-ttl | |
#define | DNS_ZONEOPT_NOTIFYFORWARD 0x80000000U |
#define | DNS_ZONEKEY_ALLOW 0x00000001U |
fetch keys on command | |
#define | DNS_ZONEKEY_MAINTAIN 0x00000002U |
publish/sign on schedule | |
#define | DNS_ZONEKEY_CREATE 0x00000004U |
make keys when needed | |
#define | DNS_ZONEKEY_FULLSIGN 0x00000008U |
roll to new keys immediately | |
#define | DNS_ZONEKEY_NORESIGN 0x00000010U |
no automatic resigning | |
#define | DNS_ZONE_MINREFRESH 300 |
5 minutes | |
#define | DNS_ZONE_MAXREFRESH 2419200 |
4 weeks | |
#define | DNS_ZONE_DEFAULTREFRESH 3600 |
1 hour | |
#define | DNS_ZONE_MINRETRY 300 |
5 minutes | |
#define | DNS_ZONE_MAXRETRY 1209600 |
2 weeks | |
#define | DNS_ZONE_DEFAULTRETRY 60 |
1 minute, subject to exponential backoff | |
#define | DNS_ZONESTATE_XFERRUNNING 1 |
#define | DNS_ZONESTATE_XFERDEFERRED 2 |
#define | DNS_ZONESTATE_SOAQUERY 3 |
#define | DNS_ZONESTATE_ANY 4 |
#define | DNS_ZONESTATE_AUTOMATIC 5 |
Enumerations | |
enum | dns_zonetype_t { dns_zone_none, dns_zone_master, dns_zone_slave, dns_zone_stub, dns_zone_staticstub, dns_zone_key, dns_zone_dlz, dns_zone_redirect } |
enum | dns_zonestat_level_t { dns_zonestat_none = 0, dns_zonestat_terse, dns_zonestat_full } |
Functions | |
ISC_LANG_BEGINDECLS isc_result_t | dns_zone_create (dns_zone_t **zonep, isc_mem_t *mctx) |
Creates a new empty zone and attach '*zonep' to it. | |
void | dns_zone_setclass (dns_zone_t *zone, dns_rdataclass_t rdclass) |
Sets the class of a zone. This operation can only be performed once on a zone. | |
dns_rdataclass_t | dns_zone_getclass (dns_zone_t *zone) |
Returns the current zone class. | |
isc_result_t | dns_zone_getserial2 (dns_zone_t *zone, isc_uint32_t *serialp) |
isc_uint32_t | dns_zone_getserial (dns_zone_t *zone) |
Returns the current serial number of the zone. On success, the SOA serial of the zone will be copied into '*serialp'. dns_zone_getserial() cannot catch failure cases and is deprecated by dns_zone_getserial2(). | |
void | dns_zone_settype (dns_zone_t *zone, dns_zonetype_t type) |
Sets the zone type. This operation can only be performed once on a zone. | |
void | dns_zone_setview (dns_zone_t *zone, dns_view_t *view) |
Associate the zone with a view. | |
dns_view_t * | dns_zone_getview (dns_zone_t *zone) |
Returns the zone's associated view. | |
isc_result_t | dns_zone_setorigin (dns_zone_t *zone, const dns_name_t *origin) |
Sets the zones origin to 'origin'. | |
dns_name_t * | dns_zone_getorigin (dns_zone_t *zone) |
Returns the value of the origin. | |
isc_result_t | dns_zone_setfile (dns_zone_t *zone, const char *file) |
isc_result_t | dns_zone_setfile2 (dns_zone_t *zone, const char *file, dns_masterformat_t format) |
isc_result_t | dns_zone_setfile3 (dns_zone_t *zone, const char *file, dns_masterformat_t format, const dns_master_style_t *style) |
Sets the name of the master file in the format of 'format' from which the zone loads its database to 'file'. | |
const char * | dns_zone_getfile (dns_zone_t *zone) |
Gets the name of the zone's master file, if any. | |
void | dns_zone_setmaxttl (dns_zone_t *zone, isc_uint32_t maxttl) |
Sets the max ttl of the zone. | |
dns_ttl_t | dns_zone_getmaxttl (dns_zone_t *zone) |
Gets the max ttl of the zone. | |
isc_result_t | dns_zone_load (dns_zone_t *zone) |
isc_result_t | dns_zone_loadnew (dns_zone_t *zone) |
isc_result_t | dns_zone_loadandthaw (dns_zone_t *zone) |
Cause the database to be loaded from its backing store. Confirm that the minimum requirements for the zone type are met, otherwise DNS_R_BADZONE is returned. | |
isc_result_t | dns_zone_asyncload (dns_zone_t *zone, dns_zt_zoneloaded_t done, void *arg) |
Cause the database to be loaded from its backing store asynchronously. Other zone maintenance functions are suspended until this is complete. When finished, 'done' is called to inform the caller, with 'arg' as its first argument and 'zone' as its second. (Normally, 'arg' is expected to point to the zone table but is left undefined for testing purposes.). | |
isc_boolean_t | dns__zone_loadpending (dns_zone_t *zone) |
Indicates whether the zone is waiting to be loaded asynchronously. (Not currently intended for use outside of this module and associated tests.). | |
void | dns_zone_attach (dns_zone_t *source, dns_zone_t **target) |
Attach '*target' to 'source' incrementing its external reference count. | |
void | dns_zone_detach (dns_zone_t **zonep) |
Detach from a zone decrementing its external reference count. If this was the last external reference to the zone it will be shut down and eventually freed. | |
void | dns_zone_iattach (dns_zone_t *source, dns_zone_t **target) |
Attach '*target' to 'source' incrementing its internal reference count. This is intended for use by operations such as zone transfers that need to prevent the zone object from being freed but not from shutting down. | |
void | dns_zone_idetach (dns_zone_t **zonep) |
Detach from a zone decrementing its internal reference count. If there are no more internal or external references to the zone, it will be freed. | |
void | dns_zone_setflag (dns_zone_t *zone, unsigned int flags, isc_boolean_t value) |
Sets ('value' == 'ISC_TRUE') / clears ('value' == 'IS_FALSE') zone flags. Valid flag bits are DNS_ZONE_F_*. | |
isc_result_t | dns_zone_getdb (dns_zone_t *zone, dns_db_t **dbp) |
Attach '*dbp' to the database to if it exists otherwise return DNS_R_NOTLOADED. | |
void | dns_zone_setdb (dns_zone_t *zone, dns_db_t *db) |
Sets the zone database to 'db'. | |
isc_result_t | dns_zone_setdbtype (dns_zone_t *zone, unsigned int dbargc, const char *const *dbargv) |
Sets the database type to dbargv[0] and database arguments to subsequent dbargv elements. 'db_type' is not checked to see if it is a valid database type. | |
isc_result_t | dns_zone_getdbtype (dns_zone_t *zone, char ***argv, isc_mem_t *mctx) |
Returns the current dbtype. isc_mem_free() should be used to free 'argv' after use. | |
void | dns_zone_markdirty (dns_zone_t *zone) |
Mark a zone as 'dirty'. | |
void | dns_zone_expire (dns_zone_t *zone) |
Mark the zone as expired. If the zone requires dumping cause it to be initiated. Set the refresh and retry intervals to there default values and unload the zone. | |
void | dns_zone_refresh (dns_zone_t *zone) |
Initiate zone up to date checks. The zone must already be being managed. | |
isc_result_t | dns_zone_flush (dns_zone_t *zone) |
Write the zone to database if there are uncommitted changes. | |
isc_result_t | dns_zone_dump (dns_zone_t *zone) |
Write the zone to database. | |
isc_result_t | dns_zone_dumptostream (dns_zone_t *zone, FILE *fd) |
isc_result_t | dns_zone_dumptostream2 (dns_zone_t *zone, FILE *fd, dns_masterformat_t format, const dns_master_style_t *style) |
isc_result_t | dns_zone_dumptostream3 (dns_zone_t *zone, FILE *fd, dns_masterformat_t format, const dns_master_style_t *style, const isc_uint32_t rawversion) |
Write the zone to stream 'fd' in the specified 'format'. If the 'format' is dns_masterformat_text (RFC1035), 'style' also specifies the file style (e.g., &dns_master_style_default). | |
isc_result_t | dns_zone_fulldumptostream (dns_zone_t *zone, FILE *fd) |
The same as dns_zone_dumptostream, but dumps the zone with different dump settings (dns_master_style_full). | |
void | dns_zone_maintenance (dns_zone_t *zone) |
Perform regular maintenance on the zone. This is called as a result of a zone being managed. | |
isc_result_t | dns_zone_setmasters (dns_zone_t *zone, const isc_sockaddr_t *masters, isc_uint32_t count) |
isc_result_t | dns_zone_setmasterswithkeys (dns_zone_t *zone, const isc_sockaddr_t *masters, dns_name_t **keynames, isc_uint32_t count) |
Set the list of master servers for the zone. | |
isc_result_t | dns_zone_setalsonotify (dns_zone_t *zone, const isc_sockaddr_t *notify, isc_uint32_t count) |
isc_result_t | dns_zone_setalsonotifywithkeys (dns_zone_t *zone, const isc_sockaddr_t *notify, dns_name_t **keynames, isc_uint32_t count) |
isc_result_t | dns_zone_setalsonotifydscpkeys (dns_zone_t *zone, const isc_sockaddr_t *notify, const isc_dscp_t *dscps, dns_name_t **keynames, isc_uint32_t count) |
Set the list of additional servers to be notified when a zone changes. To clear the list use 'count = 0'. | |
void | dns_zone_unload (dns_zone_t *zone) |
detach the database from the zone structure. | |
void | dns_zone_setoption (dns_zone_t *zone, unsigned int option, isc_boolean_t value) |
void | dns_zone_setoption2 (dns_zone_t *zone, unsigned int option, isc_boolean_t value) |
Set the given options on ('value' == ISC_TRUE) or off ('value' == ISC_FALSE). | |
unsigned int | dns_zone_getoptions (dns_zone_t *zone) |
unsigned int | dns_zone_getoptions2 (dns_zone_t *zone) |
Returns the current zone options. | |
void | dns_zone_setkeyopt (dns_zone_t *zone, unsigned int option, isc_boolean_t value) |
Set key options on ('value' == ISC_TRUE) or off ('value' == ISC_FALSE). | |
unsigned int | dns_zone_getkeyopts (dns_zone_t *zone) |
Returns the current zone key options. | |
void | dns_zone_setminrefreshtime (dns_zone_t *zone, isc_uint32_t val) |
Set the minimum refresh time. | |
void | dns_zone_setmaxrefreshtime (dns_zone_t *zone, isc_uint32_t val) |
Set the maximum refresh time. | |
void | dns_zone_setminretrytime (dns_zone_t *zone, isc_uint32_t val) |
Set the minimum retry time. | |
void | dns_zone_setmaxretrytime (dns_zone_t *zone, isc_uint32_t val) |
Set the maximum retry time. | |
isc_result_t | dns_zone_setxfrsource4 (dns_zone_t *zone, const isc_sockaddr_t *xfrsource) |
isc_result_t | dns_zone_setaltxfrsource4 (dns_zone_t *zone, const isc_sockaddr_t *xfrsource) |
Set the source address to be used in IPv4 zone transfers. | |
isc_sockaddr_t * | dns_zone_getxfrsource4 (dns_zone_t *zone) |
isc_sockaddr_t * | dns_zone_getaltxfrsource4 (dns_zone_t *zone) |
Returns the source address set by a previous dns_zone_setxfrsource4 call, or the default of inaddr_any, port 0. | |
isc_result_t | dns_zone_setxfrsource4dscp (dns_zone_t *zone, isc_dscp_t dscp) |
isc_result_t | dns_zone_setaltxfrsource4dscp (dns_zone_t *zone, isc_dscp_t dscp) |
Set the DSCP value associated with the transfer/alt-transfer source. | |
isc_dscp_t | dns_zone_getxfrsource4dscp (dns_zone_t *zone) |
isc_dscp_t | dns_zone_getaltxfrsource4dscp (dns_zone_t *zone) |
isc_result_t | dns_zone_setxfrsource6 (dns_zone_t *zone, const isc_sockaddr_t *xfrsource) |
/ Get the DSCP value associated with the transfer/alt-transfer source. | |
isc_result_t | dns_zone_setaltxfrsource6 (dns_zone_t *zone, const isc_sockaddr_t *xfrsource) |
Set the source address to be used in IPv6 zone transfers. | |
isc_sockaddr_t * | dns_zone_getxfrsource6 (dns_zone_t *zone) |
isc_sockaddr_t * | dns_zone_getaltxfrsource6 (dns_zone_t *zone) |
Returns the source address set by a previous dns_zone_setxfrsource6 call, or the default of in6addr_any, port 0. | |
isc_dscp_t | dns_zone_getxfrsource6dscp (dns_zone_t *zone) |
isc_dscp_t | dns_zone_getaltxfrsource6dscp (dns_zone_t *zone) |
isc_result_t | dns_zone_setxfrsource6dscp (dns_zone_t *zone, isc_dscp_t dscp) |
/ Get the DSCP value associated with the transfer/alt-transfer source. | |
isc_result_t | dns_zone_setaltxfrsource6dscp (dns_zone_t *zone, isc_dscp_t dscp) |
Set the DSCP value associated with the transfer/alt-transfer source. | |
isc_result_t | dns_zone_setnotifysrc4 (dns_zone_t *zone, const isc_sockaddr_t *notifysrc) |
Set the source address to be used with IPv4 NOTIFY messages. | |
isc_sockaddr_t * | dns_zone_getnotifysrc4 (dns_zone_t *zone) |
Returns the source address set by a previous dns_zone_setnotifysrc4 call, or the default of inaddr_any, port 0. | |
isc_dscp_t | dns_zone_getnotifysrc4dscp (dns_zone_t *zone) |
isc_result_t | dns_zone_setnotifysrc4dscp (dns_zone_t *zone, isc_dscp_t dscp) |
/ Get the DCSP value associated with the notify source. | |
isc_result_t | dns_zone_setnotifysrc6 (dns_zone_t *zone, const isc_sockaddr_t *notifysrc) |
/ Get the DSCP value associated with the notify source. | |
isc_sockaddr_t * | dns_zone_getnotifysrc6 (dns_zone_t *zone) |
Returns the source address set by a previous dns_zone_setnotifysrc6 call, or the default of in6addr_any, port 0. | |
isc_dscp_t | dns_zone_getnotifysrc6dscp (dns_zone_t *zone) |
isc_result_t | dns_zone_setnotifysrc6dscp (dns_zone_t *zone, isc_dscp_t dscp) |
/ Get the DCSP value associated with the notify source. | |
void | dns_zone_setnotifyacl (dns_zone_t *zone, dns_acl_t *acl) |
/ Get the DSCP value associated with the notify source. | |
void | dns_zone_setqueryacl (dns_zone_t *zone, dns_acl_t *acl) |
Sets the query acl list for the zone. | |
void | dns_zone_setqueryonacl (dns_zone_t *zone, dns_acl_t *acl) |
Sets the query-on acl list for the zone. | |
void | dns_zone_setupdateacl (dns_zone_t *zone, dns_acl_t *acl) |
Sets the update acl list for the zone. | |
void | dns_zone_setforwardacl (dns_zone_t *zone, dns_acl_t *acl) |
Sets the forward unsigned updates acl list for the zone. | |
void | dns_zone_setxfracl (dns_zone_t *zone, dns_acl_t *acl) |
Sets the transfer acl list for the zone. | |
dns_acl_t * | dns_zone_getnotifyacl (dns_zone_t *zone) |
Returns the current notify acl or NULL. | |
dns_acl_t * | dns_zone_getqueryacl (dns_zone_t *zone) |
Returns the current query acl or NULL. | |
dns_acl_t * | dns_zone_getqueryonacl (dns_zone_t *zone) |
Returns the current query-on acl or NULL. | |
dns_acl_t * | dns_zone_getupdateacl (dns_zone_t *zone) |
Returns the current update acl or NULL. | |
dns_acl_t * | dns_zone_getforwardacl (dns_zone_t *zone) |
Returns the current forward unsigned updates acl or NULL. | |
dns_acl_t * | dns_zone_getxfracl (dns_zone_t *zone) |
Returns the current transfer acl or NULL. | |
void | dns_zone_clearupdateacl (dns_zone_t *zone) |
Clear the current update acl. | |
void | dns_zone_clearforwardacl (dns_zone_t *zone) |
Clear the current forward unsigned updates acl. | |
void | dns_zone_clearnotifyacl (dns_zone_t *zone) |
Clear the current notify acl. | |
void | dns_zone_clearqueryacl (dns_zone_t *zone) |
Clear the current query acl. | |
void | dns_zone_clearqueryonacl (dns_zone_t *zone) |
Clear the current query-on acl. | |
void | dns_zone_clearxfracl (dns_zone_t *zone) |
Clear the current transfer acl. | |
isc_boolean_t | dns_zone_getupdatedisabled (dns_zone_t *zone) |
Return update disabled. Transient unless called when running in isc_task_exclusive() mode. | |
void | dns_zone_setupdatedisabled (dns_zone_t *zone, isc_boolean_t state) |
Set update disabled. Should only be called only when running in isc_task_exclusive() mode. Failure to do so may result in updates being committed after the call has been made. | |
isc_boolean_t | dns_zone_getzeronosoattl (dns_zone_t *zone) |
Return zero-no-soa-ttl status. | |
void | dns_zone_setzeronosoattl (dns_zone_t *zone, isc_boolean_t state) |
Set zero-no-soa-ttl status. | |
void | dns_zone_setchecknames (dns_zone_t *zone, dns_severity_t severity) |
Set the severity of name checking when loading a zone. | |
dns_severity_t | dns_zone_getchecknames (dns_zone_t *zone) |
Return the current severity of name checking. | |
void | dns_zone_setjournalsize (dns_zone_t *zone, isc_int32_t size) |
Sets the journal size for the zone. | |
isc_int32_t | dns_zone_getjournalsize (dns_zone_t *zone) |
Return the journal size as set with a previous call to dns_zone_setjournalsize(). | |
isc_result_t | dns_zone_notifyreceive (dns_zone_t *zone, isc_sockaddr_t *from, dns_message_t *msg) |
Tell the zone that it has received a NOTIFY message from another server. This may cause some zone maintenance activity to occur. | |
void | dns_zone_setmaxxfrin (dns_zone_t *zone, isc_uint32_t maxxfrin) |
Set the maximum time (in seconds) that a zone transfer in (AXFR/IXFR) of this zone will use before being aborted. | |
isc_uint32_t | dns_zone_getmaxxfrin (dns_zone_t *zone) |
Returns the maximum transfer time for this zone. This will be either the value set by the last call to dns_zone_setmaxxfrin() or the default value of 1 hour. | |
void | dns_zone_setmaxxfrout (dns_zone_t *zone, isc_uint32_t maxxfrout) |
Set the maximum time (in seconds) that a zone transfer out (AXFR/IXFR) of this zone will use before being aborted. | |
isc_uint32_t | dns_zone_getmaxxfrout (dns_zone_t *zone) |
Returns the maximum transfer time for this zone. This will be either the value set by the last call to dns_zone_setmaxxfrout() or the default value of 1 hour. | |
isc_result_t | dns_zone_setjournal (dns_zone_t *zone, const char *myjournal) |
Sets the filename used for journaling updates / IXFR transfers. The default journal name is set by dns_zone_setfile() to be "file.jnl". If 'myjournal' is NULL, the zone will have no journal name. | |
char * | dns_zone_getjournal (dns_zone_t *zone) |
Returns the journal name associated with this zone. If no journal has been set this will be NULL. | |
dns_zonetype_t | dns_zone_gettype (dns_zone_t *zone) |
Returns the type of the zone (master/slave/etc.). | |
void | dns_zone_settask (dns_zone_t *zone, isc_task_t *task) |
Give a zone a task to work with. Any current task will be detached. | |
void | dns_zone_gettask (dns_zone_t *zone, isc_task_t **target) |
Attach '*target' to the zone's task. | |
void | dns_zone_notify (dns_zone_t *zone) |
Generate notify events for this zone. | |
isc_result_t | dns_zone_replacedb (dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump) |
Replace the database of "zone" with a new database "db". | |
isc_uint32_t | dns_zone_getidlein (dns_zone_t *zone) |
Requires:. | |
void | dns_zone_setidlein (dns_zone_t *zone, isc_uint32_t idlein) |
| |
isc_uint32_t | dns_zone_getidleout (dns_zone_t *zone) |
Requires:. | |
void | dns_zone_setidleout (dns_zone_t *zone, isc_uint32_t idleout) |
| |
void | dns_zone_getssutable (dns_zone_t *zone, dns_ssutable_t **table) |
Get the simple-secure-update policy table. | |
void | dns_zone_setssutable (dns_zone_t *zone, dns_ssutable_t *table) |
Set / clear the simple-secure-update policy table. | |
isc_mem_t * | dns_zone_getmctx (dns_zone_t *zone) |
Get the memory context of a zone. | |
dns_zonemgr_t * | dns_zone_getmgr (dns_zone_t *zone) |
If 'zone' is managed return the zone manager otherwise NULL. | |
void | dns_zone_setsigvalidityinterval (dns_zone_t *zone, isc_uint32_t interval) |
Set the zone's RRSIG 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. | |
isc_uint32_t | dns_zone_getsigvalidityinterval (dns_zone_t *zone) |
Get the zone's RRSIG validity interval. | |
void | dns_zone_setsigresigninginterval (dns_zone_t *zone, isc_uint32_t interval) |
Set the zone's RRSIG re-signing interval. A dynamic zone's RRSIG's will be re-signed 'interval' amount of time before they expire. | |
isc_uint32_t | dns_zone_getsigresigninginterval (dns_zone_t *zone) |
Get the zone's RRSIG re-signing interval. | |
void | dns_zone_setnotifytype (dns_zone_t *zone, dns_notifytype_t notifytype) |
Sets zone notify method to "notifytype". | |
isc_result_t | dns_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 exhausted 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);. | |
isc_result_t | dns_zone_next (dns_zone_t *zone, dns_zone_t **next) |
Find the next zone in the list of managed zones. | |
isc_result_t | dns_zone_first (dns_zonemgr_t *zmgr, dns_zone_t **first) |
Find the first zone in the list of managed zones. | |
isc_result_t | dns_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. | |
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. | |
isc_result_t | dns_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. Note: the zone manager will not be able to manage any zones until dns_zonemgr_setsize() has been run. | |
isc_result_t | dns_zonemgr_setsize (dns_zonemgr_t *zmgr, int num_zones) |
Set the size of the zone manager task pool. This must be run before zmgr can be used for managing zones. Currently, it can only be run once; the task pool cannot be resized. | |
isc_result_t | dns_zonemgr_createzone (dns_zonemgr_t *zmgr, dns_zone_t **zonep) |
Allocate a new zone using a memory context from the zone manager's memory context pool. | |
isc_result_t | dns_zonemgr_managezone (dns_zonemgr_t *zmgr, dns_zone_t *zone) |
Bring the zone under control of a zone manager. | |
isc_result_t | dns_zonemgr_forcemaint (dns_zonemgr_t *zmgr) |
Force zone maintenance of all zones managed by 'zmgr' at its earliest convenience. | |
void | dns__zonemgr_run (isc_task_t *task, isc_event_t *event) |
Event handler to call dns_zonemgr_forcemaint(); used to start zone operations from a unit test. Not intended for use outside libdns or related tests. | |
void | dns_zonemgr_resumexfrs (dns_zonemgr_t *zmgr) |
Attempt to start any stalled zone transfers. | |
void | dns_zonemgr_shutdown (dns_zonemgr_t *zmgr) |
Shut down the zone manager. | |
void | dns_zonemgr_attach (dns_zonemgr_t *source, dns_zonemgr_t **target) |
Attach '*target' to 'source' incrementing its external reference count. | |
void | dns_zonemgr_detach (dns_zonemgr_t **zmgrp) |
Detach from a zone manager. | |
void | dns_zonemgr_releasezone (dns_zonemgr_t *zmgr, dns_zone_t *zone) |
Release 'zone' from the managed by 'zmgr'. 'zmgr' is implicitly detached from 'zone'. | |
void | dns_zonemgr_settransfersin (dns_zonemgr_t *zmgr, isc_uint32_t value) |
Set the maximum number of simultaneous transfers in allowed by the zone manager. | |
isc_uint32_t | dns_zonemgr_getttransfersin (dns_zonemgr_t *zmgr) |
Return the maximum number of simultaneous transfers in allowed. | |
void | dns_zonemgr_settransfersperns (dns_zonemgr_t *zmgr, isc_uint32_t value) |
Set the number of zone transfers allowed per nameserver. | |
isc_uint32_t | dns_zonemgr_getttransfersperns (dns_zonemgr_t *zmgr) |
Return the number of transfers allowed per nameserver. | |
void | dns_zonemgr_setiolimit (dns_zonemgr_t *zmgr, isc_uint32_t iolimit) |
Set the number of simultaneous file descriptors available for reading and writing masterfiles. | |
isc_uint32_t | dns_zonemgr_getiolimit (dns_zonemgr_t *zmgr) |
Get the number of simultaneous file descriptors available for reading and writing masterfiles. | |
void | dns_zonemgr_setnotifyrate (dns_zonemgr_t *zmgr, unsigned int value) |
Set the number of NOTIFY requests sent per second. | |
void | dns_zonemgr_setstartupnotifyrate (dns_zonemgr_t *zmgr, unsigned int value) |
Set the number of startup NOTIFY requests sent per second. | |
void | dns_zonemgr_setserialqueryrate (dns_zonemgr_t *zmgr, unsigned int value) |
Set the number of SOA queries sent per second. | |
unsigned int | dns_zonemgr_getnotifyrate (dns_zonemgr_t *zmgr) |
Return the number of NOTIFY requests sent per second. | |
unsigned int | dns_zonemgr_getstartupnotifyrate (dns_zonemgr_t *zmgr) |
Return the number of startup NOTIFY requests sent per second. | |
unsigned int | dns_zonemgr_getserialqueryrate (dns_zonemgr_t *zmgr) |
Return the number of SOA queries sent per second. | |
unsigned int | dns_zonemgr_getcount (dns_zonemgr_t *zmgr, int state) |
Returns the number of zones in the specified state. | |
void | dns_zonemgr_unreachableadd (dns_zonemgr_t *zmgr, isc_sockaddr_t *remote, isc_sockaddr_t *local, isc_time_t *now) |
Add the pair of addresses to the unreachable cache. | |
isc_boolean_t | dns_zonemgr_unreachable (dns_zonemgr_t *zmgr, isc_sockaddr_t *remote, isc_sockaddr_t *local, isc_time_t *now) |
Returns ISC_TRUE if the given local/remote address pair is found in the zone maanger's unreachable cache. | |
void | dns_zonemgr_unreachabledel (dns_zonemgr_t *zmgr, isc_sockaddr_t *remote, isc_sockaddr_t *local) |
Remove the pair of addresses from the unreachable cache. | |
void | dns_zone_forcereload (dns_zone_t *zone) |
Force a reload of specified zone. | |
isc_boolean_t | dns_zone_isforced (dns_zone_t *zone) |
Check if the zone is waiting a forced reload. | |
isc_result_t | dns_zone_setstatistics (dns_zone_t *zone, isc_boolean_t on) |
This function is obsoleted by dns_zone_setrequeststats(). | |
isc_uint64_t * | dns_zone_getstatscounters (dns_zone_t *zone) |
This function is obsoleted by dns_zone_getrequeststats(). | |
void | dns_zone_setstats (dns_zone_t *zone, isc_stats_t *stats) |
Set a general zone-maintenance statistics set 'stats' for 'zone'. This function is expected to be called only on zone creation (when necessary). Once installed, it cannot be removed or replaced. Also, there is no interface to get the installed stats from the zone; the caller must keep the stats to reference (e.g. dump) it later. | |
void | dns_zone_setrequeststats (dns_zone_t *zone, isc_stats_t *stats) |
void | dns_zone_setrcvquerystats (dns_zone_t *zone, dns_stats_t *stats) |
Set additional statistics sets to zone. These are attached to the zone but are not counted in the zone module; only the caller updates the counters. | |
isc_stats_t * | dns_zone_getrequeststats (dns_zone_t *zone) |
dns_stats_t * | dns_zone_getrcvquerystats (dns_zone_t *zone) |
Get the additional statistics for zone, if one is installed. | |
void | dns_zone_dialup (dns_zone_t *zone) |
Perform dialup-time maintenance on 'zone'. | |
void | dns_zone_setdialup (dns_zone_t *zone, dns_dialuptype_t dialup) |
Set the dialup type of 'zone' to 'dialup'. | |
void | dns_zone_log (dns_zone_t *zone, int level, const char *msg,...) ISC_FORMAT_PRINTF(3 |
void void | dns_zone_logc (dns_zone_t *zone, isc_logcategory_t *category, int level, const char *msg,...) ISC_FORMAT_PRINTF(4 |
Log the message 'msg...' at 'level', including text that identifies the message as applying to 'zone'. | |
void void void | dns_zone_name (dns_zone_t *zone, char *buf, size_t len) |
Log the message 'msg...' at 'level', including text that identifies the message as applying to 'zone'. | |
isc_result_t | dns_zone_checknames (dns_zone_t *zone, dns_name_t *name, dns_rdata_t *rdata) |
Check if this record meets the check-names policy. | |
void | dns_zone_setacache (dns_zone_t *zone, dns_acache_t *acache) |
Associate the zone with an additional cache. | |
void | dns_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 TARGET is not within the zone. | |
void | dns_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. | |
void | dns_zone_setcheckns (dns_zone_t *zone, dns_checknsfunc_t checkns) |
Set the post load integrity callback function 'checkns'. 'checkns' will be called if the NS TARGET is not within the zone. | |
void | dns_zone_setnotifydelay (dns_zone_t *zone, isc_uint32_t delay) |
Set the minimum delay between sets of notify messages. | |
isc_uint32_t | dns_zone_getnotifydelay (dns_zone_t *zone) |
Get the minimum delay between sets of notify messages. | |
void | dns_zone_setisself (dns_zone_t *zone, dns_isselffunc_t isself, void *arg) |
Set the isself callback function and argument. | |
void | dns_zone_setnodes (dns_zone_t *zone, isc_uint32_t nodes) |
Set the number of nodes that will be checked per quantum. | |
void | dns_zone_setsignatures (dns_zone_t *zone, isc_uint32_t signatures) |
Set the number of signatures that will be generated per quantum. | |
isc_uint32_t | dns_zone_getsignatures (dns_zone_t *zone) |
Get the number of signatures that will be generated per quantum. | |
isc_result_t | dns_zone_signwithkey (dns_zone_t *zone, dns_secalg_t algorithm, isc_uint16_t keyid, isc_boolean_t deleteit) |
Initiate/resume signing of the entire zone with the zone DNSKEY(s) that match the given algorithm and keyid. | |
isc_result_t | dns_zone_addnsec3chain (dns_zone_t *zone, dns_rdata_nsec3param_t *nsec3param) |
Incrementally add a NSEC3 chain that corresponds to 'nsec3param'. | |
void | dns_zone_setprivatetype (dns_zone_t *zone, dns_rdatatype_t type) |
dns_rdatatype_t | dns_zone_getprivatetype (dns_zone_t *zone) |
void | dns_zone_rekey (dns_zone_t *zone, isc_boolean_t fullsign) |
Update the zone's DNSKEY set from the key repository. | |
isc_result_t | dns_zone_nscheck (dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version, unsigned int *errors) |
void | dns_zone_setadded (dns_zone_t *zone, isc_boolean_t added) |
Check if the name servers for the zone are sane (have address, don't refer to CNAMEs/DNAMEs. The number of constiancy errors detected in returned in '*errors'. | |
isc_boolean_t | dns_zone_getadded (dns_zone_t *zone) |
Sets the value of zone->added, which should be ISC_TRUE for zones that were originally added by "rndc addzone". | |
void | dns_zone_setautomatic (dns_zone_t *zone, isc_boolean_t automatic) |
Returns ISC_TRUE if the zone was originally added at runtime using "rndc addzone". | |
isc_boolean_t | dns_zone_getautomatic (dns_zone_t *zone) |
Sets the value of zone->automatic, which should be ISC_TRUE for zones that were automatically added by named. | |
isc_result_t | dns_zone_dlzpostload (dns_zone_t *zone, dns_db_t *db) |
Returns ISC_TRUE if the zone was added automatically by named. | |
isc_boolean_t | dns_zone_isdynamic (dns_zone_t *zone, isc_boolean_t ignore_freeze) |
Load the origin names for a writeable DLZ database. | |
isc_result_t | dns_zone_setrefreshkeyinterval (dns_zone_t *zone, isc_uint32_t interval) |
Return true iff the zone is "dynamic", in the sense that the zone's master file (if any) is written by the server, rather than being updated manually and read by the server. | |
isc_boolean_t | dns_zone_getrequestexpire (dns_zone_t *zone) |
Sets the frequency, in minutes, with which the key repository will be checked to see if the keys for this zone have been updated. Any value higher than 1440 minutes (24 hours) will be silently reduced. A value of zero will return an out-of-range error. | |
void | dns_zone_setrequestexpire (dns_zone_t *zone, isc_boolean_t flag) |
Returns the true/false value of the request-expire option in the zone. | |
isc_boolean_t | dns_zone_getrequestixfr (dns_zone_t *zone) |
Sets the request-expire option for the zone. Either true or false. The default value is determined by the setting of this option in the view. | |
void | dns_zone_setrequestixfr (dns_zone_t *zone, isc_boolean_t flag) |
Returns the true/false value of the request-ixfr option in the zone. | |
void | dns_zone_setserialupdatemethod (dns_zone_t *zone, dns_updatemethod_t method) |
Sets the request-ixfr option for the zone. Either true or false. The default value is determined by the setting of this option in the view. | |
dns_updatemethod_t | dns_zone_getserialupdatemethod (dns_zone_t *zone) |
Sets the update method to use when incrementing the zone serial number due to a DDNS update. Valid options are dns_updatemethod_increment and dns_updatemethod_unixtime. | |
isc_result_t | dns_zone_link (dns_zone_t *zone, dns_zone_t *raw) |
Returns the update method to be used when incrementing the zone serial number due to a DDNS update. | |
void | dns_zone_getraw (dns_zone_t *zone, dns_zone_t **raw) |
isc_result_t | dns_zone_keydone (dns_zone_t *zone, const char *data) |
isc_result_t | dns_zone_setnsec3param (dns_zone_t *zone, isc_uint8_t hash, isc_uint8_t flags, isc_uint16_t iter, isc_uint8_t saltlen, unsigned char *salt, isc_boolean_t replace) |
void | dns_zone_setrawdata (dns_zone_t *zone, dns_masterrawheader_t *header) |
Set the NSEC3 parameters for the zone. | |
isc_result_t | dns_zone_synckeyzone (dns_zone_t *zone) |
Set the data to be included in the header when the zone is dumped in binary format. | |
isc_result_t | dns_zone_getloadtime (dns_zone_t *zone, isc_time_t *loadtime) |
Force the managed key zone to synchronize, and start the key maintenance timer. | |
isc_result_t | dns_zone_getrefreshtime (dns_zone_t *zone, isc_time_t *refreshtime) |
Return the time when the zone was last loaded. | |
isc_result_t | dns_zone_getexpiretime (dns_zone_t *zone, isc_time_t *expiretime) |
Return the time when the (slave) zone will need to be refreshed. | |
isc_result_t | dns_zone_getrefreshkeytime (dns_zone_t *zone, isc_time_t *refreshkeytime) |
Return the time when the (slave) zone will expire. | |
unsigned int | dns_zone_getincludes (dns_zone_t *zone, char ***includesp) |
Return the time of the next scheduled DNSSEC key event. | |
isc_result_t | dns_zone_rpz_enable (dns_zone_t *zone, dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num) |
Return the number include files that were encountered during load. If the number is greater than zero, 'includesp' will point to an array containing the filenames. | |
void | dns_zone_rpz_enable_db (dns_zone_t *zone, dns_db_t *db) |
Set the response policy associated with a zone. | |
dns_rpz_num_t | dns_zone_get_rpz_num (dns_zone_t *zone) |
If a zone is a response policy zone, mark its new database. | |
void | dns_zone_setstatlevel (dns_zone_t *zone, dns_zonestat_level_t level) |
dns_zonestat_level_t | dns_zone_getstatlevel (dns_zone_t *zone) |
isc_result_t | dns_zone_setserial (dns_zone_t *zone, isc_uint32_t serial) |
Set and get the statistics reporting level for the zone; full, terse, or none. |
Definition in file zone.h.
#define DNS_ZONEOPT_MANYERRORS 0x00000010U |
return many errors on load
Definition at line 63 of file zone.h.
Referenced by configure_zone(), and zone_startload().
#define DNS_ZONEOPT_IXFRFROMDIFFS 0x00000020U |
calculate differences
Definition at line 64 of file zone.h.
Referenced by ns_zone_configure(), zone_postload(), and zone_replacedb().
#define DNS_ZONEOPT_NOMERGE 0x00000040U |
don't merge journal
Definition at line 65 of file zone.h.
Referenced by load_zone(), and zone_postload().
#define DNS_ZONEOPT_CHECKNS 0x00000080U |
check if NS's are addresses
Definition at line 66 of file zone.h.
Referenced by configure_zone(), get_master_options(), and main().
#define DNS_ZONEOPT_FATALNS 0x00000100U |
DNS_ZONEOPT_CHECKNS is fatal.
Definition at line 67 of file zone.h.
Referenced by get_master_options(), and main().
#define DNS_ZONEOPT_MULTIMASTER 0x00000200U |
this zone has multiple masters
Definition at line 68 of file zone.h.
Referenced by ns_zone_configure(), and refresh_callback().
#define DNS_ZONEOPT_USEALTXFRSRC 0x00000400U |
use alternate transfer sources
Definition at line 69 of file zone.h.
Referenced by ns_zone_configure(), refresh_callback(), stub_callback(), and zone_xfrdone().
#define DNS_ZONEOPT_CHECKNAMES 0x00000800U |
check-names
Definition at line 70 of file zone.h.
Referenced by configure_zone(), get_master_options(), main(), and ns_zone_configure().
#define DNS_ZONEOPT_CHECKNAMESFAIL 0x00001000U |
fatal check-name failures
Definition at line 71 of file zone.h.
Referenced by configure_zone(), get_master_options(), main(), and ns_zone_configure().
#define DNS_ZONEOPT_CHECKWILDCARD 0x00002000U |
check for internal wildcards
Definition at line 72 of file zone.h.
Referenced by get_master_options(), main(), ns_zone_configure(), and update_action().
#define DNS_ZONEOPT_CHECKMX 0x00004000U |
check-mx
Definition at line 73 of file zone.h.
Referenced by configure_zone(), get_master_options(), main(), and ns_zone_configure().
#define DNS_ZONEOPT_CHECKMXFAIL 0x00008000U |
fatal check-mx failures
Definition at line 74 of file zone.h.
Referenced by configure_zone(), get_master_options(), main(), ns_zone_configure(), and zone_check_mx().
#define DNS_ZONEOPT_CHECKINTEGRITY 0x00010000U |
perform integrity checks
Definition at line 75 of file zone.h.
Referenced by check_mx(), configure_zone(), main(), ns_zone_configure(), and zone_postload().
#define DNS_ZONEOPT_CHECKSIBLING 0x00020000U |
perform sibling glue checks
Definition at line 76 of file zone.h.
Referenced by configure_zone(), main(), ns_zone_configure(), and zone_check_glue().
#define DNS_ZONEOPT_NOCHECKNS 0x00040000U |
disable IN NS address checks
Definition at line 77 of file zone.h.
Referenced by add_keydata_zone(), create_empty_zone(), dns64_reverse(), and zone_check_ns().
#define DNS_ZONEOPT_WARNMXCNAME 0x00080000U |
warn on MX CNAME check
Definition at line 78 of file zone.h.
Referenced by checkmx(), configure_zone(), main(), ns_zone_configure(), and zone_check_mx().
#define DNS_ZONEOPT_IGNOREMXCNAME 0x00100000U |
ignore MX CNAME check
Definition at line 79 of file zone.h.
Referenced by checkmx(), configure_zone(), main(), ns_zone_configure(), and zone_check_mx().
#define DNS_ZONEOPT_WARNSRVCNAME 0x00200000U |
warn on SRV CNAME check
Definition at line 80 of file zone.h.
Referenced by checksrv(), configure_zone(), main(), ns_zone_configure(), and zone_check_srv().
#define DNS_ZONEOPT_IGNORESRVCNAME 0x00400000U |
ignore SRV CNAME check
Definition at line 81 of file zone.h.
Referenced by checksrv(), configure_zone(), main(), ns_zone_configure(), and zone_check_srv().
#define DNS_ZONEOPT_UPDATECHECKKSK 0x00800000U |
check dnskey KSK flag
Definition at line 82 of file zone.h.
Referenced by dns_update_signaturesinc(), ns_zone_configure(), zone_nsec3chain(), zone_resigninc(), and zone_sign().
#define DNS_ZONEOPT_TRYTCPREFRESH 0x01000000U |
try tcp refresh on udp failure
Definition at line 83 of file zone.h.
Referenced by ns_zone_configure(), and refresh_callback().
#define DNS_ZONEOPT_NOTIFYTOSOA 0x02000000U |
Notify the SOA MNAME.
Definition at line 84 of file zone.h.
Referenced by ns_zone_configure(), and zone_notify().
#define DNS_ZONEOPT_NSEC3TESTZONE 0x04000000U |
nsec3-test-zone
Definition at line 85 of file zone.h.
Referenced by check_nsec3param(), and ns_zone_configure().
#define DNS_ZONEOPT_SECURETOINSECURE 0x08000000U |
#define DNS_ZONEOPT_DNSKEYKSKONLY 0x10000000U |
dnssec-dnskey-kskonly
Definition at line 87 of file zone.h.
Referenced by dns_update_signaturesinc(), ns_zone_configure(), zone_nsec3chain(), zone_resigninc(), and zone_sign().
#define DNS_ZONEOPT_CHECKDUPRR 0x20000000U |
check-dup-records
Definition at line 88 of file zone.h.
Referenced by configure_zone(), main(), ns_zone_configure(), and zone_postload().
#define DNS_ZONEOPT_CHECKDUPRRFAIL 0x40000000U |
fatal check-dup-records failures
Definition at line 89 of file zone.h.
Referenced by configure_zone(), main(), ns_zone_configure(), and zone_rrset_check_dup().
#define DNS_ZONEOPT_CHECKSPF 0x80000000U |
check SPF records
Definition at line 90 of file zone.h.
Referenced by configure_zone(), integrity_checks(), main(), and ns_zone_configure().
#define DNS_ZONEOPT2_CHECKTTL 0x00000001 |
check max-zone-ttl
Definition at line 96 of file zone.h.
Referenced by configure_zone(), dns_zone_setmaxttl(), get_master_options(), main(), and update_action().
#define DNS_ZONEKEY_ALLOW 0x00000001U |
fetch keys on command
Definition at line 108 of file zone.h.
Referenced by ns_server_rekey(), ns_server_zonestatus(), and ns_zone_configure().
#define DNS_ZONEKEY_MAINTAIN 0x00000002U |
publish/sign on schedule
Definition at line 109 of file zone.h.
Referenced by configure_zone(), ns_server_rekey(), ns_server_zonestatus(), ns_zone_configure(), and zone_postload().
#define DNS_ZONEKEY_FULLSIGN 0x00000008U |
#define DNS_ZONEKEY_NORESIGN 0x00000010U |
no automatic resigning
Definition at line 112 of file zone.h.
Referenced by ns_server_zonestatus(), ns_zone_configure(), zone_postload(), and zone_resigninc().
#define DNS_ZONE_MINREFRESH 300 |
#define DNS_ZONE_MAXREFRESH 2419200 |
#define DNS_ZONE_DEFAULTREFRESH 3600 |
1 hour
Definition at line 121 of file zone.h.
Referenced by dns_zone_create(), zone_expire(), and zone_xfrdone().
#define DNS_ZONE_MINRETRY 300 |
#define DNS_ZONE_MAXRETRY 1209600 |
#define DNS_ZONE_DEFAULTRETRY 60 |
1 minute, subject to exponential backoff
Definition at line 130 of file zone.h.
Referenced by dns_zone_create(), zone_expire(), and zone_xfrdone().
#define DNS_ZONESTATE_XFERRUNNING 1 |
#define DNS_ZONESTATE_XFERDEFERRED 2 |
#define DNS_ZONESTATE_SOAQUERY 3 |
#define DNS_ZONESTATE_ANY 4 |
#define DNS_ZONESTATE_AUTOMATIC 5 |
enum dns_zonetype_t |
enum dns_zonestat_level_t |
ISC_LANG_BEGINDECLS isc_result_t dns_zone_create | ( | dns_zone_t ** | zonep, | |
isc_mem_t * | mctx | |||
) |
Creates a new empty zone and attach '*zonep' to it.
Requires:
Definition at line 884 of file zone.c.
References dbargc_default, dbargv_default, DESTROYLOCK, DNS_DEFAULT_IDLEIN, DNS_DEFAULT_IDLEOUT, DNS_EVENT_ZONECONTROL, dns_masterformat_none, dns_name_init(), dns_notifytype_yes, DNS_RPZ_INVALID_NUM, dns_severity_ignore, dns_updatemethod_increment, DNS_ZONE_DEFAULTREFRESH, DNS_ZONE_DEFAULTRETRY, DNS_ZONE_MAXREFRESH, DNS_ZONE_MAXRETRY, DNS_ZONE_MINREFRESH, DNS_ZONE_MINRETRY, dns_zone_none, dns_zone_setdbtype(), dns_zonestat_none, ISC_EVENT_INIT, ISC_FALSE, ISC_LINK_INIT, ISC_LIST_INIT, isc_mem_attach(), isc_mem_get, isc_mem_putanddetach, isc_mutex_init, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_refcount_decrement, isc_refcount_destroy, isc_refcount_init(), isc_sockaddr_any(), isc_sockaddr_any6(), isc_time_settoepoch(), ISC_TRUE, MAX_XFER_TIME, now, REQUIRE, TIME_NOW, ZONE_MAGIC, zone_shutdown(), ZONEDB_DESTROYLOCK, and ZONEDB_INITLOCK.
Referenced by configure_zone(), dns64_reverse(), dns_dlz_writeablezone(), dns_test_makezone(), dns_zonemgr_createzone(), and load_zone().
void dns_zone_setclass | ( | dns_zone_t * | zone, | |
dns_rdataclass_t | rdclass | |||
) |
Sets the class of a zone. This operation can only be performed once on a zone.
Require:
Definition at line 1238 of file zone.c.
References dns_zone_setclass(), DNS_ZONE_VALID, inline_secure(), INSIST, isc_mem_free, isc_mem_strdup, LOCK_ZONE, namebuf, REQUIRE, UNLOCK_ZONE, zone_namerd_tostr(), and zone_rdclass_tostr().
Referenced by add_keydata_zone(), create_empty_zone(), dns64_reverse(), dns_test_makezone(), dns_zone_setclass(), load_zone(), and ns_zone_configure().
dns_rdataclass_t dns_zone_getclass | ( | dns_zone_t * | zone | ) |
Returns the current zone class.
Requires:
Definition at line 1269 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by configure_staticstub(), configure_staticstub_serveraddrs(), configure_staticstub_servernames(), dns_xfrin_create3(), freezezones(), ns_server_freeze(), ns_server_sync(), send_forward_event(), and update_log().
isc_result_t dns_zone_getserial2 | ( | dns_zone_t * | zone, | |
isc_uint32_t * | serialp | |||
) |
Definition at line 1285 of file zone.c.
References DNS_R_NOTLOADED, DNS_ZONE_VALID, ISC_R_FAILURE, ISC_R_SUCCESS, isc_rwlocktype_read, LOCK_ZONE, REQUIRE, UNLOCK_ZONE, zone_get_from_db(), ZONEDB_LOCK, and ZONEDB_UNLOCK.
Referenced by dns_zone_getserial().
isc_uint32_t dns_zone_getserial | ( | dns_zone_t * | zone | ) |
Returns the current serial number of the zone. On success, the SOA serial of the zone will be copied into '*serialp'. dns_zone_getserial() cannot catch failure cases and is deprecated by dns_zone_getserial2().
Requires:
Definition at line 1309 of file zone.c.
References dns_zone_getserial2(), and ISC_R_SUCCESS.
Referenced by ns_server_zonestatus().
void dns_zone_settype | ( | dns_zone_t * | zone, | |
dns_zonetype_t | type | |||
) |
Sets the zone type. This operation can only be performed once on a zone.
Requires:
Definition at line 1324 of file zone.c.
References dns_zone_none, DNS_ZONE_VALID, isc_mem_free, isc_mem_strdup, LOCK_ZONE, namebuf, REQUIRE, UNLOCK_ZONE, and zone_namerd_tostr().
Referenced by add_keydata_zone(), create_empty_zone(), dns64_reverse(), dns_test_makezone(), load_zone(), ns_zone_configure(), and ns_zone_configure_writeable_dlz().
void dns_zone_setview | ( | dns_zone_t * | zone, | |
dns_view_t * | view | |||
) |
Associate the zone with a view.
Require:
Definition at line 1441 of file zone.c.
References dns_view_weakattach(), dns_view_weakdetach(), dns_zone_setview(), DNS_ZONE_VALID, inline_secure(), INSIST, isc_mem_free, isc_mem_strdup, LOCK_ZONE, namebuf, REQUIRE, UNLOCK_ZONE, zone_namerd_tostr(), and zone_viewname_tostr().
Referenced by add_keydata_zone(), configure_zone(), create_empty_zone(), dns64_reverse(), dns_dlz_writeablezone(), dns_test_makezone(), and dns_zone_setview().
dns_view_t* dns_zone_getview | ( | dns_zone_t * | zone | ) |
Returns the zone's associated view.
Requires:
Definition at line 1468 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by adjust_interfaces(), asyncload(), ATF_TC_BODY(), configure_zone_acl(), freezezones(), got_transfer_quota(), ns_query(), ns_server_delzone(), ns_server_freeze(), ns_server_showzone(), ns_server_sync(), ns_stats_dump(), ns_zone_configure(), removed(), soa_query(), xfrin_recv_done(), and zone_notify().
isc_result_t dns_zone_setorigin | ( | dns_zone_t * | zone, | |
const dns_name_t * | origin | |||
) |
Sets the zones origin to 'origin'.
Require:
Definition at line 1476 of file zone.c.
References dns_name_dup(), dns_name_dynamic(), dns_name_free(), dns_name_init(), dns_zone_setorigin(), DNS_ZONE_VALID, inline_secure(), INSIST, isc_mem_free, isc_mem_strdup, ISC_R_SUCCESS, LOCK_ZONE, namebuf, REQUIRE, UNLOCK_ZONE, zone_name_tostr(), and zone_namerd_tostr().
Referenced by add_keydata_zone(), configure_zone(), create_empty_zone(), dns64_reverse(), dns_dlz_writeablezone(), dns_test_makezone(), dns_zone_setorigin(), and load_zone().
dns_name_t* dns_zone_getorigin | ( | dns_zone_t * | zone | ) |
Returns the value of the origin.
Require:
Definition at line 13280 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by add_nsec3param_records(), configure_staticstub(), configure_staticstub_serveraddrs(), configure_staticstub_servernames(), configure_zone_ssutable(), dlzconfigure_callback(), dns_nsec3param_deletechains(), dns_view_find2(), dns_xfrin_create3(), dns_zt_mount(), dns_zt_unmount(), freezezones(), ns_server_freeze(), ns_server_signing(), ns_server_sync(), ns_stats_dump(), query_getdb(), send_forward_event(), and update_log().
isc_result_t dns_zone_setfile | ( | dns_zone_t * | zone, | |
const char * | file | |||
) |
Definition at line 1557 of file zone.c.
References dns_master_style_default, dns_masterformat_text, and dns_zone_setfile3().
Referenced by add_keydata_zone(), and ATF_TC_BODY().
isc_result_t dns_zone_setfile2 | ( | dns_zone_t * | zone, | |
const char * | file, | |||
dns_masterformat_t | format | |||
) |
Definition at line 1563 of file zone.c.
References dns_master_style_default, and dns_zone_setfile3().
Referenced by load_zone().
isc_result_t dns_zone_setfile3 | ( | dns_zone_t * | zone, | |
const char * | file, | |||
dns_masterformat_t | format, | |||
const dns_master_style_t * | style | |||
) |
Sets the name of the master file in the format of 'format' from which the zone loads its database to 'file'.
For zones that have no associated master file, 'file' will be NULL.
For zones with persistent databases, the file name setting is ignored.
dns_zone_setfile() is a backward-compatible form of dns_zone_setfile2(), which always specifies the dns_masterformat_text (RFC1035) format.
dns_zone_setfile2() is a backward-compatible form of dns_zone_setfile3(), which also specifies the style that should be used if a zone using the 'text' masterformat is ever dumped.
Require:
Definition at line 1571 of file zone.c.
References default_journal(), dns_masterformat_text, dns_zone_setstring(), DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by dns_zone_setfile(), dns_zone_setfile2(), and ns_zone_configure().
const char* dns_zone_getfile | ( | dns_zone_t * | zone | ) |
Gets the name of the zone's master file, if any.
Requires:
Definition at line 1593 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by create_empty_zone(), ns_server_delzone(), ns_server_zonestatus(), and ns_zone_reusable().
void dns_zone_setmaxttl | ( | dns_zone_t * | zone, | |
isc_uint32_t | maxttl | |||
) |
Sets the max ttl of the zone.
Requires:
Referenced by load_zone(), and ns_zone_configure().
dns_ttl_t dns_zone_getmaxttl | ( | dns_zone_t * | zone | ) |
Gets the max ttl of the zone.
Requires:
Definition at line 1600 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by update_action().
isc_result_t dns_zone_load | ( | dns_zone_t * | zone | ) |
Definition at line 2011 of file zone.c.
References ISC_FALSE, and zone_load().
Referenced by load(), load_zone(), load_zones(), and ns_server_reloadcommand().
isc_result_t dns_zone_loadnew | ( | dns_zone_t * | zone | ) |
Definition at line 2016 of file zone.c.
References DNS_ZONELOADFLAG_NOSTAT, ISC_FALSE, and zone_load().
Referenced by do_addzone(), do_modzone(), load_new_zones(), and loadnew().
isc_result_t dns_zone_loadandthaw | ( | dns_zone_t * | zone | ) |
Cause the database to be loaded from its backing store. Confirm that the minimum requirements for the zone type are met, otherwise DNS_R_BADZONE is returned.
dns_zone_loadnew() only loads zones that are not yet loaded. dns_zone_load() also loads zones that are already loaded and and whose master file has changed since the last load. dns_zone_loadandthaw() is similar to dns_zone_load() but will also re-enable DNS UPDATEs when the load completes.
Require:
Definition at line 2113 of file zone.c.
References DNS_R_CONTINUE, DNS_R_NOMASTERFILE, DNS_R_SEENINCLUDE, DNS_R_UPTODATE, DNS_ZONELOADFLAG_THAW, inline_raw(), ISC_FALSE, ISC_R_SUCCESS, and zone_load().
Referenced by freezezones(), and ns_server_freeze().
isc_result_t dns_zone_asyncload | ( | dns_zone_t * | zone, | |
dns_zt_zoneloaded_t | done, | |||
void * | arg | |||
) |
Cause the database to be loaded from its backing store asynchronously. Other zone maintenance functions are suspended until this is complete. When finished, 'done' is called to inform the caller, with 'arg' as its first argument and 'zone' as its second. (Normally, 'arg' is expected to point to the zone table but is left undefined for testing purposes.).
Require:
Definition at line 2062 of file zone.c.
References CHECK, DNS_EVENT_ZONELOAD, DNS_ZONE_FLAG, DNS_ZONE_SETFLAG, DNS_ZONE_VALID, DNS_ZONEFLG_LOADPENDING, isc_event_allocate(), isc_mem_get, isc_mem_put, ISC_R_ALREADYRUNNING, ISC_R_FAILURE, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_task_send(), LOCK_ZONE, REQUIRE, UNLOCK_ZONE, zone_asyncload(), and zone_iattach().
Referenced by asyncload(), and start_zone_asyncload().
isc_boolean_t dns__zone_loadpending | ( | dns_zone_t * | zone | ) |
Indicates whether the zone is waiting to be loaded asynchronously. (Not currently intended for use outside of this module and associated tests.).
Definition at line 2106 of file zone.c.
References DNS_ZONE_FLAG, DNS_ZONE_VALID, DNS_ZONEFLG_LOADPENDING, ISC_TF, and REQUIRE.
Referenced by ATF_TC_BODY().
void dns_zone_attach | ( | dns_zone_t * | source, | |
dns_zone_t ** | target | |||
) |
Attach '*target' to 'source' incrementing its external reference count.
Require:
Definition at line 4982 of file zone.c.
References DNS_ZONE_VALID, isc_refcount_increment, and REQUIRE.
Referenced by add_keydata_zone(), add_zone_tolist(), configure_zone(), dns_acache_getentry(), dns_acache_setentry(), dns_viewlist_findzone(), dns_zt_find(), dns_zt_mount(), ns_server_freeze(), ns_server_refreshcommand(), ns_server_retransfercommand(), ns_update_start(), query_find(), receive_secure_serial(), and xfrout_ctx_create().
void dns_zone_detach | ( | dns_zone_t ** | zonep | ) |
Detach from a zone decrementing its external reference count. If this was the last external reference to the zone it will be shut down and eventually freed.
Require:
Definition at line 4990 of file zone.c.
References dns_zone_detach(), dns_zone_idetach(), DNS_ZONE_VALID, free_now, INSIST, ISC_FALSE, isc_refcount_decrement, isc_task_send(), ISC_TRUE, LOCK_ZONE, REQUIRE, secure(), UNLOCK_ZONE, and zone_free().
Referenced by add_keydata_zone(), ATF_TC_BODY(), auto_detach(), clear_entry(), configure_view(), configure_zone(), create_empty_zone(), destroy(), dns64_reverse(), dns_acache_getentry(), dns_dlz_writeablezone(), dns_test_makezone(), dns_view_find2(), dns_view_findzone(), dns_view_findzonecut2(), dns_viewlist_findzone(), dns_zone_detach(), do_addzone(), do_modzone(), dumpcontext_destroy(), forward_action(), forward_callback(), freezezones(), load_zone(), ns_notify_start(), ns_server_delzone(), ns_server_freeze(), ns_server_notifycommand(), ns_server_refreshcommand(), ns_server_rekey(), ns_server_reloadcommand(), ns_server_retransfercommand(), ns_server_showzone(), ns_server_signing(), ns_server_sync(), ns_server_zonestatus(), ns_update_start(), ns_xfr_start(), ns_zone_reusable(), query_addadditional(), query_addadditional2(), query_addbestns(), query_discardcache(), query_find(), query_getdb(), query_getzonedb(), query_reset(), receive_secure_serial(), rpz_clean(), rpz_rrset_find(), synczone(), updatedone_action(), view_flushanddetach(), xfrout_ctx_destroy(), zone_from_args(), and zone_shutdown().
void dns_zone_iattach | ( | dns_zone_t * | source, | |
dns_zone_t ** | target | |||
) |
Attach '*target' to 'source' incrementing its internal reference count. This is intended for use by operations such as zone transfers that need to prevent the zone object from being freed but not from shutting down.
Require:
Definition at line 5050 of file zone.c.
References DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, UNLOCK_ZONE, and zone_iattach().
Referenced by dns_zone_forwardupdate(), xfrin_create(), and zone_notify().
void dns_zone_idetach | ( | dns_zone_t ** | zonep | ) |
Detach from a zone decrementing its internal reference count. If there are no more internal or external references to the zone, it will be freed.
Require:
Definition at line 5091 of file zone.c.
References DNS_ZONE_VALID, exit_check(), INSIST, LOCK_ZONE, REQUIRE, UNLOCK_ZONE, and zone_free().
Referenced by dns_zone_detach(), dump_done(), forward_destroy(), keydone(), maybe_free(), notify_destroy(), receive_secure_db(), receive_secure_serial(), refresh_callback(), soa_query(), stub_callback(), xfrin_create(), zone_asyncload(), zone_loaddone(), and zone_shutdown().
void dns_zone_setflag | ( | dns_zone_t * | zone, | |
unsigned int | flags, | |||
isc_boolean_t | value | |||
) |
Sets ('value' == 'ISC_TRUE') / clears ('value' == 'IS_FALSE') zone flags. Valid flag bits are DNS_ZONE_F_*.
Requires
Definition at line 5123 of file zone.c.
References DNS_ZONE_CLRFLAG, DNS_ZONE_SETFLAG, DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
isc_result_t dns_zone_getdb | ( | dns_zone_t * | zone, | |
dns_db_t ** | dbp | |||
) |
Attach '*dbp' to the database to if it exists otherwise return DNS_R_NOTLOADED.
Require:
Definition at line 5724 of file zone.c.
References dns_db_attach(), DNS_R_NOTLOADED, DNS_ZONE_VALID, ISC_R_SUCCESS, isc_rwlocktype_read, REQUIRE, ZONEDB_LOCK, and ZONEDB_UNLOCK.
Referenced by ATF_TC_BODY(), check_ttls(), dns_view_find2(), dns_view_findzonecut2(), dns_xfrin_create3(), dns_zone_synckeyzone(), do_addzone(), do_modzone(), dumpdone(), mkey_dumpzone(), ns_server_delzone(), ns_server_signing(), ns_server_zonestatus(), ns_xfr_start(), query_getzonedb(), query_iscachevalid(), redirect(), and update_action().
void dns_zone_setdb | ( | dns_zone_t * | zone, | |
dns_db_t * | db | |||
) |
Sets the zone database to 'db'.
This function is expected to be used to configure a zone with a database which is not loaded from a file or zone transfer. It can be used for a general purpose zone, but right now its use is limited to static-stub zones to avoid possible undiscovered problems in the general cases.
Require:
Definition at line 5740 of file zone.c.
References dns_db_attach(), dns_zone_staticstub, DNS_ZONE_VALID, isc_rwlocktype_write, REQUIRE, ZONEDB_LOCK, and ZONEDB_UNLOCK.
Referenced by configure_staticstub().
isc_result_t dns_zone_setdbtype | ( | dns_zone_t * | zone, | |
unsigned int | dbargc, | |||
const char *const * | dbargv | |||
) |
Sets the database type to dbargv[0] and database arguments to subsequent dbargv elements. 'db_type' is not checked to see if it is a valid database type.
Require:
Definition at line 1394 of file zone.c.
References DNS_ZONE_VALID, isc_mem_free, isc_mem_get, isc_mem_put, isc_mem_strdup, ISC_R_NOMEMORY, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, UNLOCK_ZONE, and zone_freedbargs().
Referenced by create_empty_zone(), dns64_reverse(), dns_zone_create(), load_zone(), and ns_zone_configure().
isc_result_t dns_zone_getdbtype | ( | dns_zone_t * | zone, | |
char *** | argv, | |||
isc_mem_t * | mctx | |||
) |
Returns the current dbtype. isc_mem_free() should be used to free 'argv' after use.
Require:
Definition at line 1361 of file zone.c.
References DNS_ZONE_VALID, isc_mem_allocate, ISC_R_NOMEMORY, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by check_dbtype().
void dns_zone_markdirty | ( | dns_zone_t * | zone | ) |
Mark a zone as 'dirty'.
Require:
Definition at line 9547 of file zone.c.
References DNS_DUMP_DELAY, DNS_R_NOTLOADED, dns_zone_master, inline_raw(), INSIST, ISC_R_SUCCESS, isc_rwlocktype_read, isc_thread_yield, LOCK_ZONE, secure(), set_resigntime(), TRYLOCK_ZONE, UNLOCK_ZONE, zone_get_from_db(), zone_needdump(), zone_send_secureserial(), ZONEDB_LOCK, and ZONEDB_UNLOCK.
Referenced by ixfr_commit(), and update_action().
void dns_zone_expire | ( | dns_zone_t * | zone | ) |
Mark the zone as expired. If the zone requires dumping cause it to be initiated. Set the refresh and retry intervals to there default values and unload the zone.
Require
Definition at line 9598 of file zone.c.
References DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, UNLOCK_ZONE, and zone_expire().
void dns_zone_refresh | ( | dns_zone_t * | zone | ) |
Initiate zone up to date checks. The zone must already be being managed.
Require
Definition at line 9624 of file zone.c.
References dns_result_totext(), DNS_ZONE_CLRFLAG, DNS_ZONE_FLAG, dns_zone_log(), DNS_ZONE_SETFLAG, DNS_ZONE_VALID, DNS_ZONEFLG_EXITING, DNS_ZONEFLG_HAVETIMERS, DNS_ZONEFLG_LOADING, DNS_ZONEFLG_NOEDNS, DNS_ZONEFLG_NOMASTERS, DNS_ZONEFLG_REFRESH, DNS_ZONEFLG_USEALTXFRSRC, ISC_FALSE, isc_interval_set(), ISC_LOG_ERROR, ISC_LOG_WARNING, ISC_MIN, ISC_R_SUCCESS, isc_random_jitter(), isc_time_nowplusinterval(), LOCK_ZONE, queue_soa_query(), REQUIRE, and UNLOCK_ZONE.
Referenced by dns_zone_notifyreceive(), ns_server_refreshcommand(), ns_server_reloadcommand(), and zone_maintenance().
isc_result_t dns_zone_flush | ( | dns_zone_t * | zone | ) |
Write the zone to database if there are uncommitted changes.
Require:
Definition at line 9686 of file zone.c.
References DNS_ZONE_FLAG, DNS_ZONE_SETFLAG, DNS_ZONE_VALID, DNS_ZONEFLG_FLUSH, DNS_ZONEFLG_NEEDDUMP, ISC_FALSE, ISC_R_ALREADYRUNNING, ISC_R_SUCCESS, ISC_TRUE, LOCK_ZONE, REQUIRE, UNLOCK_ZONE, was_dumping(), and zone_dump().
Referenced by flush(), freezezones(), ns_server_freeze(), ns_server_mkeys(), synczone(), and view_flushanddetach().
isc_result_t dns_zone_dump | ( | dns_zone_t * | zone | ) |
Write the zone to database.
Require:
Definition at line 9707 of file zone.c.
References DNS_ZONE_VALID, ISC_FALSE, ISC_R_ALREADYRUNNING, LOCK_ZONE, REQUIRE, UNLOCK_ZONE, was_dumping(), and zone_dump().
isc_result_t dns_zone_dumptostream | ( | dns_zone_t * | zone, | |
FILE * | fd | |||
) |
Definition at line 10003 of file zone.c.
References dns_master_style_default, dns_masterformat_text, and dumptostream().
isc_result_t dns_zone_dumptostream2 | ( | dns_zone_t * | zone, | |
FILE * | fd, | |||
dns_masterformat_t | format, | |||
const dns_master_style_t * | style | |||
) |
isc_result_t dns_zone_dumptostream3 | ( | dns_zone_t * | zone, | |
FILE * | fd, | |||
dns_masterformat_t | format, | |||
const dns_master_style_t * | style, | |||
const isc_uint32_t | rawversion | |||
) |
Write the zone to stream 'fd' in the specified 'format'. If the 'format' is dns_masterformat_text (RFC1035), 'style' also specifies the file style (e.g., &dns_master_style_default).
dns_zone_dumptostream() is a backward-compatible form of dns_zone_dumptostream2(), which always uses the dns_masterformat_text format and the dns_master_style_default style.
dns_zone_dumptostream2() is a backward-compatible form of dns_zone_dumptostream3(), which always uses the current default raw file format version.
Note that dns_zone_dumptostream3() is the most flexible form. It can also provide the functionality of dns_zone_fulldumptostream().
Require:
Definition at line 9989 of file zone.c.
References dumptostream().
Referenced by dump_zone().
isc_result_t dns_zone_fulldumptostream | ( | dns_zone_t * | zone, | |
FILE * | fd | |||
) |
The same as dns_zone_dumptostream, but dumps the zone with different dump settings (dns_master_style_full).
Require:
Definition at line 10009 of file zone.c.
References dns_master_style_full, dns_masterformat_text, and dumptostream().
void dns_zone_maintenance | ( | dns_zone_t * | zone | ) |
Perform regular maintenance on the zone. This is called as a result of a zone being managed.
Require
Definition at line 5755 of file zone.c.
References DNS_ZONE_VALID, ENTER, LOCK_ZONE, now, REQUIRE, TIME_NOW, UNLOCK_ZONE, and zone_settimer().
Referenced by dns_zonemgr_forcemaint().
isc_result_t dns_zone_setmasters | ( | dns_zone_t * | zone, | |
const isc_sockaddr_t * | masters, | |||
isc_uint32_t | count | |||
) |
Definition at line 5622 of file zone.c.
References dns_zone_setmasterswithkeys().
Referenced by ns_zone_configure().
isc_result_t dns_zone_setmasterswithkeys | ( | dns_zone_t * | zone, | |
const isc_sockaddr_t * | masters, | |||
dns_name_t ** | keynames, | |||
isc_uint32_t | count | |||
) |
Set the list of master servers for the zone.
Require:
Definition at line 5632 of file zone.c.
References clear_addresskeylist(), dns_request_cancel(), DNS_ZONE_CLRFLAG, DNS_ZONE_VALID, DNS_ZONEFLG_NOMASTERS, INSIST, ISC_FALSE, isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, same_addrs(), same_keynames(), set_addrkeylist(), and UNLOCK_ZONE.
Referenced by dns_zone_setmasters(), ns_zone_configure(), and zone_free().
isc_result_t dns_zone_setalsonotify | ( | dns_zone_t * | zone, | |
const isc_sockaddr_t * | notify, | |||
isc_uint32_t | count | |||
) |
Definition at line 5557 of file zone.c.
References dns_zone_setalsonotifydscpkeys().
Referenced by ns_zone_configure(), and zone_free().
isc_result_t dns_zone_setalsonotifywithkeys | ( | dns_zone_t * | zone, | |
const isc_sockaddr_t * | notify, | |||
dns_name_t ** | keynames, | |||
isc_uint32_t | count | |||
) |
isc_result_t dns_zone_setalsonotifydscpkeys | ( | dns_zone_t * | zone, | |
const isc_sockaddr_t * | notify, | |||
const isc_dscp_t * | dscps, | |||
dns_name_t ** | keynames, | |||
isc_uint32_t | count | |||
) |
Set the list of additional servers to be notified when a zone changes. To clear the list use 'count = 0'.
dns_zone_alsonotifywithkeys() allows each notify address to be associated with a TSIG key.
Require:
Definition at line 5573 of file zone.c.
References clear_addresskeylist(), DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, same_addrs(), same_keynames(), set_addrkeylist(), and UNLOCK_ZONE.
Referenced by dns_zone_setalsonotify(), dns_zone_setalsonotifywithkeys(), and ns_zone_configure().
void dns_zone_unload | ( | dns_zone_t * | zone | ) |
detach the database from the zone structure.
Require:
Definition at line 10015 of file zone.c.
References DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, UNLOCK_ZONE, and zone_unload().
Referenced by do_addzone(), do_modzone(), and ns_server_delzone().
void dns_zone_setoption | ( | dns_zone_t * | zone, | |
unsigned int | option, | |||
isc_boolean_t | value | |||
) |
Definition at line 5135 of file zone.c.
References DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by add_keydata_zone(), create_empty_zone(), dns64_reverse(), load_zone(), and ns_zone_configure().
void dns_zone_setoption2 | ( | dns_zone_t * | zone, | |
unsigned int | option, | |||
isc_boolean_t | value | |||
) |
Set the given options on ('value' == ISC_TRUE) or off ('value' == ISC_FALSE).
dns_zone_setoption2() has been introduced because the number of options needed now exceeds the 32 bits in the zone->options field; it should be used set options with names beginning with DNS_ZONEOPT2_.
Require:
Definition at line 5149 of file zone.c.
References DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by load_zone().
unsigned int dns_zone_getoptions | ( | dns_zone_t * | zone | ) |
Definition at line 5163 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by check_mx(), dns_update_signaturesinc(), and update_action().
unsigned int dns_zone_getoptions2 | ( | dns_zone_t * | zone | ) |
Returns the current zone options.
Callers should be aware there is now more than one set of zone options. dns_zone_getoptions2() has been introduced because the number of options needed now exceeds the 32 bits in the zone->options field. It returns the options whose names begin with DNS_ZONEOPT2_.
Require:
Definition at line 5170 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by update_action().
void dns_zone_setkeyopt | ( | dns_zone_t * | zone, | |
unsigned int | option, | |||
isc_boolean_t | value | |||
) |
Set key options on ('value' == ISC_TRUE) or off ('value' == ISC_FALSE).
Require:
Definition at line 5177 of file zone.c.
References DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
unsigned int dns_zone_getkeyopts | ( | dns_zone_t * | zone | ) |
Returns the current zone key options.
Require:
Definition at line 5190 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by configure_zone(), ns_server_rekey(), and ns_server_zonestatus().
void dns_zone_setminrefreshtime | ( | dns_zone_t * | zone, | |
isc_uint32_t | val | |||
) |
Set the minimum refresh time.
Requires:
Definition at line 10085 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_zone_configure().
void dns_zone_setmaxrefreshtime | ( | dns_zone_t * | zone, | |
isc_uint32_t | val | |||
) |
Set the maximum refresh time.
Requires:
Definition at line 10093 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_zone_configure().
void dns_zone_setminretrytime | ( | dns_zone_t * | zone, | |
isc_uint32_t | val | |||
) |
Set the minimum retry time.
Requires:
Definition at line 10101 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_zone_configure().
void dns_zone_setmaxretrytime | ( | dns_zone_t * | zone, | |
isc_uint32_t | val | |||
) |
Set the maximum retry time.
Requires:
Definition at line 10109 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_zone_configure().
isc_result_t dns_zone_setxfrsource4 | ( | dns_zone_t * | zone, | |
const isc_sockaddr_t * | xfrsource | |||
) |
Definition at line 5198 of file zone.c.
References DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
isc_result_t dns_zone_setaltxfrsource4 | ( | dns_zone_t * | zone, | |
const isc_sockaddr_t * | xfrsource | |||
) |
Set the source address to be used in IPv4 zone transfers.
Require:
Definition at line 5266 of file zone.c.
References DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
isc_sockaddr_t* dns_zone_getxfrsource4 | ( | dns_zone_t * | zone | ) |
Definition at line 5209 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by dns_xfrin_create().
isc_sockaddr_t* dns_zone_getaltxfrsource4 | ( | dns_zone_t * | zone | ) |
Returns the source address set by a previous dns_zone_setxfrsource4 call, or the default of inaddr_any, port 0.
Require:
Definition at line 5279 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
isc_result_t dns_zone_setxfrsource4dscp | ( | dns_zone_t * | zone, | |
isc_dscp_t | dscp | |||
) |
Definition at line 5215 of file zone.c.
References DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
isc_result_t dns_zone_setaltxfrsource4dscp | ( | dns_zone_t * | zone, | |
isc_dscp_t | dscp | |||
) |
Set the DSCP value associated with the transfer/alt-transfer source.
Require:
Definition at line 5285 of file zone.c.
References DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
isc_dscp_t dns_zone_getxfrsource4dscp | ( | dns_zone_t * | zone | ) |
Definition at line 5226 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by dns_xfrin_create().
isc_dscp_t dns_zone_getaltxfrsource4dscp | ( | dns_zone_t * | zone | ) |
isc_result_t dns_zone_setxfrsource6 | ( | dns_zone_t * | zone, | |
const isc_sockaddr_t * | xfrsource | |||
) |
/ Get the DSCP value associated with the transfer/alt-transfer source.
Require:
Definition at line 5232 of file zone.c.
References DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
isc_result_t dns_zone_setaltxfrsource6 | ( | dns_zone_t * | zone, | |
const isc_sockaddr_t * | xfrsource | |||
) |
Set the source address to be used in IPv6 zone transfers.
Require:
Definition at line 5302 of file zone.c.
References DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
isc_sockaddr_t* dns_zone_getxfrsource6 | ( | dns_zone_t * | zone | ) |
Definition at line 5243 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by adjust_interfaces(), and dns_xfrin_create().
isc_sockaddr_t* dns_zone_getaltxfrsource6 | ( | dns_zone_t * | zone | ) |
Returns the source address set by a previous dns_zone_setxfrsource6 call, or the default of in6addr_any, port 0.
Require:
Definition at line 5315 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
isc_dscp_t dns_zone_getxfrsource6dscp | ( | dns_zone_t * | zone | ) |
Definition at line 5249 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by adjust_interfaces(), and dns_xfrin_create().
isc_dscp_t dns_zone_getaltxfrsource6dscp | ( | dns_zone_t * | zone | ) |
isc_result_t dns_zone_setxfrsource6dscp | ( | dns_zone_t * | zone, | |
isc_dscp_t | dscp | |||
) |
/ Get the DSCP value associated with the transfer/alt-transfer source.
Require:
Definition at line 5255 of file zone.c.
References DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
isc_result_t dns_zone_setaltxfrsource6dscp | ( | dns_zone_t * | zone, | |
isc_dscp_t | dscp | |||
) |
Set the DSCP value associated with the transfer/alt-transfer source.
Require:
Definition at line 5321 of file zone.c.
References DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
isc_result_t dns_zone_setnotifysrc4 | ( | dns_zone_t * | zone, | |
const isc_sockaddr_t * | notifysrc | |||
) |
Set the source address to be used with IPv4 NOTIFY messages.
Require:
Definition at line 5338 of file zone.c.
References DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
isc_sockaddr_t* dns_zone_getnotifysrc4 | ( | dns_zone_t * | zone | ) |
Returns the source address set by a previous dns_zone_setnotifysrc4 call, or the default of inaddr_any, port 0.
Require:
Definition at line 5349 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
isc_dscp_t dns_zone_getnotifysrc4dscp | ( | dns_zone_t * | zone | ) |
isc_result_t dns_zone_setnotifysrc4dscp | ( | dns_zone_t * | zone, | |
isc_dscp_t | dscp | |||
) |
/ Get the DCSP value associated with the notify source.
Require:
Definition at line 5355 of file zone.c.
References DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
isc_result_t dns_zone_setnotifysrc6 | ( | dns_zone_t * | zone, | |
const isc_sockaddr_t * | notifysrc | |||
) |
/ Get the DSCP value associated with the notify source.
Require:
Definition at line 5372 of file zone.c.
References DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
isc_sockaddr_t* dns_zone_getnotifysrc6 | ( | dns_zone_t * | zone | ) |
Returns the source address set by a previous dns_zone_setnotifysrc6 call, or the default of in6addr_any, port 0.
Require:
Definition at line 5383 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by adjust_interfaces().
isc_dscp_t dns_zone_getnotifysrc6dscp | ( | dns_zone_t * | zone | ) |
Definition at line 5551 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by adjust_interfaces().
isc_result_t dns_zone_setnotifysrc6dscp | ( | dns_zone_t * | zone, | |
isc_dscp_t | dscp | |||
) |
/ Get the DCSP value associated with the notify source.
Require:
Definition at line 5540 of file zone.c.
References DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
void dns_zone_setnotifyacl | ( | dns_zone_t * | zone, | |
dns_acl_t * | acl | |||
) |
/ Get the DSCP value associated with the notify source.
Require:
Definition at line 12789 of file zone.c.
References dns_acl_attach(), dns_acl_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
void dns_zone_setqueryacl | ( | dns_zone_t * | zone, | |
dns_acl_t * | acl | |||
) |
Sets the query acl list for the zone.
Require:
Definition at line 12801 of file zone.c.
References dns_acl_attach(), dns_acl_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by add_keydata_zone(), create_empty_zone(), dns64_reverse(), and ns_zone_configure().
void dns_zone_setqueryonacl | ( | dns_zone_t * | zone, | |
dns_acl_t * | acl | |||
) |
Sets the query-on acl list for the zone.
Require:
Definition at line 12813 of file zone.c.
References dns_acl_attach(), dns_acl_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by add_keydata_zone(), create_empty_zone(), dns64_reverse(), and ns_zone_configure().
void dns_zone_setupdateacl | ( | dns_zone_t * | zone, | |
dns_acl_t * | acl | |||
) |
Sets the update acl list for the zone.
Require:
Definition at line 12825 of file zone.c.
References dns_acl_attach(), dns_acl_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
void dns_zone_setforwardacl | ( | dns_zone_t * | zone, | |
dns_acl_t * | acl | |||
) |
Sets the forward unsigned updates acl list for the zone.
Require:
Definition at line 12837 of file zone.c.
References dns_acl_attach(), dns_acl_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
void dns_zone_setxfracl | ( | dns_zone_t * | zone, | |
dns_acl_t * | acl | |||
) |
Sets the transfer acl list for the zone.
Require:
Definition at line 12849 of file zone.c.
References dns_acl_attach(), dns_acl_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by create_empty_zone(), and ns_zone_configure().
dns_acl_t* dns_zone_getnotifyacl | ( | dns_zone_t * | zone | ) |
Returns the current notify acl or NULL.
Require:
Definition at line 12861 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
dns_acl_t* dns_zone_getqueryacl | ( | dns_zone_t * | zone | ) |
Returns the current query acl or NULL.
Require:
Definition at line 12869 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by query_validatezonedb(), redirect(), and update_action().
dns_acl_t* dns_zone_getqueryonacl | ( | dns_zone_t * | zone | ) |
Returns the current query-on acl or NULL.
Require:
Definition at line 12877 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by query_validatezonedb().
dns_acl_t* dns_zone_getupdateacl | ( | dns_zone_t * | zone | ) |
Returns the current update acl or NULL.
Require:
Definition at line 12885 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_zone_configure(), and update_action().
dns_acl_t* dns_zone_getforwardacl | ( | dns_zone_t * | zone | ) |
Returns the current forward unsigned updates acl or NULL.
Require:
Definition at line 12893 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_update_start().
dns_acl_t* dns_zone_getxfracl | ( | dns_zone_t * | zone | ) |
Returns the current transfer acl or NULL.
Require:
Definition at line 12901 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_xfr_start().
void dns_zone_clearupdateacl | ( | dns_zone_t * | zone | ) |
Clear the current update acl.
Require:
Definition at line 12909 of file zone.c.
References dns_acl_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by create_empty_zone(), and ns_zone_configure().
void dns_zone_clearforwardacl | ( | dns_zone_t * | zone | ) |
Clear the current forward unsigned updates acl.
Require:
Definition at line 12920 of file zone.c.
References dns_acl_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
void dns_zone_clearnotifyacl | ( | dns_zone_t * | zone | ) |
Clear the current notify acl.
Require:
Definition at line 12931 of file zone.c.
References dns_acl_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by ns_zone_configure().
void dns_zone_clearqueryacl | ( | dns_zone_t * | zone | ) |
Clear the current query acl.
Require:
Definition at line 12942 of file zone.c.
References dns_acl_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by create_empty_zone(), and ns_zone_configure().
void dns_zone_clearqueryonacl | ( | dns_zone_t * | zone | ) |
Clear the current query-on acl.
Require:
Definition at line 12953 of file zone.c.
References dns_acl_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by create_empty_zone(), and ns_zone_configure().
void dns_zone_clearxfracl | ( | dns_zone_t * | zone | ) |
Clear the current transfer acl.
Require:
Definition at line 12964 of file zone.c.
References dns_acl_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by create_empty_zone(), and ns_zone_configure().
isc_boolean_t dns_zone_getupdatedisabled | ( | dns_zone_t * | zone | ) |
Return update disabled. Transient unless called when running in isc_task_exclusive() mode.
Definition at line 12975 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by freezezones(), ns_server_freeze(), and update_action().
void dns_zone_setupdatedisabled | ( | dns_zone_t * | zone, | |
isc_boolean_t | state | |||
) |
Set update disabled. Should only be called only when running in isc_task_exclusive() mode. Failure to do so may result in updates being committed after the call has been made.
Definition at line 12982 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by freezezones(), and ns_server_freeze().
isc_boolean_t dns_zone_getzeronosoattl | ( | dns_zone_t * | zone | ) |
Return zero-no-soa-ttl status.
Definition at line 12988 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by query_find().
void dns_zone_setzeronosoattl | ( | dns_zone_t * | zone, | |
isc_boolean_t | state | |||
) |
Set zero-no-soa-ttl status.
Definition at line 12995 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_zone_configure().
void dns_zone_setchecknames | ( | dns_zone_t * | zone, | |
dns_severity_t | severity | |||
) |
Set the severity of name checking when loading a zone.
Require:
Definition at line 13001 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
dns_severity_t dns_zone_getchecknames | ( | dns_zone_t * | zone | ) |
Return the current severity of name checking.
Require:
Definition at line 13009 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
void dns_zone_setjournalsize | ( | dns_zone_t * | zone, | |
isc_int32_t | size | |||
) |
Sets the journal size for the zone.
Requires:
Definition at line 13017 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by add_keydata_zone(), and ns_zone_configure().
isc_int32_t dns_zone_getjournalsize | ( | dns_zone_t * | zone | ) |
Return the journal size as set with a previous call to dns_zone_setjournalsize().
Requires:
Definition at line 13025 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
isc_result_t dns_zone_notifyreceive | ( | dns_zone_t * | zone, | |
isc_sockaddr_t * | from, | |||
dns_message_t * | msg | |||
) |
Tell the zone that it has received a NOTIFY message from another server. This may cause some zone maintenance activity to occur.
Requires:
Definition at line 12589 of file zone.c.
References dns_message::counts, dns_acl_match(), dns_message_findname(), dns_message_gettsigkey(), DNS_R_FORMERR, DNS_R_NOTIMP, DNS_R_REFUSED, DNS_RDATA_INIT, dns_rdata_tostruct(), dns_rdataset_current(), dns_rdataset_first(), DNS_SECTION_ANSWER, DNS_SECTION_QUESTION, dns_tsigkey_identity, DNS_ZONE_FLAG, dns_zone_log(), dns_zone_master, dns_zone_notifyreceive(), dns_zone_refresh(), DNS_ZONE_SETFLAG, DNS_ZONE_VALID, DNS_ZONEFLG_LOADED, DNS_ZONEFLG_NEEDREFRESH, DNS_ZONEFLG_NOREFRESH, DNS_ZONEFLG_REFRESH, dns_zonemgr_unreachabledel(), dns_zonestatscounter_notifyinv4, dns_zonestatscounter_notifyinv6, dns_zonestatscounter_notifyrej, IN6_IS_ADDR_V4MAPPED, inc_stats(), inline_secure(), INSIST, ISC_FALSE, ISC_LOG_INFO, ISC_LOG_NOTICE, isc_netaddr_equal(), isc_netaddr_fromsockaddr(), isc_netaddr_fromv4mapped(), ISC_R_SUCCESS, isc_serial_le(), isc_sockaddr_eqaddr(), isc_sockaddr_format(), ISC_SOCKADDR_FORMATSIZE, isc_sockaddr_pf(), ISC_TRUE, LOCK_ZONE, match(), REQUIRE, RUNTIME_CHECK, isc_sockaddr::sin6, sockaddr_in6::sin6_addr, tsigkey, isc_sockaddr::type, UNLOCK_ZONE, and zone_get_from_db().
Referenced by dns_zone_notifyreceive(), and ns_notify_start().
void dns_zone_setmaxxfrin | ( | dns_zone_t * | zone, | |
isc_uint32_t | maxxfrin | |||
) |
Set the maximum time (in seconds) that a zone transfer in (AXFR/IXFR) of this zone will use before being aborted.
Requires:
Definition at line 13246 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_zone_configure().
isc_uint32_t dns_zone_getmaxxfrin | ( | dns_zone_t * | zone | ) |
Returns the maximum transfer time for this zone. This will be either the value set by the last call to dns_zone_setmaxxfrin() or the default value of 1 hour.
Requires:
Definition at line 13253 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by xfrin_create().
void dns_zone_setmaxxfrout | ( | dns_zone_t * | zone, | |
isc_uint32_t | maxxfrout | |||
) |
Set the maximum time (in seconds) that a zone transfer out (AXFR/IXFR) of this zone will use before being aborted.
Requires:
Definition at line 13260 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_zone_configure().
isc_uint32_t dns_zone_getmaxxfrout | ( | dns_zone_t * | zone | ) |
Returns the maximum transfer time for this zone. This will be either the value set by the last call to dns_zone_setmaxxfrout() or the default value of 1 hour.
Requires:
Definition at line 13266 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_xfr_start().
isc_result_t dns_zone_setjournal | ( | dns_zone_t * | zone, | |
const char * | myjournal | |||
) |
Sets the filename used for journaling updates / IXFR transfers. The default journal name is set by dns_zone_setfile() to be "file.jnl". If 'myjournal' is NULL, the zone will have no journal name.
Requires:
Definition at line 1647 of file zone.c.
References dns_zone_setstring(), DNS_ZONE_VALID, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by load_zone(), and ns_zone_configure().
char* dns_zone_getjournal | ( | dns_zone_t * | zone | ) |
Returns the journal name associated with this zone. If no journal has been set this will be NULL.
Requires:
Definition at line 1660 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ixfr_init(), ns_server_delzone(), ns_xfr_start(), synczone(), update_action(), and zone_journal().
dns_zonetype_t dns_zone_gettype | ( | dns_zone_t * | zone | ) |
Returns the type of the zone (master/slave/etc.).
Requires:
Definition at line 13273 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by create_empty_zone(), dns_view_find2(), freezezones(), ns_notify_start(), ns_server_delzone(), ns_server_freeze(), ns_server_refreshcommand(), ns_server_rekey(), ns_server_reloadcommand(), ns_server_retransfercommand(), ns_server_zonestatus(), ns_update_start(), ns_xfr_start(), ns_zone_reusable(), query_find(), query_validatezonedb(), and removed().
void dns_zone_settask | ( | dns_zone_t * | zone, | |
isc_task_t * | task | |||
) |
Give a zone a task to work with. Any current task will be detached.
Requires:
Definition at line 13287 of file zone.c.
References dns_db_settask(), DNS_ZONE_VALID, isc_rwlocktype_read, isc_task_attach(), isc_task_detach(), LOCK_ZONE, REQUIRE, UNLOCK_ZONE, ZONEDB_LOCK, and ZONEDB_UNLOCK.
void dns_zone_gettask | ( | dns_zone_t * | zone, | |
isc_task_t ** | target | |||
) |
Attach '*target' to the zone's task.
Requires:
Definition at line 13302 of file zone.c.
References DNS_ZONE_VALID, isc_task_attach(), and REQUIRE.
Referenced by send_forward_event(), and send_update_event().
void dns_zone_notify | ( | dns_zone_t * | zone | ) |
Generate notify events for this zone.
Requires:
Definition at line 10539 of file zone.c.
References DNS_ZONE_SETFLAG, DNS_ZONE_VALID, DNS_ZONEFLG_NEEDNOTIFY, LOCK_ZONE, now, REQUIRE, TIME_NOW, UNLOCK_ZONE, and zone_settimer().
Referenced by ns_server_notifycommand(), and update_action().
isc_result_t dns_zone_replacedb | ( | dns_zone_t * | zone, | |
dns_db_t * | db, | |||
isc_boolean_t | dump | |||
) |
Replace the database of "zone" with a new database "db".
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 redundant 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:
Definition at line 14281 of file zone.c.
References DNS_ZONE_VALID, inline_raw(), INSIST, ISC_R_SUCCESS, isc_rwlocktype_write, isc_thread_yield, LOCK_ZONE, REQUIRE, secure(), TRYLOCK_ZONE, UNLOCK_ZONE, zone_replacedb(), ZONEDB_LOCK, and ZONEDB_UNLOCK.
Referenced by axfr_finalize(), and create_empty_zone().
isc_uint32_t dns_zone_getidlein | ( | dns_zone_t * | zone | ) |
Requires:.
Definition at line 13317 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by xfrin_create().
void dns_zone_setidlein | ( | dns_zone_t * | zone, | |
isc_uint32_t | idlein | |||
) |
Definition at line 13308 of file zone.c.
References DNS_DEFAULT_IDLEIN, DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_zone_configure().
isc_uint32_t dns_zone_getidleout | ( | dns_zone_t * | zone | ) |
Requires:.
Definition at line 13331 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_xfr_start().
void dns_zone_setidleout | ( | dns_zone_t * | zone, | |
isc_uint32_t | idleout | |||
) |
Definition at line 13324 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_zone_configure().
void dns_zone_getssutable | ( | dns_zone_t * | zone, | |
dns_ssutable_t ** | table | |||
) |
Get the simple-secure-update policy table.
Requires:
Definition at line 14858 of file zone.c.
References dns_ssutable_attach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by update_action().
void dns_zone_setssutable | ( | dns_zone_t * | zone, | |
dns_ssutable_t * | table | |||
) |
Set / clear the simple-secure-update policy table.
Requires:
Definition at line 14870 of file zone.c.
References dns_ssutable_attach(), dns_ssutable_detach(), DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by configure_zone_ssutable(), and dns_dlz_writeablezone().
isc_mem_t* dns_zone_getmctx | ( | dns_zone_t * | zone | ) |
Get the memory context of a zone.
Requires:
Definition at line 5109 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by configure_staticstub(), configure_staticstub_serveraddrs(), configure_staticstub_servernames(), configure_zone_acl(), configure_zone_ssutable(), ns_server_zonestatus(), and ns_zone_configure().
dns_zonemgr_t* dns_zone_getmgr | ( | dns_zone_t * | zone | ) |
If 'zone' is managed return the zone manager otherwise NULL.
Requires:
Definition at line 5116 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by xfrin_connect_done().
void dns_zone_setsigvalidityinterval | ( | dns_zone_t * | zone, | |
isc_uint32_t | interval | |||
) |
Set the zone's RRSIG 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:
Definition at line 14882 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_zone_configure().
isc_uint32_t dns_zone_getsigvalidityinterval | ( | dns_zone_t * | zone | ) |
Get the zone's RRSIG validity interval.
Requires:
Definition at line 14889 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by update_action(), zone_nsec3chain(), zone_resigninc(), and zone_sign().
void dns_zone_setsigresigninginterval | ( | dns_zone_t * | zone, | |
isc_uint32_t | interval | |||
) |
Set the zone's RRSIG re-signing interval. A dynamic zone's RRSIG's will be re-signed 'interval' amount of time before they expire.
Requires:
Definition at line 14896 of file zone.c.
References DNS_ZONE_VALID, LOCK_ZONE, now, REQUIRE, set_resigntime(), TIME_NOW, UNLOCK_ZONE, and zone_settimer().
Referenced by ns_zone_configure().
isc_uint32_t dns_zone_getsigresigninginterval | ( | dns_zone_t * | zone | ) |
Get the zone's RRSIG re-signing interval.
Requires:
Definition at line 14912 of file zone.c.
References DNS_ZONE_VALID, and REQUIRE.
Referenced by ns_server_zonestatus().
void dns_zone_setnotifytype | ( | dns_zone_t * | zone, | |
dns_notifytype_t | notifytype | |||
) |
Sets zone notify method to "notifytype".
Definition at line 1276 of file zone.c.
References DNS_ZONE_VALID, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by add_keydata_zone(), create_empty_zone(), dns64_reverse(), and ns_zone_configure().
isc_result_t dns_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 exhausted 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:
Definition at line 15305 of file zone.c.
References dns_forward::callback, dns_forward::callback_arg, cleanup(), dns_message_getrawmessage(), DNS_REQUESTOPT_FIXEDID, DNS_REQUESTOPT_TCP, dns_zone_iattach(), DNS_ZONE_VALID, forward_destroy(), FORWARD_MAGIC, isc_buffer_allocate(), isc_buffer_copyregion(), ISC_LINK_INIT, isc_mem_attach(), isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_R_UNEXPECTEDEND, isc_region::length, dns_forward::magic, dns_forward::mctx, dns_forward::msgbuf, dns_forward::options, dns_forward::request, REQUIRE, sendtomaster(), dns_message::sig0, dns_forward::which, and dns_forward::zone.
Referenced by forward_action().
isc_result_t dns_zone_next | ( | dns_zone_t * | zone, | |
dns_zone_t ** | next | |||
) |
Find the next zone in the list of managed zones.
Requires:
Definition at line 15362 of file zone.c.
References DNS_ZONE_VALID, ISC_LIST_NEXT, ISC_R_NOMORE, ISC_R_SUCCESS, and REQUIRE.
Referenced by adjust_interfaces(), and ns_stats_dump().
isc_result_t dns_zone_first | ( | dns_zonemgr_t * | zmgr, | |
dns_zone_t ** | first | |||
) |
Find the first zone in the list of managed zones.
Requires:
Definition at line 15374 of file zone.c.
References DNS_ZONEMGR_VALID, ISC_LIST_HEAD, ISC_R_NOMORE, ISC_R_SUCCESS, REQUIRE, and dns_zonemgr::zones.
Referenced by adjust_interfaces(), and ns_stats_dump().
isc_result_t dns_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:
Definition at line 16556 of file zone.c.
Referenced by ns_zone_configure().
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:
Definition at line 16569 of file zone.c.
Referenced by find_zone_keys().
isc_result_t dns_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. Note: the zone manager will not be able to manage any zones until dns_zonemgr_setsize() has been run.
Requires:
Definition at line 15390 of file zone.c.
References DESTROYLOCK, dns_zonemgr::high, dns_zonemgr::ioactive, dns_zonemgr::iolimit, dns_zonemgr::iolock, ISC_LIST_INIT, isc_mem_attach(), isc_mem_detach(), isc_mem_get, isc_mem_put, isc_mutex_init, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_ratelimiter_create(), isc_ratelimiter_detach(), isc_rwlock_destroy(), isc_rwlock_init(), isc_task_create(), isc_task_detach(), isc_task_setname(), dns_zonemgr::loadtasks, dns_zonemgr::low, dns_zonemgr::magic, dns_zonemgr::mctx, dns_zonemgr::mctxpool, dns_zonemgr::notifyrate, dns_zonemgr::notifyrl, dns_zonemgr::refreshrl, dns_zonemgr::refs, dns_zonemgr::rwlock, dns_zonemgr::serialqueryrate, setrl(), dns_zonemgr::socketmgr, dns_zonemgr::startupnotifyrate, dns_zonemgr::startupnotifyrl, dns_zonemgr::startuprefreshrl, dns_zonemgr::startupserialqueryrate, dns_zonemgr::task, dns_zonemgr::taskmgr, dns_zonemgr::timermgr, dns_zonemgr::transfersin, dns_zonemgr::transfersperns, dns_zonemgr::unreachable, dns_zonemgr::urlock, dns_zonemgr::waiting_for_xfrin, dns_zonemgr::xfrin_in_progress, ZONEMGR_MAGIC, dns_zonemgr::zones, and dns_zonemgr::zonetasks.
Referenced by ATF_TC_BODY(), dns_test_setupzonemgr(), and ns_server_create().
isc_result_t dns_zonemgr_setsize | ( | dns_zonemgr_t * | zmgr, | |
int | num_zones | |||
) |
Set the size of the zone manager task pool. This must be run before zmgr can be used for managing zones. Currently, it can only be run once; the task pool cannot be resized.
Requires:
Definition at line 15740 of file zone.c.
References DNS_ZONEMGR_VALID, isc_pool_create(), isc_pool_expand(), ISC_R_SUCCESS, isc_taskpool_create(), isc_taskpool_expand(), isc_taskpool_setprivilege(), ISC_TRUE, dns_zonemgr::loadtasks, dns_zonemgr::mctx, mctxfree(), mctxinit(), dns_zonemgr::mctxpool, ntasks, REQUIRE, dns_zonemgr::taskmgr, ZONES_PER_MCTX, ZONES_PER_TASK, and dns_zonemgr::zonetasks.
Referenced by ATF_TC_BODY(), dns_test_managezone(), load_configuration(), and ns_server_create().
isc_result_t dns_zonemgr_createzone | ( | dns_zonemgr_t * | zmgr, | |
dns_zone_t ** | zonep | |||
) |
Allocate a new zone using a memory context from the zone manager's memory context pool.
Require:
Definition at line 15501 of file zone.c.
References dns_zone_create(), DNS_ZONEMGR_VALID, isc_mem_attach(), isc_mem_detach(), isc_pool_get(), ISC_R_FAILURE, ISC_R_SUCCESS, dns_notify::mctx, dns_zonemgr::mctxpool, and REQUIRE.
Referenced by add_keydata_zone(), ATF_TC_BODY(), configure_zone(), and create_empty_zone().
isc_result_t dns_zonemgr_managezone | ( | dns_zonemgr_t * | zmgr, | |
dns_zone_t * | zone | |||
) |
Bring the zone under control of a zone manager.
Require:
Definition at line 15528 of file zone.c.
References DNS_ZONE_VALID, DNS_ZONEMGR_VALID, INSIST, ISC_LIST_APPEND, ISC_R_FAILURE, ISC_R_SUCCESS, isc_rwlocktype_write, isc_task_detach(), isc_task_setname(), isc_taskpool_gettask(), isc_timer_create(), isc_timertype_inactive, dns_zonemgr::loadtasks, LOCK_ZONE, dns_zonemgr::refs, REQUIRE, dns_zonemgr::rwlock, RWLOCK, RWUNLOCK, dns_zonemgr::timermgr, UNLOCK_ZONE, zone_timer(), dns_zonemgr::zones, and dns_zonemgr::zonetasks.
Referenced by add_keydata_zone(), ATF_TC_BODY(), configure_zone(), create_empty_zone(), dlzconfigure_callback(), dns64_reverse(), and dns_test_managezone().
isc_result_t dns_zonemgr_forcemaint | ( | dns_zonemgr_t * | zmgr | ) |
Force zone maintenance of all zones managed by 'zmgr' at its earliest convenience.
Definition at line 15643 of file zone.c.
References dns_zone_maintenance(), DNS_ZONEMGR_VALID, ISC_LIST_HEAD, ISC_LIST_NEXT, ISC_R_SUCCESS, isc_rwlocktype_read, isc_rwlocktype_write, ISC_TRUE, REQUIRE, dns_zonemgr::rwlock, RWLOCK, RWUNLOCK, zmgr_resume_xfrs(), and dns_zonemgr::zones.
Referenced by view_loaded().
void dns__zonemgr_run | ( | isc_task_t * | task, | |
isc_event_t * | event | |||
) |
Event handler to call dns_zonemgr_forcemaint(); used to start zone operations from a unit test. Not intended for use outside libdns or related tests.
void dns_zonemgr_resumexfrs | ( | dns_zonemgr_t * | zmgr | ) |
Attempt to start any stalled zone transfers.
Definition at line 15670 of file zone.c.
References DNS_ZONEMGR_VALID, isc_rwlocktype_write, ISC_TRUE, REQUIRE, dns_zonemgr::rwlock, RWLOCK, RWUNLOCK, and zmgr_resume_xfrs().
Referenced by load_new_zones().
void dns_zonemgr_shutdown | ( | dns_zonemgr_t * | zmgr | ) |
Shut down the zone manager.
Requires:
Definition at line 15680 of file zone.c.
References DNS_ZONEMGR_VALID, forward_cancel(), ISC_LIST_HEAD, ISC_LIST_NEXT, isc_pool_destroy(), isc_ratelimiter_shutdown(), isc_rwlocktype_read, isc_task_destroy(), isc_taskpool_destroy(), dns_zonemgr::loadtasks, LOCK_ZONE, dns_zonemgr::mctxpool, dns_zonemgr::notifyrl, dns_zonemgr::refreshrl, REQUIRE, dns_zonemgr::rwlock, RWLOCK, RWUNLOCK, dns_zonemgr::startupnotifyrl, dns_zonemgr::startuprefreshrl, dns_zonemgr::task, UNLOCK_ZONE, dns_zonemgr::zones, and dns_zonemgr::zonetasks.
Referenced by ATF_TC_BODY(), dns_test_closezonemgr(), and shutdown_server().
void dns_zonemgr_attach | ( | dns_zonemgr_t * | source, | |
dns_zonemgr_t ** | target | |||
) |
Attach '*target' to 'source' incrementing its external reference count.
Require:
Definition at line 15610 of file zone.c.
References DNS_ZONEMGR_VALID, INSIST, isc_rwlocktype_write, dns_zonemgr::refs, REQUIRE, dns_zonemgr::rwlock, RWLOCK, and RWUNLOCK.
void dns_zonemgr_detach | ( | dns_zonemgr_t ** | zmgrp | ) |
Detach from a zone manager.
Requires:
Definition at line 15623 of file zone.c.
References DNS_ZONEMGR_VALID, free_now, ISC_FALSE, isc_rwlocktype_write, ISC_TRUE, dns_zonemgr::refs, REQUIRE, dns_zonemgr::rwlock, RWLOCK, RWUNLOCK, and zonemgr_free().
Referenced by ATF_TC_BODY(), dns_test_closezonemgr(), and ns_server_destroy().
void dns_zonemgr_releasezone | ( | dns_zonemgr_t * | zmgr, | |
dns_zone_t * | zone | |||
) |
Release 'zone' from the managed by 'zmgr'. 'zmgr' is implicitly detached from 'zone'.
Requires:
Definition at line 15585 of file zone.c.
References DNS_ZONE_VALID, DNS_ZONEMGR_VALID, ENSURE, free_now, ISC_FALSE, ISC_LIST_UNLINK, isc_rwlocktype_write, ISC_TRUE, LOCK_ZONE, dns_zonemgr::refs, REQUIRE, dns_zonemgr::rwlock, RWLOCK, RWUNLOCK, UNLOCK_ZONE, zonemgr_free(), and dns_zonemgr::zones.
Referenced by ATF_TC_BODY(), dns_test_releasezone(), and zone_shutdown().
void dns_zonemgr_settransfersin | ( | dns_zonemgr_t * | zmgr, | |
isc_uint32_t | value | |||
) |
Set the maximum number of simultaneous transfers in allowed by the zone manager.
Requires:
Definition at line 15831 of file zone.c.
References DNS_ZONEMGR_VALID, REQUIRE, and dns_zonemgr::transfersin.
Referenced by load_configuration().
isc_uint32_t dns_zonemgr_getttransfersin | ( | dns_zonemgr_t * | zmgr | ) |
Return the maximum number of simultaneous transfers in allowed.
Requires:
Definition at line 15838 of file zone.c.
References DNS_ZONEMGR_VALID, REQUIRE, and dns_zonemgr::transfersin.
void dns_zonemgr_settransfersperns | ( | dns_zonemgr_t * | zmgr, | |
isc_uint32_t | value | |||
) |
Set the number of zone transfers allowed per nameserver.
Requires:
Definition at line 15845 of file zone.c.
References DNS_ZONEMGR_VALID, REQUIRE, and dns_zonemgr::transfersperns.
Referenced by load_configuration().
isc_uint32_t dns_zonemgr_getttransfersperns | ( | dns_zonemgr_t * | zmgr | ) |
Return the number of transfers allowed per nameserver.
Requires:
Definition at line 15852 of file zone.c.
References DNS_ZONEMGR_VALID, REQUIRE, and dns_zonemgr::transfersperns.
void dns_zonemgr_setiolimit | ( | dns_zonemgr_t * | zmgr, | |
isc_uint32_t | iolimit | |||
) |
Set the number of simultaneous file descriptors available for reading and writing masterfiles.
Requires:
Definition at line 16004 of file zone.c.
References DNS_ZONEMGR_VALID, dns_zonemgr::iolimit, and REQUIRE.
isc_uint32_t dns_zonemgr_getiolimit | ( | dns_zonemgr_t * | zmgr | ) |
Get the number of simultaneous file descriptors available for reading and writing masterfiles.
Requires:
Definition at line 16013 of file zone.c.
References DNS_ZONEMGR_VALID, dns_zonemgr::iolimit, and REQUIRE.
void dns_zonemgr_setnotifyrate | ( | dns_zonemgr_t * | zmgr, | |
unsigned int | value | |||
) |
Set the number of NOTIFY requests sent per second.
Requires:
Definition at line 16217 of file zone.c.
Referenced by load_configuration().
void dns_zonemgr_setstartupnotifyrate | ( | dns_zonemgr_t * | zmgr, | |
unsigned int | value | |||
) |
Set the number of startup NOTIFY requests sent per second.
Requires:
Definition at line 16225 of file zone.c.
Referenced by load_configuration().
void dns_zonemgr_setserialqueryrate | ( | dns_zonemgr_t * | zmgr, | |
unsigned int | value | |||
) |
Set the number of SOA queries sent per second.
Requires:
Definition at line 16233 of file zone.c.
Referenced by load_configuration().
unsigned int dns_zonemgr_getnotifyrate | ( | dns_zonemgr_t * | zmgr | ) |
unsigned int dns_zonemgr_getstartupnotifyrate | ( | dns_zonemgr_t * | zmgr | ) |
unsigned int dns_zonemgr_getserialqueryrate | ( | dns_zonemgr_t * | zmgr | ) |
unsigned int dns_zonemgr_getcount | ( | dns_zonemgr_t * | zmgr, | |
int | state | |||
) |
Returns the number of zones in the specified state.
Requires:
Definition at line 16576 of file zone.c.
Referenced by ATF_TC_BODY(), and ns_server_status().
void dns_zonemgr_unreachableadd | ( | dns_zonemgr_t * | zmgr, | |
isc_sockaddr_t * | remote, | |||
isc_sockaddr_t * | local, | |||
isc_time_t * | now | |||
) |
Add the pair of addresses to the unreachable cache.
Requires:
Definition at line 16334 of file zone.c.
Referenced by ATF_TC_BODY(), stub_callback(), and xfrin_connect_done().
isc_boolean_t dns_zonemgr_unreachable | ( | dns_zonemgr_t * | zmgr, | |
isc_sockaddr_t * | remote, | |||
isc_sockaddr_t * | local, | |||
isc_time_t * | now | |||
) |
Returns ISC_TRUE if the given local/remote address pair is found in the zone maanger's unreachable cache.
Requires:
Definition at line 16264 of file zone.c.
Referenced by ATF_TC_BODY(), got_transfer_quota(), and refresh_callback().
void dns_zonemgr_unreachabledel | ( | dns_zonemgr_t * | zmgr, | |
isc_sockaddr_t * | remote, | |||
isc_sockaddr_t * | local | |||
) |
Remove the pair of addresses from the unreachable cache.
Requires:
Definition at line 16295 of file zone.c.
Referenced by ATF_TC_BODY(), dns_zone_notifyreceive(), and xfrin_connect_done().
void dns_zone_forcereload | ( | dns_zone_t * | zone | ) |
Force a reload of specified zone.
Requires:
Definition at line 16392 of file zone.c.
Referenced by ns_server_retransfercommand().
isc_boolean_t dns_zone_isforced | ( | dns_zone_t * | zone | ) |
isc_result_t dns_zone_setstatistics | ( | dns_zone_t * | zone, | |
isc_boolean_t | on | |||
) |
isc_uint64_t* dns_zone_getstatscounters | ( | dns_zone_t * | zone | ) |
void dns_zone_setstats | ( | dns_zone_t * | zone, | |
isc_stats_t * | stats | |||
) |
Set a general zone-maintenance statistics set 'stats' for 'zone'. This function is expected to be called only on zone creation (when necessary). Once installed, it cannot be removed or replaced. Also, there is no interface to get the installed stats from the zone; the caller must keep the stats to reference (e.g. dump) it later.
Requires:
Definition at line 16432 of file zone.c.
Referenced by add_keydata_zone(), configure_zone(), create_empty_zone(), dlzconfigure_callback(), and dns64_reverse().
void dns_zone_setrequeststats | ( | dns_zone_t * | zone, | |
isc_stats_t * | stats | |||
) |
void dns_zone_setrcvquerystats | ( | dns_zone_t * | zone, | |
dns_stats_t * | stats | |||
) |
Set additional statistics sets to zone. These are attached to the zone but are not counted in the zone module; only the caller updates the counters.
Requires:
Definition at line 16460 of file zone.c.
Referenced by ns_zone_configure().
isc_stats_t* dns_zone_getrequeststats | ( | dns_zone_t * | zone | ) |
Definition at line 16475 of file zone.c.
Referenced by inc_stats(), ns_stats_dump(), and rpz_log_rewrite().
dns_stats_t* dns_zone_getrcvquerystats | ( | dns_zone_t * | zone | ) |
Get the additional statistics for zone, if one is installed.
Requires:
Definition at line 16495 of file zone.c.
Referenced by inc_stats().
void dns_zone_dialup | ( | dns_zone_t * | zone | ) |
void dns_zone_setdialup | ( | dns_zone_t * | zone, | |
dns_dialuptype_t | dialup | |||
) |
Set the dialup type of 'zone' to 'dialup'.
Requires:
Definition at line 16520 of file zone.c.
Referenced by add_keydata_zone(), create_empty_zone(), dns64_reverse(), and ns_zone_configure().
void dns_zone_log | ( | dns_zone_t * | zone, | |
int | level, | |||
const char * | msg, | |||
... | ||||
) |
Referenced by add_soa(), check_nsec3param(), check_ttls(), checkmx(), checkns(), checksrv(), del_sigs(), dns_zone_addnsec3chain(), dns_zone_notifyreceive(), dns_zone_refresh(), dnskey_sane(), dump_done(), forward_callback(), get_edns_expire(), got_transfer_quota(), integrity_checks(), keydone(), keyfetch_done(), load_secroots(), ns_query(), ns_zone_reusable(), receive_secure_db(), receive_secure_serial(), refresh_callback(), removed(), resume_addnsec3chain(), resume_signingwithkey(), revocable(), set_key_expiry_warning(), set_refreshkeytimer(), setmodtime(), soa_query(), stub_callback(), sync_keyzone(), sync_secure_journal(), update_log_cb(), update_sigs(), zmgr_resume_xfrs(), zmgr_start_xfrin_ifquota(), zone_addnsec3chain(), zone_check_dnskeys(), zone_check_glue(), zone_check_mx(), zone_check_ns(), zone_check_srv(), zone_expire(), zone_journal(), zone_load(), zone_maintenance(), zone_nsec3chain(), zone_postload(), zone_refreshkeys(), zone_replacedb(), zone_resigninc(), zone_rrset_check_dup(), zone_saveunique(), zone_settimer(), zone_sign(), and zone_xfrdone().
void void dns_zone_logc | ( | dns_zone_t * | zone, | |
isc_logcategory_t * | category, | |||
int | level, | |||
const char * | msg, | |||
... | ||||
) |
Log the message 'msg...' at 'level', including text that identifies the message as applying to 'zone'.
Referenced by queue_xfrin().
void void void dns_zone_name | ( | dns_zone_t * | zone, | |
char * | buf, | |||
size_t | len | |||
) |
Log the message 'msg...' at 'level', including text that identifies the message as applying to 'zone'.
Return the name of the zone with class and view.
Requires:
Definition at line 13133 of file zone.c.
References DNS_ZONE_VALID, REQUIRE, and zone_namerd_tostr().
Referenced by dns_xfrin_create3(), dumpdone(), and xfrin_log().
isc_result_t dns_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.
Definition at line 16634 of file zone.c.
Referenced by axfr_putdata(), ixfr_putdata(), and update_action().
void dns_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'
Definition at line 1508 of file zone.c.
References dns_acache_attach(), dns_acache_detach(), dns_acache_setdb(), DNS_ZONE_VALID, ISC_R_EXISTS, ISC_R_SUCCESS, isc_result_totext(), isc_rwlocktype_read, LOCK_ZONE, REQUIRE, UNEXPECTED_ERROR, UNLOCK_ZONE, ZONEDB_LOCK, and ZONEDB_UNLOCK.
Referenced by add_keydata_zone(), and configure_zone().
void dns_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 TARGET is not within the zone.
Require: 'zone' to be a valid zone.
Definition at line 16681 of file zone.c.
Referenced by load_zone().
void dns_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.
Definition at line 16687 of file zone.c.
Referenced by load_zone().
void dns_zone_setcheckns | ( | dns_zone_t * | zone, | |
dns_checknsfunc_t | checkns | |||
) |
Set the post load integrity callback function 'checkns'. 'checkns' will be called if the NS TARGET is not within the zone.
Require: 'zone' to be a valid zone.
Definition at line 16693 of file zone.c.
Referenced by load_zone().
void dns_zone_setnotifydelay | ( | dns_zone_t * | zone, | |
isc_uint32_t | delay | |||
) |
Set the minimum delay between sets of notify messages.
Requires: 'zone' to be valid.
Definition at line 16709 of file zone.c.
Referenced by ns_zone_configure().
isc_uint32_t dns_zone_getnotifydelay | ( | dns_zone_t * | zone | ) |
void dns_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'.
Definition at line 16699 of file zone.c.
Referenced by ns_zone_configure().
void dns_zone_setnodes | ( | dns_zone_t * | zone, | |
isc_uint32_t | nodes | |||
) |
Set the number of nodes that will be checked per quantum.
Definition at line 16772 of file zone.c.
Referenced by ns_zone_configure().
void dns_zone_setsignatures | ( | dns_zone_t * | zone, | |
isc_uint32_t | signatures | |||
) |
Set the number of signatures that will be generated per quantum.
Definition at line 16781 of file zone.c.
Referenced by ns_zone_configure().
isc_uint32_t dns_zone_getsignatures | ( | dns_zone_t * | zone | ) |
Get the number of signatures that will be generated per quantum.
Definition at line 16796 of file zone.c.
Referenced by dns_update_signaturesinc().
isc_result_t dns_zone_signwithkey | ( | dns_zone_t * | zone, | |
dns_secalg_t | algorithm, | |||
isc_uint16_t | keyid, | |||
isc_boolean_t | deleteit | |||
) |
Initiate/resume signing of the entire zone with the zone DNSKEY(s) that match the given algorithm and keyid.
Definition at line 16725 of file zone.c.
Referenced by update_action().
isc_result_t dns_zone_addnsec3chain | ( | dns_zone_t * | zone, | |
dns_rdata_nsec3param_t * | nsec3param | |||
) |
Incrementally add a NSEC3 chain that corresponds to 'nsec3param'.
Definition at line 16744 of file zone.c.
References dns_zone_log(), DNS_ZONE_VALID, hex, INSIST, ISC_LOG_NOTICE, LOCK_ZONE, REQUIRE, UNLOCK_ZONE, and zone_addnsec3chain().
Referenced by update_action().
void dns_zone_setprivatetype | ( | dns_zone_t * | zone, | |
dns_rdatatype_t | type | |||
) |
dns_rdatatype_t dns_zone_getprivatetype | ( | dns_zone_t * | zone | ) |
Definition at line 16808 of file zone.c.
Referenced by add_nsec3param_records(), check_dnssec(), dns_nsec3param_deletechains(), dns_update_signaturesinc(), dnskey_sane(), ns_server_signing(), and update_action().
void dns_zone_rekey | ( | dns_zone_t * | zone, | |
isc_boolean_t | fullsign | |||
) |
Update the zone's DNSKEY set from the key repository.
If 'fullsign' is true, trigger an immediate full signing of the zone with the new key. Otherwise, if there are no keys or if the new keys are for algorithms that have already signed the zone, then the zone can be re-signed incrementally.
Definition at line 17602 of file zone.c.
Referenced by configure_zone(), and ns_server_rekey().
isc_result_t dns_zone_nscheck | ( | dns_zone_t * | zone, | |
dns_db_t * | db, | |||
dns_dbversion_t * | version, | |||
unsigned int * | errors | |||
) |
void dns_zone_setadded | ( | dns_zone_t * | zone, | |
isc_boolean_t | added | |||
) |
Check if the name servers for the zone are sane (have address, don't refer to CNAMEs/DNAMEs. The number of constiancy errors detected in returned in '*errors'.
Requires:
Definition at line 17654 of file zone.c.
Referenced by configure_zone(), dns_dlz_writeablezone(), and do_addzone().
isc_boolean_t dns_zone_getadded | ( | dns_zone_t * | zone | ) |
Sets the value of zone->added, which should be ISC_TRUE for zones that were originally added by "rndc addzone".
Requires:
Definition at line 17663 of file zone.c.
Referenced by do_modzone(), ns_server_delzone(), and ns_server_zonestatus().
void dns_zone_setautomatic | ( | dns_zone_t * | zone, | |
isc_boolean_t | automatic | |||
) |
Returns ISC_TRUE if the zone was originally added at runtime using "rndc addzone".
Requires:
Definition at line 17639 of file zone.c.
Referenced by create_empty_zone().
isc_boolean_t dns_zone_getautomatic | ( | dns_zone_t * | zone | ) |
isc_result_t dns_zone_dlzpostload | ( | dns_zone_t * | zone, | |
dns_db_t * | db | |||
) |
Returns ISC_TRUE if the zone was added automatically by named.
Requires:
Definition at line 17669 of file zone.c.
Referenced by ns_zone_configure_writeable_dlz().
isc_boolean_t dns_zone_isdynamic | ( | dns_zone_t * | zone, | |
isc_boolean_t | ignore_freeze | |||
) |
Load the origin names for a writeable DLZ database.
Definition at line 1676 of file zone.c.
References dns_acl_isnone(), dns_zone_key, dns_zone_master, dns_zone_redirect, dns_zone_slave, dns_zone_stub, DNS_ZONE_VALID, ISC_FALSE, ISC_TRUE, and REQUIRE.
Referenced by check_nsec3param(), freezezones(), ns_server_freeze(), ns_server_zonestatus(), zone_load(), and zone_postload().
isc_result_t dns_zone_setrefreshkeyinterval | ( | dns_zone_t * | zone, | |
isc_uint32_t | interval | |||
) |
Return true iff the zone is "dynamic", in the sense that the zone's master file (if any) is written by the server, rather than being updated manually and read by the server.
This is true for slave zones, stub zones, key zones, and zones that allow dynamic updates either by having an update policy ("ssutable") or an "allow-update" ACL with a value other than exactly "{ none; }".
If 'ignore_freeze' is true, then the zone which has had updates disabled will still report itself to be dynamic.
Requires:
Definition at line 17707 of file zone.c.
Referenced by ns_zone_configure().
isc_boolean_t dns_zone_getrequestexpire | ( | dns_zone_t * | zone | ) |
Sets the frequency, in minutes, with which the key repository will be checked to see if the keys for this zone have been updated. Any value higher than 1440 minutes (24 hours) will be silently reduced. A value of zero will return an out-of-range error.
Requires:
void dns_zone_setrequestexpire | ( | dns_zone_t * | zone, | |
isc_boolean_t | flag | |||
) |
Returns the true/false value of the request-expire option in the zone.
Requires:
Definition at line 17732 of file zone.c.
Referenced by ns_zone_configure().
isc_boolean_t dns_zone_getrequestixfr | ( | dns_zone_t * | zone | ) |
void dns_zone_setrequestixfr | ( | dns_zone_t * | zone, | |
isc_boolean_t | flag | |||
) |
Returns the true/false value of the request-ixfr option in the zone.
Requires:
Definition at line 17720 of file zone.c.
Referenced by ns_zone_configure().
void dns_zone_setserialupdatemethod | ( | dns_zone_t * | zone, | |
dns_updatemethod_t | method | |||
) |
Sets the request-ixfr option for the zone. Either true or false. The default value is determined by the setting of this option in the view.
Requires:
Definition at line 17744 of file zone.c.
Referenced by ns_zone_configure().
dns_updatemethod_t dns_zone_getserialupdatemethod | ( | dns_zone_t * | zone | ) |
Sets the update method to use when incrementing the zone serial number due to a DDNS update. Valid options are dns_updatemethod_increment and dns_updatemethod_unixtime.
Requires:
Definition at line 17750 of file zone.c.
Referenced by update_action().
isc_result_t dns_zone_link | ( | dns_zone_t * | zone, | |
dns_zone_t * | raw | |||
) |
Returns the update method to be used when incrementing the zone serial number due to a DDNS update.
Requires:
Definition at line 17759 of file zone.c.
References DNS_ZONE_VALID, INSIST, ISC_LIST_APPEND, ISC_R_SUCCESS, isc_refcount_increment, isc_rwlocktype_write, isc_task_attach(), isc_timer_create(), isc_timertype_inactive, LOCK_ZONE, dns_zonemgr::refs, REQUIRE, dns_zonemgr::rwlock, RWLOCK, RWUNLOCK, dns_zonemgr::timermgr, UNLOCK_ZONE, zone_iattach(), zone_timer(), and dns_zonemgr::zones.
Referenced by configure_zone().
void dns_zone_getraw | ( | dns_zone_t * | zone, | |
dns_zone_t ** | raw | |||
) |
Definition at line 17820 of file zone.c.
Referenced by configure_zone(), create_empty_zone(), freezezones(), ns_server_delzone(), ns_server_freeze(), ns_server_refreshcommand(), ns_server_retransfercommand(), ns_server_zonestatus(), ns_update_start(), ns_xfr_start(), ns_zone_reusable(), query_find(), and synczone().
isc_result_t dns_zone_keydone | ( | dns_zone_t * | zone, | |
const char * | data | |||
) |
isc_result_t dns_zone_setnsec3param | ( | dns_zone_t * | zone, | |
isc_uint8_t | hash, | |||
isc_uint8_t | flags, | |||
isc_uint16_t | iter, | |||
isc_uint8_t | saltlen, | |||
unsigned char * | salt, | |||
isc_boolean_t | replace | |||
) |
void dns_zone_setrawdata | ( | dns_zone_t * | zone, | |
dns_masterrawheader_t * | header | |||
) |
Set the NSEC3 parameters for the zone.
If 'replace' is ISC_TRUE, then the existing NSEC3 chain, if any, will be replaced with the new one. If 'hash' is zero, then the replacement chain will be NSEC rather than NSEC3.
Requires:
Definition at line 2327 of file zone.c.
References LOCK_ZONE, UNLOCK_ZONE, and zone_setrawdata().
Referenced by main().
isc_result_t dns_zone_synckeyzone | ( | dns_zone_t * | zone | ) |
Set the data to be included in the header when the zone is dumped in binary format.
Definition at line 4118 of file zone.c.
References CHECK, dns_db_detach(), DNS_R_BADZONE, dns_zone_getdb(), dns_zone_key, LOCK_ZONE, sync_keyzone(), and UNLOCK_ZONE.
Referenced by add_keydata_zone(), and mkey_refresh().
isc_result_t dns_zone_getloadtime | ( | dns_zone_t * | zone, | |
isc_time_t * | loadtime | |||
) |
Force the managed key zone to synchronize, and start the key maintenance timer.
Definition at line 18267 of file zone.c.
Referenced by ns_server_zonestatus().
isc_result_t dns_zone_getrefreshtime | ( | dns_zone_t * | zone, | |
isc_time_t * | refreshtime | |||
) |
Return the time when the zone was last loaded.
Definition at line 18289 of file zone.c.
Referenced by ns_server_zonestatus().
isc_result_t dns_zone_getexpiretime | ( | dns_zone_t * | zone, | |
isc_time_t * | expiretime | |||
) |
Return the time when the (slave) zone will need to be refreshed.
Definition at line 18278 of file zone.c.
Referenced by ns_server_zonestatus(), ns_xfr_start(), and query_find().
isc_result_t dns_zone_getrefreshkeytime | ( | dns_zone_t * | zone, | |
isc_time_t * | refreshkeytime | |||
) |
Return the time when the (slave) zone will expire.
Definition at line 18300 of file zone.c.
Referenced by mkey_status(), and ns_server_zonestatus().
unsigned int dns_zone_getincludes | ( | dns_zone_t * | zone, | |
char *** | includesp | |||
) |
Return the time of the next scheduled DNSSEC key event.
Definition at line 18311 of file zone.c.
Referenced by ns_server_zonestatus().
isc_result_t dns_zone_rpz_enable | ( | dns_zone_t * | zone, | |
dns_rpz_zones_t * | rpzs, | |||
dns_rpz_num_t | rpz_num | |||
) |
Return the number include files that were encountered during load. If the number is greater than zero, 'includesp' will point to an array containing the filenames.
The array and its contents need to be freed using isc_mem_free.
Definition at line 1699 of file zone.c.
References dns_rpz_zones::defined, dns_rpz_attach_rpzs(), DNS_RPZ_INVALID_NUM, DNS_RPZ_ZBIT, ISC_R_NOTIMPLEMENTED, ISC_R_SUCCESS, LOCK_ZONE, REQUIRE, and UNLOCK_ZONE.
Referenced by configure_zone().
void dns_zone_rpz_enable_db | ( | dns_zone_t * | zone, | |
dns_db_t * | db | |||
) |
Set the response policy associated with a zone.
Definition at line 1738 of file zone.c.
References dns_db_rpz_attach(), DNS_RPZ_INVALID_NUM, and REQUIRE.
Referenced by axfr_makedb(), and zone_startload().
dns_rpz_num_t dns_zone_get_rpz_num | ( | dns_zone_t * | zone | ) |
If a zone is a response policy zone, mark its new database.
Definition at line 1730 of file zone.c.
Referenced by configure_zone().
void dns_zone_setstatlevel | ( | dns_zone_t * | zone, | |
dns_zonestat_level_t | level | |||
) |
dns_zonestat_level_t dns_zone_getstatlevel | ( | dns_zone_t * | zone | ) |
isc_result_t dns_zone_setserial | ( | dns_zone_t * | zone, | |
isc_uint32_t | serial | |||
) |
Set and get the statistics reporting level for the zone; full, terse, or none.
Definition at line 18452 of file zone.c.
Referenced by ns_server_signing().