1int_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 (ECH => 5, "ech")
14 (IPV6HINT => 6, "ipv6hint")
15 (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}