/*
* Copyright (C) 2013, 2015-2017 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <config.h>
#include <stdlib.h>
#include <isc/commandline.h>
#include <dns/fixedname.h>
#include <dns/rdataclass.h>
#include <dns/rdatatype.h>
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void
usage(void) {
"interpeting the record\n");
exit(0);
}
ISC_PLATFORM_NORETURN_PRE static void
static void
exit(1);
}
int
int c;
unsigned int options = 0;
unsigned int t;
switch (c) {
case 'o':
break;
case 'p':
break;
case 'u':
break;
case 'C':
for (t = 1; t <= 0xfeffu; t++) {
if (dns_rdataclass_ismeta(t))
continue;
}
exit(0);
case 'P':
for (t = 0xff00; t <= 0xfffeu; t++) {
if (dns_rdatatype_ismeta(t))
continue;
}
break;
case 'T':
for (t = 1; t <= 0xfeffu; t++) {
if (dns_rdatatype_ismeta(t))
continue;
}
break;
case '?':
case 'h':
/* Does not return. */
usage();
default:
argv[0], isc_commandline_option);
exit(1);
}
}
if (doexit)
exit(0);
/*
* Set up to lex DNS master file.
*/
if (result != ISC_R_SUCCESS) {
fatal("dns_name_fromstring: %s",
}
}
&token)) == ISC_R_SUCCESS) {
break;
continue;
if (once) {
fatal("extra data");
}
/*
* Get class.
*/
fatal("class value too big %lu",
}
if (dns_rdataclass_ismeta(rdclass)) {
fatal("class %lu is a meta value",
}
if (result != ISC_R_SUCCESS) {
fatal("dns_rdataclass_fromtext: %s",
}
if (dns_rdataclass_ismeta(rdclass)) {
fatal("class %.*s(%d) is a meta value",
}
} else {
}
&token);
if (result != ISC_R_SUCCESS)
break;
continue;
break;
/*
* Get type.
*/
fatal("type value too big %lu",
}
if (dns_rdatatype_ismeta(rdtype)) {
fatal("type %lu is a meta value",
}
if (result != ISC_R_SUCCESS) {
fatal("dns_rdatatype_fromtext: %s",
}
if (dns_rdatatype_ismeta(rdtype)) {
fatal("type %.*s(%d) is a meta value",
}
} else {
}
if (result != ISC_R_SUCCESS) {
fatal("dns_rdata_fromtext: %s",
}
}
fatal("eof not found");
}
if (!once) {
fatal("no records found");
}
if (print) {
if (result != ISC_R_SUCCESS) {
fatal("dns_rdataclass_totext: %s",
}
if (result != ISC_R_SUCCESS) {
fatal("dns_rdatatype_totext: %s",
}
if (result != ISC_R_SUCCESS) {
fatal("dns_rdata_totext: %s",
}
}
if (unknown) {
if (result != ISC_R_SUCCESS) {
fatal("dns_rdataclass_tounknowntext: %s",
}
if (result != ISC_R_SUCCESS) {
fatal("dns_rdatatype_tounknowntext: %s",
}
0, 0, "", &tbuf);
if (result != ISC_R_SUCCESS) {
fatal("dns_rdata_tofmttext: %sn",
}
}
return (0);
}