From: Michal Markowski Subject: tcpdump(8): sync DNS RR types To: tech@openbsd.org Cc: Michal Markowski Date: Sun, 20 Sep 2026 17:07:41 +0200 The following syncs tcpdump's DNS resource record type definitions with IANA: https://www.iana.org/assignments/dns-parameters diff --git a/usr.sbin/tcpdump/nameser.h b/usr.sbin/tcpdump/nameser.h index ddb5e065c4a..0c16e7568cf 100644 --- a/usr.sbin/tcpdump/nameser.h +++ b/usr.sbin/tcpdump/nameser.h @@ -157,13 +157,40 @@ #define T_RRSIG 46 /* RRSIG */ #define T_NSEC 47 /* NSEC */ #define T_DNSKEY 48 /* DNSKEY */ +#define T_DHCID 49 /* DHCID, RFC 4701 */ +#define T_NSEC3 50 /* NSEC3, RFC 5155 and RFC 9077 */ +#define T_NSEC3PARAM 51 /* NSEC3PARAM, RFC 5155 */ +#define T_TLSA 52 /* TLSA, RFC 6698 */ +#define T_SMIMEA 53 /* S/MIME cert association, RFC 8162 */ +#define T_HIP 55 /* Host Identity Protocol, RFC 8005 */ +#define T_NINFO 56 /* NINFO */ +#define T_RKEY 57 /* RKEY */ +#define T_TALINK 58 /* Trust Anchor LINK */ +#define T_CDS 59 /* Child DS, RFC 7344 */ +#define T_CDNSKEY 60 /* DNSKEY(s) the Child wants reflected in DS, RFC 7344 */ +#define T_OPENPGPKEY 61 /* OpenPGP Key, RFC 7929 */ +#define T_CSYNC 62 /* Child-To-Parent Synchronization, RFC 7477 */ +#define T_ZONEMD 63 /* Message Digest Over Zone Data, RFC 8976 */ +#define T_SVCB 64 /* General-purpose service binding, RFC 9460 */ +#define T_HTTPS 65 /* SVCB-compatible type for use with HTTP, RFC 9460 */ +#define T_DSYNC 66 /* Endpoint discovery for delegation synchronization, RFC 9859 */ +#define T_HHIT 67 /* Hierarchical Host Identity Tag, RFC 9886 */ +#define T_BRID 68 /* UAS Broadcast Remote Identification, RFC 9886 */ +#define T_UNECE 69 /* Value coded per a UNECE Recommendation */ +#define T_ISO 70 /* Value coded per an ISO standard */ /* non standard */ #define T_SPF 99 /* sender policy framework */ #define T_UINFO 100 /* user (finger) information */ #define T_UID 101 /* user ID */ #define T_GID 102 /* group ID */ #define T_UNSPEC 103 /* Unspecified format (binary data) */ -#define T_UNSPECA 104 /* "unspecified ascii". Ugly MIT hack */ +#define T_NID 104 /* RFC 6742 */ +#define T_L32 105 /* RFC 6742 */ +#define T_L64 106 /* RFC 6742 */ +#define T_LP 107 /* RFC 6742 */ +#define T_EUI48 108 /* an EUI-48 address, RFC 7043 */ +#define T_EUI64 109 /* an EUI-64 address, RFC 7043 */ +#define T_NXNAME 128 /* NXDOMAIN indicator for Compact Denial of Existence, RFC 9824 */ /* Query type values which do not appear in resource records */ #define T_TKEY 249 /* Transaction Key [RFC2930] */ #define T_TSIG 250 /* Transaction Signature [RFC2845] */ @@ -172,6 +199,17 @@ #define T_MAILB 253 /* transfer mailbox records */ #define T_MAILA 254 /* transfer mail agent records */ #define T_ANY 255 /* wildcard match */ +#define T_URI 256 /* URI, RFC 7553 */ +#define T_CAA 257 /* Certification Authority Restriction, RFC 8659 */ +#define T_AVC 258 /* Application Visibility and Control */ +#define T_DOA 259 /* Digital Object Architecture */ +#define T_AMTRELAY 260 /* Automatic Multicast Tunneling Relay, RFC 8777 */ +#define T_RESINFO 261 /* Resolver Information as Key/Value Pairs, RFC 9606 */ +#define T_WALLET 262 /* Public wallet address */ +#define T_CLA 263 /* BP Convergence Layer Adapter */ +#define T_IPN 264 /* BP Node Number */ +#define T_TA 32768 /* DNSSEC Trust Authorities */ +#define T_DLV 32769 /* DNSSEC Lookaside Validation (OBSOLETE), RFC 8749 and RFC 4431 */ /* * Values for class field diff --git a/usr.sbin/tcpdump/print-domain.c b/usr.sbin/tcpdump/print-domain.c index d3372a64c01..f13363fe473 100644 --- a/usr.sbin/tcpdump/print-domain.c +++ b/usr.sbin/tcpdump/print-domain.c @@ -301,12 +301,39 @@ struct tok ns_type2str[] = { { T_RRSIG, "RRSIG" }, /* RFC 4034 */ { T_NSEC, "NSEC" }, /* RFC 4034 */ { T_DNSKEY, "DNSKEY" }, /* RFC 4034 */ + { T_DHCID, "DHCID" }, /* RFC 4701 */ + { T_NSEC3, "NSEC3" }, /* RFC 5155, RFC 9077 */ + { T_NSEC3PARAM, "NSEC3PARAM" }, /* RFC 5155 */ + { T_TLSA, "TLSA" }, /* RFC 6698 */ + { T_SMIMEA, "SMIMEA" }, /* RFC 8162 */ + { T_HIP, "HIP" }, /* RFC 8005 */ + { T_NINFO, "NINFO" }, + { T_RKEY, "RKEY" }, + { T_TALINK, "TALINK" }, + { T_CDS, "CDS" }, /* RFC 7344 */ + { T_CDNSKEY, "CDNSKEY" }, /* RFC 7344 */ + { T_OPENPGPKEY, "OPENPGPKEY" }, /* RFC 7929 */ + { T_CSYNC, "CSYNC" }, /* RFC 7477 */ + { T_ZONEMD, "ZONEMD" }, /* RFC 8976 */ + { T_SVCB, "SVCB" }, /* RFC 9460 */ + { T_HTTPS, "HTTPS" }, /* RFC 9460 */ + { T_DSYNC, "DSYNC" }, /* RFC 9859 */ + { T_HHIT, "HHIT" }, /* RFC 9886 */ + { T_BRID, "BRID" }, /* RFC 9886 */ + { T_UNECE, "UNECE" }, + { T_ISO, "ISO" }, { T_SPF, "SPF" }, /* RFC-schlitt-spf-classic-02.txt */ { T_UINFO, "UINFO" }, { T_UID, "UID" }, { T_GID, "GID" }, { T_UNSPEC, "UNSPEC" }, - { T_UNSPECA, "UNSPECA" }, + { T_NID, "NID" }, /* RFC 6742 */ + { T_L32, "L32" }, /* RFC 6742 */ + { T_L64, "L64" }, /* RFC 6742 */ + { T_LP, "LP" }, /* RFC 6742 */ + { T_EUI48, "EUI48" }, /* RFC 7043 */ + { T_EUI64, "EUI64" }, /* RFC 7043 */ + { T_NXNAME, "NXNAME" }, /* RFC 9824 */ { T_TKEY, "TKEY" }, /* RFC 2930 */ { T_TSIG, "TSIG" }, /* RFC 2845 */ { T_IXFR, "IXFR" }, /* RFC 1995 */ @@ -314,6 +341,17 @@ struct tok ns_type2str[] = { { T_MAILB, "MAILB" }, /* RFC 1035 */ { T_MAILA, "MAILA" }, /* RFC 1035 */ { T_ANY, "ANY" }, + { T_URI, "URI" }, /* RFC 7553 */ + { T_CAA, "CAA" }, /* RFC 8659 */ + { T_AVC, "AVC" }, + { T_DOA, "DOA" }, + { T_AMTRELAY, "AMTRELAY" }, /* RFC 8777 */ + { T_RESINFO, "RESINFO" }, /* RFC 9606 */ + { T_WALLET, "WALLET" }, + { T_CLA, "CLA" }, + { T_IPN, "IPN" }, + { T_TA, "TA" }, + { T_DLV, "DLV" }, /* RFC 8749, RFC 4431 */ { 0, NULL } }; @@ -527,13 +565,6 @@ ns_rprint(const u_char *cp, const u_char *bp, int is_mdns) printf(" DO"); break; - case T_UNSPECA: /* One long string */ - if (!TTEST2(*cp, len)) - return(NULL); - if (fn_printn(cp, len, snapend)) - return(NULL); - break; - case T_TSIG: { if (cp + len > snapend)