server.c revision 03a89d793846fae03d2f682fdef3d00ef059717d
5dee04703805e9453ff4d8d77884391e3a185977Bob Halley * Copyright (C) 1999, 2000 Internet Software Consortium.
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * Permission to use, copy, modify, and distribute this software for any
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * purpose with or without fee is hereby granted, provided that the above
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * copyright notice and this permission notice appear in all copies.
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
d25afd60ee2286cb171c4960a790f3d7041b6f85Bob Halley/* $Id: server.c,v 1.209 2000/08/02 20:44:31 tale Exp $ */
125d72976ab6b8fa6629a5ace276a86e9fef91acBrian Wellington * Check an operation for failure. Assumes that the function
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley * using it has a 'result' variable and a 'cleanup' label.
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley } while (0) \
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley } while (0) \
138a6660fb74d458270511ca0ba24aa19bf375d5Bob Halleytypedef struct {
138a6660fb74d458270511ca0ba24aa19bf375d5Bob Halleyns_server_reload(isc_task_t *task, isc_event_t *event);
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halleyns_listenelt_fromconfig(dns_c_lstnon_t *celt, dns_c_ctx_t *cctx,
e4e071ae12aee942fefc2c0a3280e402938669deBob Halleyns_listenlist_fromconfig(dns_c_lstnlist_t *clist, dns_c_ctx_t *cctx,
e4e071ae12aee942fefc2c0a3280e402938669deBob Halley * Configure a single view ACL at '*aclp'. Get its configuration by
96754ed7b400ce080279de2f92111ad868105290Bob Halley * calling 'getvcacl' (for per-view configuration) and maybe 'getscacl'
e4e071ae12aee942fefc2c0a3280e402938669deBob Halley * (for a global default).
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley * No value available. *aclp == NULL.
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley result = dns_acl_fromconfig(cacl, cctx, actx, mctx, aclp);
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley * Convert a null-terminated string of base64 text into binary,
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halley * storing it in a buffer. 'mctx' is only used internally.
25e43e68b7431d5e4ff8b5427108cd7f5f9bcf3eBob Halleybase64_cstring_tobuffer(isc_mem_t *mctx, char *cstr, isc_buffer_t *target) {
static isc_result_t
isc_region_t r;
&viewclass));
&keydatabuf));
NULL));
&dstkey));
goto cleanup;
return (result);
static isc_result_t
switch (af) {
case AF_INET:
case AF_INET6:
INSIST(0);
switch (af) {
case AF_INET:
case AF_INET6:
INSIST(0);
return (ISC_R_SUCCESS);
attrs = 0;
switch (af) {
case AF_INET:
case AF_INET6:
attrmask = 0;
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
&pview);
goto cleanup;
&dispatch4));
&dispatch6));
0, ns_g_dispatchmgr,
goto cleanup;
goto cleanup;
return (result);
static isc_result_t
return (result);
static isc_result_t
char *versiontext;
isc_region_t r;
return (result);
static isc_result_t
isc_region_t r;
static char *authors[] = {
NULL,
return (result);
static isc_result_t
return (result);
static isc_result_t
const char *viewname;
return (result);
return (ISC_R_SUCCESS);
return (result);
return (result);
return (ISC_R_SUCCESS);
* is called after parsing each "zone" statement in named.conf.
static isc_result_t
void *uap)
char *corigin;
goto cleanup;
corigin);
goto cleanup;
corigin);
goto cleanup;
corigin);
goto cleanup;
corigin);
goto cleanup;
goto cleanup;
&pview);
goto cleanup;
goto cleanup;
return (result);
static isc_result_t
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
char *pidfilename;
filename);
&callbacks));
if (ns_g_port != 0) {
cctx,
&listenon);
cctx,
&listenon);
if (interface_interval == 0) {
&aclconfctx));
goto cleanup;
if (first_time)
* files specified in named.conf get created by the
if (ns_g_logstderr) {
return (result);
static isc_result_t
return (result);
sizeof(isc_event_t));
static isc_result_t
return (result);
goto cleanup;
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
return (result);
return (result);
return (ISC_R_SUCCESS);