| Copyright | (c) Viktor Dukhovni 2026 |
|---|---|
| License | BSD-3-Clause |
| Maintainer | ietf-dane@dukhovni.org |
| Stability | unstable |
| Safe Haskell | None |
| Language | GHC2024 |
Net.DNSBase.RData.WKS
Description
The WKS resource record predates port-by-port service discovery
conventions and was effectively obsoleted by them. It is defined
here so wire-form parsers can read stray WKS records in zone
data without failing; new deployments should not produce WKS.
Documentation
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 | |