server.c revision 573b8b48d888e3f203ddd3fc78eafa986b9af44b
754cb8a2b33fa6cfaa15d6470f66e5fb0eab4764Automatic Updater * Copyright (C) 1999 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * Permission to use, copy, modify, and distribute this software for any
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater * purpose with or without fee is hereby granted, provided that the above
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson * copyright notice and this permission notice appear in all copies.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellingtontypedef struct {
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrencecreate_default_view(isc_mem_t *mctx, dns_rdataclass_t rdclass,
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson REQUIRE(viewp != NULL && *viewp == NULL);
fb64c9cf757422c5473764521ffc7c6111b8c821Brian Wellington result = dns_view_create(mctx, rdclass, "_default", &view);
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson result = dns_cache_create(mctx, ns_g_taskmgr, ns_g_timermgr, rdclass,
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson * XXXRTH Temporary support for loading cache contents.
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
fb01226bcd598c36b5edc566489c890c39f03ed3Brian Wellington result = dns_db_load(view->cachedb, ns_g_cachefile);
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews * XXXRTH hardwired number of tasks. Also, we'll need to
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews * see if we are dealing with a shared dispatcher in this view.
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews result = dns_view_createresolver(view, ns_g_taskmgr, 31,
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington * We have default hints for class IN.
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson * Create the special view that handles queries for
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington * "version.bind. CH". The version string returned is that
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington * configured in 'configctx', or a compiled-in default if
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt * there is no "version" configuration option.
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellingtoncreate_version_view(dns_c_ctx_t *configctx, dns_view_t **viewp) {
8c7eaac6bbcc9746afe8f57b60bb964745c01eafAndreas Gustafsson (void) dns_c_ctx_getversion(configctx, &versiontext);
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
&view);
return (result);
goto cleanup;
goto cleanup;
return (result);
static isc_result_t
void *uap)
return (result);
&tview);
return (result);
return (result);
&pview);
goto cleanup;
return (result);
return (result);
INSIST(0);
goto cleanup;
goto cleanup;
goto cleanup;
return (result);
&callbacks);
#ifdef notyet
&view);
(void)task;
(void)task;
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
ns_server_init() {
return (result);
return (result);
return (result);
goto cleanup_rootns;
goto cleanup_task;
goto cleanup_task;
return (ISC_R_SUCCESS);
return (result);
const char *format, ...)
abort();