named-rrchecker.c revision aec8a3b7cff6a144bfd9d1b72415dd644a0bd828
/*
* Copyright (C) 2013, 2015 Internet Systems Consortium, Inc. ("ISC")
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#include <stdlib.h>
#include <isc/commandline.h>
#include <dns/fixedname.h>
#include <dns/rdataclass.h>
#include <dns/rdatatype.h>
static isc_lexspecials_t specials;
static void
usage(void) {
}
int
int c;
unsigned int options = 0;
unsigned int t;
switch (c) {
case '?':
case 'h':
if (isc_commandline_option != '?' &&
isc_commandline_option != 'h')
argv[0], isc_commandline_option);
usage();
exit(1);
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;
}
}
if (doexit)
exit(0);
/*
* Set up to lex DNS master file.
*/
if (result != ISC_R_SUCCESS) {
exit(1);
}
}
&token)) == ISC_R_SUCCESS) {
break;
continue;
if (once) {
exit(1);
}
/*
* Get class.
*/
exit(1);
}
if (dns_rdataclass_ismeta(rdclass)) {
exit(1);
}
if (result != ISC_R_SUCCESS) {
exit(1);
}
if (dns_rdataclass_ismeta(rdclass)) {
"class %.*s(%d) is a meta value\n",
exit(1);
}
} else {
exit(1);
}
&token);
if (result != ISC_R_SUCCESS)
break;
continue;
break;
/*
* Get type.
*/
exit(1);
}
if (dns_rdatatype_ismeta(rdtype)) {
exit(1);
}
if (result != ISC_R_SUCCESS) {
exit(1);
}
if (dns_rdatatype_ismeta(rdtype)) {
"type %.*s(%d) is a meta value\n",
exit(1);
}
} else {
exit(1);
}
if (result != ISC_R_SUCCESS) {
exit(1);
}
}
exit(1);
}
if (!once) {
exit(1);
}
if (print) {
if (result != ISC_R_SUCCESS) {
exit(1);
}
if (result != ISC_R_SUCCESS) {
exit(1);
}
if (result != ISC_R_SUCCESS)
else
}
if (unknown) {
unsigned int i;
}
}
return (0);
}