zone2_test.c revision f6754349781d86adcd749e6ef90bb4074f18ba65
/*
* Copyright (C) 1999, 2000 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#include <config.h>
#include <stdlib.h>
#include <unistd.h>
#include <dns/confparser.h>
#include <dns/fixedname.h>
#include <dns/rdataset.h>
#include <dns/zoneconf.h>
do { \
if (result != ISC_R_SUCCESS) { \
return; \
} \
} while (0)
if (result != ISC_R_SUCCESS) { \
continue; \
} else \
(void)NULL
typedef struct dns_zone_callbackarg dns_zone_callbackarg_t;
struct dns_zone_callbackarg {
};
static isc_result_t
void *uap) {
const char *viewname;
/*
* Find views by name.
*/
else
viewname = "default";
&oldview);
&newview);
&newview);
if (result != ISC_R_SUCCESS)
goto cleanup;
}
/*
* Create and populate a new zone structure.
*/
if (result != ISC_R_SUCCESS)
goto cleanup;
if (result != ISC_R_SUCCESS)
goto cleanup;
#if 0
/* XXX hints should be a zone */
goto cleanup;
}
#endif
/*
* Find zone in mount table.
*/
if (result == ISC_R_SUCCESS) {
printf("zone already exists=\n");
goto cleanup;
goto cleanup;
&oldzone);
else
if (result == DNS_R_PARTIALMATCH) {
}
if (result != ISC_R_SUCCESS)
goto cleanup;
} else if (result == ISC_R_SUCCESS) {
/* Does the new configuration match the existing one? */
if (boolean)
else
}
return (result);
}
static void
char t[1000];
isc_region_t r;
isc_buffer_init(&text, t, sizeof(t));
&text);
isc_buffer_usedregion(&text, &r);
if (result == ISC_R_SUCCESS)
else
}
static void
char buf[1024];
char *s;
int reload = 0;
do {
break;
}
if (s != NULL)
*s = '\0';
if (s != NULL)
*s = '\0';
reload = 0;
continue;
}
break;
reload = 1;
continue;
}
reload = 0;
continue;
}
if (reload) {
dns_fixedname_name(&name), 0,
if (result != ISC_R_SUCCESS) {
if (result == DNS_R_PARTIALMATCH)
reload = 0;
continue;
}
reload = 0;
} else {
dns_rdatatype_a, 0, 0,
"dns_view_simplefind",
switch (result) {
case ISC_R_SUCCESS:
&rdataset);
break;
default:
continue;
}
}
} while (1);
}
int
char *conf = "named.conf";
int c;
char *dir;
switch (c) {
case 'c':
break;
case 'q':
quiet = 1;
break;
case 's':
stats = 1;
break;
default:
break;
}
}
#if 0
#endif
/*
RUNTIME_CHECK(dns_view_create(mctx, dns_rdataclass_in,
RUNTIME_CHECK(dns_view_create(mctx, dns_rdataclass_in,
*/
}
/* mv new ->old */
/*
view = ISC_LIST_HEAD(cba.newviews);
while (view != NULL) {
dns_view_t *next;
next = ISC_LIST_NEXT(view, link);
ISC_LIST_UNLINK(cba.newviews, view, link);
ISC_LIST_APPEND(cba.oldviews, view, link);
view = next;
}
*/
if (result == ISC_R_SUCCESS) {
if (result == ISC_R_SUCCESS)
}
} else {
}
}
/* cleanup */
}
}
return (0);
}