dighost.c revision 7949dbdae1db33e6263d754e5940daa1dfba59f9
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyer * Copyright (C) 2000 Internet Software Consortium.
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyer * Permission to use, copy, modify, and distribute this software for any
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyer * purpose with or without fee is hereby granted, provided that the above
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyer * copyright notice and this permission notice appear in all copies.
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyer * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyer * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyer * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyer * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyer * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyer * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyer * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyerisc_boolean_t tcp_mode = ISC_FALSE, recurse = ISC_TRUE, have_ipv6 = ISC_FALSE,
02bc88821c5c853027b20199d178b321093ad2ceMichael Sawyer free_now = ISC_FALSE, show_details = ISC_FALSE;
unsigned int timeout;
int sendcount = 0;
free_lists(void);
s = string;
unsigned int len;
isc_region_t r;
isc_buffer_remainingregion(b, &r);
#ifdef NEVER
free_lists();
#ifdef MEMDEBUG
#ifdef DEBUG
for (i = 0; i < numclasses; i++)
return ISC_TRUE;
return ISC_FALSE;
for (i = 0; i < numtypes; i++) {
return ISC_TRUE;
return ISC_FALSE;
#ifdef TWIDDLE
isc_region_t r;
unsigned char bitfield;
int i, tw;
for (i=0;i<tw;i++) {
setup_system(void) {
char *ptr;
dig_lookup_t *l;
if (get_servers &&
sizeof(struct dig_server));
ptr,
ndots);
!= NULL) {
mctx, sizeof(struct
dig_server));
ptr,
link);
l != NULL;
setup_libs(void) {
isc_buffer_t b;
isc_region_t r;
int len;
&name);
BUFSIZE);
NULL,
isc_buffer_usedregion(b, &r);
(char *)r.base);
(mctx,
dig_lookup));
dig_server));
len);
isc_buffer_free (&b);
link);
dig_server_t *s;
while (s != NULL) {
dig_server));
link);
link);
int len;
isc_region_t r;
isc_buffer_t b;
isc_buffer_usedregion (&b, &r);
isc_buffer_usedregion (&b, &r);
#ifdef DEBUG
if (recurse)
DNS_SECTION_QUESTION, 0);
sendcount++;
#ifdef TWIDDLE
if (twiddle) {
isc_region_t r;
q != NULL;
if (q->working) {
if (!free_now) {
isc_buffer_clear(b);
isc_buffer_usedregion(b, &r);
isc_buffer_free(&b);
isc_region_t r;
isc_buffer_usedregion(b, &r);
isc_buffer_free(&b);
length);
if (include_question) {
#ifdef TWIDDLE
if (twiddle) {
link);
sendcount++;
isc_region_t r;
isc_buffer_usedregion(b, &r);
isc_buffer_free(&b);
static isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
isc_region_t r;
if (free_now) {
sendcount--;
&msg);
hex_dump(b);
if (show_details) {
#ifdef DEBUG
&ab);
query);
&ab);
port);
#ifdef DEBUG
if (tcp_mode)
free_lists(void) {
void *ptr;
dig_lookup_t *l;
dig_query_t *q;
dig_server_t *s;
dig_searchlist_t *o;
if (free_now)
while (l != NULL) {
q = ISC_LIST_HEAD(l->q);
while (q != NULL) {
link);
link);
ptr = q;
if (l->use_my_server_list) {
while (s != NULL) {
s->servername);
ptr = s;
ptr = l;
while (s != NULL) {
s->servername);
ptr = s;
while (o != NULL) {
o->origin);
ptr = o;
#ifdef MEMDEBUG
exit(0);
#ifdef TWIDDLE
#ifdef TWIDDLE
srandom(i);
setup_libs();
setup_system();
if (tcp_mode)
isc_app_run();
free_lists();