db_test.c revision 307d2084502eddc7ce921e5ce439aec3531d90e0
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * Copyright (C) 1999-2001 Internet Software Consortium.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * Permission to use, copy, modify, and/or distribute this software for any
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * purpose with or without fee is hereby granted, provided that the above
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * copyright notice and this permission notice appear in all copies.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * PERFORMANCE OF THIS SOFTWARE.
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt/* $Id: db_test.c,v 1.67 2009/09/01 00:22:25 jinmei Exp $ */
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt * Principal Author: Bob Halley
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunttypedef struct dbinfo {
int rcount;
int hold_count;
int pause_every;
} dbinfo;
static int pause_every = 0;
len = 0;
isc_region_t r;
&text);
static dbinfo *
return (cache_dbi);
return (NULL);
return (dbi);
0, NULL);
seekname);
&rdsiter);
static isc_result_t
return (ISC_R_NOMEMORY);
for (i = 0; i < MAXVERSIONS; i++)
for (i = 0; i < MAXHOLD; i++)
return (result);
return (result);
return (result);
if (cache) {
return (result);
return (ISC_R_SUCCESS);
unload_all(void) {
int ch;
char *origintext;
unsigned int addopts;
switch (ch) {
if (argc != 0)
if (time_lookups) {
while (!done) {
if (!quiet)
len--;
if (addmode)
if (delmode)
if (holdmode)
if (printnode)
if (find_zonecut)
if (noexact_zonecut)
zcoptions = 0;
if (noexact_zonecut)
&db);
if (!quiet) {
&tb1);
if (noexact_zonecut)
if (!quiet) {
switch (result) {
case ISC_R_SUCCESS:
case DNS_R_GLUE:
case DNS_R_CNAME:
case DNS_R_ZONECUT:
case DNS_R_DNAME:
case DNS_R_DELEGATION:
case DNS_R_NXRRSET:
if (holdmode) {
MAXHOLD);
node;
case DNS_R_NXDOMAIN:
if (quiet)
if (printnode)
&rdsiter);
if (!quiet)
if (!quiet)
if (!quiet)
addopts = 0;
0, &rdataset,
if (printnode)
if (printnode)
if (holdmode) {
if (time_lookups) {
unload_all();
if (!quiet)