zone.c revision 9733108152679bfaadc92d3e139a5bc8edbf2f6d
3b922eeb6294d579edfd720ac162287e6736e07aTinderbox User * Copyright (C) 1999 Internet Software Consortium.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * Permission to use, copy, modify, and distribute this software for any
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * purpose with or without fee is hereby granted, provided that the above
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * copyright notice and this permission notice appear in all copies.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
3b922eeb6294d579edfd720ac162287e6736e07aTinderbox User /* $Id: zone.c,v 1.24 1999/10/15 19:47:31 gson Exp $ */
#include <stdarg.h>
#define DNS_GLOBAL_OPTION(o) 0
typedef struct dns_zone_checkservers {
struct dns_zone {
unsigned int magic;
unsigned int references;
char *database;
char *updatelog;
unsigned int flags;
unsigned int options;
unsigned int setoptions;
char * db_type;
unsigned int db_argc;
char ** db_argv;
unsigned int masterscnt;
unsigned int curmaster;
unsigned int notifycnt;
/* XXX MPA these may need to go back into zone.h */
(((z)->options & (o)) != 0) : \
static void record_serial(void);
return (DNS_R_NOMEMORY);
return (DNS_R_UNEXPECTED);
return (DNS_R_SUCCESS);
return (result);
return (result);
return (result);
return (result);
return (result);
return (result);
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
case dns_zone_hint:
case dns_zone_forward:
case dns_zone_cache:
int soacount = 0;
int nscount = 0;
return (DNS_R_UNEXPECTED);
case dns_zone_forward:
case dns_zone_none:
return (DNS_R_SUCCESS);
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
case dns_zone_hint:
case dns_zone_cache:
return (result);
goto cleanup;
goto cleanup;
nscount = 0;
soacount = 0;
NULL);
nscount++;
NULL);
if (soacount == 0)
soacount++;
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
soacount);
if (nscount == 0)
if (soacount != 0)
return (DNS_R_BADZONE);
case dns_zone_hint:
if (nscount == 0) {
if (soacount != 0)
return (DNS_R_BADZONE);
case dns_zone_cache:
if (soacount != 0)
return (DNS_R_UNEXPECTED);
goto cleanup;
if (soacount != 0)
return (result);
#ifdef notyet
NULL);
sizeof *checkservers);
#ifdef notyet
char *master;
switch (state) {
case get_a6:
case get_aaaa:
case get_a:
case get_ns:
case get_soa:
goto cleanup;
switch (state) {
case get_a6:
case get_aaaa:
case get_a:
case get_ns:
case get_soa:
goto cleanup;
server);
server);
goto cleanup_msgsoa;
goto cleanup_msgsoa;
goto cleanup_msgsoa;
server);
goto cleanup_zonesoa;
goto cleanup_zonesoa;
server);
switch (type) {
case dns_rdatatype_a:
dns_rdata_freestruct(&a);
case dns_rdatatype_a6:
INSIST(0);
sizeof outbuf);
return (outbuf);
if (value)
if (value)
unsigned int *optionsmask)
goto cleanup;
goto cleanup;
return (DNS_R_SUCCESS);
return (DNS_R_NOMEMORY);
return (DNS_R_SUCCESS);
goto cleanup;
return (DNS_R_SUCCESS);
return (DNS_R_NOMEMORY);
return (DNS_R_NOMEMORY);
return (DNS_R_SUCCESS);
return (result);
case dns_zone_slave:
case dns_zone_stub:
case dns_zone_slave:
case dns_zone_stub:
case dns_zone_master:
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
#ifdef notyet
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
#ifdef notyet
&rdsiter);
goto retry;
return (result);
(void)zone;
(void)tmgr;
return (DNS_R_NOTIMPLEMENTED);
return (DNS_R_UNEXPECTED);
return (DNS_R_UNEXPECTED);
return (DNS_R_UNEXPECTED);
isc_socket_t *s;
== ISC_R_SUCCESS);
s = NULL;
return (result);
isc_socket_detach(&s);
return (DNS_R_SUCCESS);
goto cleanup1;
goto cleanup2;
(void)task;
(void)event;
char *master;
goto next_master;
goto next_master;
goto next_master;
if (cnamecnt != 0) {
goto next_master;
goto next_master;
goto next_master;
goto next_master;
goto next_master;
goto next_master;
goto next_master;
goto next_master;
goto next_master;
#ifdef notyet
static dns_result_t
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
if (next == 0) {
ISC_TRUE);
return (DNS_R_UNEXPECTED);
return (DNS_R_SUCCESS);
static dns_result_t
return (result);
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
return (result);
return (DNS_R_REFUSED);
return (DNS_R_REFUSED);
&rdataset);
return (DNS_R_SUCCESS);
return (DNS_R_SUCCESS);
return (DNS_R_SUCCESS);
isc_uint32_t i;
const char *origin;
return (result);
if (o == NULL)
return (DNS_R_NOMEMORY);
return (result);
return (result);
case dns_c_zone_master:
return (iresult);
return (iresult);
return (result);
return (result);
case dns_c_zone_forward:
#ifdef notyet
case dns_c_zone_slave:
return (iresult);
return (iresult);
return (result);
case dns_c_zone_stub:
return (iresult);
return (iresult);
return (result);
case dns_c_zone_hint:
return (iresult);
return (result);
return (DNS_R_SUCCESS);
acl);
acl);
acl);
int len;
len = 0;
int res = 0;
res++;
return (res);
case AF_INET:
case AF_INET6:
INSIST(0);
record_serial() {
return (ISC_FALSE);
goto fail;
if (dump) {
goto fail;
return (DNS_R_SUCCESS);
fail:
return (result);