| Copyright | (c) Viktor Dukhovni 2026 |
|---|---|
| License | BSD-3-Clause |
| Maintainer | ietf-dane@dukhovni.org |
| Stability | unstable |
| Safe Haskell | None |
| Language | GHC2024 |
Net.DNSBase.RData.Obsolete
Description
A grab-bag of RR types that are no longer used in current zone data but appear in historic records and zone-data archives. They are defined here so wire-form parsers can read stray examples without failing. No new deployment should use any of these types.
The module gathers four loose groups:
- Early host-name and mailbox pointers:
T_md,T_mf,T_mb,T_mg,T_mr(the shared codecX_domainis re-exported here). - RFC 1035 and RFC 1183 records that never saw wide use:
T_minfo,T_x25,T_isdn,T_rt. - OSI / X.400-mapping records, all deprecated by RFC 9121:
T_nsap,T_nsapptr,T_px. - Other one-offs:
T_gpos(early geographic location, superseded byLOC),T_kx(Key Exchange),T_a6(chained IPv6 addressing; obsoleted by RFC 6563).
T_wks (Well-Known Services) is re-exported here for
convenience; its definition lives in Net.DNSBase.RData.WKS.
The pre-RFC-4034 records in this module lower-case their
embedded domains in canonical form; T_nsapptr is the
exception (its derived instances compare the wire bytes
case-sensitively).
Synopsis
- data X_domain (n :: Nat) where
- type T_md = X_domain N_md
- type T_mf = X_domain N_mf
- type T_mb = X_domain N_mb
- type T_mg = X_domain N_mg
- type T_mr = X_domain N_mr
- data T_wks = T_WKS {}
- newtype WksProto where
- data T_minfo = T_MINFO {}
- newtype T_x25 = T_X25 ShortByteString
- data T_isdn = T_ISDN ShortByteString (Maybe ShortByteString)
- data T_rt = T_RT Word16 Domain
- newtype T_nsap = T_NSAP ShortByteString
- newtype T_nsapptr = T_NSAPPTR Domain
- data T_px = T_PX {}
- data T_gpos = T_GPOS {}
- data T_kx = T_KX {}
- data T_a6 where
Obsolete RR types
Obsolete RR types representing a host name or mailbox.
data X_domain (n :: Nat) where Source #
Shared wire-format representation for the RFC 1035 RR types
whose RDATA is a single domain name: NS
(section 3.3.11),
CNAME
(section 3.3.1),
PTR
(section 3.3.12),
and the obsolete mailbox-pointer types MB, MD, MF, MG,
MR (RFC 1035 sections 3.3.3-3.3.8). The type parameter n
(one of N_ns, N_cname, N_ptr, N_mb, N_md, N_mf,
N_mg, N_mr) determines the RR type. Each has its own type
synonym (T_ns, T_cname, ...) and matching pattern synonym
(T_NS, T_CNAME, ...).
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / DOMAINNAME / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Although all these RR types share a common underlying representation, the constructors are not shared and the types are not mutually coercible — this is deliberate, to catch RR-type confusion at compile time.
The target domain is subject to wire-form name compression on
encode
(RFC 3597 section 4)
and canonicalises to lower case
(RFC 4034 section 6.2).
The Eq and Ord instances compare in canonical wire form
(via equalWireHost / compareWireHost), so Ord is
canonical. Presentation preserves the original case.
Bundled Patterns
| pattern T_MD :: Domain -> T_md | Mail destination
(RFC 1035 section 3.3.4;
obsolete — use |
| pattern T_MF :: Domain -> T_mf | Mail forwarder
(RFC 1035 section 3.3.5;
obsolete — use |
| pattern T_MB :: Domain -> T_mb | Mailbox domain (RFC 1035 section 3.3.3; obsolete). |
| pattern T_MG :: Domain -> T_mg | Mail group member (RFC 1035 section 3.3.6; obsolete). |
| pattern T_MR :: Domain -> T_mr | Mail rename (RFC 1035 section 3.3.8; obsolete). |
Instances
Other obsolete RR types.
The WKS resource record
(RFC 1035 section 3.4.2),
mapping an IPv4 address and a WksProto protocol number to the
set of TCP/UDP port numbers (16-bit) on which the named host
accepts connections. Ports are encoded on the wire as a packed
bitmap whose length implies the maximum port carried.
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ADDRESS | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PROTOCOL | | +--+--+--+--+--+--+--+--+ | | | / <BIT MAP> / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
The Ord instance compares by address, then protocol, then
the port set in descending order — matching the byte-wise
comparison of the wire-form port bitmap, so it agrees with the
canonical RR-content ordering of
RFC 4034 section 6.2.
Constructors
| T_WKS | |
Instances
| Presentable T_wks Source # | |||||
Defined in Net.DNSBase.RData.WKS Methods present :: T_wks -> Builder -> Builder Source # presentLazy :: T_wks -> ByteString -> ByteString Source # | |||||
| KnownRData T_wks Source # | |||||
Defined in Net.DNSBase.RData.WKS Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_wks => RDataExtensionVal T_wks Source # rdType :: forall b -> b ~ T_wks => RRTYPE Source # rdTypePres :: forall b -> b ~ T_wks => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_wks => RDataExtensionVal T_wks -> Int -> SGet RData Source # | |||||
| Show T_wks Source # | |||||
| Eq T_wks Source # | |||||
| Ord T_wks Source # | |||||
| type RDataExtensionVal T_wks Source # | |||||
Defined in Net.DNSBase.RData.WKS | |||||
IP protocol number used in the T_wks header byte. Bidirectional
patterns TCP (6) and UDP (17) cover the two protocols WKS
was ever realistically used for; any other protocol number
presents as its decimal value.
Instances
| Presentable WksProto Source # | |
Defined in Net.DNSBase.RData.WKS Methods present :: WksProto -> Builder -> Builder Source # presentLazy :: WksProto -> ByteString -> ByteString Source # | |
| Bounded WksProto Source # | |
| Enum WksProto Source # | |
Defined in Net.DNSBase.RData.WKS | |
| Num WksProto Source # | |
| Read WksProto Source # | |
| Integral WksProto Source # | |
Defined in Net.DNSBase.RData.WKS | |
| Real WksProto Source # | |
Defined in Net.DNSBase.RData.WKS Methods toRational :: WksProto -> Rational # | |
| Show WksProto Source # | |
| Eq WksProto Source # | |
| Ord WksProto Source # | |
Defined in Net.DNSBase.RData.WKS | |
The MINFO resource record
(RFC 1035 section 3.3.7)
— mailing-list request and owner addresses: two Domain
fields, the request mailbox and the owner (bounce) mailbox.
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / RMAILBX / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / EMAILBX / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Both fields are subject to wire-form name compression on encode
(RFC 3597 section 4)
and canonicalise to lower case
(RFC 4034 section 6.2).
The Eq and Ord instances compare both domain fields in
canonical wire form (via equalWireHost / compareWireHost),
so Ord is canonical.
Constructors
| T_MINFO | |
Fields
| |
Instances
| Presentable T_minfo Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Methods present :: T_minfo -> Builder -> Builder Source # presentLazy :: T_minfo -> ByteString -> ByteString Source # | |||||
| KnownRData T_minfo Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_minfo => RDataExtensionVal T_minfo Source # rdType :: forall b -> b ~ T_minfo => RRTYPE Source # rdTypePres :: forall b -> b ~ T_minfo => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_minfo => RDataExtensionVal T_minfo -> Int -> SGet RData Source # | |||||
| Show T_minfo Source # | |||||
| Eq T_minfo Source # | Case-insensitive wire-form equality. | ||||
| Ord T_minfo Source # | Case-insensitive wire-form order. | ||||
Defined in Net.DNSBase.RData.Obsolete | |||||
| type RDataExtensionVal T_minfo Source # | |||||
Defined in Net.DNSBase.RData.Obsolete | |||||
The X25 resource record
(RFC 1183 section 3.1)
— an X.25 PSDN address held as a single DNS
character-string. RFC 1183 calls for at least four ASCII
digits, but the constructor does not enforce that — callers may
store any byte sequence that fits in a character-string (up to
255 bytes).
The Ord instance compares the payload as a DNS
character-string (length-prefixed lexicographic), so it agrees
with the canonical wire-form ordering of
RFC 4034 section 6.2.
Constructors
| T_X25 ShortByteString |
Instances
| Presentable T_x25 Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Methods present :: T_x25 -> Builder -> Builder Source # presentLazy :: T_x25 -> ByteString -> ByteString Source # | |||||
| KnownRData T_x25 Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_x25 => RDataExtensionVal T_x25 Source # rdType :: forall b -> b ~ T_x25 => RRTYPE Source # rdTypePres :: forall b -> b ~ T_x25 => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_x25 => RDataExtensionVal T_x25 -> Int -> SGet RData Source # | |||||
| Show T_x25 Source # | |||||
| Eq T_x25 Source # | |||||
| Ord T_x25 Source # | |||||
| type RDataExtensionVal T_x25 Source # | |||||
Defined in Net.DNSBase.RData.Obsolete | |||||
The ISDN resource record
(RFC 1183 section 3.2)
— the ISDN number of the owner host, with an optional
Direct-Dial-In subaddress. Both fields are DNS
character-strings; only the address is mandatory.
The Ord instance compares both fields as DNS
character-strings. With the trailing DDI absent, the wire form
is shorter than any encoding with a present DDI, so Ord agrees
with the canonical wire-form ordering of
RFC 4034 section 6.2.
Constructors
| T_ISDN ShortByteString (Maybe ShortByteString) |
Instances
| Presentable T_isdn Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Methods present :: T_isdn -> Builder -> Builder Source # presentLazy :: T_isdn -> ByteString -> ByteString Source # | |||||
| KnownRData T_isdn Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_isdn => RDataExtensionVal T_isdn Source # rdType :: forall b -> b ~ T_isdn => RRTYPE Source # rdTypePres :: forall b -> b ~ T_isdn => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_isdn => RDataExtensionVal T_isdn -> Int -> SGet RData Source # | |||||
| Show T_isdn Source # | |||||
| Eq T_isdn Source # | |||||
| Ord T_isdn Source # | |||||
| type RDataExtensionVal T_isdn Source # | |||||
Defined in Net.DNSBase.RData.Obsolete | |||||
The RT resource record
(RFC 1183 section 3.3)
— Route-Through: a 16-bit preference and a Domain naming an
intermediate host that will route packets to the owner. Used
in the X.25 and ISDN era for hosts without their own wide-area
addresses.
The route-through domain is not subject to wire-form name
compression on encode but compression is tolerated on decode
(RFC 3597 section 4).
It canonicalises to lower case
(RFC 4034 section 6.2).
The Eq and Ord instances compare the domain in canonical
wire form (via equalWireHost / compareWireHost), so Ord
is canonical.
Instances
| Presentable T_rt Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Methods present :: T_rt -> Builder -> Builder Source # presentLazy :: T_rt -> ByteString -> ByteString Source # | |||||
| KnownRData T_rt Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_rt => RDataExtensionVal T_rt Source # rdType :: forall b -> b ~ T_rt => RRTYPE Source # rdTypePres :: forall b -> b ~ T_rt => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_rt => RDataExtensionVal T_rt -> Int -> SGet RData Source # | |||||
| Show T_rt Source # | |||||
| Eq T_rt Source # | |||||
| Ord T_rt Source # | |||||
| type RDataExtensionVal T_rt Source # | |||||
Defined in Net.DNSBase.RData.Obsolete | |||||
The NSAP resource record
(RFC 1706 section 5;
deprecated by RFC 9121)
— mapped a domain name to an OSI Network Service Access Point
address. An opaque byte string carrying the NSAP value
verbatim; presented in zone-file syntax as a 0x-prefixed hex
literal.
Derived Ord compares the raw bytes, which matches the
canonical wire-form ordering of
RFC 4034 section 6.2.
Constructors
| T_NSAP ShortByteString |
Instances
| Presentable T_nsap Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Methods present :: T_nsap -> Builder -> Builder Source # presentLazy :: T_nsap -> ByteString -> ByteString Source # | |||||
| KnownRData T_nsap Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_nsap => RDataExtensionVal T_nsap Source # rdType :: forall b -> b ~ T_nsap => RRTYPE Source # rdTypePres :: forall b -> b ~ T_nsap => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_nsap => RDataExtensionVal T_nsap -> Int -> SGet RData Source # | |||||
| Show T_nsap Source # | |||||
| Eq T_nsap Source # | |||||
| Ord T_nsap Source # | |||||
| type RDataExtensionVal T_nsap Source # | |||||
Defined in Net.DNSBase.RData.Obsolete | |||||
The NSAPPTR resource record
(RFC 1348;
obsoleted by PTR in
RFC 1706 section 6,
deprecated by RFC 9121)
— the OSI counterpart of PTR, mapping an NSAP-derived owner
name to a domain name.
The target domain is not subject to wire-form name compression
(RFC 3597 section 4)
and is not in the
RFC 4034 section 6.2
list of types that lower-case their RDATA names. Derived Eq
and Ord therefore compare the wire bytes verbatim
(case-sensitively).
Instances
| Presentable T_nsapptr Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Methods present :: T_nsapptr -> Builder -> Builder Source # presentLazy :: T_nsapptr -> ByteString -> ByteString Source # | |||||
| KnownRData T_nsapptr Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_nsapptr => RDataExtensionVal T_nsapptr Source # rdType :: forall b -> b ~ T_nsapptr => RRTYPE Source # rdTypePres :: forall b -> b ~ T_nsapptr => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_nsapptr => RDataExtensionVal T_nsapptr -> Int -> SGet RData Source # | |||||
| Show T_nsapptr Source # | |||||
| Eq T_nsapptr Source # | |||||
| Ord T_nsapptr Source # | |||||
| type RDataExtensionVal T_nsapptr Source # | |||||
Defined in Net.DNSBase.RData.Obsolete | |||||
The PX resource record
(RFC 2163 section 4;
deprecated by RFC 9121)
— points at X.400/RFC 822 mapping information: a 16-bit
preference and two Domain fields naming the RFC 822 (SMTP)
and X.400 sides of the mapping.
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFERENCE | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / MAP822 / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / MAPX400 / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Neither domain field is subject to wire-form name compression
on encode but compression is tolerated on decode
(RFC 3597 section 4).
Both canonicalise to lower case
(RFC 4034 section 6.2).
The Eq and Ord instances compare both domains in canonical
wire form (via equalWireHost / compareWireHost), so Ord
is canonical.
Instances
| Presentable T_px Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Methods present :: T_px -> Builder -> Builder Source # presentLazy :: T_px -> ByteString -> ByteString Source # | |||||
| KnownRData T_px Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_px => RDataExtensionVal T_px Source # rdType :: forall b -> b ~ T_px => RRTYPE Source # rdTypePres :: forall b -> b ~ T_px => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_px => RDataExtensionVal T_px -> Int -> SGet RData Source # | |||||
| Show T_px Source # | |||||
| Eq T_px Source # | |||||
| Ord T_px Source # | |||||
| type RDataExtensionVal T_px Source # | |||||
Defined in Net.DNSBase.RData.Obsolete | |||||
The GPOS resource record
(RFC 1712 section 3)
— an early geographical-location record: longitude, latitude,
and altitude as three DNS character-strings holding decimal
floating-point text. Superseded by LOC-style records and not
used in modern zone data.
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / LONGITUDE / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / LATITUDE / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / ALTITUDE / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
The Ord instance compares the three fields as DNS
character-strings, agreeing with the canonical wire-form
ordering of
RFC 4034 section 6.2.
Constructors
| T_GPOS | |
Instances
| Presentable T_gpos Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Methods present :: T_gpos -> Builder -> Builder Source # presentLazy :: T_gpos -> ByteString -> ByteString Source # | |||||
| KnownRData T_gpos Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_gpos => RDataExtensionVal T_gpos Source # rdType :: forall b -> b ~ T_gpos => RRTYPE Source # rdTypePres :: forall b -> b ~ T_gpos => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_gpos => RDataExtensionVal T_gpos -> Int -> SGet RData Source # | |||||
| Show T_gpos Source # | |||||
| Eq T_gpos Source # | |||||
| Ord T_gpos Source # | |||||
| type RDataExtensionVal T_gpos Source # | |||||
Defined in Net.DNSBase.RData.Obsolete | |||||
The KX resource record
(RFC 2230 section 3.1)
— names a Key Exchange host for the owner: a 16-bit preference
and a Domain naming the exchanger. Defined for the DNSSEC
precursor work; never widely deployed.
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFERENCE | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / EXCHANGER / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
The exchanger field is not subject to wire-form name compression
(RFC 3597 section 4)
and canonicalises to lower case
(RFC 4034 section 6.2).
The Eq and Ord instances compare the exchanger in canonical
wire form (via equalWireHost / compareWireHost), so Ord
is canonical.
Instances
| Presentable T_kx Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Methods present :: T_kx -> Builder -> Builder Source # presentLazy :: T_kx -> ByteString -> ByteString Source # | |||||
| KnownRData T_kx Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_kx => RDataExtensionVal T_kx Source # rdType :: forall b -> b ~ T_kx => RRTYPE Source # rdTypePres :: forall b -> b ~ T_kx => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_kx => RDataExtensionVal T_kx -> Int -> SGet RData Source # | |||||
| Show T_kx Source # | |||||
| Eq T_kx Source # | |||||
| Ord T_kx Source # | |||||
| type RDataExtensionVal T_kx Source # | |||||
Defined in Net.DNSBase.RData.Obsolete | |||||
The A6 resource record
(RFC 2874 section 3.1;
obsoleted by RFC 6563)
— an experimental chained IPv6 addressing scheme. Each record
carries a prefix length, an address suffix containing the
low-order bits, and a Domain naming where to look up the
remaining prefix bits. Resolution walked the chain to assemble
the full address. The deployment experience reported in RFC
6563 led to A6 being abandoned in favour of plain T_aaaa
records.
+-----------+------------------+-------------------+ |Prefix len.| Address suffix | Prefix name | | (1 octet) | (0..16 octets) | (0..255 octets) | +-----------+------------------+-------------------+
The wire encoding rules are:
- The prefix length is an unsigned octet between 0 and 128.
- The address-suffix field carries exactly enough octets to
hold
128 - prefix-lengthbits, with up to seven leading pad bits set to zero so the field is an integral number of bytes. - The prefix-name field is a wire-form
Domain. It is absent when the prefix length is zero (the suffix already holds the whole address); the suffix field is absent when the prefix length is 128 (the whole address comes from the chain). - The prefix-name is not subject to wire-form name compression (RFC 3597 section 4) and canonicalises to lower case (RFC 4034 section 6.2).
The Eq and Ord instances compare the prefix-name field in
canonical wire form (via toHost), so Ord is canonical.
Bundled Patterns
| pattern T_A6 :: Word8 -> IPv6 -> Maybe Domain -> T_a6 | Smart constructor for
|
Instances
| Presentable T_a6 Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Methods present :: T_a6 -> Builder -> Builder Source # presentLazy :: T_a6 -> ByteString -> ByteString Source # | |||||
| KnownRData T_a6 Source # | |||||
Defined in Net.DNSBase.RData.Obsolete Associated Types
Methods rdataExtensionVal :: forall b -> b ~ T_a6 => RDataExtensionVal T_a6 Source # rdType :: forall b -> b ~ T_a6 => RRTYPE Source # rdTypePres :: forall b -> b ~ T_a6 => Builder -> Builder Source # rdDecode :: forall b -> b ~ T_a6 => RDataExtensionVal T_a6 -> Int -> SGet RData Source # | |||||
| Show T_a6 Source # | |||||
| Eq T_a6 Source # | |||||
| Ord T_a6 Source # | |||||
| type RDataExtensionVal T_a6 Source # | |||||
Defined in Net.DNSBase.RData.Obsolete | |||||