diff options
96 files changed, 67 insertions, 3883 deletions
diff --git a/usr.bin/dig/dighost.c b/usr.bin/dig/dighost.c index ebe7a8f32fb..dcfe6cc1d1b 100644 --- a/usr.bin/dig/dighost.c +++ b/usr.bin/dig/dighost.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dighost.c,v 1.15 2020/02/23 08:55:43 florian Exp $ */ +/* $Id: dighost.c,v 1.16 2020/02/23 19:54:25 jung Exp $ */ /*! \file * \note @@ -169,7 +169,6 @@ dns_tsigkey_t *tsigkey = NULL; isc_boolean_t validated = ISC_TRUE; isc_boolean_t debugging = ISC_FALSE; isc_boolean_t debugtiming = ISC_FALSE; -isc_boolean_t memdebugging = ISC_FALSE; char *progname = NULL; dig_lookup_t *current_lookup = NULL; @@ -3908,8 +3907,6 @@ destroy_libs(void) { clear_searchlist(); - dns_name_destroy(); - if (socketmgr != NULL) { debug("freeing socketmgr"); isc_socketmgr_destroy(&socketmgr); diff --git a/usr.bin/dig/lib/dns/dns_result.c b/usr.bin/dig/lib/dns/dns_result.c index 21b5659613d..7d8d46982a7 100644 --- a/usr.bin/dig/lib/dns/dns_result.c +++ b/usr.bin/dig/lib/dns/dns_result.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dns_result.c,v 1.3 2020/02/12 13:05:03 jsg Exp $ */ +/* $Id: dns_result.c,v 1.4 2020/02/23 19:54:25 jung Exp $ */ /*! \file */ #include <isc/util.h> @@ -221,13 +221,6 @@ initialize(void) { } } -const char * -dns_result_totext(isc_result_t result) { - initialize(); - - return (isc_result_totext(result)); -} - void dns_result_register(void) { initialize(); diff --git a/usr.bin/dig/lib/dns/dns_time.c b/usr.bin/dig/lib/dns/dns_time.c index 5e2bb540d39..3f42911fd95 100644 --- a/usr.bin/dig/lib/dns/dns_time.c +++ b/usr.bin/dig/lib/dns/dns_time.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dns_time.c,v 1.4 2020/02/16 21:12:41 florian Exp $ */ +/* $Id: dns_time.c,v 1.5 2020/02/23 19:54:25 jung Exp $ */ /*! \file */ @@ -123,75 +123,3 @@ isc_result_t dns_time32_totext(uint32_t value, isc_buffer_t *target) { return (dns_time64_totext(dns_time64_from32(value), target)); } - -isc_result_t -dns_time64_fromtext(const char *source, int64_t *target) { - int year, month, day, hour, minute, second; - int64_t value; - int secs; - int i; - -#define RANGE(min, max, value) \ - do { \ - if (value < (min) || value > (max)) \ - return (ISC_R_RANGE); \ - } while (0) - - if (strlen(source) != 14U) - return (DNS_R_SYNTAX); - /* - * Confirm the source only consists digits. sscanf() allows some - * minor exceptions. - */ - for (i = 0; i < 14; i++) { - if (!isdigit((unsigned char)source[i])) - return (DNS_R_SYNTAX); - } - if (sscanf(source, "%4d%2d%2d%2d%2d%2d", - &year, &month, &day, &hour, &minute, &second) != 6) - return (DNS_R_SYNTAX); - - RANGE(0, 9999, year); - RANGE(1, 12, month); - RANGE(1, days[month - 1] + - ((month == 2 && is_leap(year)) ? 1 : 0), day); - RANGE(0, 23, hour); - RANGE(0, 59, minute); - RANGE(0, 60, second); /* 60 == leap second. */ - - /* - * Calculate seconds from epoch. - * Note: this uses a idealized calendar. - */ - value = second + (60 * minute) + (3600 * hour) + ((day - 1) * 86400); - for (i = 0; i < (month - 1); i++) - value += days[i] * 86400; - if (is_leap(year) && month > 2) - value += 86400; - if (year < 1970) { - for (i = 1969; i >= year; i--) { - secs = (is_leap(i) ? 366 : 365) * 86400; - value -= secs; - } - } else { - for (i = 1970; i < year; i++) { - secs = (is_leap(i) ? 366 : 365) * 86400; - value += secs; - } - } - - *target = value; - return (ISC_R_SUCCESS); -} - -isc_result_t -dns_time32_fromtext(const char *source, uint32_t *target) { - int64_t value64; - isc_result_t result; - result = dns_time64_fromtext(source, &value64); - if (result != ISC_R_SUCCESS) - return (result); - *target = (uint32_t)value64; - - return (ISC_R_SUCCESS); -} diff --git a/usr.bin/dig/lib/dns/gen.c b/usr.bin/dig/lib/dns/gen.c index 74e8b612c53..3bf0813e465 100644 --- a/usr.bin/dig/lib/dns/gen.c +++ b/usr.bin/dig/lib/dns/gen.c @@ -69,26 +69,12 @@ #define COMPARETYPE "rdata1->type" #define COMPAREDEF "use_default = ISC_TRUE" -#define ADDITIONALDATAARGS "rdata, add, arg" -#define ADDITIONALDATACLASS "rdata->rdclass" -#define ADDITIONALDATATYPE "rdata->type" -#define ADDITIONALDATADEF "use_default = ISC_TRUE" - -#define DIGESTARGS "rdata, digest, arg" -#define DIGESTCLASS "rdata->rdclass" -#define DIGESTTYPE "rdata->type" -#define DIGESTDEF "use_default = ISC_TRUE" #define CHECKOWNERARGS "name, rdclass, type, wildcard" #define CHECKOWNERCLASS "rdclass" #define CHECKOWNERTYPE "type" #define CHECKOWNERDEF "result = ISC_TRUE" -#define CHECKNAMESARGS "rdata, owner, bad" -#define CHECKNAMESCLASS "rdata->rdclass" -#define CHECKNAMESTYPE "rdata->type" -#define CHECKNAMESDEF "result = ISC_TRUE" - static const char copyright[] = "/*\n" " * Copyright (C) 2004%s Internet Systems Consortium, Inc. (\"ISC\")\n" @@ -656,18 +642,9 @@ main(int argc, char **argv) { TOSTRUCTTYPE, TOSTRUCTCLASS, TOSTRUCTDEF); doswitch("FREESTRUCTSWITCH", "freestruct", FREESTRUCTARGS, FREESTRUCTTYPE, FREESTRUCTCLASS, FREESTRUCTDEF); - doswitch("ADDITIONALDATASWITCH", "additionaldata", - ADDITIONALDATAARGS, ADDITIONALDATATYPE, - ADDITIONALDATACLASS, ADDITIONALDATADEF); - doswitch("DIGESTSWITCH", "digest", - DIGESTARGS, DIGESTTYPE, - DIGESTCLASS, DIGESTDEF); doswitch("CHECKOWNERSWITCH", "checkowner", CHECKOWNERARGS, CHECKOWNERTYPE, CHECKOWNERCLASS, CHECKOWNERDEF); - doswitch("CHECKNAMESSWITCH", "checknames", - CHECKNAMESARGS, CHECKNAMESTYPE, - CHECKNAMESCLASS, CHECKNAMESDEF); /* * From here down, we are processing the rdata names and diff --git a/usr.bin/dig/lib/dns/include/dns/cert.h b/usr.bin/dig/lib/dns/include/dns/cert.h index 2fe9b0ee86c..2bddd99238b 100644 --- a/usr.bin/dig/lib/dns/include/dns/cert.h +++ b/usr.bin/dig/lib/dns/include/dns/cert.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: cert.h,v 1.2 2020/02/13 13:53:00 jsg Exp $ */ +/* $Id: cert.h,v 1.3 2020/02/23 19:54:25 jung Exp $ */ #ifndef DNS_CERT_H #define DNS_CERT_H 1 @@ -24,23 +24,6 @@ #include <dns/types.h> isc_result_t -dns_cert_fromtext(dns_cert_t *certp, isc_textregion_t *source); -/*%< - * Convert the text 'source' refers to into a certificate type. - * The text may contain either a mnemonic type name or a decimal type number. - * - * Requires: - *\li 'certp' is a valid pointer. - * - *\li 'source' is a valid text region. - * - * Returns: - *\li #ISC_R_SUCCESS on success - *\li #ISC_R_RANGE numeric type is out of range - *\li #DNS_R_UNKNOWN mnemonic type is unknown - */ - -isc_result_t dns_cert_totext(dns_cert_t cert, isc_buffer_t *target); /*%< * Put a textual representation of certificate type 'cert' into 'target'. diff --git a/usr.bin/dig/lib/dns/include/dns/keyflags.h b/usr.bin/dig/lib/dns/include/dns/keyflags.h deleted file mode 100644 index aeaef13769b..00000000000 --- a/usr.bin/dig/lib/dns/include/dns/keyflags.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * Permission to use, copy, modify, and/or distribute this software for any - * 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. - */ - -/* $Id: keyflags.h,v 1.2 2020/02/13 13:53:00 jsg Exp $ */ - -#ifndef DNS_KEYFLAGS_H -#define DNS_KEYFLAGS_H 1 - -/*! \file dns/keyflags.h */ - -#include <dns/types.h> - -isc_result_t -dns_keyflags_fromtext(dns_keyflags_t *flagsp, isc_textregion_t *source); -/*%< - * Convert the text 'source' refers to into a DNSSEC KEY flags value. - * The text may contain either a set of flag mnemonics separated by - * vertical bars or a decimal flags value. For compatibility with - * older versions of BIND and the DNSSEC signer, octal values - * prefixed with a zero and hexadecimal values prefixed with "0x" - * are also accepted. - * - * Requires: - *\li 'flagsp' is a valid pointer. - * - *\li 'source' is a valid text region. - * - * Returns: - *\li ISC_R_SUCCESS on success - *\li ISC_R_RANGE numeric flag value is out of range - *\li DNS_R_UNKNOWN mnemonic flag is unknown - */ - -#endif /* DNS_KEYFLAGS_H */ diff --git a/usr.bin/dig/lib/dns/include/dns/masterdump.h b/usr.bin/dig/lib/dns/include/dns/masterdump.h index ec2d160698b..b2c273ce2ea 100644 --- a/usr.bin/dig/lib/dns/include/dns/masterdump.h +++ b/usr.bin/dig/lib/dns/include/dns/masterdump.h @@ -138,12 +138,6 @@ dns_master_questiontotext(dns_name_t *owner_name, isc_buffer_t *target); isc_result_t -dns_master_stylecreate(dns_master_style_t **style, unsigned int flags, - unsigned int ttl_column, unsigned int class_column, - unsigned int type_column, unsigned int rdata_column, - unsigned int line_length, unsigned int tab_width); - -isc_result_t dns_master_stylecreate2(dns_master_style_t **style, unsigned int flags, unsigned int ttl_column, unsigned int class_column, unsigned int type_column, unsigned int rdata_column, diff --git a/usr.bin/dig/lib/dns/include/dns/name.h b/usr.bin/dig/lib/dns/include/dns/name.h index 43136f1f2f4..ffa3f8fc572 100644 --- a/usr.bin/dig/lib/dns/include/dns/name.h +++ b/usr.bin/dig/lib/dns/include/dns/name.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: name.h,v 1.6 2020/02/18 18:11:27 florian Exp $ */ +/* $Id: name.h,v 1.7 2020/02/23 19:54:25 jung Exp $ */ #ifndef DNS_NAME_H #define DNS_NAME_H 1 @@ -919,33 +919,6 @@ dns_name_free(dns_name_t *name); * invalidated. */ -isc_result_t -dns_name_digest(dns_name_t *name, dns_digestfunc_t digest, void *arg); -/*%< - * Send 'name' in DNSSEC canonical form to 'digest'. - * - * Requires: - * - *\li 'name' is a valid name. - * - *\li 'digest' is a valid dns_digestfunc_t. - * - * Ensures: - * - *\li If successful, the DNSSEC canonical form of 'name' will have been - * sent to 'digest'. - * - *\li If digest() returns something other than ISC_R_SUCCESS, that result - * will be returned as the result of dns_name_digest(). - * - * Returns: - * - *\li #ISC_R_SUCCESS - * - *\li Many other results are possible if not successful. - * - */ - isc_boolean_t dns_name_dynamic(dns_name_t *name); /*%< @@ -986,8 +959,6 @@ dns_name_format(dns_name_t *name, char *cp, unsigned int size); */ isc_result_t -dns_name_fromstring(dns_name_t *target, const char *src, unsigned int options); -isc_result_t dns_name_fromstring2(dns_name_t *target, const char *src, const dns_name_t *origin, unsigned int options); /*%< @@ -1012,22 +983,6 @@ dns_name_fromstring2(dns_name_t *target, const char *src, *\li Any error that dns_name_dup() can return. */ -isc_result_t -dns_name_settotextfilter(dns_name_totextfilter_t proc); -/*%< - * Set / clear a thread specific function 'proc' to be called at the - * end of dns_name_totext(). - * - * Note: Under Windows you need to call "dns_name_settotextfilter(NULL);" - * prior to exiting the thread otherwise memory will be leaked. - * For other platforms, which are pthreads based, this is still a good - * idea but not required. - * - * Returns - *\li #ISC_R_SUCCESS - *\li #ISC_R_UNEXPECTED - */ - #define DNS_NAME_FORMATSIZE (DNS_NAME_MAXTEXT + 1) /*%< * Suggested size of buffer passed to dns_name_format(). @@ -1080,24 +1035,6 @@ dns_name_ismailbox(const dns_name_t *name); * \li 'name' to be valid. */ -void -dns_name_destroy(void); -/*%< - * Cleanup dns_name_settotextfilter() / dns_name_totext() state. - * - * This should be called as part of the final cleanup process. - * - * Note: dns_name_settotextfilter(NULL); should be called for all - * threads which have called dns_name_settotextfilter() with a - * non-NULL argument prior to calling dns_name_destroy(); - */ - -isc_boolean_t -dns_name_isdnssd(const dns_name_t *owner); -/*%< - * Determine if the 'owner' is a DNS-SD prefix. - */ - #define DNS_NAME_INITABSOLUTE(A,B) { \ A, sizeof(A), sizeof(B), \ DNS_NAMEATTR_READONLY | DNS_NAMEATTR_ABSOLUTE, \ diff --git a/usr.bin/dig/lib/dns/include/dns/rcode.h b/usr.bin/dig/lib/dns/include/dns/rcode.h index 55a108c4ed1..e42d2915675 100644 --- a/usr.bin/dig/lib/dns/include/dns/rcode.h +++ b/usr.bin/dig/lib/dns/include/dns/rcode.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rcode.h,v 1.3 2020/02/13 13:53:01 jsg Exp $ */ +/* $Id: rcode.h,v 1.4 2020/02/23 19:54:25 jung Exp $ */ #ifndef DNS_RCODE_H #define DNS_RCODE_H 1 @@ -23,21 +23,6 @@ #include <dns/types.h> -isc_result_t dns_tsigrcode_fromtext(dns_rcode_t *rcodep, - isc_textregion_t *source); -/*%< - * Convert the text 'source' refers to into a TSIG/TKEY error value. - * - * Requires: - *\li 'rcodep' is a valid pointer. - * - *\li 'source' is a valid text region. - * - * Returns: - *\li #ISC_R_SUCCESS on success - *\li #DNS_R_UNKNOWN type is unknown - */ - isc_result_t dns_tsigrcode_totext(dns_rcode_t rcode, isc_buffer_t *target); /*%< * Put a textual representation of TSIG/TKEY error 'rcode' into 'target'. @@ -56,19 +41,4 @@ isc_result_t dns_tsigrcode_totext(dns_rcode_t rcode, isc_buffer_t *target); *\li #ISC_R_NOSPACE target buffer is too small */ -isc_result_t -dns_hashalg_fromtext(unsigned char *hashalg, isc_textregion_t *source); -/*%< - * Convert the text 'source' refers to into a has algorithm value. - * - * Requires: - *\li 'hashalg' is a valid pointer. - * - *\li 'source' is a valid text region. - * - * Returns: - *\li #ISC_R_SUCCESS on success - *\li #DNS_R_UNKNOWN type is unknown - */ - #endif /* DNS_RCODE_H */ diff --git a/usr.bin/dig/lib/dns/include/dns/result.h b/usr.bin/dig/lib/dns/include/dns/result.h index 93c4fc4f862..ba56c4ff782 100644 --- a/usr.bin/dig/lib/dns/include/dns/result.h +++ b/usr.bin/dig/lib/dns/include/dns/result.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.h,v 1.3 2020/02/13 13:53:01 jsg Exp $ */ +/* $Id: result.h,v 1.4 2020/02/23 19:54:25 jung Exp $ */ #ifndef DNS_RESULT_H #define DNS_RESULT_H 1 @@ -186,9 +186,6 @@ #define DNS_RESULT_ISRCODE(result) \ (ISC_RESULTCLASS_INCLASS(ISC_RESULTCLASS_DNSRCODE, (result))) -const char * -dns_result_totext(isc_result_t); - void dns_result_register(void); diff --git a/usr.bin/dig/lib/dns/include/dns/secalg.h b/usr.bin/dig/lib/dns/include/dns/secalg.h index 8b519101c3b..683ba8fd46d 100644 --- a/usr.bin/dig/lib/dns/include/dns/secalg.h +++ b/usr.bin/dig/lib/dns/include/dns/secalg.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: secalg.h,v 1.2 2020/02/13 13:53:01 jsg Exp $ */ +/* $Id: secalg.h,v 1.3 2020/02/23 19:54:25 jung Exp $ */ #ifndef DNS_SECALG_H #define DNS_SECALG_H 1 @@ -24,24 +24,6 @@ #include <dns/types.h> isc_result_t -dns_secalg_fromtext(dns_secalg_t *secalgp, isc_textregion_t *source); -/*%< - * Convert the text 'source' refers to into a DNSSEC security algorithm value. - * The text may contain either a mnemonic algorithm name or a decimal algorithm - * number. - * - * Requires: - *\li 'secalgp' is a valid pointer. - * - *\li 'source' is a valid text region. - * - * Returns: - *\li ISC_R_SUCCESS on success - *\li ISC_R_RANGE numeric type is out of range - *\li DNS_R_UNKNOWN mnemonic type is unknown - */ - -isc_result_t dns_secalg_totext(dns_secalg_t secalg, isc_buffer_t *target); /*%< * Put a textual representation of the DNSSEC security algorithm 'secalg' diff --git a/usr.bin/dig/lib/dns/include/dns/secproto.h b/usr.bin/dig/lib/dns/include/dns/secproto.h deleted file mode 100644 index a7a4e02bc2d..00000000000 --- a/usr.bin/dig/lib/dns/include/dns/secproto.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * Permission to use, copy, modify, and/or distribute this software for any - * 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. - */ - -/* $Id: secproto.h,v 1.3 2020/02/13 13:53:01 jsg Exp $ */ - -#ifndef DNS_SECPROTO_H -#define DNS_SECPROTO_H 1 - -/*! \file dns/secproto.h */ - -#include <dns/types.h> - -isc_result_t -dns_secproto_fromtext(dns_secproto_t *secprotop, isc_textregion_t *source); -/*%< - * Convert the text 'source' refers to into a DNSSEC security protocol value. - * The text may contain either a mnemonic protocol name or a decimal protocol - * number. - * - * Requires: - *\li 'secprotop' is a valid pointer. - * - *\li 'source' is a valid text region. - * - * Returns: - *\li ISC_R_SUCCESS on success - *\li ISC_R_RANGE numeric type is out of range - *\li DNS_R_UNKNOWN mnemonic type is unknown - */ - -#endif /* DNS_SECPROTO_H */ diff --git a/usr.bin/dig/lib/dns/include/dns/time.h b/usr.bin/dig/lib/dns/include/dns/time.h index 055af3914ca..c44ae79db54 100644 --- a/usr.bin/dig/lib/dns/include/dns/time.h +++ b/usr.bin/dig/lib/dns/include/dns/time.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.h,v 1.2 2020/02/13 13:53:01 jsg Exp $ */ +/* $Id: time.h,v 1.3 2020/02/23 19:54:26 jung Exp $ */ #ifndef DNS_TIME_H #define DNS_TIME_H 1 @@ -32,22 +32,6 @@ ***/ isc_result_t -dns_time64_fromtext(const char *source, int64_t *target); -/*%< - * Convert a date and time in YYYYMMDDHHMMSS text format at 'source' - * into to a 64-bit count of seconds since Jan 1 1970 0:00 GMT. - * Store the count at 'target'. - */ - -isc_result_t -dns_time32_fromtext(const char *source, uint32_t *target); -/*%< - * Like dns_time64_fromtext, but returns the second count modulo 2^32 - * as per RFC2535. - */ - - -isc_result_t dns_time64_totext(int64_t value, isc_buffer_t *target); /*%< * Convert a 64-bit count of seconds since Jan 1 1970 0:00 GMT into diff --git a/usr.bin/dig/lib/dns/include/dns/types.h b/usr.bin/dig/lib/dns/include/dns/types.h index 24877b3fb4a..34cbd49e8e8 100644 --- a/usr.bin/dig/lib/dns/include/dns/types.h +++ b/usr.bin/dig/lib/dns/include/dns/types.h @@ -201,12 +201,6 @@ enum { /* * Functions. */ -typedef isc_result_t -(*dns_additionaldatafunc_t)(void *, dns_name_t *, dns_rdatatype_t); - -typedef isc_result_t -(*dns_digestfunc_t)(void *, isc_region_t *); - typedef int (*dns_rdatasetorderfunc_t)(const dns_rdata_t *, const void *); diff --git a/usr.bin/dig/lib/dns/masterdump.c b/usr.bin/dig/lib/dns/masterdump.c index f1bf14e3b62..d0b637d3bad 100644 --- a/usr.bin/dig/lib/dns/masterdump.c +++ b/usr.bin/dig/lib/dns/masterdump.c @@ -552,18 +552,6 @@ dns_master_questiontotext(dns_name_t *owner_name, } isc_result_t -dns_master_stylecreate(dns_master_style_t **stylep, unsigned int flags, - unsigned int ttl_column, unsigned int class_column, - unsigned int type_column, unsigned int rdata_column, - unsigned int line_length, unsigned int tab_width) -{ - return (dns_master_stylecreate2(stylep, flags, ttl_column, - class_column, type_column, - rdata_column, line_length, - tab_width, 0xffffffff)); -} - -isc_result_t dns_master_stylecreate2(dns_master_style_t **stylep, unsigned int flags, unsigned int ttl_column, unsigned int class_column, unsigned int type_column, unsigned int rdata_column, diff --git a/usr.bin/dig/lib/dns/name.c b/usr.bin/dig/lib/dns/name.c index d444d765c76..4fafc0cdcea 100644 --- a/usr.bin/dig/lib/dns/name.c +++ b/usr.bin/dig/lib/dns/name.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: name.c,v 1.9 2020/02/22 19:48:48 jung Exp $ */ +/* $Id: name.c,v 1.10 2020/02/23 19:54:25 jung Exp $ */ /*! \file */ #include <ctype.h> @@ -1829,33 +1829,6 @@ dns_name_free(dns_name_t *name) { dns_name_invalidate(name); } -isc_result_t -dns_name_digest(dns_name_t *name, dns_digestfunc_t digest, void *arg) { - dns_name_t downname; - unsigned char data[256]; - isc_buffer_t buffer; - isc_result_t result; - isc_region_t r; - - /* - * Send 'name' in DNSSEC canonical form to 'digest'. - */ - - REQUIRE(digest != NULL); - - dns_name_init(&downname, NULL); - - isc_buffer_init(&buffer, data, sizeof(data)); - - result = dns_name_downcase(name, &downname, &buffer); - if (result != ISC_R_SUCCESS) - return (result); - - isc_buffer_usedregion(&buffer, &r); - - return ((digest)(arg, &r)); -} - isc_boolean_t dns_name_dynamic(dns_name_t *name) { @@ -1867,12 +1840,6 @@ dns_name_dynamic(dns_name_t *name) { ISC_TRUE : ISC_FALSE); } -isc_result_t -dns_name_settotextfilter(dns_name_totextfilter_t proc) { - totext_filter_proc = proc; - return (ISC_R_SUCCESS); -} - void dns_name_format(dns_name_t *name, char *cp, unsigned int size) { isc_result_t result; @@ -1902,12 +1869,6 @@ dns_name_format(dns_name_t *name, char *cp, unsigned int size) { * allocating memory as needed */ isc_result_t -dns_name_fromstring(dns_name_t *target, const char *src, unsigned int options) -{ - return (dns_name_fromstring2(target, src, dns_rootname, options)); -} - -isc_result_t dns_name_fromstring2(dns_name_t *target, const char *src, const dns_name_t *origin, unsigned int options) { @@ -1984,45 +1945,3 @@ dns_name_copy(dns_name_t *source, dns_name_t *dest, isc_buffer_t *target) { return (ISC_R_SUCCESS); } - -void -dns_name_destroy(void) { -} - -/* - * Service Discovery Prefixes RFC 6763. - */ -static unsigned char b_dns_sd_udp_data[] = "\001b\007_dns-sd\004_udp"; -static unsigned char b_dns_sd_udp_offsets[] = { 0, 2, 10 }; -static unsigned char db_dns_sd_udp_data[] = "\002db\007_dns-sd\004_udp"; -static unsigned char db_dns_sd_udp_offsets[] = { 0, 3, 11 }; -static unsigned char r_dns_sd_udp_data[] = "\001r\007_dns-sd\004_udp"; -static unsigned char r_dns_sd_udp_offsets[] = { 0, 2, 10 }; -static unsigned char dr_dns_sd_udp_data[] = "\002dr\007_dns-sd\004_udp"; -static unsigned char dr_dns_sd_udp_offsets[] = { 0, 3, 11 }; -static unsigned char lb_dns_sd_udp_data[] = "\002lb\007_dns-sd\004_udp"; -static unsigned char lb_dns_sd_udp_offsets[] = { 0, 3, 11 }; - -static dns_name_t const dns_sd[] = { - DNS_NAME_INITNONABSOLUTE(b_dns_sd_udp_data, b_dns_sd_udp_offsets), - DNS_NAME_INITNONABSOLUTE(db_dns_sd_udp_data, db_dns_sd_udp_offsets), - DNS_NAME_INITNONABSOLUTE(r_dns_sd_udp_data, r_dns_sd_udp_offsets), - DNS_NAME_INITNONABSOLUTE(dr_dns_sd_udp_data, dr_dns_sd_udp_offsets), - DNS_NAME_INITNONABSOLUTE(lb_dns_sd_udp_data, lb_dns_sd_udp_offsets) -}; - -isc_boolean_t -dns_name_isdnssd(const dns_name_t *name) { - size_t i; - dns_name_t prefix; - - if (dns_name_countlabels(name) > 3U) { - dns_name_init(&prefix, NULL); - dns_name_getlabelsequence(name, 0, 3, &prefix); - for (i = 0; i < (sizeof(dns_sd)/sizeof(dns_sd[0])); i++) - if (dns_name_equal(&prefix, &dns_sd[i])) - return (ISC_TRUE); - } - - return (ISC_FALSE); -} diff --git a/usr.bin/dig/lib/dns/rcode.c b/usr.bin/dig/lib/dns/rcode.c index 7f7b88159ff..1496ac2b8c3 100644 --- a/usr.bin/dig/lib/dns/rcode.c +++ b/usr.bin/dig/lib/dns/rcode.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rcode.c,v 1.6 2020/02/22 19:47:06 jung Exp $ */ +/* $Id: rcode.c,v 1.7 2020/02/23 19:54:25 jung Exp $ */ #include <ctype.h> @@ -30,26 +30,13 @@ #include <isc/types.h> #include <isc/util.h> - - #include <dns/cert.h> #include <dns/ds.h> -#include <dns/keyflags.h> #include <dns/keyvalues.h> #include <dns/rcode.h> #include <dns/rdataclass.h> #include <dns/result.h> #include <dns/secalg.h> -#include <dns/secproto.h> - -#define RETERR(x) \ - do { \ - isc_result_t _r = (x); \ - if (_r != ISC_R_SUCCESS) \ - return (_r); \ - } while (0) - -#define NUMBERSIZE sizeof("037777777777") /* 2^32-1 octal + NUL */ #define TOTEXTONLY 0x01 @@ -125,28 +112,6 @@ /* RFC2535 section 7.1 */ -#define SECPROTONAMES \ - { 0, "NONE", 0 }, \ - { 1, "TLS", 0 }, \ - { 2, "EMAIL", 0 }, \ - { 3, "DNSSEC", 0 }, \ - { 4, "IPSEC", 0 }, \ - { 255, "ALL", 0 }, \ - { 0, NULL, 0} - -#define HASHALGNAMES \ - { 1, "SHA-1", 0 }, \ - { 0, NULL, 0 } - -/* RFC3658, RFC4509, RFC5933, RFC6605 */ - -#define DSDIGESTNAMES \ - { DNS_DSDIGEST_SHA1, "SHA-1", 0 }, \ - { DNS_DSDIGEST_SHA256, "SHA-256", 0 }, \ - { DNS_DSDIGEST_GOST, "GOST", 0 }, \ - { DNS_DSDIGEST_SHA384, "SHA-384", 0 }, \ - { 0, NULL, 0} - struct tbl { unsigned int value; const char *name; @@ -156,48 +121,6 @@ struct tbl { static struct tbl tsigrcodes[] = { RCODENAMES TSIGRCODENAMES }; static struct tbl certs[] = { CERTNAMES }; static struct tbl secalgs[] = { SECALGNAMES }; -static struct tbl secprotos[] = { SECPROTONAMES }; -static struct tbl hashalgs[] = { HASHALGNAMES }; - -static struct keyflag { - const char *name; - unsigned int value; - unsigned int mask; -} keyflags[] = { - { "NOCONF", 0x4000, 0xC000 }, - { "NOAUTH", 0x8000, 0xC000 }, - { "NOKEY", 0xC000, 0xC000 }, - { "FLAG2", 0x2000, 0x2000 }, - { "EXTEND", 0x1000, 0x1000 }, - { "FLAG4", 0x0800, 0x0800 }, - { "FLAG5", 0x0400, 0x0400 }, - { "USER", 0x0000, 0x0300 }, - { "ZONE", 0x0100, 0x0300 }, - { "HOST", 0x0200, 0x0300 }, - { "NTYP3", 0x0300, 0x0300 }, - { "FLAG8", 0x0080, 0x0080 }, - { "FLAG9", 0x0040, 0x0040 }, - { "FLAG10", 0x0020, 0x0020 }, - { "FLAG11", 0x0010, 0x0010 }, - { "SIG0", 0x0000, 0x000F }, - { "SIG1", 0x0001, 0x000F }, - { "SIG2", 0x0002, 0x000F }, - { "SIG3", 0x0003, 0x000F }, - { "SIG4", 0x0004, 0x000F }, - { "SIG5", 0x0005, 0x000F }, - { "SIG6", 0x0006, 0x000F }, - { "SIG7", 0x0007, 0x000F }, - { "SIG8", 0x0008, 0x000F }, - { "SIG9", 0x0009, 0x000F }, - { "SIG10", 0x000A, 0x000F }, - { "SIG11", 0x000B, 0x000F }, - { "SIG12", 0x000C, 0x000F }, - { "SIG13", 0x000D, 0x000F }, - { "SIG14", 0x000E, 0x000F }, - { "SIG15", 0x000F, 0x000F }, - { "KSK", DNS_KEYFLAG_KSK, DNS_KEYFLAG_KSK }, - { NULL, 0, 0 } -}; static isc_result_t str_totext(const char *source, isc_buffer_t *target) { @@ -216,63 +139,6 @@ str_totext(const char *source, isc_buffer_t *target) { } static isc_result_t -maybe_numeric(unsigned int *valuep, isc_textregion_t *source, - unsigned int max, isc_boolean_t hex_allowed) -{ - isc_result_t result; - uint32_t n; - char buffer[NUMBERSIZE]; - - if (! isdigit(source->base[0] & 0xff) || - source->length > NUMBERSIZE - 1) - return (ISC_R_BADNUMBER); - - /* - * We have a potential number. Try to parse it with - * isc_parse_uint32(). isc_parse_uint32() requires - * null termination, so we must make a copy. - */ - snprintf(buffer, sizeof(buffer), "%.*s", - (int)source->length, source->base); - - INSIST(buffer[source->length] == '\0'); - - result = isc_parse_uint32(&n, buffer, 10); - if (result == ISC_R_BADNUMBER && hex_allowed) - result = isc_parse_uint32(&n, buffer, 16); - if (result != ISC_R_SUCCESS) - return (result); - if (n > max) - return (ISC_R_RANGE); - *valuep = n; - return (ISC_R_SUCCESS); -} - -static isc_result_t -dns_mnemonic_fromtext(unsigned int *valuep, isc_textregion_t *source, - struct tbl *table, unsigned int max) -{ - isc_result_t result; - int i; - - result = maybe_numeric(valuep, source, max, ISC_FALSE); - if (result != ISC_R_BADNUMBER) - return (result); - - for (i = 0; table[i].name != NULL; i++) { - unsigned int n; - n = strlen(table[i].name); - if (n == source->length && - (table[i].flags & TOTEXTONLY) == 0 && - strncasecmp(source->base, table[i].name, n) == 0) { - *valuep = table[i].value; - return (ISC_R_SUCCESS); - } - } - return (DNS_R_UNKNOWN); -} - -static isc_result_t dns_mnemonic_totext(unsigned int value, isc_buffer_t *target, struct tbl *table) { @@ -289,40 +155,16 @@ dns_mnemonic_totext(unsigned int value, isc_buffer_t *target, } isc_result_t -dns_tsigrcode_fromtext(dns_rcode_t *rcodep, isc_textregion_t *source) { - unsigned int value; - RETERR(dns_mnemonic_fromtext(&value, source, tsigrcodes, 0xffff)); - *rcodep = value; - return (ISC_R_SUCCESS); -} - -isc_result_t dns_tsigrcode_totext(dns_rcode_t rcode, isc_buffer_t *target) { return (dns_mnemonic_totext(rcode, target, tsigrcodes)); } isc_result_t -dns_cert_fromtext(dns_cert_t *certp, isc_textregion_t *source) { - unsigned int value; - RETERR(dns_mnemonic_fromtext(&value, source, certs, 0xffff)); - *certp = value; - return (ISC_R_SUCCESS); -} - -isc_result_t dns_cert_totext(dns_cert_t cert, isc_buffer_t *target) { return (dns_mnemonic_totext(cert, target, certs)); } isc_result_t -dns_secalg_fromtext(dns_secalg_t *secalgp, isc_textregion_t *source) { - unsigned int value; - RETERR(dns_mnemonic_fromtext(&value, source, secalgs, 0xff)); - *secalgp = value; - return (ISC_R_SUCCESS); -} - -isc_result_t dns_secalg_totext(dns_secalg_t secalg, isc_buffer_t *target) { return (dns_mnemonic_totext(secalg, target, secalgs)); } @@ -342,65 +184,6 @@ dns_secalg_format(dns_secalg_t alg, char *cp, unsigned int size) { r.base[0] = 0; } -isc_result_t -dns_secproto_fromtext(dns_secproto_t *secprotop, isc_textregion_t *source) { - unsigned int value; - RETERR(dns_mnemonic_fromtext(&value, source, secprotos, 0xff)); - *secprotop = value; - return (ISC_R_SUCCESS); -} - -isc_result_t -dns_hashalg_fromtext(unsigned char *hashalg, isc_textregion_t *source) { - unsigned int value; - RETERR(dns_mnemonic_fromtext(&value, source, hashalgs, 0xff)); - *hashalg = value; - return (ISC_R_SUCCESS); -} - -isc_result_t -dns_keyflags_fromtext(dns_keyflags_t *flagsp, isc_textregion_t *source) -{ - isc_result_t result; - char *text, *end; - unsigned int value, mask; - - result = maybe_numeric(&value, source, 0xffff, ISC_TRUE); - if (result == ISC_R_SUCCESS) { - *flagsp = value; - return (ISC_R_SUCCESS); - } - if (result != ISC_R_BADNUMBER) - return (result); - - text = source->base; - end = source->base + source->length; - value = mask = 0; - - while (text < end) { - struct keyflag *p; - unsigned int len; - char *delim = memchr(text, '|', end - text); - if (delim != NULL) - len = (unsigned int)(delim - text); - else - len = (unsigned int)(end - text); - for (p = keyflags; p->name != NULL; p++) { - if (strncasecmp(p->name, text, len) == 0) - break; - } - if (p->name == NULL) - return (DNS_R_UNKNOWNFLAG); - value |= p->value; - mask |= p->mask; - text += len; - if (delim != NULL) - text++; /* Skip "|" */ - } - *flagsp = value; - return (ISC_R_SUCCESS); -} - /* * This uses lots of hard coded values, but how often do we actually * add classes? diff --git a/usr.bin/dig/lib/dns/rdata.c b/usr.bin/dig/lib/dns/rdata.c index fb820fce886..d20f5ff0066 100644 --- a/usr.bin/dig/lib/dns/rdata.c +++ b/usr.bin/dig/lib/dns/rdata.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.12 2020/02/23 04:15:57 jsg Exp $ */ +/* $Id: rdata.c,v 1.13 2020/02/23 19:54:25 jung Exp $ */ /*! \file */ @@ -35,14 +35,12 @@ #include <dns/cert.h> #include <dns/compress.h> #include "enumtype.h" -#include <dns/keyflags.h> #include <dns/keyvalues.h> #include <dns/rcode.h> #include <dns/rdata.h> #include "rdatastruct.h" #include <dns/rdatatype.h> #include <dns/result.h> -#include <dns/secproto.h> #include <dns/time.h> #include <dns/ttl.h> @@ -72,16 +70,9 @@ #define ARGS_FREESTRUCT void *source -#define ARGS_ADDLDATA dns_rdata_t *rdata, dns_additionaldatafunc_t add, \ - void *arg - -#define ARGS_DIGEST dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg - #define ARGS_CHECKOWNER dns_name_t *name, dns_rdataclass_t rdclass, \ dns_rdatatype_t type, isc_boolean_t wildcard -#define ARGS_CHECKNAMES dns_rdata_t *rdata, dns_name_t *owner, dns_name_t *bad - /*% * Context structure for the totext_ functions. * Contains formatting options for rdata-to-text diff --git a/usr.bin/dig/lib/dns/rdata/any_255/tsig_250.c b/usr.bin/dig/lib/dns/rdata/any_255/tsig_250.c index 3a8dc03a8e8..28d406a3f79 100644 --- a/usr.bin/dig/lib/dns/rdata/any_255/tsig_250.c +++ b/usr.bin/dig/lib/dns/rdata/any_255/tsig_250.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: tsig_250.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: tsig_250.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */ @@ -429,31 +429,6 @@ freestruct_any_tsig(ARGS_FREESTRUCT) { free(tsig->other); } -static inline isc_result_t -additionaldata_any_tsig(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_tsig); - REQUIRE(rdata->rdclass == dns_rdataclass_any); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_any_tsig(ARGS_DIGEST) { - - REQUIRE(rdata->type == dns_rdatatype_tsig); - REQUIRE(rdata->rdclass == dns_rdataclass_any); - - UNUSED(rdata); - UNUSED(digest); - UNUSED(arg); - - return (ISC_R_NOTIMPLEMENTED); -} - static inline isc_boolean_t checkowner_any_tsig(ARGS_CHECKOWNER) { @@ -468,19 +443,6 @@ checkowner_any_tsig(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_any_tsig(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_tsig); - REQUIRE(rdata->rdclass == dns_rdataclass_any); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_any_tsig(ARGS_COMPARE) { return (compare_any_tsig(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/ch_3/a_1.c b/usr.bin/dig/lib/dns/rdata/ch_3/a_1.c index dc889faa250..58f2a560eab 100644 --- a/usr.bin/dig/lib/dns/rdata/ch_3/a_1.c +++ b/usr.bin/dig/lib/dns/rdata/ch_3/a_1.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: a_1.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: a_1.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* by Bjorn.Victor@it.uu.se, 2005-05-07 */ /* Based on generic/soa_6.c and generic/mx_15.c */ @@ -208,35 +208,6 @@ freestruct_ch_a(ARGS_FREESTRUCT) { dns_name_free(&a->ch_addr_dom); } -static inline isc_result_t -additionaldata_ch_a(ARGS_ADDLDATA) { - - REQUIRE(rdata->type == dns_rdatatype_a); - REQUIRE(rdata->rdclass == dns_rdataclass_ch); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_ch_a(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_a); - REQUIRE(rdata->rdclass == dns_rdataclass_ch); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - isc_region_consume(&r, name_length(&name)); - RETERR(dns_name_digest(&name, digest, arg)); - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_ch_a(ARGS_CHECKOWNER) { @@ -248,28 +219,6 @@ checkowner_ch_a(ARGS_CHECKOWNER) { return (dns_name_ishostname(name, wildcard)); } -static inline isc_boolean_t -checknames_ch_a(ARGS_CHECKNAMES) { - isc_region_t region; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_a); - REQUIRE(rdata->rdclass == dns_rdataclass_ch); - - UNUSED(owner); - - dns_rdata_toregion(rdata, ®ion); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ishostname(&name, ISC_FALSE)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - - return (ISC_TRUE); -} - static inline int casecompare_ch_a(ARGS_COMPARE) { return (compare_ch_a(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/afsdb_18.c b/usr.bin/dig/lib/dns/rdata/generic/afsdb_18.c index f1bcabeaaf7..341ba22cdac 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/afsdb_18.c +++ b/usr.bin/dig/lib/dns/rdata/generic/afsdb_18.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: afsdb_18.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: afsdb_18.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Wed Mar 15 14:59:00 PST 2000 by explorer */ @@ -191,40 +191,6 @@ freestruct_afsdb(ARGS_FREESTRUCT) { dns_name_free(&afsdb->server); } -static inline isc_result_t -additionaldata_afsdb(ARGS_ADDLDATA) { - dns_name_t name; - dns_offsets_t offsets; - isc_region_t region; - - REQUIRE(rdata->type == dns_rdatatype_afsdb); - - dns_name_init(&name, offsets); - dns_rdata_toregion(rdata, ®ion); - isc_region_consume(®ion, 2); - dns_name_fromregion(&name, ®ion); - - return ((add)(arg, &name, dns_rdatatype_a)); -} - -static inline isc_result_t -digest_afsdb(ARGS_DIGEST) { - isc_region_t r1, r2; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_afsdb); - - dns_rdata_toregion(rdata, &r1); - r2 = r1; - isc_region_consume(&r2, 2); - r1.length = 2; - RETERR((digest)(arg, &r1)); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r2); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_afsdb(ARGS_CHECKOWNER) { @@ -238,27 +204,6 @@ checkowner_afsdb(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_afsdb(ARGS_CHECKNAMES) { - isc_region_t region; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_afsdb); - - UNUSED(owner); - - dns_rdata_toregion(rdata, ®ion); - isc_region_consume(®ion, 2); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ishostname(&name, ISC_FALSE)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - return (ISC_TRUE); -} - static inline int casecompare_afsdb(ARGS_COMPARE) { return (compare_afsdb(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/avc_258.c b/usr.bin/dig/lib/dns/rdata/generic/avc_258.c index 627a4ba9754..dc9fefa5b3d 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/avc_258.c +++ b/usr.bin/dig/lib/dns/rdata/generic/avc_258.c @@ -99,28 +99,6 @@ freestruct_avc(ARGS_FREESTRUCT) { generic_freestruct_txt(source); } -static inline isc_result_t -additionaldata_avc(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_avc); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_avc(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_avc); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_avc(ARGS_CHECKOWNER) { @@ -134,18 +112,6 @@ checkowner_avc(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_avc(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_avc); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_avc(ARGS_COMPARE) { return (compare_avc(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/caa_257.c b/usr.bin/dig/lib/dns/rdata/generic/caa_257.c index 5b71d897ec9..88be92d337f 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/caa_257.c +++ b/usr.bin/dig/lib/dns/rdata/generic/caa_257.c @@ -255,32 +255,6 @@ freestruct_caa(ARGS_FREESTRUCT) { free(caa->value); } -static inline isc_result_t -additionaldata_caa(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_caa); - REQUIRE(rdata->data != NULL); - REQUIRE(rdata->length >= 3U); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_caa(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_caa); - REQUIRE(rdata->data != NULL); - REQUIRE(rdata->length >= 3U); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_caa(ARGS_CHECKOWNER) { @@ -294,20 +268,6 @@ checkowner_caa(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_caa(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_caa); - REQUIRE(rdata->data != NULL); - REQUIRE(rdata->length >= 3U); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_caa(ARGS_COMPARE) { return (compare_caa(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/cdnskey_60.c b/usr.bin/dig/lib/dns/rdata/generic/cdnskey_60.c index 594d065a9ad..797b18396da 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/cdnskey_60.c +++ b/usr.bin/dig/lib/dns/rdata/generic/cdnskey_60.c @@ -105,29 +105,6 @@ freestruct_cdnskey(ARGS_FREESTRUCT) { generic_freestruct_key(source); } -static inline isc_result_t -additionaldata_cdnskey(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_cdnskey); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_cdnskey(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata != NULL); - REQUIRE(rdata->type == dns_rdatatype_cdnskey); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_cdnskey(ARGS_CHECKOWNER) { @@ -141,19 +118,6 @@ checkowner_cdnskey(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_cdnskey(ARGS_CHECKNAMES) { - - REQUIRE(rdata != NULL); - REQUIRE(rdata->type == dns_rdatatype_cdnskey); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_cdnskey(ARGS_COMPARE) { diff --git a/usr.bin/dig/lib/dns/rdata/generic/cds_59.c b/usr.bin/dig/lib/dns/rdata/generic/cds_59.c index 26bdc211302..284c70e3a7a 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/cds_59.c +++ b/usr.bin/dig/lib/dns/rdata/generic/cds_59.c @@ -108,28 +108,6 @@ freestruct_cds(ARGS_FREESTRUCT) { free(ds->digest); } -static inline isc_result_t -additionaldata_cds(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_cds); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_cds(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_cds); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_cds(ARGS_CHECKOWNER) { @@ -143,18 +121,6 @@ checkowner_cds(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_cds(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_cds); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_cds(ARGS_COMPARE) { return (compare_cds(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/cert_37.c b/usr.bin/dig/lib/dns/rdata/generic/cert_37.c index 95356f07929..079456ffbc6 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/cert_37.c +++ b/usr.bin/dig/lib/dns/rdata/generic/cert_37.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: cert_37.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: cert_37.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Wed Mar 15 21:14:32 EST 2000 by tale */ @@ -183,28 +183,6 @@ freestruct_cert(ARGS_FREESTRUCT) { free(cert->certificate); } -static inline isc_result_t -additionaldata_cert(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_cert); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_cert(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_cert); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_cert(ARGS_CHECKOWNER) { @@ -218,19 +196,6 @@ checkowner_cert(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_cert(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_cert); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - - static inline int casecompare_cert(ARGS_COMPARE) { return (compare_cert(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/cname_5.c b/usr.bin/dig/lib/dns/rdata/generic/cname_5.c index 76d79368c68..055103e25d6 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/cname_5.c +++ b/usr.bin/dig/lib/dns/rdata/generic/cname_5.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: cname_5.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: cname_5.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */ @@ -151,31 +151,6 @@ freestruct_cname(ARGS_FREESTRUCT) { dns_name_free(&cname->cname); } -static inline isc_result_t -additionaldata_cname(ARGS_ADDLDATA) { - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - REQUIRE(rdata->type == dns_rdatatype_cname); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_cname(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_cname); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_cname(ARGS_CHECKOWNER) { @@ -189,18 +164,6 @@ checkowner_cname(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_cname(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_cname); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_cname(ARGS_COMPARE) { return (compare_cname(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/csync_62.c b/usr.bin/dig/lib/dns/rdata/generic/csync_62.c index 6a49c919081..9ba6f961707 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/csync_62.c +++ b/usr.bin/dig/lib/dns/rdata/generic/csync_62.c @@ -176,27 +176,6 @@ freestruct_csync(ARGS_FREESTRUCT) { free(csync->typebits); } -static inline isc_result_t -additionaldata_csync(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_csync); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_csync(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_csync); - - dns_rdata_toregion(rdata, &r); - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_csync(ARGS_CHECKOWNER) { @@ -210,18 +189,6 @@ checkowner_csync(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_csync(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_csync); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_csync(ARGS_COMPARE) { isc_region_t region1; diff --git a/usr.bin/dig/lib/dns/rdata/generic/dlv_32769.c b/usr.bin/dig/lib/dns/rdata/generic/dlv_32769.c index 7b0d8fddbb5..8d9c10d75e7 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/dlv_32769.c +++ b/usr.bin/dig/lib/dns/rdata/generic/dlv_32769.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dlv_32769.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: dlv_32769.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* RFC3658 */ @@ -105,28 +105,6 @@ freestruct_dlv(ARGS_FREESTRUCT) { free(dlv->digest); } -static inline isc_result_t -additionaldata_dlv(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_dlv); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_dlv(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_dlv); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_dlv(ARGS_CHECKOWNER) { @@ -140,18 +118,6 @@ checkowner_dlv(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_dlv(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_dlv); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_dlv(ARGS_COMPARE) { return (compare_dlv(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/dname_39.c b/usr.bin/dig/lib/dns/rdata/generic/dname_39.c index a5d4fbd1da1..a2280e32e58 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/dname_39.c +++ b/usr.bin/dig/lib/dns/rdata/generic/dname_39.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dname_39.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: dname_39.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Wed Mar 15 16:52:38 PST 2000 by explorer */ @@ -152,31 +152,6 @@ freestruct_dname(ARGS_FREESTRUCT) { dns_name_free(&dname->dname); } -static inline isc_result_t -additionaldata_dname(ARGS_ADDLDATA) { - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - REQUIRE(rdata->type == dns_rdatatype_dname); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_dname(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_dname); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_dname(ARGS_CHECKOWNER) { @@ -190,18 +165,6 @@ checkowner_dname(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_dname(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_dname); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_dname(ARGS_COMPARE) { return (compare_dname(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/dnskey_48.c b/usr.bin/dig/lib/dns/rdata/generic/dnskey_48.c index f9c33e2ce60..6a467fc2464 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/dnskey_48.c +++ b/usr.bin/dig/lib/dns/rdata/generic/dnskey_48.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnskey_48.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: dnskey_48.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* * Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley. @@ -112,30 +112,6 @@ freestruct_dnskey(ARGS_FREESTRUCT) { generic_freestruct_key(source); } -static inline isc_result_t -additionaldata_dnskey(ARGS_ADDLDATA) { - - REQUIRE(rdata->type == dns_rdatatype_dnskey); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_dnskey(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata != NULL); - REQUIRE(rdata->type == dns_rdatatype_dnskey); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_dnskey(ARGS_CHECKOWNER) { @@ -149,19 +125,6 @@ checkowner_dnskey(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_dnskey(ARGS_CHECKNAMES) { - - REQUIRE(rdata != NULL); - REQUIRE(rdata->type == dns_rdatatype_dnskey); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_dnskey(ARGS_COMPARE) { diff --git a/usr.bin/dig/lib/dns/rdata/generic/doa_259.c b/usr.bin/dig/lib/dns/rdata/generic/doa_259.c index 8cdaed46384..32a1f44d7d8 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/doa_259.c +++ b/usr.bin/dig/lib/dns/rdata/generic/doa_259.c @@ -242,28 +242,6 @@ freestruct_doa(ARGS_FREESTRUCT) { free(doa->data); } -static inline isc_result_t -additionaldata_doa(ARGS_ADDLDATA) { - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - REQUIRE(rdata->type == dns_rdatatype_doa); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_doa(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_doa); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_doa(ARGS_CHECKOWNER) { UNUSED(name); @@ -276,17 +254,6 @@ checkowner_doa(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_doa(ARGS_CHECKNAMES) { - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - REQUIRE(rdata->type == dns_rdatatype_doa); - - return (ISC_TRUE); -} - static inline int casecompare_doa(ARGS_COMPARE) { return (compare_doa(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/ds_43.c b/usr.bin/dig/lib/dns/rdata/generic/ds_43.c index 999173c8867..ada1e9c9d48 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/ds_43.c +++ b/usr.bin/dig/lib/dns/rdata/generic/ds_43.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ds_43.c,v 1.3 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: ds_43.c,v 1.4 2020/02/23 19:54:26 jung Exp $ */ /* RFC3658 */ @@ -259,28 +259,6 @@ freestruct_ds(ARGS_FREESTRUCT) { free(ds->digest); } -static inline isc_result_t -additionaldata_ds(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_ds); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_ds(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_ds); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_ds(ARGS_CHECKOWNER) { @@ -294,18 +272,6 @@ checkowner_ds(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_ds(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_ds); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_ds(ARGS_COMPARE) { return (compare_ds(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/eui48_108.c b/usr.bin/dig/lib/dns/rdata/generic/eui48_108.c index 60bb29edbb7..d411c75f6bc 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/eui48_108.c +++ b/usr.bin/dig/lib/dns/rdata/generic/eui48_108.c @@ -122,31 +122,6 @@ freestruct_eui48(ARGS_FREESTRUCT) { return; } -static inline isc_result_t -additionaldata_eui48(ARGS_ADDLDATA) { - - REQUIRE(rdata->type == dns_rdatatype_eui48); - REQUIRE(rdata->length == 6); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_eui48(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_eui48); - REQUIRE(rdata->length == 6); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_eui48(ARGS_CHECKOWNER) { @@ -160,19 +135,6 @@ checkowner_eui48(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_eui48(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_eui48); - REQUIRE(rdata->length == 6); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_eui48(ARGS_COMPARE) { return (compare_eui48(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/eui64_109.c b/usr.bin/dig/lib/dns/rdata/generic/eui64_109.c index 56d3e5a7cb3..4289c012b6f 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/eui64_109.c +++ b/usr.bin/dig/lib/dns/rdata/generic/eui64_109.c @@ -125,31 +125,6 @@ freestruct_eui64(ARGS_FREESTRUCT) { return; } -static inline isc_result_t -additionaldata_eui64(ARGS_ADDLDATA) { - - REQUIRE(rdata->type == dns_rdatatype_eui64); - REQUIRE(rdata->length == 8); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_eui64(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_eui64); - REQUIRE(rdata->length == 8); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_eui64(ARGS_CHECKOWNER) { @@ -163,19 +138,6 @@ checkowner_eui64(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_eui64(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_eui64); - REQUIRE(rdata->length == 8); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_eui64(ARGS_COMPARE) { return (compare_eui64(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/gpos_27.c b/usr.bin/dig/lib/dns/rdata/generic/gpos_27.c index fb1f844f096..a74c34fe05b 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/gpos_27.c +++ b/usr.bin/dig/lib/dns/rdata/generic/gpos_27.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: gpos_27.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: gpos_27.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */ @@ -170,28 +170,6 @@ freestruct_gpos(ARGS_FREESTRUCT) { free(gpos->altitude); } -static inline isc_result_t -additionaldata_gpos(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_gpos); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_gpos(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_gpos); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_gpos(ARGS_CHECKOWNER) { @@ -205,18 +183,6 @@ checkowner_gpos(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_gpos(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_gpos); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_gpos(ARGS_COMPARE) { return (compare_gpos(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/hinfo_13.c b/usr.bin/dig/lib/dns/rdata/generic/hinfo_13.c index 4a087643e3d..93f797e5a05 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/hinfo_13.c +++ b/usr.bin/dig/lib/dns/rdata/generic/hinfo_13.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: hinfo_13.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: hinfo_13.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* * Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley. @@ -143,28 +143,6 @@ freestruct_hinfo(ARGS_FREESTRUCT) { free(hinfo->os); } -static inline isc_result_t -additionaldata_hinfo(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_hinfo); - - UNUSED(add); - UNUSED(arg); - UNUSED(rdata); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_hinfo(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_hinfo); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_hinfo(ARGS_CHECKOWNER) { @@ -178,18 +156,6 @@ checkowner_hinfo(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_hinfo(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_hinfo); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_hinfo(ARGS_COMPARE) { return (compare_hinfo(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/hip_55.c b/usr.bin/dig/lib/dns/rdata/generic/hip_55.c index 2ef532c2788..1c3337f0fc7 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/hip_55.c +++ b/usr.bin/dig/lib/dns/rdata/generic/hip_55.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: hip_55.c,v 1.3 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: hip_55.c,v 1.4 2020/02/23 19:54:26 jung Exp $ */ /* reviewed: TBC */ @@ -265,27 +265,6 @@ freestruct_hip(ARGS_FREESTRUCT) { free(hip->servers); } -static inline isc_result_t -additionaldata_hip(ARGS_ADDLDATA) { - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - REQUIRE(rdata->type == dns_rdatatype_hip); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_hip(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_hip); - - dns_rdata_toregion(rdata, &r); - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_hip(ARGS_CHECKOWNER) { @@ -299,18 +278,6 @@ checkowner_hip(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_hip(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_hip); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - isc_result_t dns_rdata_hip_first(dns_rdata_hip_t *hip) { if (hip->servers_len == 0) diff --git a/usr.bin/dig/lib/dns/rdata/generic/ipseckey_45.c b/usr.bin/dig/lib/dns/rdata/generic/ipseckey_45.c index 1c2c3d5aafa..73a41cf03fd 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/ipseckey_45.c +++ b/usr.bin/dig/lib/dns/rdata/generic/ipseckey_45.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ipseckey_45.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: ipseckey_45.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ #ifndef RDATA_GENERIC_IPSECKEY_45_C #define RDATA_GENERIC_IPSECKEY_45_C @@ -315,28 +315,6 @@ freestruct_ipseckey(ARGS_FREESTRUCT) { } -static inline isc_result_t -additionaldata_ipseckey(ARGS_ADDLDATA) { - - REQUIRE(rdata->type == dns_rdatatype_ipseckey); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_ipseckey(ARGS_DIGEST) { - isc_region_t region; - - REQUIRE(rdata->type == dns_rdatatype_ipseckey); - - dns_rdata_toregion(rdata, ®ion); - return ((digest)(arg, ®ion)); -} - static inline isc_boolean_t checkowner_ipseckey(ARGS_CHECKOWNER) { @@ -350,18 +328,6 @@ checkowner_ipseckey(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_ipseckey(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_ipseckey); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_ipseckey(ARGS_COMPARE) { isc_region_t region1; diff --git a/usr.bin/dig/lib/dns/rdata/generic/isdn_20.c b/usr.bin/dig/lib/dns/rdata/generic/isdn_20.c index 8580cfb28d2..04b73f8aa9a 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/isdn_20.c +++ b/usr.bin/dig/lib/dns/rdata/generic/isdn_20.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: isdn_20.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: isdn_20.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Wed Mar 15 16:53:11 PST 2000 by bwelling */ @@ -154,28 +154,6 @@ freestruct_isdn(ARGS_FREESTRUCT) { free(isdn->subaddress); } -static inline isc_result_t -additionaldata_isdn(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_isdn); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_isdn(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_isdn); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_isdn(ARGS_CHECKOWNER) { @@ -189,18 +167,6 @@ checkowner_isdn(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_isdn(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_isdn); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_isdn(ARGS_COMPARE) { return (compare_isdn(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/key_25.c b/usr.bin/dig/lib/dns/rdata/generic/key_25.c index 958aca5c693..0dac87d2c39 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/key_25.c +++ b/usr.bin/dig/lib/dns/rdata/generic/key_25.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: key_25.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: key_25.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* * Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley. @@ -326,31 +326,6 @@ freestruct_key(ARGS_FREESTRUCT) { generic_freestruct_key(source); } -static inline isc_result_t -additionaldata_key(ARGS_ADDLDATA) { - - REQUIRE(rdata != NULL); - REQUIRE(rdata->type == dns_rdatatype_key); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_key(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata != NULL); - REQUIRE(rdata->type == dns_rdatatype_key); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_key(ARGS_CHECKOWNER) { @@ -364,19 +339,6 @@ checkowner_key(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_key(ARGS_CHECKNAMES) { - - REQUIRE(rdata != NULL); - REQUIRE(rdata->type == dns_rdatatype_key); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_key(ARGS_COMPARE) { return (compare_key(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/keydata_65533.c b/usr.bin/dig/lib/dns/rdata/generic/keydata_65533.c index b3fb50e8718..84a1ed40ad9 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/keydata_65533.c +++ b/usr.bin/dig/lib/dns/rdata/generic/keydata_65533.c @@ -338,28 +338,6 @@ freestruct_keydata(ARGS_FREESTRUCT) { free(keydata->data); } -static inline isc_result_t -additionaldata_keydata(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_keydata); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_keydata(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_keydata); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_keydata(ARGS_CHECKOWNER) { @@ -373,18 +351,6 @@ checkowner_keydata(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_keydata(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_keydata); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_keydata(ARGS_COMPARE) { return (compare_keydata(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/l32_105.c b/usr.bin/dig/lib/dns/rdata/generic/l32_105.c index e9f252952b2..d83932e1dd6 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/l32_105.c +++ b/usr.bin/dig/lib/dns/rdata/generic/l32_105.c @@ -139,31 +139,6 @@ freestruct_l32(ARGS_FREESTRUCT) { return; } -static inline isc_result_t -additionaldata_l32(ARGS_ADDLDATA) { - - REQUIRE(rdata->type == dns_rdatatype_l32); - REQUIRE(rdata->length == 6); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_l32(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_l32); - REQUIRE(rdata->length == 6); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_l32(ARGS_CHECKOWNER) { @@ -177,19 +152,6 @@ checkowner_l32(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_l32(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_l32); - REQUIRE(rdata->length == 6); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_l32(ARGS_COMPARE) { return (compare_l32(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/l64_106.c b/usr.bin/dig/lib/dns/rdata/generic/l64_106.c index 572a07f72d7..1f48fd1fa68 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/l64_106.c +++ b/usr.bin/dig/lib/dns/rdata/generic/l64_106.c @@ -140,31 +140,6 @@ freestruct_l64(ARGS_FREESTRUCT) { return; } -static inline isc_result_t -additionaldata_l64(ARGS_ADDLDATA) { - - REQUIRE(rdata->type == dns_rdatatype_l64); - REQUIRE(rdata->length == 10); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_l64(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_l64); - REQUIRE(rdata->length == 10); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_l64(ARGS_CHECKOWNER) { @@ -178,19 +153,6 @@ checkowner_l64(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_l64(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_l64); - REQUIRE(rdata->length == 10); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_l64(ARGS_COMPARE) { return (compare_l64(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/loc_29.c b/usr.bin/dig/lib/dns/rdata/generic/loc_29.c index fdf88ca6867..85320b42b59 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/loc_29.c +++ b/usr.bin/dig/lib/dns/rdata/generic/loc_29.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: loc_29.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: loc_29.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Wed Mar 15 18:13:09 PST 2000 by explorer */ @@ -336,28 +336,6 @@ freestruct_loc(ARGS_FREESTRUCT) { UNUSED(loc); } -static inline isc_result_t -additionaldata_loc(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_loc); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_loc(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_loc); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_loc(ARGS_CHECKOWNER) { @@ -371,18 +349,6 @@ checkowner_loc(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_loc(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_loc); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_loc(ARGS_COMPARE) { return (compare_loc(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/lp_107.c b/usr.bin/dig/lib/dns/rdata/generic/lp_107.c index ce5beb35dea..11c621b5d9c 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/lp_107.c +++ b/usr.bin/dig/lib/dns/rdata/generic/lp_107.c @@ -153,36 +153,6 @@ freestruct_lp(ARGS_FREESTRUCT) { dns_name_free(&lp->lp); } -static inline isc_result_t -additionaldata_lp(ARGS_ADDLDATA) { - dns_name_t name; - dns_offsets_t offsets; - isc_region_t region; - isc_result_t result; - - REQUIRE(rdata->type == dns_rdatatype_lp); - - dns_name_init(&name, offsets); - dns_rdata_toregion(rdata, ®ion); - isc_region_consume(®ion, 2); - dns_name_fromregion(&name, ®ion); - - result = (add)(arg, &name, dns_rdatatype_l32); - if (result != ISC_R_SUCCESS) - return (result); - return ((add)(arg, &name, dns_rdatatype_l64)); -} - -static inline isc_result_t -digest_lp(ARGS_DIGEST) { - isc_region_t region; - - REQUIRE(rdata->type == dns_rdatatype_lp); - - dns_rdata_toregion(rdata, ®ion); - return ((digest)(arg, ®ion)); -} - static inline isc_boolean_t checkowner_lp(ARGS_CHECKOWNER) { @@ -196,17 +166,6 @@ checkowner_lp(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_lp(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_lp); - - UNUSED(bad); - UNUSED(owner); - - return (ISC_TRUE); -} - static inline int casecompare_lp(ARGS_COMPARE) { dns_name_t name1; diff --git a/usr.bin/dig/lib/dns/rdata/generic/mb_7.c b/usr.bin/dig/lib/dns/rdata/generic/mb_7.c index a4cb57166d0..9b60e80c889 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/mb_7.c +++ b/usr.bin/dig/lib/dns/rdata/generic/mb_7.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mb_7.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: mb_7.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Wed Mar 15 17:31:26 PST 2000 by bwelling */ @@ -150,35 +150,6 @@ freestruct_mb(ARGS_FREESTRUCT) { dns_name_free(&mb->mb); } -static inline isc_result_t -additionaldata_mb(ARGS_ADDLDATA) { - dns_name_t name; - dns_offsets_t offsets; - isc_region_t region; - - REQUIRE(rdata->type == dns_rdatatype_mb); - - dns_name_init(&name, offsets); - dns_rdata_toregion(rdata, ®ion); - dns_name_fromregion(&name, ®ion); - - return ((add)(arg, &name, dns_rdatatype_a)); -} - -static inline isc_result_t -digest_mb(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_mb); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_mb(ARGS_CHECKOWNER) { @@ -191,18 +162,6 @@ checkowner_mb(ARGS_CHECKOWNER) { return (dns_name_ismailbox(name)); } -static inline isc_boolean_t -checknames_mb(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_mb); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_mb(ARGS_COMPARE) { return (compare_mb(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/md_3.c b/usr.bin/dig/lib/dns/rdata/generic/md_3.c index 0aa7e1503e5..656b02afb09 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/md_3.c +++ b/usr.bin/dig/lib/dns/rdata/generic/md_3.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: md_3.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: md_3.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Wed Mar 15 17:48:20 PST 2000 by bwelling */ @@ -151,35 +151,6 @@ freestruct_md(ARGS_FREESTRUCT) { dns_name_free(&md->md); } -static inline isc_result_t -additionaldata_md(ARGS_ADDLDATA) { - dns_name_t name; - dns_offsets_t offsets; - isc_region_t region; - - REQUIRE(rdata->type == dns_rdatatype_md); - - dns_name_init(&name, offsets); - dns_rdata_toregion(rdata, ®ion); - dns_name_fromregion(&name, ®ion); - - return ((add)(arg, &name, dns_rdatatype_a)); -} - -static inline isc_result_t -digest_md(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_md); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_md(ARGS_CHECKOWNER) { @@ -193,18 +164,6 @@ checkowner_md(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_md(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_md); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_md(ARGS_COMPARE) { return (compare_md(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/mf_4.c b/usr.bin/dig/lib/dns/rdata/generic/mf_4.c index 1c8796c9074..7c215e22f27 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/mf_4.c +++ b/usr.bin/dig/lib/dns/rdata/generic/mf_4.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mf_4.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: mf_4.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* reviewed: Wed Mar 15 17:47:33 PST 2000 by brister */ @@ -151,35 +151,6 @@ freestruct_mf(ARGS_FREESTRUCT) { dns_name_free(&mf->mf); } -static inline isc_result_t -additionaldata_mf(ARGS_ADDLDATA) { - dns_name_t name; - dns_offsets_t offsets; - isc_region_t region; - - REQUIRE(rdata->type == dns_rdatatype_mf); - - dns_name_init(&name, offsets); - dns_rdata_toregion(rdata, ®ion); - dns_name_fromregion(&name, ®ion); - - return ((add)(arg, &name, dns_rdatatype_a)); -} - -static inline isc_result_t -digest_mf(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_mf); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_mf(ARGS_CHECKOWNER) { @@ -193,18 +164,6 @@ checkowner_mf(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_mf(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_mf); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_mf(ARGS_COMPARE) { return (compare_mf(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/mg_8.c b/usr.bin/dig/lib/dns/rdata/generic/mg_8.c index 5bc77c004c9..0aae4be53b0 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/mg_8.c +++ b/usr.bin/dig/lib/dns/rdata/generic/mg_8.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mg_8.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: mg_8.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* reviewed: Wed Mar 15 17:49:21 PST 2000 by brister */ @@ -151,31 +151,6 @@ freestruct_mg(ARGS_FREESTRUCT) { dns_name_free(&mg->mg); } -static inline isc_result_t -additionaldata_mg(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_mg); - - UNUSED(add); - UNUSED(arg); - UNUSED(rdata); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_mg(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_mg); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_mg(ARGS_CHECKOWNER) { @@ -188,18 +163,6 @@ checkowner_mg(ARGS_CHECKOWNER) { return (dns_name_ismailbox(name)); } -static inline isc_boolean_t -checknames_mg(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_mg); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_mg(ARGS_COMPARE) { return (compare_mg(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/minfo_14.c b/usr.bin/dig/lib/dns/rdata/generic/minfo_14.c index f8863a1aa79..6f3ddd4a924 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/minfo_14.c +++ b/usr.bin/dig/lib/dns/rdata/generic/minfo_14.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: minfo_14.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: minfo_14.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* reviewed: Wed Mar 15 17:45:32 PST 2000 by brister */ @@ -209,38 +209,6 @@ freestruct_minfo(ARGS_FREESTRUCT) { dns_name_free(&minfo->emailbox); } -static inline isc_result_t -additionaldata_minfo(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_minfo); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_minfo(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - isc_result_t result; - - REQUIRE(rdata->type == dns_rdatatype_minfo); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - result = dns_name_digest(&name, digest, arg); - if (result != ISC_R_SUCCESS) - return (result); - isc_region_consume(&r, name_length(&name)); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_minfo(ARGS_CHECKOWNER) { @@ -254,33 +222,6 @@ checkowner_minfo(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_minfo(ARGS_CHECKNAMES) { - isc_region_t region; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_minfo); - - UNUSED(owner); - - dns_rdata_toregion(rdata, ®ion); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ismailbox(&name)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - isc_region_consume(®ion, name_length(&name)); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ismailbox(&name)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - return (ISC_TRUE); -} - static inline int casecompare_minfo(ARGS_COMPARE) { return (compare_minfo(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/mr_9.c b/usr.bin/dig/lib/dns/rdata/generic/mr_9.c index e50a46c01ec..f719e97691f 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/mr_9.c +++ b/usr.bin/dig/lib/dns/rdata/generic/mr_9.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mr_9.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: mr_9.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Wed Mar 15 21:30:35 EST 2000 by tale */ @@ -151,31 +151,6 @@ freestruct_mr(ARGS_FREESTRUCT) { dns_name_free(&mr->mr); } -static inline isc_result_t -additionaldata_mr(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_mr); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_mr(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_mr); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_mr(ARGS_CHECKOWNER) { @@ -189,18 +164,6 @@ checkowner_mr(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_mr(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_mr); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_mr(ARGS_COMPARE) { return (compare_mr(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/mx_15.c b/usr.bin/dig/lib/dns/rdata/generic/mx_15.c index 66c49ea166b..2b9ef481f7e 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/mx_15.c +++ b/usr.bin/dig/lib/dns/rdata/generic/mx_15.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mx_15.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: mx_15.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* reviewed: Wed Mar 15 18:05:46 PST 2000 by brister */ @@ -183,39 +183,6 @@ freestruct_mx(ARGS_FREESTRUCT) { dns_name_free(&mx->mx); } -static inline isc_result_t -additionaldata_mx(ARGS_ADDLDATA) { - dns_name_t name; - dns_offsets_t offsets; - isc_region_t region; - - REQUIRE(rdata->type == dns_rdatatype_mx); - - dns_name_init(&name, offsets); - dns_rdata_toregion(rdata, ®ion); - isc_region_consume(®ion, 2); - dns_name_fromregion(&name, ®ion); - - return ((add)(arg, &name, dns_rdatatype_a)); -} - -static inline isc_result_t -digest_mx(ARGS_DIGEST) { - isc_region_t r1, r2; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_mx); - - dns_rdata_toregion(rdata, &r1); - r2 = r1; - isc_region_consume(&r2, 2); - r1.length = 2; - RETERR((digest)(arg, &r1)); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r2); - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_mx(ARGS_CHECKOWNER) { @@ -227,27 +194,6 @@ checkowner_mx(ARGS_CHECKOWNER) { return (dns_name_ishostname(name, wildcard)); } -static inline isc_boolean_t -checknames_mx(ARGS_CHECKNAMES) { - isc_region_t region; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_mx); - - UNUSED(owner); - - dns_rdata_toregion(rdata, ®ion); - isc_region_consume(®ion, 2); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ishostname(&name, ISC_FALSE)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - return (ISC_TRUE); -} - static inline int casecompare_mx(ARGS_COMPARE) { return (compare_mx(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/naptr_35.c b/usr.bin/dig/lib/dns/rdata/generic/naptr_35.c index 35ec2c179e8..e11d1ae4782 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/naptr_35.c +++ b/usr.bin/dig/lib/dns/rdata/generic/naptr_35.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: naptr_35.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: naptr_35.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */ @@ -445,121 +445,6 @@ freestruct_naptr(ARGS_FREESTRUCT) { dns_name_free(&naptr->replacement); } -static inline isc_result_t -additionaldata_naptr(ARGS_ADDLDATA) { - dns_name_t name; - dns_offsets_t offsets; - isc_region_t sr; - dns_rdatatype_t atype; - unsigned int i, flagslen; - char *cp; - - REQUIRE(rdata->type == dns_rdatatype_naptr); - - /* - * Order, preference. - */ - dns_rdata_toregion(rdata, &sr); - isc_region_consume(&sr, 4); - - /* - * Flags. - */ - atype = 0; - flagslen = sr.base[0]; - cp = (char *)&sr.base[1]; - for (i = 0; i < flagslen; i++, cp++) { - if (*cp == 'S' || *cp == 's') { - atype = dns_rdatatype_srv; - break; - } - if (*cp == 'A' || *cp == 'a') { - atype = dns_rdatatype_a; - break; - } - } - isc_region_consume(&sr, flagslen + 1); - - /* - * Service. - */ - isc_region_consume(&sr, sr.base[0] + 1); - - /* - * Regexp. - */ - isc_region_consume(&sr, sr.base[0] + 1); - - /* - * Replacement. - */ - dns_name_init(&name, offsets); - dns_name_fromregion(&name, &sr); - - if (atype != 0) - return ((add)(arg, &name, atype)); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_naptr(ARGS_DIGEST) { - isc_region_t r1, r2; - unsigned int length, n; - isc_result_t result; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_naptr); - - dns_rdata_toregion(rdata, &r1); - r2 = r1; - length = 0; - - /* - * Order, preference. - */ - length += 4; - isc_region_consume(&r2, 4); - - /* - * Flags. - */ - n = r2.base[0] + 1; - length += n; - isc_region_consume(&r2, n); - - /* - * Service. - */ - n = r2.base[0] + 1; - length += n; - isc_region_consume(&r2, n); - - /* - * Regexp. - */ - n = r2.base[0] + 1; - length += n; - isc_region_consume(&r2, n); - - /* - * Digest the RR up to the replacement name. - */ - r1.length = length; - result = (digest)(arg, &r1); - if (result != ISC_R_SUCCESS) - return (result); - - /* - * Replacement. - */ - - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r2); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_naptr(ARGS_CHECKOWNER) { @@ -573,18 +458,6 @@ checkowner_naptr(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_naptr(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_naptr); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_naptr(ARGS_COMPARE) { return (compare_naptr(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/nid_104.c b/usr.bin/dig/lib/dns/rdata/generic/nid_104.c index 4afb6361448..cd3e784eaf9 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/nid_104.c +++ b/usr.bin/dig/lib/dns/rdata/generic/nid_104.c @@ -140,31 +140,6 @@ freestruct_nid(ARGS_FREESTRUCT) { return; } -static inline isc_result_t -additionaldata_nid(ARGS_ADDLDATA) { - - REQUIRE(rdata->type == dns_rdatatype_nid); - REQUIRE(rdata->length == 10); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_nid(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_nid); - REQUIRE(rdata->length == 10); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_nid(ARGS_CHECKOWNER) { @@ -178,19 +153,6 @@ checkowner_nid(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_nid(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_nid); - REQUIRE(rdata->length == 10); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_nid(ARGS_COMPARE) { return (compare_nid(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/ninfo_56.c b/usr.bin/dig/lib/dns/rdata/generic/ninfo_56.c index 830087b349f..b77d40506a2 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/ninfo_56.c +++ b/usr.bin/dig/lib/dns/rdata/generic/ninfo_56.c @@ -98,28 +98,6 @@ freestruct_ninfo(ARGS_FREESTRUCT) { generic_freestruct_txt(source); } -static inline isc_result_t -additionaldata_ninfo(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_ninfo); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_ninfo(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_ninfo); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_ninfo(ARGS_CHECKOWNER) { @@ -133,18 +111,6 @@ checkowner_ninfo(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_ninfo(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_ninfo); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_ninfo(ARGS_COMPARE) { return (compare_ninfo(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/ns_2.c b/usr.bin/dig/lib/dns/rdata/generic/ns_2.c index 2a2b44106ef..ca75f0183f5 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/ns_2.c +++ b/usr.bin/dig/lib/dns/rdata/generic/ns_2.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ns_2.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: ns_2.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Wed Mar 15 18:15:00 PST 2000 by bwelling */ @@ -150,35 +150,6 @@ freestruct_ns(ARGS_FREESTRUCT) { dns_name_free(&ns->name); } -static inline isc_result_t -additionaldata_ns(ARGS_ADDLDATA) { - dns_name_t name; - dns_offsets_t offsets; - isc_region_t region; - - REQUIRE(rdata->type == dns_rdatatype_ns); - - dns_name_init(&name, offsets); - dns_rdata_toregion(rdata, ®ion); - dns_name_fromregion(&name, ®ion); - - return ((add)(arg, &name, dns_rdatatype_a)); -} - -static inline isc_result_t -digest_ns(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_ns); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_ns(ARGS_CHECKOWNER) { @@ -192,26 +163,6 @@ checkowner_ns(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_ns(ARGS_CHECKNAMES) { - isc_region_t region; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_ns); - - UNUSED(owner); - - dns_rdata_toregion(rdata, ®ion); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ishostname(&name, ISC_FALSE)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - return (ISC_TRUE); -} - static inline int casecompare_ns(ARGS_COMPARE) { return (compare_ns(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/nsec3_50.c b/usr.bin/dig/lib/dns/rdata/generic/nsec3_50.c index be6511bb262..9a1b98af280 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/nsec3_50.c +++ b/usr.bin/dig/lib/dns/rdata/generic/nsec3_50.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsec3_50.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: nsec3_50.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* * Copyright (C) 2004 Nominet, Ltd. @@ -274,27 +274,6 @@ freestruct_nsec3(ARGS_FREESTRUCT) { free(nsec3->typebits); } -static inline isc_result_t -additionaldata_nsec3(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_nsec3); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_nsec3(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_nsec3); - - dns_rdata_toregion(rdata, &r); - return ((digest)(arg, &r)); -} - #define NSEC3_MAX_HASH_LENGTH 155 static inline isc_boolean_t checkowner_nsec3(ARGS_CHECKOWNER) { @@ -320,18 +299,6 @@ checkowner_nsec3(ARGS_CHECKOWNER) { return (ISC_FALSE); } -static inline isc_boolean_t -checknames_nsec3(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_nsec3); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_nsec3(ARGS_COMPARE) { return (compare_nsec3(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/nsec3param_51.c b/usr.bin/dig/lib/dns/rdata/generic/nsec3param_51.c index 79640b1046e..be53c574051 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/nsec3param_51.c +++ b/usr.bin/dig/lib/dns/rdata/generic/nsec3param_51.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsec3param_51.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: nsec3param_51.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* * Copyright (C) 2004 Nominet, Ltd. @@ -209,27 +209,6 @@ freestruct_nsec3param(ARGS_FREESTRUCT) { free(nsec3param->salt); } -static inline isc_result_t -additionaldata_nsec3param(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_nsec3param); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_nsec3param(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_nsec3param); - - dns_rdata_toregion(rdata, &r); - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_nsec3param(ARGS_CHECKOWNER) { @@ -243,18 +222,6 @@ checkowner_nsec3param(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_nsec3param(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_nsec3param); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_nsec3param(ARGS_COMPARE) { return (compare_nsec3param(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/nsec_47.c b/usr.bin/dig/lib/dns/rdata/generic/nsec_47.c index b5565152d3f..70a18aad2a2 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/nsec_47.c +++ b/usr.bin/dig/lib/dns/rdata/generic/nsec_47.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsec_47.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: nsec_47.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* reviewed: Wed Mar 15 18:21:15 PST 2000 by brister */ @@ -178,27 +178,6 @@ freestruct_nsec(ARGS_FREESTRUCT) { free(nsec->typebits); } -static inline isc_result_t -additionaldata_nsec(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_nsec); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_nsec(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_nsec); - - dns_rdata_toregion(rdata, &r); - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_nsec(ARGS_CHECKOWNER) { @@ -212,18 +191,6 @@ checkowner_nsec(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_nsec(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_nsec); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_nsec(ARGS_COMPARE) { isc_region_t region1; diff --git a/usr.bin/dig/lib/dns/rdata/generic/null_10.c b/usr.bin/dig/lib/dns/rdata/generic/null_10.c index 88a7c0e7bea..ac6b79623e2 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/null_10.c +++ b/usr.bin/dig/lib/dns/rdata/generic/null_10.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: null_10.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: null_10.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Thu Mar 16 13:57:50 PST 2000 by explorer */ @@ -117,28 +117,6 @@ freestruct_null(ARGS_FREESTRUCT) { free(null->data); } -static inline isc_result_t -additionaldata_null(ARGS_ADDLDATA) { - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - REQUIRE(rdata->type == dns_rdatatype_null); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_null(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_null); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_null(ARGS_CHECKOWNER) { @@ -152,18 +130,6 @@ checkowner_null(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_null(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_null); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_null(ARGS_COMPARE) { return (compare_null(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/nxt_30.c b/usr.bin/dig/lib/dns/rdata/generic/nxt_30.c index 8cae4c9deb0..80cc3cb3352 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/nxt_30.c +++ b/usr.bin/dig/lib/dns/rdata/generic/nxt_30.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nxt_30.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: nxt_30.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* reviewed: Wed Mar 15 18:21:15 PST 2000 by brister */ @@ -209,36 +209,6 @@ freestruct_nxt(ARGS_FREESTRUCT) { free(nxt->typebits); } -static inline isc_result_t -additionaldata_nxt(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_nxt); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_nxt(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - isc_result_t result; - - REQUIRE(rdata->type == dns_rdatatype_nxt); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - result = dns_name_digest(&name, digest, arg); - if (result != ISC_R_SUCCESS) - return (result); - isc_region_consume(&r, name_length(&name)); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_nxt(ARGS_CHECKOWNER) { @@ -252,18 +222,6 @@ checkowner_nxt(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_nxt(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_nxt); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_nxt(ARGS_COMPARE) { return (compare_nxt(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/openpgpkey_61.c b/usr.bin/dig/lib/dns/rdata/generic/openpgpkey_61.c index 4e732bedc70..57c55be611c 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/openpgpkey_61.c +++ b/usr.bin/dig/lib/dns/rdata/generic/openpgpkey_61.c @@ -159,28 +159,6 @@ freestruct_openpgpkey(ARGS_FREESTRUCT) { free(sig->keyring); } -static inline isc_result_t -additionaldata_openpgpkey(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_openpgpkey); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_openpgpkey(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_openpgpkey); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_openpgpkey(ARGS_CHECKOWNER) { @@ -194,18 +172,6 @@ checkowner_openpgpkey(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_openpgpkey(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_openpgpkey); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_openpgpkey(ARGS_COMPARE) { isc_region_t r1; diff --git a/usr.bin/dig/lib/dns/rdata/generic/opt_41.c b/usr.bin/dig/lib/dns/rdata/generic/opt_41.c index 34015f99c61..a28127ed2ab 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/opt_41.c +++ b/usr.bin/dig/lib/dns/rdata/generic/opt_41.c @@ -278,33 +278,6 @@ freestruct_opt(ARGS_FREESTRUCT) { free(opt->options); } -static inline isc_result_t -additionaldata_opt(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_opt); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_opt(ARGS_DIGEST) { - - /* - * OPT records are not digested. - */ - - REQUIRE(rdata->type == dns_rdatatype_opt); - - UNUSED(rdata); - UNUSED(digest); - UNUSED(arg); - - return (ISC_R_NOTIMPLEMENTED); -} - static inline isc_boolean_t checkowner_opt(ARGS_CHECKOWNER) { @@ -317,18 +290,6 @@ checkowner_opt(ARGS_CHECKOWNER) { return (dns_name_equal(name, dns_rootname)); } -static inline isc_boolean_t -checknames_opt(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_opt); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_opt(ARGS_COMPARE) { return (compare_opt(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/proforma.c b/usr.bin/dig/lib/dns/rdata/generic/proforma.c index c0278bdb1c7..ccd01ec4583 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/proforma.c +++ b/usr.bin/dig/lib/dns/rdata/generic/proforma.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: proforma.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: proforma.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ #ifndef RDATA_GENERIC_#_#_C #define RDATA_GENERIC_#_#_C @@ -106,29 +106,6 @@ freestruct_#(ARGS_FREESTRUCT) { } -static inline isc_result_t -additionaldata_#(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_proforma.c#); - REQUIRE(rdata->rdclass == #); - - (void)add; - (void)arg; - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_#(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_proforma.c#); - REQUIRE(rdata->rdclass == #); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_#(ARGS_CHECKOWNER) { @@ -143,19 +120,6 @@ checkowner_#(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_#(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_proforma.c#); - REQUIRE(rdata->rdclass == #); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_#(ARGS_COMPARE) { isc_region_t r1; diff --git a/usr.bin/dig/lib/dns/rdata/generic/ptr_12.c b/usr.bin/dig/lib/dns/rdata/generic/ptr_12.c index 353b1332469..0be42a85cf2 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/ptr_12.c +++ b/usr.bin/dig/lib/dns/rdata/generic/ptr_12.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ptr_12.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: ptr_12.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Thu Mar 16 14:05:12 PST 2000 by explorer */ @@ -151,31 +151,6 @@ freestruct_ptr(ARGS_FREESTRUCT) { dns_name_free(&ptr->ptr); } -static inline isc_result_t -additionaldata_ptr(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_ptr); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_ptr(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_ptr); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_ptr(ARGS_CHECKOWNER) { @@ -204,34 +179,6 @@ static unsigned char in_addr_arpa_offsets[] = { 0, 8, 13 }; static const dns_name_t in_addr_arpa = DNS_NAME_INITABSOLUTE(in_addr_arpa_data, in_addr_arpa_offsets); -static inline isc_boolean_t -checknames_ptr(ARGS_CHECKNAMES) { - isc_region_t region; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_ptr); - - if (rdata->rdclass != dns_rdataclass_in) - return (ISC_TRUE); - - if (dns_name_isdnssd(owner)) - return (ISC_TRUE); - - if (dns_name_issubdomain(owner, &in_addr_arpa) || - dns_name_issubdomain(owner, &ip6_arpa) || - dns_name_issubdomain(owner, &ip6_int)) { - dns_rdata_toregion(rdata, ®ion); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ishostname(&name, ISC_FALSE)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - } - return (ISC_TRUE); -} - static inline int casecompare_ptr(ARGS_COMPARE) { return (compare_ptr(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/rkey_57.c b/usr.bin/dig/lib/dns/rdata/generic/rkey_57.c index 9207ed35338..55e4afde350 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/rkey_57.c +++ b/usr.bin/dig/lib/dns/rdata/generic/rkey_57.c @@ -102,30 +102,6 @@ freestruct_rkey(ARGS_FREESTRUCT) { generic_freestruct_key(source); } -static inline isc_result_t -additionaldata_rkey(ARGS_ADDLDATA) { - - REQUIRE(rdata->type == dns_rdatatype_rkey); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_rkey(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata != NULL); - REQUIRE(rdata->type == dns_rdatatype_rkey); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_rkey(ARGS_CHECKOWNER) { @@ -139,19 +115,6 @@ checkowner_rkey(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_rkey(ARGS_CHECKNAMES) { - - REQUIRE(rdata != NULL); - REQUIRE(rdata->type == dns_rdatatype_rkey); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_rkey(ARGS_COMPARE) { diff --git a/usr.bin/dig/lib/dns/rdata/generic/rp_17.c b/usr.bin/dig/lib/dns/rdata/generic/rp_17.c index 073b63d8c57..ab6c7d5f4ee 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/rp_17.c +++ b/usr.bin/dig/lib/dns/rdata/generic/rp_17.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rp_17.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: rp_17.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* RFC1183 */ @@ -205,37 +205,6 @@ freestruct_rp(ARGS_FREESTRUCT) { dns_name_free(&rp->text); } -static inline isc_result_t -additionaldata_rp(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_rp); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_rp(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_rp); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - - dns_name_fromregion(&name, &r); - RETERR(dns_name_digest(&name, digest, arg)); - isc_region_consume(&r, name_length(&name)); - - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_rp(ARGS_CHECKOWNER) { @@ -249,26 +218,6 @@ checkowner_rp(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_rp(ARGS_CHECKNAMES) { - isc_region_t region; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_rp); - - UNUSED(owner); - - dns_rdata_toregion(rdata, ®ion); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ismailbox(&name)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - return (ISC_TRUE); -} - static inline int casecompare_rp(ARGS_COMPARE) { return (compare_rp(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/rrsig_46.c b/usr.bin/dig/lib/dns/rdata/generic/rrsig_46.c index 44efce8033a..1a6dc8be1f0 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/rrsig_46.c +++ b/usr.bin/dig/lib/dns/rdata/generic/rrsig_46.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rrsig_46.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: rrsig_46.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */ @@ -383,29 +383,6 @@ freestruct_rrsig(ARGS_FREESTRUCT) { free(sig->signature); } -static inline isc_result_t -additionaldata_rrsig(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_rrsig); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_rrsig(ARGS_DIGEST) { - - REQUIRE(rdata->type == dns_rdatatype_rrsig); - - UNUSED(rdata); - UNUSED(digest); - UNUSED(arg); - - return (ISC_R_NOTIMPLEMENTED); -} - static inline dns_rdatatype_t covers_rrsig(dns_rdata_t *rdata) { dns_rdatatype_t type; @@ -432,18 +409,6 @@ checkowner_rrsig(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_rrsig(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_rrsig); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_rrsig(ARGS_COMPARE) { isc_region_t r1; diff --git a/usr.bin/dig/lib/dns/rdata/generic/rt_21.c b/usr.bin/dig/lib/dns/rdata/generic/rt_21.c index b76174b2e93..8739a10baf4 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/rt_21.c +++ b/usr.bin/dig/lib/dns/rdata/generic/rt_21.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rt_21.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: rt_21.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* reviewed: Thu Mar 16 15:02:31 PST 2000 by brister */ @@ -189,49 +189,6 @@ freestruct_rt(ARGS_FREESTRUCT) { dns_name_free(&rt->host); } -static inline isc_result_t -additionaldata_rt(ARGS_ADDLDATA) { - dns_name_t name; - dns_offsets_t offsets; - isc_region_t region; - isc_result_t result; - - REQUIRE(rdata->type == dns_rdatatype_rt); - - dns_name_init(&name, offsets); - dns_rdata_toregion(rdata, ®ion); - isc_region_consume(®ion, 2); - dns_name_fromregion(&name, ®ion); - - result = (add)(arg, &name, dns_rdatatype_x25); - if (result != ISC_R_SUCCESS) - return (result); - result = (add)(arg, &name, dns_rdatatype_isdn); - if (result != ISC_R_SUCCESS) - return (result); - return ((add)(arg, &name, dns_rdatatype_a)); -} - -static inline isc_result_t -digest_rt(ARGS_DIGEST) { - isc_region_t r1, r2; - isc_result_t result; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_rt); - - dns_rdata_toregion(rdata, &r1); - r2 = r1; - isc_region_consume(&r2, 2); - r1.length = 2; - result = (digest)(arg, &r1); - if (result != ISC_R_SUCCESS) - return (result); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r2); - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_rt(ARGS_CHECKOWNER) { @@ -245,27 +202,6 @@ checkowner_rt(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_rt(ARGS_CHECKNAMES) { - isc_region_t region; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_rt); - - UNUSED(owner); - - dns_rdata_toregion(rdata, ®ion); - isc_region_consume(®ion, 2); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ishostname(&name, ISC_FALSE)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - return (ISC_TRUE); -} - static inline int casecompare_rt(ARGS_COMPARE) { return (compare_rt(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/sig_24.c b/usr.bin/dig/lib/dns/rdata/generic/sig_24.c index 7e7b96229e5..59e313d4843 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/sig_24.c +++ b/usr.bin/dig/lib/dns/rdata/generic/sig_24.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sig_24.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: sig_24.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */ @@ -411,29 +411,6 @@ freestruct_sig(ARGS_FREESTRUCT) { free(sig->signature); } -static inline isc_result_t -additionaldata_sig(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_sig); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_sig(ARGS_DIGEST) { - - REQUIRE(rdata->type == dns_rdatatype_sig); - - UNUSED(rdata); - UNUSED(digest); - UNUSED(arg); - - return (ISC_R_NOTIMPLEMENTED); -} - static inline dns_rdatatype_t covers_sig(dns_rdata_t *rdata) { dns_rdatatype_t type; @@ -460,18 +437,6 @@ checkowner_sig(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_sig(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_sig); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_sig(ARGS_COMPARE) { return (compare_sig(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/sink_40.c b/usr.bin/dig/lib/dns/rdata/generic/sink_40.c index cecff0c3c77..70e033c3bcf 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/sink_40.c +++ b/usr.bin/dig/lib/dns/rdata/generic/sink_40.c @@ -188,28 +188,6 @@ freestruct_sink(ARGS_FREESTRUCT) { free(sink->data); } -static inline isc_result_t -additionaldata_sink(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_sink); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_sink(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_sink); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_sink(ARGS_CHECKOWNER) { @@ -223,18 +201,6 @@ checkowner_sink(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_sink(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_sink); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_sink(ARGS_COMPARE) { return (compare_sink(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/smimea_53.c b/usr.bin/dig/lib/dns/rdata/generic/smimea_53.c index a76e4b2b245..492fddb330a 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/smimea_53.c +++ b/usr.bin/dig/lib/dns/rdata/generic/smimea_53.c @@ -97,28 +97,6 @@ freestruct_smimea(ARGS_FREESTRUCT) { generic_freestruct_tlsa(source); } -static inline isc_result_t -additionaldata_smimea(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_smimea); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_smimea(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_smimea); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_smimea(ARGS_CHECKOWNER) { @@ -132,18 +110,6 @@ checkowner_smimea(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_smimea(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_smimea); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_smimea(ARGS_COMPARE) { return (compare_smimea(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/soa_6.c b/usr.bin/dig/lib/dns/rdata/generic/soa_6.c index b1757e3791b..b8653c6f54e 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/soa_6.c +++ b/usr.bin/dig/lib/dns/rdata/generic/soa_6.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: soa_6.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: soa_6.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Thu Mar 16 15:18:32 PST 2000 by explorer */ @@ -303,39 +303,6 @@ freestruct_soa(ARGS_FREESTRUCT) { dns_name_free(&soa->contact); } -static inline isc_result_t -additionaldata_soa(ARGS_ADDLDATA) { - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - REQUIRE(rdata->type == dns_rdatatype_soa); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_soa(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_soa); - - dns_rdata_toregion(rdata, &r); - - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - RETERR(dns_name_digest(&name, digest, arg)); - isc_region_consume(&r, name_length(&name)); - - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - RETERR(dns_name_digest(&name, digest, arg)); - isc_region_consume(&r, name_length(&name)); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_soa(ARGS_CHECKOWNER) { @@ -349,33 +316,6 @@ checkowner_soa(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_soa(ARGS_CHECKNAMES) { - isc_region_t region; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_soa); - - UNUSED(owner); - - dns_rdata_toregion(rdata, ®ion); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ishostname(&name, ISC_FALSE)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - isc_region_consume(®ion, name_length(&name)); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ismailbox(&name)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - return (ISC_TRUE); -} - static inline int casecompare_soa(ARGS_COMPARE) { return (compare_soa(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/spf_99.c b/usr.bin/dig/lib/dns/rdata/generic/spf_99.c index 26922d3a529..4dea1af323a 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/spf_99.c +++ b/usr.bin/dig/lib/dns/rdata/generic/spf_99.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: spf_99.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: spf_99.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Thu Mar 16 15:40:00 PST 2000 by bwelling */ @@ -103,28 +103,6 @@ freestruct_spf(ARGS_FREESTRUCT) { generic_freestruct_txt(source); } -static inline isc_result_t -additionaldata_spf(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_spf); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_spf(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_spf); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_spf(ARGS_CHECKOWNER) { @@ -138,18 +116,6 @@ checkowner_spf(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_spf(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_spf); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_spf(ARGS_COMPARE) { return (compare_spf(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/sshfp_44.c b/usr.bin/dig/lib/dns/rdata/generic/sshfp_44.c index 79443cd2204..3b0c47cfd9b 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/sshfp_44.c +++ b/usr.bin/dig/lib/dns/rdata/generic/sshfp_44.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sshfp_44.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: sshfp_44.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* RFC 4255 */ @@ -173,28 +173,6 @@ freestruct_sshfp(ARGS_FREESTRUCT) { free(sshfp->digest); } -static inline isc_result_t -additionaldata_sshfp(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_sshfp); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_sshfp(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_sshfp); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_sshfp(ARGS_CHECKOWNER) { @@ -208,18 +186,6 @@ checkowner_sshfp(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_sshfp(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_sshfp); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_sshfp(ARGS_COMPARE) { return (compare_sshfp(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/ta_32768.c b/usr.bin/dig/lib/dns/rdata/generic/ta_32768.c index 68a20ae3b3f..07d1560aa82 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/ta_32768.c +++ b/usr.bin/dig/lib/dns/rdata/generic/ta_32768.c @@ -102,28 +102,6 @@ freestruct_ta(ARGS_FREESTRUCT) { free(ds->digest); } -static inline isc_result_t -additionaldata_ta(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_ta); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_ta(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_ta); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_ta(ARGS_CHECKOWNER) { @@ -137,18 +115,6 @@ checkowner_ta(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_ta(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_ta); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_ta(ARGS_COMPARE) { return (compare_ta(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/talink_58.c b/usr.bin/dig/lib/dns/rdata/generic/talink_58.c index 1eceb47e84c..6261048af2f 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/talink_58.c +++ b/usr.bin/dig/lib/dns/rdata/generic/talink_58.c @@ -180,27 +180,6 @@ freestruct_talink(ARGS_FREESTRUCT) { dns_name_free(&talink->next); } -static inline isc_result_t -additionaldata_talink(ARGS_ADDLDATA) { - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - REQUIRE(rdata->type == dns_rdatatype_talink); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_talink(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_talink); - - dns_rdata_toregion(rdata, &r); - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_talink(ARGS_CHECKOWNER) { @@ -214,17 +193,6 @@ checkowner_talink(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_talink(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_talink); - - UNUSED(bad); - UNUSED(owner); - - return (ISC_TRUE); -} - static inline int casecompare_talink(ARGS_COMPARE) { return (compare_talink(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/tkey_249.c b/usr.bin/dig/lib/dns/rdata/generic/tkey_249.c index 9d868ddfe1a..99f1611c834 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/tkey_249.c +++ b/usr.bin/dig/lib/dns/rdata/generic/tkey_249.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: tkey_249.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: tkey_249.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* * Reviewed: Thu Mar 16 17:35:30 PST 2000 by halley. @@ -411,28 +411,6 @@ freestruct_tkey(ARGS_FREESTRUCT) { free(tkey->other); } -static inline isc_result_t -additionaldata_tkey(ARGS_ADDLDATA) { - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - REQUIRE(rdata->type == dns_rdatatype_tkey); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_tkey(ARGS_DIGEST) { - UNUSED(rdata); - UNUSED(digest); - UNUSED(arg); - - REQUIRE(rdata->type == dns_rdatatype_tkey); - - return (ISC_R_NOTIMPLEMENTED); -} - static inline isc_boolean_t checkowner_tkey(ARGS_CHECKOWNER) { @@ -446,18 +424,6 @@ checkowner_tkey(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_tkey(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_tkey); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_tkey(ARGS_COMPARE) { return (compare_tkey(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/tlsa_52.c b/usr.bin/dig/lib/dns/rdata/generic/tlsa_52.c index 439a110ab9a..d222099c97b 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/tlsa_52.c +++ b/usr.bin/dig/lib/dns/rdata/generic/tlsa_52.c @@ -226,28 +226,6 @@ freestruct_tlsa(ARGS_FREESTRUCT) { generic_freestruct_tlsa(source); } -static inline isc_result_t -additionaldata_tlsa(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_tlsa); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_tlsa(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_tlsa); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_tlsa(ARGS_CHECKOWNER) { @@ -261,18 +239,6 @@ checkowner_tlsa(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_tlsa(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_tlsa); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_tlsa(ARGS_COMPARE) { return (compare_tlsa(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/txt_16.c b/usr.bin/dig/lib/dns/rdata/generic/txt_16.c index 2d7b6dba849..8492e572a6a 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/txt_16.c +++ b/usr.bin/dig/lib/dns/rdata/generic/txt_16.c @@ -185,28 +185,6 @@ freestruct_txt(ARGS_FREESTRUCT) { generic_freestruct_txt(source); } -static inline isc_result_t -additionaldata_txt(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_txt); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_txt(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_txt); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_txt(ARGS_CHECKOWNER) { @@ -220,18 +198,6 @@ checkowner_txt(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_txt(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_txt); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_txt(ARGS_COMPARE) { return (compare_txt(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/unspec_103.c b/usr.bin/dig/lib/dns/rdata/generic/unspec_103.c index 149f617e800..5f7b1f312f3 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/unspec_103.c +++ b/usr.bin/dig/lib/dns/rdata/generic/unspec_103.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: unspec_103.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: unspec_103.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ #ifndef RDATA_GENERIC_UNSPEC_103_C #define RDATA_GENERIC_UNSPEC_103_C @@ -119,28 +119,6 @@ freestruct_unspec(ARGS_FREESTRUCT) { free(unspec->data); } -static inline isc_result_t -additionaldata_unspec(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_unspec); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_unspec(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_unspec); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_unspec(ARGS_CHECKOWNER) { @@ -154,18 +132,6 @@ checkowner_unspec(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_unspec(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_unspec); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_unspec(ARGS_COMPARE) { return (compare_unspec(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/uri_256.c b/usr.bin/dig/lib/dns/rdata/generic/uri_256.c index 1f5b5bb61dc..1bd513dd873 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/uri_256.c +++ b/usr.bin/dig/lib/dns/rdata/generic/uri_256.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: uri_256.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: uri_256.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ #ifndef GENERIC_URI_256_C #define GENERIC_URI_256_C 1 @@ -213,28 +213,6 @@ freestruct_uri(ARGS_FREESTRUCT) { free(uri->target); } -static inline isc_result_t -additionaldata_uri(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_uri); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_uri(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_uri); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_uri(ARGS_CHECKOWNER) { @@ -248,18 +226,6 @@ checkowner_uri(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_uri(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_uri); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_uri(ARGS_COMPARE) { return (compare_uri(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/generic/x25_19.c b/usr.bin/dig/lib/dns/rdata/generic/x25_19.c index 198e196a92f..d1545ca2251 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/x25_19.c +++ b/usr.bin/dig/lib/dns/rdata/generic/x25_19.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: x25_19.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: x25_19.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Thu Mar 16 16:15:57 PST 2000 by bwelling */ @@ -139,28 +139,6 @@ freestruct_x25(ARGS_FREESTRUCT) { free(x25->x25); } -static inline isc_result_t -additionaldata_x25(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_x25); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_x25(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_x25); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_x25(ARGS_CHECKOWNER) { @@ -174,18 +152,6 @@ checkowner_x25(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_x25(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_x25); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_x25(ARGS_COMPARE) { return (compare_x25(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/hs_4/a_1.c b/usr.bin/dig/lib/dns/rdata/hs_4/a_1.c index 2b9649eac91..c9c58abf6b6 100644 --- a/usr.bin/dig/lib/dns/rdata/hs_4/a_1.c +++ b/usr.bin/dig/lib/dns/rdata/hs_4/a_1.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: a_1.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: a_1.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* reviewed: Thu Mar 16 15:58:36 PST 2000 by brister */ @@ -148,30 +148,6 @@ freestruct_hs_a(ARGS_FREESTRUCT) { REQUIRE(source != NULL); } -static inline isc_result_t -additionaldata_hs_a(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_a); - REQUIRE(rdata->rdclass == dns_rdataclass_hs); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_hs_a(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_a); - REQUIRE(rdata->rdclass == dns_rdataclass_hs); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_hs_a(ARGS_CHECKOWNER) { @@ -186,19 +162,6 @@ checkowner_hs_a(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_hs_a(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_a); - REQUIRE(rdata->rdclass == dns_rdataclass_hs); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_hs_a(ARGS_COMPARE) { return (compare_hs_a(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/in_1/a6_38.c b/usr.bin/dig/lib/dns/rdata/in_1/a6_38.c index cd5ce99c276..f3294811909 100644 --- a/usr.bin/dig/lib/dns/rdata/in_1/a6_38.c +++ b/usr.bin/dig/lib/dns/rdata/in_1/a6_38.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: a6_38.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: a6_38.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* RFC2874 */ @@ -305,46 +305,6 @@ freestruct_in_a6(ARGS_FREESTRUCT) { dns_name_free(&a6->prefix); } -static inline isc_result_t -additionaldata_in_a6(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_a6); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_in_a6(ARGS_DIGEST) { - isc_region_t r1, r2; - unsigned char prefixlen, octets; - isc_result_t result; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_a6); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_rdata_toregion(rdata, &r1); - r2 = r1; - prefixlen = r1.base[0]; - octets = 1 + 16 - prefixlen / 8; - - r1.length = octets; - result = (digest)(arg, &r1); - if (result != ISC_R_SUCCESS) - return (result); - if (prefixlen == 0) - return (ISC_R_SUCCESS); - - isc_region_consume(&r2, octets); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r2); - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_in_a6(ARGS_CHECKOWNER) { @@ -357,32 +317,6 @@ checkowner_in_a6(ARGS_CHECKOWNER) { return (dns_name_ishostname(name, wildcard)); } -static inline isc_boolean_t -checknames_in_a6(ARGS_CHECKNAMES) { - isc_region_t region; - dns_name_t name; - unsigned int prefixlen; - - REQUIRE(rdata->type == dns_rdatatype_a6); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(owner); - - dns_rdata_toregion(rdata, ®ion); - prefixlen = uint8_fromregion(®ion); - if (prefixlen == 0) - return (ISC_TRUE); - isc_region_consume(®ion, 1 + 16 - prefixlen / 8); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ishostname(&name, ISC_FALSE)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - return (ISC_TRUE); -} - static inline int casecompare_in_a6(ARGS_COMPARE) { return (compare_in_a6(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/in_1/a_1.c b/usr.bin/dig/lib/dns/rdata/in_1/a_1.c index 50d9dd30976..a9dbaac4030 100644 --- a/usr.bin/dig/lib/dns/rdata/in_1/a_1.c +++ b/usr.bin/dig/lib/dns/rdata/in_1/a_1.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: a_1.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: a_1.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */ @@ -154,30 +154,6 @@ freestruct_in_a(ARGS_FREESTRUCT) { UNUSED(a); } -static inline isc_result_t -additionaldata_in_a(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_a); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_in_a(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_a); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_in_a(ARGS_CHECKOWNER) { dns_name_t prefix, suffix; @@ -204,19 +180,6 @@ checkowner_in_a(ARGS_CHECKOWNER) { return (dns_name_ishostname(name, wildcard)); } -static inline isc_boolean_t -checknames_in_a(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_a); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_in_a(ARGS_COMPARE) { return (compare_in_a(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/in_1/aaaa_28.c b/usr.bin/dig/lib/dns/rdata/in_1/aaaa_28.c index 9f33fa093d4..d0681ec2dea 100644 --- a/usr.bin/dig/lib/dns/rdata/in_1/aaaa_28.c +++ b/usr.bin/dig/lib/dns/rdata/in_1/aaaa_28.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: aaaa_28.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: aaaa_28.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */ @@ -150,30 +150,6 @@ freestruct_in_aaaa(ARGS_FREESTRUCT) { UNUSED(aaaa); } -static inline isc_result_t -additionaldata_in_aaaa(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_aaaa); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_in_aaaa(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_aaaa); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_in_aaaa(ARGS_CHECKOWNER) { dns_name_t prefix, suffix; @@ -200,19 +176,6 @@ checkowner_in_aaaa(ARGS_CHECKOWNER) { return (dns_name_ishostname(name, wildcard)); } -static inline isc_boolean_t -checknames_in_aaaa(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_aaaa); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_in_aaaa(ARGS_COMPARE) { return (compare_in_aaaa(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/in_1/apl_42.c b/usr.bin/dig/lib/dns/rdata/in_1/apl_42.c index 0da03ca71c6..76bf053e411 100644 --- a/usr.bin/dig/lib/dns/rdata/in_1/apl_42.c +++ b/usr.bin/dig/lib/dns/rdata/in_1/apl_42.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: apl_42.c,v 1.3 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: apl_42.c,v 1.4 2020/02/23 19:54:26 jung Exp $ */ /* RFC3123 */ @@ -216,29 +216,6 @@ freestruct_in_apl(ARGS_FREESTRUCT) { free(apl->apl); } -static inline isc_result_t -additionaldata_in_apl(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_apl); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - (void)add; - (void)arg; - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_in_apl(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_apl); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_in_apl(ARGS_CHECKOWNER) { @@ -253,20 +230,6 @@ checkowner_in_apl(ARGS_CHECKOWNER) { return (ISC_TRUE); } - -static inline isc_boolean_t -checknames_in_apl(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_apl); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_in_apl(ARGS_COMPARE) { return (compare_in_apl(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/in_1/dhcid_49.c b/usr.bin/dig/lib/dns/rdata/in_1/dhcid_49.c index a0a7ac0a520..e51a76fff04 100644 --- a/usr.bin/dig/lib/dns/rdata/in_1/dhcid_49.c +++ b/usr.bin/dig/lib/dns/rdata/in_1/dhcid_49.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dhcid_49.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: dhcid_49.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* RFC 4701 */ @@ -159,30 +159,6 @@ freestruct_in_dhcid(ARGS_FREESTRUCT) { free(dhcid->dhcid); } -static inline isc_result_t -additionaldata_in_dhcid(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_dhcid); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_in_dhcid(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_dhcid); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_in_dhcid(ARGS_CHECKOWNER) { @@ -197,19 +173,6 @@ checkowner_in_dhcid(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_in_dhcid(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_dhcid); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_in_dhcid(ARGS_COMPARE) { return (compare_in_dhcid(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/in_1/kx_36.c b/usr.bin/dig/lib/dns/rdata/in_1/kx_36.c index 83734c9a70e..7f12dcf9c1f 100644 --- a/usr.bin/dig/lib/dns/rdata/in_1/kx_36.c +++ b/usr.bin/dig/lib/dns/rdata/in_1/kx_36.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: kx_36.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: kx_36.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Thu Mar 16 17:24:54 PST 2000 by explorer */ @@ -189,41 +189,6 @@ freestruct_in_kx(ARGS_FREESTRUCT) { dns_name_free(&kx->exchange); } -static inline isc_result_t -additionaldata_in_kx(ARGS_ADDLDATA) { - dns_name_t name; - dns_offsets_t offsets; - isc_region_t region; - - REQUIRE(rdata->type == dns_rdatatype_kx); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_name_init(&name, offsets); - dns_rdata_toregion(rdata, ®ion); - isc_region_consume(®ion, 2); - dns_name_fromregion(&name, ®ion); - - return ((add)(arg, &name, dns_rdatatype_a)); -} - -static inline isc_result_t -digest_in_kx(ARGS_DIGEST) { - isc_region_t r1, r2; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_kx); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_rdata_toregion(rdata, &r1); - r2 = r1; - isc_region_consume(&r2, 2); - r1.length = 2; - RETERR((digest)(arg, &r1)); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r2); - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_in_kx(ARGS_CHECKOWNER) { @@ -238,19 +203,6 @@ checkowner_in_kx(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_in_kx(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_kx); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_in_kx(ARGS_COMPARE) { return (compare_in_kx(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/in_1/nsap-ptr_23.c b/usr.bin/dig/lib/dns/rdata/in_1/nsap-ptr_23.c index dc8ef2dee5a..b702a21ca8a 100644 --- a/usr.bin/dig/lib/dns/rdata/in_1/nsap-ptr_23.c +++ b/usr.bin/dig/lib/dns/rdata/in_1/nsap-ptr_23.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsap-ptr_23.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: nsap-ptr_23.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Fri Mar 17 10:16:02 PST 2000 by gson */ @@ -159,33 +159,6 @@ freestruct_in_nsap_ptr(ARGS_FREESTRUCT) { dns_name_free(&nsap_ptr->owner); } -static inline isc_result_t -additionaldata_in_nsap_ptr(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_nsap_ptr); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_in_nsap_ptr(ARGS_DIGEST) { - isc_region_t r; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_nsap_ptr); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_rdata_toregion(rdata, &r); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_in_nsap_ptr(ARGS_CHECKOWNER) { @@ -200,19 +173,6 @@ checkowner_in_nsap_ptr(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_in_nsap_ptr(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_nsap_ptr); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_in_nsap_ptr(ARGS_COMPARE) { return (compare_in_nsap_ptr(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/in_1/nsap_22.c b/usr.bin/dig/lib/dns/rdata/in_1/nsap_22.c index c3639499d69..c417f743c46 100644 --- a/usr.bin/dig/lib/dns/rdata/in_1/nsap_22.c +++ b/usr.bin/dig/lib/dns/rdata/in_1/nsap_22.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsap_22.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: nsap_22.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Fri Mar 17 10:41:07 PST 2000 by gson */ @@ -147,30 +147,6 @@ freestruct_in_nsap(ARGS_FREESTRUCT) { free(nsap->nsap); } -static inline isc_result_t -additionaldata_in_nsap(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_nsap); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_in_nsap(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_nsap); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_in_nsap(ARGS_CHECKOWNER) { @@ -185,19 +161,6 @@ checkowner_in_nsap(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_in_nsap(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_nsap); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_in_nsap(ARGS_COMPARE) { return (compare_in_nsap(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/in_1/px_26.c b/usr.bin/dig/lib/dns/rdata/in_1/px_26.c index 7c539f6c9b7..179339490f8 100644 --- a/usr.bin/dig/lib/dns/rdata/in_1/px_26.c +++ b/usr.bin/dig/lib/dns/rdata/in_1/px_26.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: px_26.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: px_26.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Mon Mar 20 10:44:27 PST 2000 */ @@ -254,46 +254,6 @@ freestruct_in_px(ARGS_FREESTRUCT) { dns_name_free(&px->mapx400); } -static inline isc_result_t -additionaldata_in_px(ARGS_ADDLDATA) { - REQUIRE(rdata->type == dns_rdatatype_px); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_in_px(ARGS_DIGEST) { - isc_region_t r1, r2; - dns_name_t name; - isc_result_t result; - - REQUIRE(rdata->type == dns_rdatatype_px); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_rdata_toregion(rdata, &r1); - r2 = r1; - isc_region_consume(&r2, 2); - r1.length = 2; - result = (digest)(arg, &r1); - if (result != ISC_R_SUCCESS) - return (result); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r2); - result = dns_name_digest(&name, digest, arg); - if (result != ISC_R_SUCCESS) - return (result); - isc_region_consume(&r2, name_length(&name)); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r2); - - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_in_px(ARGS_CHECKOWNER) { @@ -308,19 +268,6 @@ checkowner_in_px(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_in_px(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_px); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_in_px(ARGS_COMPARE) { return (compare_in_px(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/in_1/srv_33.c b/usr.bin/dig/lib/dns/rdata/in_1/srv_33.c index 14c14071d58..2298c1c285a 100644 --- a/usr.bin/dig/lib/dns/rdata/in_1/srv_33.c +++ b/usr.bin/dig/lib/dns/rdata/in_1/srv_33.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: srv_33.c,v 1.2 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: srv_33.c,v 1.3 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Fri Mar 17 13:01:00 PST 2000 by bwelling */ @@ -233,41 +233,6 @@ freestruct_in_srv(ARGS_FREESTRUCT) { dns_name_free(&srv->target); } -static inline isc_result_t -additionaldata_in_srv(ARGS_ADDLDATA) { - dns_name_t name; - dns_offsets_t offsets; - isc_region_t region; - - REQUIRE(rdata->type == dns_rdatatype_srv); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_name_init(&name, offsets); - dns_rdata_toregion(rdata, ®ion); - isc_region_consume(®ion, 6); - dns_name_fromregion(&name, ®ion); - - return ((add)(arg, &name, dns_rdatatype_a)); -} - -static inline isc_result_t -digest_in_srv(ARGS_DIGEST) { - isc_region_t r1, r2; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_srv); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_rdata_toregion(rdata, &r1); - r2 = r1; - isc_region_consume(&r2, 6); - r1.length = 6; - RETERR((digest)(arg, &r1)); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, &r2); - return (dns_name_digest(&name, digest, arg)); -} - static inline isc_boolean_t checkowner_in_srv(ARGS_CHECKOWNER) { @@ -282,28 +247,6 @@ checkowner_in_srv(ARGS_CHECKOWNER) { return (ISC_TRUE); } -static inline isc_boolean_t -checknames_in_srv(ARGS_CHECKNAMES) { - isc_region_t region; - dns_name_t name; - - REQUIRE(rdata->type == dns_rdatatype_srv); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(owner); - - dns_rdata_toregion(rdata, ®ion); - isc_region_consume(®ion, 6); - dns_name_init(&name, NULL); - dns_name_fromregion(&name, ®ion); - if (!dns_name_ishostname(&name, ISC_FALSE)) { - if (bad != NULL) - dns_name_clone(&name, bad); - return (ISC_FALSE); - } - return (ISC_TRUE); -} - static inline int casecompare_in_srv(ARGS_COMPARE) { return (compare_in_srv(rdata1, rdata2)); diff --git a/usr.bin/dig/lib/dns/rdata/in_1/wks_11.c b/usr.bin/dig/lib/dns/rdata/in_1/wks_11.c index 0db69b99d41..aa234dd49f7 100644 --- a/usr.bin/dig/lib/dns/rdata/in_1/wks_11.c +++ b/usr.bin/dig/lib/dns/rdata/in_1/wks_11.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: wks_11.c,v 1.3 2020/02/20 18:08:51 florian Exp $ */ +/* $Id: wks_11.c,v 1.4 2020/02/23 19:54:26 jung Exp $ */ /* Reviewed: Fri Mar 17 15:01:49 PST 2000 by explorer */ @@ -189,30 +189,6 @@ freestruct_in_wks(ARGS_FREESTRUCT) { free(wks->map); } -static inline isc_result_t -additionaldata_in_wks(ARGS_ADDLDATA) { - UNUSED(rdata); - UNUSED(add); - UNUSED(arg); - - REQUIRE(rdata->type == dns_rdatatype_wks); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - return (ISC_R_SUCCESS); -} - -static inline isc_result_t -digest_in_wks(ARGS_DIGEST) { - isc_region_t r; - - REQUIRE(rdata->type == dns_rdatatype_wks); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - dns_rdata_toregion(rdata, &r); - - return ((digest)(arg, &r)); -} - static inline isc_boolean_t checkowner_in_wks(ARGS_CHECKOWNER) { @@ -225,19 +201,6 @@ checkowner_in_wks(ARGS_CHECKOWNER) { return (dns_name_ishostname(name, wildcard)); } -static inline isc_boolean_t -checknames_in_wks(ARGS_CHECKNAMES) { - - REQUIRE(rdata->type == dns_rdatatype_wks); - REQUIRE(rdata->rdclass == dns_rdataclass_in); - - UNUSED(rdata); - UNUSED(owner); - UNUSED(bad); - - return (ISC_TRUE); -} - static inline int casecompare_in_wks(ARGS_COMPARE) { return (compare_in_wks(rdata1, rdata2)); |