zone_test.c revision 9c3531d72aeaad6c5f01efe6a1c82023e1379e4d
/*
* 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.
*/
/* $Id: zone_test.c,v 1.20 2000/06/22 21:51:01 tale Exp $ */
#include <config.h>
#include <stdlib.h>
#include <isc/commandline.h>
#include <dns/fixedname.h>
#include <dns/rdataclass.h>
#include <dns/rdataset.h>
static int debug = 0;
static int quiet = 0;
static int stats = 0;
do { \
if (result != ISC_R_SUCCESS) { \
return; \
} \
} while (0)
if (result != ISC_R_SUCCESS) { \
continue; \
} else \
(void)NULL
static void
usage() {
"usage: zone_test [-dqsSM] [-c class] [-f file] zone\n");
exit(1);
}
static void
if (debug)
if (zonetype == dns_zone_slave)
}
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
query(void) {
char buf[1024];
char *s;
if (result != ISC_R_SUCCESS) {
return;
}
do {
break;
}
if (s != NULL)
*s = '\0';
if (s != NULL)
*s = '\0';
continue;
}
continue;
NULL /*vesion*/,
0 /*options*/,
0 /*time*/,
NULL /*nodep*/,
switch (result) {
case DNS_R_DELEGATION:
break;
case ISC_R_SUCCESS:
break;
default:
break;
}
if (dns_rdataset_isassociated(&sigset))
} while (1);
dns_db_detach(&db);
}
static void
destroy(void) {
return;
}
int
int c;
char *classname = "IN";
switch (c) {
case 'c':
break;
case 'd':
debug++;
break;
case 'f':
usage();
break;
case 'm':
break;
case 'q':
quiet++;
break;
case 's':
stats++;
break;
case 'S':
break;
case 'M':
break;
default:
usage();
}
}
usage();
&zonemgr) == ISC_R_SUCCESS);
query();
destroy();
return (0);
}