1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

resolve: add several comments for DNS type table

Also update compile time checks.

Follow-up for 818bb6f4825b57c2cd2783fbffe2b2ef82a31573.
This commit is contained in:
Yu Watanabe 2023-12-30 06:05:32 +09:00
parent e6bca18296
commit d05649ca7d

View File

@ -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 */