view.c revision 65a66336a6e2ce2032f68139ef9c8afe18d08c14
c6fb85f9500350e5ce58c9a24f5d264c8a8bd6f4Automatic Updater * Copyright (C) 1999-2001 Internet Software Consortium.
c6fb85f9500350e5ce58c9a24f5d264c8a8bd6f4Automatic Updater * Permission to use, copy, modify, and distribute this software for any
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt * purpose with or without fee is hereby granted, provided that the above
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt * copyright notice and this permission notice appear in all copies.
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
c6fb85f9500350e5ce58c9a24f5d264c8a8bd6f4Automatic Updater * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt/* $Id: view.c,v 1.96 2001/02/14 03:50:10 gson Exp $ */
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt#include <isc/string.h> /* Required for HP/UX (and others?) */
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt#define RESSHUTDOWN(v) (((v)->attributes & DNS_VIEWATTR_RESSHUTDOWN) != 0)
0ae35ecf053a29f61ad6b3659ac2445cf2c3f663Automatic Updater#define ADBSHUTDOWN(v) (((v)->attributes & DNS_VIEWATTR_ADBSHUTDOWN) != 0)
0ae35ecf053a29f61ad6b3659ac2445cf2c3f663Automatic Updater#define REQSHUTDOWN(v) (((v)->attributes & DNS_VIEWATTR_REQSHUTDOWN) != 0)
0ae35ecf053a29f61ad6b3659ac2445cf2c3f663Automatic Updaterstatic void resolver_shutdown(isc_task_t *task, isc_event_t *event);
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterstatic void adb_shutdown(isc_task_t *task, isc_event_t *event);
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Huntstatic void req_shutdown(isc_task_t *task, isc_event_t *event);
0ae35ecf053a29f61ad6b3659ac2445cf2c3f663Automatic Updaterdns_view_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt * Create a view.
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt "isc_mutex_init() failed: %s",
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater result = dns_zt_create(mctx, rdclass, &view->zonetable);
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt "dns_zt_create() failed: %s",
goto cleanup_mutex;
goto cleanup_zt;
goto cleanup_secroots;
goto cleanup_trustedkeys;
goto cleanup_fwdtable;
goto cleanup_dynkeys;
return (ISC_R_SUCCESS);
return (result);
static isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
unsigned int refs;
if (refs == 0) {
if (flush)
if (done)
static isc_result_t
return (ISC_R_SUCCESS);
if (done)
if (done)
if (done)
if (done)
unsigned int options,
return (result);
return (result);
return (result);
return (result);
return (ISC_R_SUCCESS);
return (result);
return (result);
goto cleanup;
goto cleanup;
if (!is_cache) {
goto db_find;
goto cleanup;
goto db_find;
return (result);
return (result);
goto finish;
goto cleanup;
if (!is_cache) {
goto cleanup;
goto cleanup;
goto db_find;
goto cleanup;
if (use_zone) {
goto cleanup;
return (result);
return (ISC_R_NOTFOUND);
return (ISC_R_SUCCESS);
return (result);
return (result);
return (result);
return (result);
return (ISC_R_SUCCESS);