adb_test.c revision 910df98b0efcbe8380b952887f4071051cc39a25
7a272c6b0de3b8c0ad018b9896e287da19c43befAutomatic Updater * Copyright (C) 1998, 1999 Internet Software Consortium.
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews * Permission to use, copy, modify, and distribute this software for any
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater * purpose with or without fee is hereby granted, provided that the above
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews * copyright notice and this permission notice appear in all copies.
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrewsstatic inline void
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews fatal("%s: %s", msg, isc_result_totext(result));
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * EVERYTHING needs a memory context.
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * The task manager is independent (other than memory context)
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews result = isc_taskmgr_create(mctx, 2, 0, &manager);
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews result = isc_task_create(manager, NULL, 0, &t1);
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews result = isc_task_create(manager, NULL, 0, &t2);
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * Create the address database.
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews * Store this address and name in it.
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews isc_buffer_init(&t, NAME1, sizeof NAME1 - 1, ISC_BUFFERTYPE_TEXT);
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews isc_buffer_init(&namebuf, namestorage, sizeof namestorage,
1e107b3d7b54de5022c3328423164e533afcc15eMark Andrews result = dns_name_fromtext(&name, &t, dns_rootname, ISC_FALSE,