zt.c revision dafcb997e390efa4423883dafd100c975c4095d6
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater * Copyright (C) 1999-2002 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater * copyright notice and this permission notice appear in all copies.
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
271c4c7ffafeb0bda21278af6cac4535c0193f18Automatic Updater * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * PERFORMANCE OF THIS SOFTWARE.
cb3e854e181373807f7f011e5050c1a8013b4841Brian Wellington/* $Id: zt.c,v 1.38 2004/03/05 05:09:27 marka Exp $ */
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington /* Unlocked. */
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington /* Locked by lock. */
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#define ZTMAGIC ISC_MAGIC('Z', 'T', 'b', 'l')
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington#define VALID_ZT(zt) ISC_MAGIC_VALID(zt, ZTMAGIC)
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellingtonauto_detach(void *, void *);
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellingtondns_zt_create(isc_mem_t *mctx, dns_rdataclass_t rdclass, dns_zt_t **ztp) {
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington result = dns_rbt_create(mctx, auto_detach, zt, &zt->table);
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington result = isc_rwlock_init(&zt->rwlock, 0, 0);
goto cleanup_rbt;
return (ISC_R_SUCCESS);
return (result);
return (result);
return (result);
unsigned int rbtoptions = 0;
(void **) (void*)&dummy);
return (result);
static isc_result_t
if (destroy) {
if (need_flush)
return (result);
static isc_result_t
return (result);
return (result);
static isc_result_t
return (result);
&node);
return (result);