• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/bind9-45.100/bind9/lib/dns/

Lines Matching refs:zt

37 #include <dns/zt.h>
51 #define VALID_ZT(zt) ISC_MAGIC_VALID(zt, ZTMAGIC)
68 dns_zt_t *zt;
73 zt = isc_mem_get(mctx, sizeof(*zt));
74 if (zt == NULL)
77 zt->table = NULL;
78 result = dns_rbt_create(mctx, auto_detach, zt, &zt->table);
82 result = isc_rwlock_init(&zt->rwlock, 0, 0);
86 zt->mctx = mctx;
87 zt->references = 1;
88 zt->rdclass = rdclass;
89 zt->magic = ZTMAGIC;
90 *ztp = zt;
95 dns_rbt_destroy(&zt->table);
98 isc_mem_put(mctx, zt, sizeof(*zt));
104 dns_zt_mount(dns_zt_t *zt, dns_zone_t *zone) {
109 REQUIRE(VALID_ZT(zt));
113 RWLOCK(&zt->rwlock, isc_rwlocktype_write);
115 result = dns_rbt_addname(zt->table, name, zone);
119 RWUNLOCK(&zt->rwlock, isc_rwlocktype_write);
125 dns_zt_unmount(dns_zt_t *zt, dns_zone_t *zone) {
129 REQUIRE(VALID_ZT(zt));
133 RWLOCK(&zt->rwlock, isc_rwlocktype_write);
135 result = dns_rbt_deletename(zt->table, name, ISC_FALSE);
137 RWUNLOCK(&zt->rwlock, isc_rwlocktype_write);
143 dns_zt_find(dns_zt_t *zt, dns_name_t *name, unsigned int options,
150 REQUIRE(VALID_ZT(zt));
155 RWLOCK(&zt->rwlock, isc_rwlocktype_read);
157 result = dns_rbt_findname(zt->table, name, rbtoptions, foundname,
162 RWUNLOCK(&zt->rwlock, isc_rwlocktype_read);
168 dns_zt_attach(dns_zt_t *zt, dns_zt_t **ztp) {
170 REQUIRE(VALID_ZT(zt));
173 RWLOCK(&zt->rwlock, isc_rwlocktype_write);
175 INSIST(zt->references > 0);
176 zt->references++;
177 INSIST(zt->references != 0);
179 RWUNLOCK(&zt->rwlock, isc_rwlocktype_write);
181 *ztp = zt;
193 dns_zt_t *zt;
197 zt = *ztp;
199 RWLOCK(&zt->rwlock, isc_rwlocktype_write);
201 INSIST(zt->references > 0);
202 zt->references--;
203 if (zt->references == 0)
206 RWUNLOCK(&zt->rwlock, isc_rwlocktype_write);
210 (void)dns_zt_apply(zt, ISC_FALSE, flush, NULL);
211 dns_rbt_destroy(&zt->table);
212 isc_rwlock_destroy(&zt->rwlock);
213 zt->magic = 0;
214 isc_mem_put(zt->mctx, zt, sizeof(*zt));
231 dns_zt_load(dns_zt_t *zt, isc_boolean_t stop) {
234 REQUIRE(VALID_ZT(zt));
236 RWLOCK(&zt->rwlock, isc_rwlocktype_read);
237 result = dns_zt_apply(zt, stop, load, NULL);
238 RWUNLOCK(&zt->rwlock, isc_rwlocktype_read);
253 dns_zt_loadnew(dns_zt_t *zt, isc_boolean_t stop) {
256 REQUIRE(VALID_ZT(zt));
258 RWLOCK(&zt->rwlock, isc_rwlocktype_read);
259 result = dns_zt_apply(zt, stop, loadnew, NULL);
260 RWUNLOCK(&zt->rwlock, isc_rwlocktype_read);
276 dns_zt_freezezones(dns_zt_t *zt, isc_boolean_t freeze) {
279 REQUIRE(VALID_ZT(zt));
281 RWLOCK(&zt->rwlock, isc_rwlocktype_read);
282 result = dns_zt_apply2(zt, ISC_FALSE, &tresult, freezezones, &freeze);
283 RWUNLOCK(&zt->rwlock, isc_rwlocktype_read);
347 dns_zt_apply(dns_zt_t *zt, isc_boolean_t stop,
350 return (dns_zt_apply2(zt, stop, NULL, action, uap));
354 dns_zt_apply2(dns_zt_t *zt, isc_boolean_t stop, isc_result_t *sub,
362 REQUIRE(VALID_ZT(zt));
365 dns_rbtnodechain_init(&chain, zt->mctx);
366 result = dns_rbtnodechain_first(&chain, zt->table, NULL, NULL);