abea1710a775ace753c688722d09a2c7e6ab1e8dMark Andrews * Copyright (C) 2000-2017 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * License, v. 2.0. If a copy of the MPL was not distributed with this
abea1710a775ace753c688722d09a2c7e6ab1e8dMark Andrews * file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
return (ISC_R_NOSPACE); \
isc_buffer_putstr(b, s); \
isc_buffer_t b;
return(buf);
ISC_PLATFORM_NORETURN_PRE static void
#ifdef DIG_SIGCHASE
#ifdef DIG_SIGCHASE
stdout);
* Callback from dighost.c to print the received message.
#ifdef WIN32
if (use_usec)
#ifdef WIN32
if (!validated)
if (use_usec)
* Callback from dighost.c to print that it is trying a server.
static isc_result_t
return (result);
if (rrcomments > 0)
if (nocrypto)
return (result);
if (use_usec)
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_SUCCESS);
return (result);
buf);
return (result);
return (result);
return (ISC_R_SUCCESS);
#ifdef DIG_SIGCHASE
static isc_result_t
return(ISC_FALSE);
if (ttlunits)
if (nottl)
if (noclass)
if (nocrypto)
if (rrcomments > 0)
if (multiline) {
if (rrcomments >= 0)
return(result);
static isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
* Callback from dighost.c to print the reply from a server
static isc_result_t
if (rrcomments > 0)
if (ttlunits)
if (nottl)
if (noclass)
if (nocrypto)
if (multiline) {
if (rrcomments >= 0)
if (!short_form)
flags = 0;
if (!headers) {
if (headers) {
goto repopulate_buffer;
goto cleanup;
if (!short_form) {
goto buftoosmall;
if (!short_form) {
goto buftoosmall;
goto buftoosmall;
if (!short_form) {
goto buftoosmall;
if (!short_form) {
goto buftoosmall;
if (headers) {
msg,
goto buftoosmall;
msg,
goto buftoosmall;
return (result);
if (printcmd) {
while (i < argc) {
if (first) {
size_t n;
goto invalid_option; \
goto invalid_option; \
switch (cmd[0]) {
goto invalid_option;
goto invalid_option;
goto need_value;
if (!state)
goto invalid_option;
goto invalid_option;
goto invalid_option;
sizeof(hexcookie));
if (n >= sizeof(hexcookie))
goto invalid_option;
goto invalid_option;
goto need_value;
if (!state)
goto invalid_option;
if (!state) {
goto need_value;
goto invalid_option;
if (!state) {
if (!state) {
if (!state) {
goto invalid_option;
goto invalid_option;
goto invalid_option;
goto invalid_option;
#ifndef WITH_IDN
goto invalid_option;
goto invalid_option;
goto need_value;
if (!state)
goto invalid_option;
if (state) {
rrcomments = 0;
goto invalid_option;
goto invalid_option;
if (!state) {
goto need_value;
for (num = 0;
num++) {
goto invalid_option;
goto invalid_option;
goto need_value;
if (!state)
goto invalid_option;
goto invalid_option;
goto invalid_option;
goto invalid_option;
if (state) {
goto invalid_option;
#ifdef DIG_SIGCHASE
goto invalid_option;
if (!state) {
splitwidth = 0;
if (splitwidth)
goto need_value;
if (!state) {
goto invalid_option;
if (!is_batchfile) {
goto need_value;
if (!state)
goto invalid_option;
if (timeout == 0)
#if DIG_SIGCHASE_TD
if (state) {
rrcomments = 0;
goto need_value;
if (!state)
goto invalid_option;
#ifdef DIG_SIGCHASE
goto need_value;
if (!state)
goto invalid_option;
sizeof(trustedkey));
if (n >= sizeof(trustedkey))
goto invalid_option;
goto invalid_option;
goto invalid_option;
goto invalid_option;
if (!is_batchfile) {
option);
usage();
static isc_boolean_t
switch (opt) {
if (have_ipv4) {
return (ISC_FALSE);
if (have_ipv6) {
return (ISC_FALSE);
return (ISC_FALSE);
help();
exit(0);
version();
exit(0);
return (ISC_FALSE);
goto invalid_option;
switch (opt) {
srcport = 0;
return (value_from_next);
value);
return (value_from_next);
return (value_from_next);
return (value_from_next);
return (value_from_next);
if (!config_only) {
if (*need_clone)
ISC_TRUE);
if (*firstarg) {
return (value_from_next);
if (!config_only)
value);
return (value_from_next);
usage();
usage();
#ifndef PK11_MD5_DISABLE
digestbits = 0;
return (value_from_next);
if (*need_clone)
if (*firstarg) {
return (value_from_next);
usage();
return (ISC_FALSE);
switch (option[0]) {
if (ipv6only)
if (ipv4only)
#ifndef NOPOSIX
if (!is_batchfile) {
#ifndef NOPOSIX
homedir);
if (n < sizeof(rcfile))
batchfp) != 0) {
bargc++;
for(i = 0; i < bargc; i++)
i, bargv[i]);
(char **)bargv);
&result);
if (addresscount == 0) {
NULL);
if (addresscount == 0)
lookup);
rc--;
rv++;
rc--;
rv++;
if (open_type_class) {
if (rdtype ==
if (rdtype ==
if (!config_only) {
if (need_clone)
ISC_TRUE);
if (firstarg) {
goto next_line;
bargc++;
for(i = 0; i < bargc; i++)
if (need_clone)
if (firstarg) {
if (!need_clone)
* Callback from dighost.c to allow program-specific shutdown code.
bargc++;
for(i = 0; i < bargc; i++)
start_lookup();
#ifdef DIG_SIGCHASE
setup_libs();
if (keyfile[0] != 0)
else if (keysecret[0] != 0)
isc_app_run();
start_lookup();
#ifdef DIG_SIGCHASE
cancel_all();
destroy_libs();
dig_startup();
dig_shutdown();
return (exitcode);