| Copyright | (c) Viktor Dukhovni 2026 |
|---|---|
| License | BSD-3-Clause |
| Maintainer | ietf-dane@dukhovni.org |
| Stability | unstable |
| Safe Haskell | None |
| Language | GHC2024 |
Net.DNSBase.RData.SVCB.SPV
Description
One KnownSVCParamValue instance per standardised service
parameter key. Each type corresponds to a SVCParamKey from
the IANA registry and carries the value payload for that key
in a form suited to the application that consumes it (a port
as Word16, address hints as a NonEmpty of IPv4 / IPv6,
and so on).
An unknown key falls through to
OpaqueSPV, which preserves the raw wire
bytes. Applications register additional typed values at runtime
via extendRRwithType on the SVCB or
HTTPS RR type — see Net.DNSBase.Extensible for a worked
example.
Synopsis
- data SPV_mandatory where
- pattern SPV_MANDATORY :: Set SVCParamKey -> SPV_mandatory
- newtype SPV_alpn = SPV_ALPN (NonEmpty ShortByteString)
- data SPV_ndalpn = SPV_NDALPN
- newtype SPV_port = SPV_PORT Word16
- newtype SPV_ipv4hint = SPV_IPV4HINT (NonEmpty IPv4)
- newtype SPV_ipv6hint = SPV_IPV6HINT (NonEmpty IPv6)
- newtype SPV_ech = SPV_ECH ShortByteString
- newtype SPV_dohpath = SPV_DOHPATH Text
- newtype SPV_docpath = SPV_DOCPATH [ShortByteString]
- newtype SPV_tlsgroups = SPV_TLSGROUPS (NonEmpty Word16)
- data SPV_pvd = SPV_PVD
Documentation
data SPV_mandatory where Source #
The mandatory service parameter
(RFC 9460 section 8)
— the set of additional SVCParamKey codes a client must
recognise to make sense of this RR, on top of any keys that
are automatically mandatory for the application protocol. A
client that does not understand all the listed keys must
ignore the RR.
The set may not be empty on the wire (an empty list is
encoded as the parameter being absent) and may hold at most
32767 keys. The constructor is not exported; build instances
via fromNonEmptyList or by combining values with their
Semigroup instance.
Bundled Patterns
| pattern SPV_MANDATORY | One-way pattern exposing the underlying key set for lookups.
Construction is available only via |
Fields
| |
Instances
The alpn service parameter
(RFC 9460 section 7.1)
— the set of Application-Layer Protocol Negotiation
(RFC 7301)
protocol identifiers this service endpoint supports. Together
with SPV_ndalpn it defines the SVCB ALPN set: by default the
scheme's protocol is implicitly included, and SPV_ndalpn
suppresses that default.
Constructors
| SPV_ALPN (NonEmpty ShortByteString) |
Instances
| Presentable SPV_alpn Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods present :: SPV_alpn -> Builder -> Builder Source # presentLazy :: SPV_alpn -> ByteString -> ByteString Source # | |
| KnownSVCParamValue SPV_alpn Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
| Show SPV_alpn Source # | |
| Eq SPV_alpn Source # | |
| Ord SPV_alpn Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
data SPV_ndalpn Source #
The no-default-alpn service parameter
(RFC 9460 section 7.1)
— a value-less flag that suppresses the scheme's default ALPN
from the SVCB ALPN set. Meaningful only alongside an explicit
SPV_alpn that supplies a replacement protocol list.
Constructors
| SPV_NDALPN |
Instances
| Presentable SPV_ndalpn Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods present :: SPV_ndalpn -> Builder -> Builder Source # presentLazy :: SPV_ndalpn -> ByteString -> ByteString Source # | |
| KnownSVCParamValue SPV_ndalpn Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods spvKey :: forall b -> b ~ SPV_ndalpn => SVCParamKey Source # spvKeyPres :: forall b -> b ~ SPV_ndalpn => Builder -> Builder Source # encodeSPV :: ErrorContext r => SPV_ndalpn -> SPut s r Source # decodeSPV :: forall b -> b ~ SPV_ndalpn => Int -> SGet SVCParamValue Source # | |
| Show SPV_ndalpn Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods showsPrec :: Int -> SPV_ndalpn -> ShowS # show :: SPV_ndalpn -> String # showList :: [SPV_ndalpn] -> ShowS # | |
| Eq SPV_ndalpn Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
| Ord SPV_ndalpn Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods compare :: SPV_ndalpn -> SPV_ndalpn -> Ordering # (<) :: SPV_ndalpn -> SPV_ndalpn -> Bool # (<=) :: SPV_ndalpn -> SPV_ndalpn -> Bool # (>) :: SPV_ndalpn -> SPV_ndalpn -> Bool # (>=) :: SPV_ndalpn -> SPV_ndalpn -> Bool # max :: SPV_ndalpn -> SPV_ndalpn -> SPV_ndalpn # min :: SPV_ndalpn -> SPV_ndalpn -> SPV_ndalpn # | |
The port service parameter
(RFC 9460 section 7.2)
— overrides the scheme's default TCP or UDP port for reaching
this service endpoint.
Instances
| Presentable SPV_port Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods present :: SPV_port -> Builder -> Builder Source # presentLazy :: SPV_port -> ByteString -> ByteString Source # | |
| KnownSVCParamValue SPV_port Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
| Bounded SPV_port Source # | |
| Enum SPV_port Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
| Num SPV_port Source # | |
| Read SPV_port Source # | |
| Integral SPV_port Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
| Real SPV_port Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods toRational :: SPV_port -> Rational # | |
| Show SPV_port Source # | |
| Eq SPV_port Source # | |
| Ord SPV_port Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
newtype SPV_ipv4hint Source #
The ipv4hint service parameter
(RFC 9460 section 7.3)
— a non-empty list of IPv4 addresses for this service endpoint
that a client may use to start a connection in parallel with
an authoritative A lookup. Hints are advisory; clients
should still validate them against authoritative address
records when they arrive.
Constructors
| SPV_IPV4HINT (NonEmpty IPv4) |
Instances
| Presentable SPV_ipv4hint Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods present :: SPV_ipv4hint -> Builder -> Builder Source # presentLazy :: SPV_ipv4hint -> ByteString -> ByteString Source # | |
| KnownSVCParamValue SPV_ipv4hint Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods spvKey :: forall b -> b ~ SPV_ipv4hint => SVCParamKey Source # spvKeyPres :: forall b -> b ~ SPV_ipv4hint => Builder -> Builder Source # encodeSPV :: ErrorContext r => SPV_ipv4hint -> SPut s r Source # decodeSPV :: forall b -> b ~ SPV_ipv4hint => Int -> SGet SVCParamValue Source # | |
| Show SPV_ipv4hint Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods showsPrec :: Int -> SPV_ipv4hint -> ShowS # show :: SPV_ipv4hint -> String # showList :: [SPV_ipv4hint] -> ShowS # | |
| Eq SPV_ipv4hint Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
| Ord SPV_ipv4hint Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods compare :: SPV_ipv4hint -> SPV_ipv4hint -> Ordering # (<) :: SPV_ipv4hint -> SPV_ipv4hint -> Bool # (<=) :: SPV_ipv4hint -> SPV_ipv4hint -> Bool # (>) :: SPV_ipv4hint -> SPV_ipv4hint -> Bool # (>=) :: SPV_ipv4hint -> SPV_ipv4hint -> Bool # max :: SPV_ipv4hint -> SPV_ipv4hint -> SPV_ipv4hint # min :: SPV_ipv4hint -> SPV_ipv4hint -> SPV_ipv4hint # | |
newtype SPV_ipv6hint Source #
The ipv6hint service parameter
(RFC 9460 section 7.3)
— the IPv6 counterpart of SPV_ipv4hint: a non-empty list of
IPv6 addresses to try in parallel with the authoritative
AAAA lookup.
Constructors
| SPV_IPV6HINT (NonEmpty IPv6) |
Instances
| Presentable SPV_ipv6hint Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods present :: SPV_ipv6hint -> Builder -> Builder Source # presentLazy :: SPV_ipv6hint -> ByteString -> ByteString Source # | |
| KnownSVCParamValue SPV_ipv6hint Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods spvKey :: forall b -> b ~ SPV_ipv6hint => SVCParamKey Source # spvKeyPres :: forall b -> b ~ SPV_ipv6hint => Builder -> Builder Source # encodeSPV :: ErrorContext r => SPV_ipv6hint -> SPut s r Source # decodeSPV :: forall b -> b ~ SPV_ipv6hint => Int -> SGet SVCParamValue Source # | |
| Show SPV_ipv6hint Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods showsPrec :: Int -> SPV_ipv6hint -> ShowS # show :: SPV_ipv6hint -> String # showList :: [SPV_ipv6hint] -> ShowS # | |
| Eq SPV_ipv6hint Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
| Ord SPV_ipv6hint Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods compare :: SPV_ipv6hint -> SPV_ipv6hint -> Ordering # (<) :: SPV_ipv6hint -> SPV_ipv6hint -> Bool # (<=) :: SPV_ipv6hint -> SPV_ipv6hint -> Bool # (>) :: SPV_ipv6hint -> SPV_ipv6hint -> Bool # (>=) :: SPV_ipv6hint -> SPV_ipv6hint -> Bool # max :: SPV_ipv6hint -> SPV_ipv6hint -> SPV_ipv6hint # min :: SPV_ipv6hint -> SPV_ipv6hint -> SPV_ipv6hint # | |
The ech service parameter
(RFC9848, Section 3)
— an Encrypted Client Hello (ECH) configuration list.
Presented as a base64-encoded value.
Constructors
| SPV_ECH ShortByteString |
Instances
| Presentable SPV_ech Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods present :: SPV_ech -> Builder -> Builder Source # presentLazy :: SPV_ech -> ByteString -> ByteString Source # | |
| KnownSVCParamValue SPV_ech Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
| Show SPV_ech Source # | |
| Eq SPV_ech Source # | |
| Ord SPV_ech Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
newtype SPV_dohpath Source #
The dohpath service parameter
(RFC 9461)
— a URI template (UTF-8) advertising the DNS-over-HTTPS
endpoint at this service. Typically seen on resolver-discovery
answers to queries for _dns.resolver.arpa or on explicit
queries to a specific operator's resolver.
Constructors
| SPV_DOHPATH Text |
Instances
| Presentable SPV_dohpath Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods present :: SPV_dohpath -> Builder -> Builder Source # presentLazy :: SPV_dohpath -> ByteString -> ByteString Source # | |
| KnownSVCParamValue SPV_dohpath Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods spvKey :: forall b -> b ~ SPV_dohpath => SVCParamKey Source # spvKeyPres :: forall b -> b ~ SPV_dohpath => Builder -> Builder Source # encodeSPV :: ErrorContext r => SPV_dohpath -> SPut s r Source # decodeSPV :: forall b -> b ~ SPV_dohpath => Int -> SGet SVCParamValue Source # | |
| Show SPV_dohpath Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods showsPrec :: Int -> SPV_dohpath -> ShowS # show :: SPV_dohpath -> String # showList :: [SPV_dohpath] -> ShowS # | |
| Eq SPV_dohpath Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
| Ord SPV_dohpath Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods compare :: SPV_dohpath -> SPV_dohpath -> Ordering # (<) :: SPV_dohpath -> SPV_dohpath -> Bool # (<=) :: SPV_dohpath -> SPV_dohpath -> Bool # (>) :: SPV_dohpath -> SPV_dohpath -> Bool # (>=) :: SPV_dohpath -> SPV_dohpath -> Bool # max :: SPV_dohpath -> SPV_dohpath -> SPV_dohpath # min :: SPV_dohpath -> SPV_dohpath -> SPV_dohpath # | |
newtype SPV_docpath Source #
The docpath service parameter
(RFC 9953 section 8.2)
— the absolute path to the DNS-over-CoAP (DoC) resource at this
service endpoint, represented as a list of path segments. An
empty list denotes the root path "/" (on the wire: a
zero-length SvcParamValue).
Each segment is 1..255 octets per the RFC ABNF; the wire-form
decoder rejects zero-length segments. Presentation form is a
comma-separated list of segments using the standard RFC 9460
Appendix A.1 quoting and escaping rules, identical to those of
SPV_alpn.
Constructors
| SPV_DOCPATH [ShortByteString] |
Instances
| Presentable SPV_docpath Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods present :: SPV_docpath -> Builder -> Builder Source # presentLazy :: SPV_docpath -> ByteString -> ByteString Source # | |
| KnownSVCParamValue SPV_docpath Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods spvKey :: forall b -> b ~ SPV_docpath => SVCParamKey Source # spvKeyPres :: forall b -> b ~ SPV_docpath => Builder -> Builder Source # encodeSPV :: ErrorContext r => SPV_docpath -> SPut s r Source # decodeSPV :: forall b -> b ~ SPV_docpath => Int -> SGet SVCParamValue Source # | |
| Show SPV_docpath Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods showsPrec :: Int -> SPV_docpath -> ShowS # show :: SPV_docpath -> String # showList :: [SPV_docpath] -> ShowS # | |
| Eq SPV_docpath Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
| Ord SPV_docpath Source # | Wire-form canonical order: by total wire length first, then
by the segment-list |
Defined in Net.DNSBase.RData.SVCB.SPV Methods compare :: SPV_docpath -> SPV_docpath -> Ordering # (<) :: SPV_docpath -> SPV_docpath -> Bool # (<=) :: SPV_docpath -> SPV_docpath -> Bool # (>) :: SPV_docpath -> SPV_docpath -> Bool # (>=) :: SPV_docpath -> SPV_docpath -> Bool # max :: SPV_docpath -> SPV_docpath -> SPV_docpath # min :: SPV_docpath -> SPV_docpath -> SPV_docpath # | |
newtype SPV_tlsgroups Source #
The tls-supported-groups service parameter
(draft-ietf-tls-key-share-prediction-04 section 5)
— a non-empty list of TLS Named Group codepoints (the
IANA TLS Supported Groups registry)
that the service supports. Clients can use this hint to
predict an acceptable key share, reducing the chance of a
HelloRetryRequest round-trip.
The wire form is a non-empty sequence of 16-bit codepoints in network byte order; the decoder rejects an empty value. The presentation form is a comma-separated list of decimal integers and forbids zone-file escape sequences (per the draft). Duplicates are flagged as a syntax error by the specification but are not currently rejected by either the encoder or the decoder — callers are expected to feed in a duplicate-free list, in their preferred order (the spec does not impose canonical ordering on the wire).
Constructors
| SPV_TLSGROUPS (NonEmpty Word16) |
Instances
| Presentable SPV_tlsgroups Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods present :: SPV_tlsgroups -> Builder -> Builder Source # presentLazy :: SPV_tlsgroups -> ByteString -> ByteString Source # | |
| KnownSVCParamValue SPV_tlsgroups Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods spvKey :: forall b -> b ~ SPV_tlsgroups => SVCParamKey Source # spvKeyPres :: forall b -> b ~ SPV_tlsgroups => Builder -> Builder Source # encodeSPV :: ErrorContext r => SPV_tlsgroups -> SPut s r Source # decodeSPV :: forall b -> b ~ SPV_tlsgroups => Int -> SGet SVCParamValue Source # | |
| Show SPV_tlsgroups Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods showsPrec :: Int -> SPV_tlsgroups -> ShowS # show :: SPV_tlsgroups -> String # showList :: [SPV_tlsgroups] -> ShowS # | |
| Eq SPV_tlsgroups Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods (==) :: SPV_tlsgroups -> SPV_tlsgroups -> Bool # (/=) :: SPV_tlsgroups -> SPV_tlsgroups -> Bool # | |
| Ord SPV_tlsgroups Source # | Wire-form canonical order: by length first, then elementwise. |
Defined in Net.DNSBase.RData.SVCB.SPV Methods compare :: SPV_tlsgroups -> SPV_tlsgroups -> Ordering # (<) :: SPV_tlsgroups -> SPV_tlsgroups -> Bool # (<=) :: SPV_tlsgroups -> SPV_tlsgroups -> Bool # (>) :: SPV_tlsgroups -> SPV_tlsgroups -> Bool # (>=) :: SPV_tlsgroups -> SPV_tlsgroups -> Bool # max :: SPV_tlsgroups -> SPV_tlsgroups -> SPV_tlsgroups # min :: SPV_tlsgroups -> SPV_tlsgroups -> SPV_tlsgroups # | |
The pvd service parameter
(draft-ietf-intarea-proxy-config-14 section 7.5)
— a value-less flag that announces the host supports
Provisioning Domain discovery via the well-known PvD URI. Its
presence in an SVCB or HTTPS RR signals that a client MAY
fetch PvD Additional Information from
https://host/.well-known/pvd. Per the draft, the wire
value MUST be empty; the presentation form is just the bare
key name with no '='.
Constructors
| SPV_PVD |
Instances
| Presentable SPV_pvd Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV Methods present :: SPV_pvd -> Builder -> Builder Source # presentLazy :: SPV_pvd -> ByteString -> ByteString Source # | |
| KnownSVCParamValue SPV_pvd Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |
| Show SPV_pvd Source # | |
| Eq SPV_pvd Source # | |
| Ord SPV_pvd Source # | |
Defined in Net.DNSBase.RData.SVCB.SPV | |