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

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.

Synopsis

Documentation

data T_wks Source #

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 

Fields

Instances

Instances details
Presentable T_wks Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

KnownRData T_wks Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Associated Types

type RDataExtensionVal T_wks 
Instance details

Defined in Net.DNSBase.RData.WKS

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 #

rdEncode :: T_wks -> SPut s RData Source #

cnEncode :: T_wks -> SPut s RData Source #

Show T_wks Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Methods

showsPrec :: Int -> T_wks -> ShowS #

show :: T_wks -> String #

showList :: [T_wks] -> ShowS #

Eq T_wks Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Methods

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

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

Ord T_wks Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Methods

compare :: T_wks -> T_wks -> Ordering #

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

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

(>) :: T_wks -> T_wks -> Bool #

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

max :: T_wks -> T_wks -> T_wks #

min :: T_wks -> T_wks -> T_wks #

type RDataExtensionVal T_wks Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

newtype WksProto Source #

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.

Constructors

WksProto Word8 

Bundled Patterns

pattern UDP :: WksProto 
pattern TCP :: WksProto 

Instances

Instances details
Presentable WksProto Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Bounded WksProto Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Enum WksProto Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Num WksProto Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Read WksProto Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Integral WksProto Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Real WksProto Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Show WksProto Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Eq WksProto Source # 
Instance details

Defined in Net.DNSBase.RData.WKS

Ord WksProto Source # 
Instance details

Defined in Net.DNSBase.RData.WKS