byname_test.c revision 6af51ff1a30dd977c4fc6c342a0661bb4f6501a5
/*
* Copyright (C) 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.
*/
/*
* Principal Author: Bob Halley
*/
/* XXXRTH */
#define ISC_MEM_DEBUG 1
#include <config.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <isc/assertions.h>
#include <isc/commandline.h>
#include <isc/sockaddr.h>
#include <dns/fixedname.h>
#include <dns/resolver.h>
#include <dns/dispatch.h>
static dns_fixedname_t name;
static dns_fixedname_t target;
static isc_logconfig_t *lcfg;
static unsigned int level = 0;
static void
log_init(void) {
unsigned int flags;
/*
* Setup a logging context.
*/
/*
* Create and install the default channel.
*/
&destination, flags) ==
}
static void
isc_buffer_t b;
isc_region_t r;
char text[1024];
isc_buffer_clear(&b);
if (result == ISC_R_SUCCESS) {
isc_buffer_used(&b, &r);
} else
printf("isc_sockaddr_totext() failed: %s\n",
}
}
static void
isc_buffer_t b;
isc_region_t r;
char text[1024];
if (result == ISC_R_SUCCESS) {
isc_buffer_used(&b, &r);
} else
printf("dns_name_totext() failed: %s\n",
}
static void
unsigned int options;
if (want_event)
dns_rootname, options, 0,
&find);
if (result == ISC_R_SUCCESS) {
/*
* We have at least some of the addresses for the
* name.
*/
} else {
/*
* We don't know any of the addresses for this
* name.
*/
/*
* And ADB isn't going to send us any events
* either. This query loses.
*/
}
/*
* If the DNS_ADBFIND_WANTEVENT flag was set, we'll
* get an event when something happens.
*/
}
} else if (result == DNS_R_ALIAS) {
} else {
printf("dns_adb_createfind() returned %s\n",
}
if (done) {
}
}
static void
if (type == DNS_EVENT_ADBMOREADDRESSES)
else if (type == DNS_EVENT_ADBNOMOREADDRESSES) {
printf("no more addresses\n");
} else {
}
}
static void
(void)task;
}
int
unsigned int workers = 2;
int ch;
isc_buffer_t b;
switch (ch) {
case 'd':
break;
case 'v':
break;
case 'w':
break;
}
}
log_init();
if (verbose) {
}
&cache) == ISC_R_SUCCESS);
&view) == ISC_R_SUCCESS);
{
}
(void)isc_app_run();
if (verbose)
return (0);
}