| Copyright | (c) Viktor Dukhovni 2026 |
|---|---|
| License | BSD-3-Clause |
| Maintainer | ietf-dane@dukhovni.org |
| Stability | unstable |
| Safe Haskell | None |
| Language | GHC2024 |
Net.DNSBase.RData.TXT
Description
Three RFC 1035 RR types carrying byte-string payloads.
T_txt is the general-purpose record holding one or more
character-strings — used by SPF, DKIM, DMARC, and many ad-hoc
TXT conventions. T_hinfo was defined to describe a host's
hardware and operating system but is rarely used in modern zone
data. T_null is opaque arbitrary bytes; primarily a
historical placeholder, presented using the generic RFC 3597
syntax.
Documentation
The TXT resource record
(RFC 1035 section 3.3.14)
— a non-empty list of byte-strings, each at most 255 bytes long.
Most TXT-record conventions (SPF, DKIM, DMARC, ...) concatenate
the strings on read, but the wire format preserves the boundaries.
The constructor does not enforce the per-string 255-byte limit; encoding fails if any individual string exceeds it. Values decoded from wire form are always within the limit by construction.
The Ord instance compares the strings as DNS
character-strings (length-prefixed lexicographic), agreeing
with the canonical wire-form ordering of
RFC 4034 section 6.2.
Constructors
| T_TXT (NonEmpty ShortByteString) | One or more character-strings |
Instances
| Presentable T_txt Source # | |||||
Defined in Net.DNSBase.RData.TXT Methods present :: T_txt -> Builder -> Builder Source # presentLazy :: T_txt -> ByteString -> ByteString Source # | |||||
| KnownRData T_txt Source # | |||||
Defined in Net.DNSBase.RData.TXT Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_txt => RDataExtensionVal T_txt Source # rdType :: forall b -> b ~ T_txt => RRTYPE Source # rdTypePres :: forall b -> b ~ T_txt => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_txt => RDataExtensionVal T_txt -> Int -> SGet RData Source # | |||||
| Show T_txt Source # | |||||
| Eq T_txt Source # | |||||
| Ord T_txt Source # | |||||
| type RDataExtensionVal T_txt Source # | |||||
Defined in Net.DNSBase.RData.TXT | |||||
The HINFO resource record
(RFC 1035 section 3.3.2)
— host information: a CPU character-string and an OS
character-string describing the named host's hardware and
operating system. Rarely used in modern zone data; RFC 8482
reuses the type code as a placeholder answer for ANY queries.
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / CPU / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / OS / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
The Ord instance compares both fields as DNS
character-strings, giving canonical ordering
(RFC 4034 section 6.2).
Constructors
| T_HINFO | |
Fields | |
Instances
| Presentable T_hinfo Source # | |||||
Defined in Net.DNSBase.RData.TXT Methods present :: T_hinfo -> Builder -> Builder Source # presentLazy :: T_hinfo -> ByteString -> ByteString Source # | |||||
| KnownRData T_hinfo Source # | |||||
Defined in Net.DNSBase.RData.TXT Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_hinfo => RDataExtensionVal T_hinfo Source # rdType :: forall b -> b ~ T_hinfo => RRTYPE Source # rdTypePres :: forall b -> b ~ T_hinfo => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_hinfo => RDataExtensionVal T_hinfo -> Int -> SGet RData Source # | |||||
| Show T_hinfo Source # | |||||
| Eq T_hinfo Source # | |||||
| Ord T_hinfo Source # | |||||
Defined in Net.DNSBase.RData.TXT | |||||
| type RDataExtensionVal T_hinfo Source # | |||||
Defined in Net.DNSBase.RData.TXT | |||||
The NULL resource record
(RFC 1035 section 3.3.10)
— arbitrary opaque bytes (up to 65535). Rarely seen on the
wire; presented using the generic
RFC 3597 section 5
syntax (\# n hex).
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / <anything> / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Derived Ord is canonical
(RFC 4034 section 6.2).
Instances
| Presentable T_null Source # | |||||
Defined in Net.DNSBase.RData.TXT Methods present :: T_null -> Builder -> Builder Source # presentLazy :: T_null -> ByteString -> ByteString Source # | |||||
| KnownRData T_null Source # | |||||
Defined in Net.DNSBase.RData.TXT Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_null => RDataExtensionVal T_null Source # rdType :: forall b -> b ~ T_null => RRTYPE Source # rdTypePres :: forall b -> b ~ T_null => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_null => RDataExtensionVal T_null -> Int -> SGet RData Source # | |||||
| Show T_null Source # | |||||
| Eq T_null Source # | |||||
| Ord T_null Source # | |||||
| type RDataExtensionVal T_null Source # | |||||
Defined in Net.DNSBase.RData.TXT | |||||