dig.c revision c5ec9b45bbf7175cf3c9b36293555c93bb703d93
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * Copyright (C) 2000 Internet Software Consortium.
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * Permission to use, copy, modify, and distribute this software for any
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * purpose with or without fee is hereby granted, provided that the above
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * copyright notice and this permission notice appear in all copies.
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
48019314431389cca5f8eba7ee9aa5bc08a67f4eMark Andrews/* $Id: dig.c,v 1.63 2000/07/13 18:52:55 mws Exp $ */
#define ADD_STRING(b, s) { \
return (ISC_R_NOSPACE); \
isc_buffer_putstr(b, s); \
extern unsigned int timeout;
extern int sendcount;
extern int ndots;
extern int tries;
extern int lookup_counter;
extern int exitcode;
static const char *opcodetext[] = {
static const char *rcodetext[] = {
extern char *progname;
show_usage(void) {
, stderr);
dighost_shutdown(void) {
free_lists();
if (!validated)
static isc_result_t
return (result);
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_SUCCESS);
return (result);
buf);
return (result);
return (ISC_R_SUCCESS);
exitcode = 0;
flags = 0;
if (!headers) {
if (headers) {
if (!short_form) {
goto question_again;
if (!short_form) {
goto answer_again;
if (!short_form) {
goto authority_again;
if (!short_form) {
goto additional_again;
if (headers) {
msg,
msg,
return (result);
if (printcmd) {
while (i < argc) {
char *ptr;
int end;
end--;
if (end == 0)
end--;
int bargc;
int rc;
char **rv;
char *ptr;
if (!is_batchfile)
sizeof(struct dig_server));
&& (!is_batchfile)) {
&& (!is_batchfile)) {
&& (!is_batchfile)) {
&& (!is_batchfile)) {
if (timeout <= 0)
if (timeout <= 0)
if (ndots < 0)
ndots = 0;
if (!forcecomment)
if (!forcecomment) {
if (!forcecomment) {
MXRD);
MXRD);
rv++;
rc--;
MXRD);
MXRD);
rv++;
rc--;
rv++;
rc--;
rv++;
rc--;
show_usage();
show_usage();
rv++;
rc--;
MXRD);
MXRD);
rv++;
rc--;
show_usage();
show_usage();
show_usage();
adrs[i]);
rv++;
rc--;
if (have_host) {
MXRD);
bargc++;
if (!is_batchfile)
setup_libs();
setup_system();
isc_app_run();
if (isc_mem_debugging)
return (exitcode);