dnsbase
Copyright(c) Viktor Dukhovni 2026
LicenseBSD-3-Clause
Maintainerietf-dane@dukhovni.org
Stabilityunstable
Safe HaskellNone
LanguageGHC2024

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.

Synopsis

Documentation

newtype T_txt Source #

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

Instances details
Presentable T_txt Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

KnownRData T_txt Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

Associated Types

type RDataExtensionVal T_txt 
Instance details

Defined in Net.DNSBase.RData.TXT

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 #

rdEncode :: T_txt -> SPut s RData Source #

cnEncode :: T_txt -> SPut s RData Source #

Show T_txt Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

Methods

showsPrec :: Int -> T_txt -> ShowS #

show :: T_txt -> String #

showList :: [T_txt] -> ShowS #

Eq T_txt Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

Methods

(==) :: T_txt -> T_txt -> Bool #

(/=) :: T_txt -> T_txt -> Bool #

Ord T_txt Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

Methods

compare :: T_txt -> T_txt -> Ordering #

(<) :: T_txt -> T_txt -> Bool #

(<=) :: T_txt -> T_txt -> Bool #

(>) :: T_txt -> T_txt -> Bool #

(>=) :: T_txt -> T_txt -> Bool #

max :: T_txt -> T_txt -> T_txt #

min :: T_txt -> T_txt -> T_txt #

type RDataExtensionVal T_txt Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

data T_hinfo Source #

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).

Instances

Instances details
Presentable T_hinfo Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

KnownRData T_hinfo Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

Associated Types

type RDataExtensionVal T_hinfo 
Instance details

Defined in Net.DNSBase.RData.TXT

Show T_hinfo Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

Eq T_hinfo Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

Methods

(==) :: T_hinfo -> T_hinfo -> Bool #

(/=) :: T_hinfo -> T_hinfo -> Bool #

Ord T_hinfo Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

type RDataExtensionVal T_hinfo Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

newtype T_null Source #

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).

Constructors

T_NULL Bytes16 

Instances

Instances details
Presentable T_null Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

KnownRData T_null Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

Associated Types

type RDataExtensionVal T_null 
Instance details

Defined in Net.DNSBase.RData.TXT

Show T_null Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

Eq T_null Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

Methods

(==) :: T_null -> T_null -> Bool #

(/=) :: T_null -> T_null -> Bool #

Ord T_null Source # 
Instance details

Defined in Net.DNSBase.RData.TXT

type RDataExtensionVal T_null Source # 
Instance details

Defined in Net.DNSBase.RData.TXT