dighost.c revision 1a69a1a78cfaa86f3b68bbc965232b7876d4da2a
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony * Copyright (C) 2000 Internet Software Consortium.
41326e4d330eb9bdf4af7ab021f3ae2cc1fb0146rbowen * Permission to use, copy, modify, and distribute this software for any
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony * purpose with or without fee is hereby granted, provided that the above
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony * copyright notice and this permission notice appear in all copies.
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony * SOFTWARE.
d4cd628a85e7ba869d3564684abcccd9863a3aafnilgunisc_boolean_t tcp_mode = ISC_FALSE, have_ipv6 = ISC_FALSE,
d4cd628a85e7ba869d3564684abcccd9863a3aafnilgun free_now = ISC_FALSE, show_details = ISC_FALSE, usesearch=ISC_TRUE;
d4cd628a85e7ba869d3564684abcccd9863a3aafnilgun while (*s != 0) {
d4cd628a85e7ba869d3564684abcccd9863a3aafnilgun if (*s == '.')
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony return (i);
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony unsigned int len;
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony printf("Printing a buffer with length %d\n", r.length);
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 (fixeddomain[0]!=0) {
if (get_servers &&
sizeof(struct dig_server));
__LINE__);
ptr,
ndots);
&& usesearch){
!= NULL) {
mctx, sizeof(struct
dig_server));
__LINE__);
ptr,
link);
(fixeddomain[0] == 0 )){
!= NULL) {
mctx, sizeof(struct
dig_server));
__LINE__);
ptr,
link);
l != NULL;
setup_libs(void) {
isc_buffer_t b;
isc_region_t r;
int len;
BUFSIZE);
NULL,
isc_buffer_usedregion(b, &r);
(char *)r.base);
if (!success) {
if (lookup_counter >
(mctx,
dig_lookup));
__LINE__);
if (section ==
query->
(long int)query->
(long int)lookup,
(long int)lookup->
link);
(long int)query->
(long int)lookup,
(long int)lookup->
dig_server));
isc_buffer_free (&b);
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
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);
ISC_R_SUCCESS) &&
if (show_details) {
== ISC_R_SUCCESS) &&
#ifdef DEBUG
&ab);
&ab);
query);
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) {
ptr = s;
ptr = l;
while (s != NULL) {
ptr = s;
while (o != NULL) {
ptr = o;
#ifdef MEMDEBUG
exit(0);
#ifdef TWIDDLE
#ifdef TWIDDLE
srandom(i);
setup_libs();
setup_system();
if (tcp_mode)
isc_app_run();
free_lists();