| Copyright | (c) Viktor Dukhovni 2026 |
|---|---|
| License | BSD-3-Clause |
| Maintainer | ietf-dane@dukhovni.org |
| Stability | unstable |
| Safe Haskell | None |
| Language | GHC2024 |
Net.DNSBase.RR
Contents
Description
An RR value is the standard DNS resource record: an owner name,
a class, a type, a TTL, and an RData payload.
The payload is held inside the existential
RData wrapper, so a single RR value can
carry any registered RR type's data. Use rrDataCast to recover
a specific KnownRData value from the wrapper;
the fromRData / monoRData
/ rdataType helpers re-exported from
Net.DNSBase.RData do the same on RData
directly.
DNS resource record data type
DNS Resource Record RFC1035 3.2.1
1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | / / / NAME / | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TYPE | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | CLASS | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TTL | | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | RDLENGTH | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| / RDATA / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
The TYPE field is implicit in the polymorphic rrData.
Instances
| Presentable RR Source # | |
Defined in Net.DNSBase.Internal.RR Methods present :: RR -> Builder -> Builder Source # presentLazy :: RR -> ByteString -> ByteString Source # | |
| Show RR Source # | |
| Eq RR Source # | |
rrDataCast :: KnownRData a => RR -> Maybe a Source #
Attempt to cast the RData payload of an RR to a
KnownRData type, obtaining its type-specific representation.
Returns Nothing if the types do not match.
Note that opaque RData payloads can't be cast directly to
type-specific forms, instead their content has to be explicitly
decoded (see fromOpaque).