2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

add declaration for dns_zt_load()

add function descriptions and contract details.
This commit is contained in:
Mark Andrews 1999-10-13 22:04:18 +00:00
parent db0a8db17b
commit b0526987ae

View File

@ -23,20 +23,106 @@
#include <isc/mem.h>
#include <dns/name.h>
#include <dns/zone.h>
#include <dns/types.h>
#include <dns/rbt.h>
typedef struct dns_zt dns_zt_t;
ISC_LANG_BEGINDECLS
dns_result_t dns_zt_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
dns_zt_t **zt);
/*
* Creates a new zone table.
*
* Requires:
* 'mctx' to be initalised.
*
* Returns:
* DNS_R_SUCCESS on success.
* DNS_R_NOMEMORY
*/
dns_result_t dns_zt_mount(dns_zt_t *zt, dns_zone_t *zone);
/*
* Mounts the zone on the zone table.
*
* Requires:
* 'zt' to be valid
* 'zone' to be valid
*
* Returns:
* DNS_R_SUCCESS
* DNS_R_EXISTS
* DNS_R_NOSPACE
* DNS_R_NOMEMORY
*/
dns_result_t dns_zt_unmount(dns_zt_t *zt, dns_zone_t *zone);
/*
* Unmount the given zone from the table.
*
* Requires:
* 'zt' to be valid
* 'zone' to be valid
*
* Returns:
* DNS_R_SUCCESS
* DNS_R_NOTFOUND
* DNS_R_NOMEMORY
*/
dns_result_t dns_zt_find(dns_zt_t *zt, dns_name_t *name,
dns_name_t *foundname, dns_zone_t **zone);
/*
* Find the best match for 'name' in 'zt'. If foundname is non NULL
* then the name of the zone found is returned.
*
* Requires:
* 'zt' to be valid
* 'name' to be valid
* 'foundname' to be initalised and associated with a fixedname or NULL
* 'zone' to be non NULL and '*zone' to be NULL
*
* Returns:
* DNS_R_SUCCESS
* DNS_R_PARTIALMATCH
* DNS_R_NOTFOUND
* DNS_R_NOSPACE
*/
void dns_zt_detach(dns_zt_t **ztp);
/*
* Detach the give zonetable, if the reference count goes to zero the
* zonetable will be freed. In either case 'ztp' is set to NULL.
*
* Requires:
* '*ztp' to be valid
*/
void dns_zt_attach(dns_zt_t *zt, dns_zt_t **ztp);
/*
* Attach 'zt' to '*ztp'.
*
* Requires:
* 'zt' to be valid
* '*ztp' to be NULL
*/
void dns_zt_load(dns_zt_t *zt);
/*
* Load all zones in the table.
*
* Requires:
* 'zt' to be valid
*/
ISC_LANG_ENDDECLS
#endif