nsprobe.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * Copyright (C) 2009-2016 Internet Systems Consortium, Inc. ("ISC")
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * This Source Code Form is subject to the terms of the Mozilla Public
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * License, v. 2.0. If a copy of the MPL was not distributed with this
96e08422d46465ebd7105bf48e475f77e60250d7wrowe * file, You can obtain one at http://mozilla.org/MPL/2.0/.
4772145ced1391b7fc8aee0df304982815aab6ebwrowestatic unsigned int outstanding_probes = 0;
96e08422d46465ebd7105bf48e475f77e60250d7wrowetypedef enum {
96e08422d46465ebd7105bf48e475f77e60250d7wrowe const char **qlabel;
96e08422d46465ebd7105bf48e475f77e60250d7wrowe /* NS list */
96e08422d46465ebd7105bf48e475f77e60250d7wrowe unsigned long valid;
96e08422d46465ebd7105bf48e475f77e60250d7wrowe unsigned long ignore;
96e08422d46465ebd7105bf48e475f77e60250d7wrowe unsigned long nxdomain;
96e08422d46465ebd7105bf48e475f77e60250d7wrowe unsigned long othererr;
96e08422d46465ebd7105bf48e475f77e60250d7wrowe unsigned long multiplesoa;
96e08422d46465ebd7105bf48e475f77e60250d7wrowe unsigned long multiplecname;
96e08422d46465ebd7105bf48e475f77e60250d7wrowe unsigned long brokenanswer;
96e08422d46465ebd7105bf48e475f77e60250d7wrowe unsigned long lame;
96e08422d46465ebd7105bf48e475f77e60250d7wrowe unsigned long unknown;
96e08422d46465ebd7105bf48e475f77e60250d7wrowestatic unsigned long number_of_domains = 0;
96e08422d46465ebd7105bf48e475f77e60250d7wrowestatic unsigned long number_of_servers = 0;
96e08422d46465ebd7105bf48e475f77e60250d7wrowestatic unsigned long multiple_error_domains = 0;
96e08422d46465ebd7105bf48e475f77e60250d7wrowestatic int verbose_level = 0;
static isc_result_t
isc_region_t r;
if (!debug_mode)
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
&target);
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
isc_region_t r;
return (result);
static isc_result_t
return (ISC_R_SUCCESS);
static isc_result_t
goto fail;
goto fail;
goto fail;
goto fail;
goto fail;
return (ISC_R_SUCCESS);
fail:
return (result);
static isc_result_t
goto cleanup;
goto cleanup;
return (ISC_R_SUCCESS);
return (result);
(*entryp)++;
unsigned int err_count = 0;
const char *stattype;
case exist:
case notype:
case timedout:
case nxdomain:
case othererr:
case multiplesoa:
case multiplecname:
case brokenanswer:
case lame:
stattype);
if (verbose_level > 0)
err_count++;
if (verbose_level > 0)
err_count++;
if (verbose_level > 0)
err_count++;
if (verbose_level > 0)
err_count++;
if (verbose_level > 0)
err_count++;
if (verbose_level > 0)
err_count++;
if (verbose_level > 0)
err_count++;
static isc_result_t
unsigned int domainlen;
isc_buffer_t b;
return (ISC_R_NOMORE);
return (result);
return (result);
0, NULL);
return (result);
&name);
link)) {
goto found;
goto found;
&name);
link)) {
goto found;
&name);
link)) {
goto found;
link)) {
none);
static isc_result_t
goto found;
return (ISC_R_NOMORE);
return (result);
return (result);
NULL);
goto cleanup;
static isc_result_t
goto cleanup;
static isc_result_t
unsigned int domainlen;
isc_buffer_t b;
char *cp;
return (ISC_R_NOMORE);
return (ISC_R_NOMEMORY);
goto cleanup;
goto cleanup;
return (ISC_R_SUCCESS);
return (result);
ISC_PLATFORM_NORETURN_PRE static void
usage(void) {
switch (ch) {
usage();
usage();
&timermgr);
if (error != 0) {
&servers);
if (argc == 0)
argv[0]);
for (i = 0; i < MAX_PROBES; i++) {
for (i = 0; i < MAX_PROBES; i++) {
for (i = 0; i < MAX_PROBES; i++) {