domain/base/iana/
svcb.rs

1//! Service Binding (SVCB) Parameter Registry
2
3int_enum! {
4    =>
5    SvcParamKey, u16;
6
7    (MANDATORY => 0, "mandatory")
8    (ALPN => 1, "alpn")
9    (NO_DEFAULT_ALPN => 2, "no-default-alpn")
10    (PORT => 3, "port")
11    (IPV4HINT => 4, "ipv4hint")
12    // https://datatracker.ietf.org/doc/draft-ietf-tls-esni/
13    (ECH => 5, "ech")
14    (IPV6HINT => 6, "ipv6hint")
15    // https://datatracker.ietf.org/doc/draft-ietf-add-svcb-dns/
16    (DOHPATH => 7, "dohpath")
17}
18
19int_enum_str_with_prefix!(SvcParamKey, "key", b"key", u16, "unknown key");
20int_enum_zonefile_fmt_with_prefix!(SvcParamKey, "key");
21
22impl SvcParamKey {
23    pub const PRIVATE_RANGE_BEGIN: u16 = 65280;
24    pub const PRIVATE_RANGE_END: u16 = 65534;
25    pub const INVALID: Self = Self(65535);
26}