zone_test.c revision 0837549bd6efe0594cbe783350753182b41a9437
/*
* Copyright (C) 2004, 2005, 2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* 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 ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC 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.35 2009/09/02 23:48:01 tbox Exp $ */
#include <config.h>
#include <unistd.h>
#include <stdlib.h>
#include <isc/commandline.h>
#include <dns/fixedname.h>
#include <dns/rdataclass.h>
#include <dns/rdataset.h>
#ifdef ISC_PLATFORM_NEEDSYSSELECTH
#endif
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
const char *rbt = "rbt";
if (debug)
(isc_textregion_t *)(void*)®ion);
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);
}
int
int c;
const char *classname = "IN";
switch (c) {
case 'c':
break;
case 'd':
debug++;
break;
case 'f':
usage();
break;
case 'm':
exit(1);
}
break;
case 'q':
quiet++;
break;
case 's':
stats++;
break;
case 'S':
break;
case 'M':
break;
default:
usage();
}
}
usage();
&zonemgr) == ISC_R_SUCCESS);
query();
return (0);
}