From: Yu Watanabe Date: Fri, 29 Dec 2023 21:05:32 +0000 (+0900) Subject: resolve: add several comments for DNS type table X-Git-Tag: v256-rc1~1364 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d05649ca7dbdff34c96ec7b9cd4af7d6949bec43;p=thirdparty%2Fsystemd.git resolve: add several comments for DNS type table Also update compile time checks. Follow-up for 818bb6f4825b57c2cd2783fbffe2b2ef82a31573. --- diff --git a/src/resolve/dns-type.h b/src/resolve/dns-type.h index b27ed130566..404256c2f88 100644 --- a/src/resolve/dns-type.h +++ b/src/resolve/dns-type.h @@ -7,7 +7,7 @@ * http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml. */ enum { - /* Normal records */ + /* 0 is reserved */ DNS_TYPE_A = 0x01, DNS_TYPE_NS, DNS_TYPE_MD, @@ -61,7 +61,7 @@ enum { DNS_TYPE_NSEC3PARAM, DNS_TYPE_TLSA, DNS_TYPE_SMIMEA, /* RFC 8162 */ - + /* 0x36 (54) is not assigned */ DNS_TYPE_HIP = 0x37, DNS_TYPE_NINFO, DNS_TYPE_RKEY, @@ -73,7 +73,7 @@ enum { DNS_TYPE_ZONEMD, DNS_TYPE_SVCB, /* RFC 9460 */ DNS_TYPE_HTTPS, /* RFC 9460 */ - + /* 0x42…0x62 (66…98) are not assigned */ DNS_TYPE_SPF = 0x63, DNS_TYPE_UINFO, DNS_TYPE_UID, @@ -85,7 +85,7 @@ enum { DNS_TYPE_LP, DNS_TYPE_EUI48, DNS_TYPE_EUI64, - + /* 0x6e…0xf8 (110…248) are not assigned */ DNS_TYPE_TKEY = 0xF9, DNS_TYPE_TSIG, DNS_TYPE_IXFR, @@ -99,15 +99,20 @@ enum { DNS_TYPE_DOA, DNS_TYPE_AMTRELAY, DNS_TYPE_RESINFO, + /* 0x106…0x7fff (262…32767) are not assigned */ DNS_TYPE_TA = 0x8000, DNS_TYPE_DLV, - + /* 32770…65279 are not assigned */ + /* 65280…65534 are for private use */ + /* 65535 is reserved */ _DNS_TYPE_MAX, _DNS_TYPE_INVALID = -EINVAL, }; -assert_cc(DNS_TYPE_SSHFP == 44); -assert_cc(DNS_TYPE_TLSA == 52); +assert_cc(DNS_TYPE_SMIMEA == 53); +assert_cc(DNS_TYPE_HTTPS == 65); +assert_cc(DNS_TYPE_EUI64 == 109); +assert_cc(DNS_TYPE_RESINFO == 261); assert_cc(DNS_TYPE_ANY == 255); /* DNS record classes, see RFC 1035 */