adb_test.c revision 307d2084502eddc7ce921e5ce439aec3531d90e0
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * Copyright (C) 1999-2001 Internet Software Consortium.
4c1132f34493327abc632196f5876a89aa573687Bob Halley * Permission to use, copy, modify, and/or distribute this software for any
4c1132f34493327abc632196f5876a89aa573687Bob Halley * purpose with or without fee is hereby granted, provided that the above
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * copyright notice and this permission notice appear in all copies.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * PERFORMANCE OF THIS SOFTWARE.
f41f183f628a148860a6d1f0070208cddd45b0c6Bob Halley/* $Id: adb_test.c,v 1.69 2009/09/01 00:22:25 jinmei Exp $ */
ce1f5b8d0ae5936fd187c1f414ff12a7e3b0aa37Andreas Gustafssoncheck_result(isc_result_t result, const char *format, ...)
5c6762838c9e423753723ec2a963164e3d66ac32Mark Andrewscheck_result(isc_result_t result, const char *format, ...) {
76117ff568dc788ed24937cfea916a18db285960Mark Andrews fprintf(stderr, ": %s\n", isc_result_totext(result));
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halleystatic inline void
139154bd9894495042f4e748f554e9c8b98b7598Bob Halley RUNTIME_CHECK(isc_mutex_lock(&client_lock) == ISC_R_SUCCESS);
fd35453765c6494d077edca44f4d998af5fd4cfaDavid Lawrencestatic inline void
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley RUNTIME_CHECK(isc_mutex_unlock(&client_lock) == ISC_R_SUCCESS);
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halleylookup_callback(isc_task_t *task, isc_event_t *ev) {
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley printf("NAME %s:\n\tTask %p got event %p type %08x from %p, client %p\n\terr4: %s err6: %s\n",
6d7585b3e948dd31bf78321d83ac0e024f44a71bMark Andrews result = isc_taskmgr_create(mctx, 5, 0, &taskmgr);
5d51e67c3b4f35c1be742574aacc1d88fe6ed444Mark Andrews result = isc_socketmgr_create(mctx, &socketmgr);
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews result = dns_dispatchmgr_create(mctx, NULL, &dispatchmgr);
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews check_result(result, "dns_dispatchmgr_create");
unsigned int attrs;
== ISC_R_SUCCESS);
== ISC_R_SUCCESS);
timermgr, 0,
unsigned int options;
options = 0;
== ISC_R_SUCCESS);
create_view();
CLOCK();
CUNLOCK();
CLOCK();
CUNLOCK();
isc_app_run();