mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
add dns_zone_callbackarg structure.
add dns_zone_getorigin() declaration. update dns_zone_getdb() declaration. add dns_zone_notify() declaration. add dns_zone_replacedb() declaration.
This commit is contained in:
@@ -38,6 +38,11 @@
|
|||||||
#include <dns/callbacks.h>
|
#include <dns/callbacks.h>
|
||||||
#include <dns/confctx.h>
|
#include <dns/confctx.h>
|
||||||
|
|
||||||
|
struct dns_zone_callbackarg {
|
||||||
|
isc_mem_t *mctx;
|
||||||
|
dns_viewlist_t oldviews;
|
||||||
|
dns_viewlist_t newviews;
|
||||||
|
};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
dns_zone_none,
|
dns_zone_none,
|
||||||
@@ -115,6 +120,14 @@ dns_result_t dns_zone_setorigin(dns_zone_t *zone, char *origin);
|
|||||||
* All possible values from dns_name_fromtext().
|
* All possible values from dns_name_fromtext().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
dns_result_t dns_zone_getorigin(dns_zone_t *zone, isc_mem_t *mctx, dns_name_t *name);
|
||||||
|
/*
|
||||||
|
* Returns the value of the origin.
|
||||||
|
*
|
||||||
|
* Require:
|
||||||
|
* 'zone' to be a valid initalised zone.
|
||||||
|
*/
|
||||||
|
|
||||||
dns_result_t dns_zone_setdatabase(dns_zone_t *zone, const char *database);
|
dns_result_t dns_zone_setdatabase(dns_zone_t *zone, const char *database);
|
||||||
/*
|
/*
|
||||||
* Sets the name of the database to be loaded.
|
* Sets the name of the database to be loaded.
|
||||||
@@ -258,15 +271,18 @@ void dns_zone_cleardbargs(dns_zone_t *zone);
|
|||||||
* 'zone' to be a valid initalised zone.
|
* 'zone' to be a valid initalised zone.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dns_db_t * dns_zone_getdb(dns_zone_t *zone);
|
dns_result_t dns_zone_getdb(dns_zone_t *zone, dns_db_t **dbp);
|
||||||
/*
|
/*
|
||||||
* Return a pointer to the database.
|
* Attach the database to '*dbp' if it exists otherwise
|
||||||
|
* return DNS_R_NOTFOUND.
|
||||||
*
|
*
|
||||||
* Require:
|
* Require:
|
||||||
* 'zone' to be a valid initalised zone.
|
* 'zone' to be a valid initalised zone.
|
||||||
|
* 'dbp' to be != NULL && '*dbp' == NULL.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* A pointer to a database structure or NULL.
|
* DNS_R_SUCCESS
|
||||||
|
* DNS_R_NOTFOUND
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dns_result_t dns_zone_setdbtype(dns_zone_t *zone, char *db_type);
|
dns_result_t dns_zone_setdbtype(dns_zone_t *zone, char *db_type);
|
||||||
@@ -503,14 +519,6 @@ dns_zonetype_t dns_zone_gettype(dns_zone_t *zone);
|
|||||||
* 'zone' to be valid initialised zone.
|
* 'zone' to be valid initialised zone.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dns_name_t *dns_zone_getorigin(dns_zone_t *zone);
|
|
||||||
/*
|
|
||||||
* Returns the zone's origin.
|
|
||||||
*
|
|
||||||
* Requires:
|
|
||||||
* 'zone' to be valid initialised zone.
|
|
||||||
*/
|
|
||||||
|
|
||||||
isc_task_t *dns_zone_gettask(dns_zone_t *zone);
|
isc_task_t *dns_zone_gettask(dns_zone_t *zone);
|
||||||
/*
|
/*
|
||||||
* Return a pointer to the zone's task.
|
* Return a pointer to the zone's task.
|
||||||
@@ -536,6 +544,35 @@ const char *dns_zone_getixfrlog(dns_zone_t *zone);
|
|||||||
* 'zone' to be valid initialised zone.
|
* 'zone' to be valid initialised zone.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void dns_zone_notify(dns_zone_t *zone);
|
||||||
|
/*
|
||||||
|
* Generate notify events for this zone.
|
||||||
|
*
|
||||||
|
* Requires:
|
||||||
|
* 'zone' to be a valid zone.
|
||||||
|
*/
|
||||||
|
|
||||||
|
dns_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 redunant redump of the data just
|
||||||
|
* loaded. Otherwise, it should be set to ISC_TRUE.
|
||||||
|
*
|
||||||
|
* If the "diff-on-reload" option is enabled in the configuration file,
|
||||||
|
* the differences between the old and the new database are added to the
|
||||||
|
* journal file, and the master file dump is postponed.
|
||||||
|
*
|
||||||
|
* Requires:
|
||||||
|
* 'zone' to be a valid zone.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
ISC_LANG_ENDDECLS
|
ISC_LANG_ENDDECLS
|
||||||
|
|
||||||
#endif /* DNS_ZONE_H */
|
#endif /* DNS_ZONE_H */
|
||||||
|
Reference in New Issue
Block a user