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

Net.DNSBase.RData.CSYNC

Description

Two unrelated child-to-parent signalling RR types live here. T_csync (RFC 7477) tells the parent zone which delegation records the child wishes to have synchronized; T_dsync (generalised DNS notifications, draft-ietf-dnsop-generalized-notify) advertises the per-RR-type endpoints a child operator wishes the parent to send notifications to. They share neither wire format nor purpose beyond the broad child-to-parent direction.

Synopsis

CSYNC RData

data T_csync Source #

The CSYNC resource record (RFC 7477 section 2.1.1) — the child zone's request to its parent to synchronise NS A AAAA records from the child to the parent. Three fields: the child's current SOA serial, processing flags, and an NsecTypes bitmap naming the RR types to be synchronised.

                     1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          SOA Serial                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       Flags                   |            Type Bit Map       /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                     Type Bit Map (continued)                  /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

See T_dsync for the other child-to-parent signalling RR type defined in this module.

Constructors

T_CSYNC 

Fields

Instances

Instances details
Presentable T_csync Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

KnownRData T_csync Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Associated Types

type RDataExtensionVal T_csync 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Show T_csync Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Eq T_csync Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Methods

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

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

Ord T_csync Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

type RDataExtensionVal T_csync Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

data NsecTypes Source #

Abstract representation of a set of RRTYPE codepoints, stored as the window-based wire-format bitmap from RFC 4034 section 4.1.2. Used by T_nsec, T_nsec3, and T_csync to carry the set of types present at the owner name.

An NsecTypes may legitimately be empty -- this is the expected encoding for an NSEC3 empty-non-terminal. With NSEC, the type bitmap is expected to include at least the NSEC type itself; that invariant is not enforced by the type.

Construction and enumeration go through IsList:

  • fromList tys :: NsecTypes builds the bitmap from a list of RRTYPE values; duplicates are merged and the wire-form ordering is canonical regardless of input order. Under OverloadedLists the same input shape is just [A, AAAA, MX].
  • toList bm :: [RRTYPE] enumerates the contained types in ascending wire-form order.
  • (<>) unions two bitmaps; mempty is the empty bitmap.

For membership without enumerating the whole set, use hasRRtype, which goes directly to the relevant window, block and bit offset.

Instances

Instances details
Presentable NsecTypes Source #

Presentation form: contained types in canonical wire-form order, space-separated, with no leading separator. The empty bitmap renders as the empty string. When the bitmap follows another field in an RR's presentation form, compose with presentSp or presentLn to prefix the appropriate separator.

Instance details

Defined in Net.DNSBase.NsecTypes

Semigroup NsecTypes Source #

The (<>) operator unions the two bitmaps; duplicate types are merged.

Instance details

Defined in Net.DNSBase.NsecTypes

IsList NsecTypes Source #

Construction is via fromList (from any list of RRTYPEs, order and duplicates immaterial), and enumeration is via toList (yielding types in canonical wire-form order).

Instance details

Defined in Net.DNSBase.NsecTypes

Associated Types

type Item NsecTypes 
Instance details

Defined in Net.DNSBase.NsecTypes

Show NsecTypes Source # 
Instance details

Defined in Net.DNSBase.NsecTypes

Eq NsecTypes Source # 
Instance details

Defined in Net.DNSBase.NsecTypes

Ord NsecTypes Source #

The Ord instance matches wire-form canonical order.

Instance details

Defined in Net.DNSBase.NsecTypes

type Item NsecTypes Source # 
Instance details

Defined in Net.DNSBase.NsecTypes

nsecTypesFromList :: [RRTYPE] -> NsecTypes Source #

Construct the per-window bitmaps from a list of types.

nsecTypesToList :: NsecTypes -> [RRTYPE] Source #

Convert NsecTypes bitmap to an RRTYPE list

hasRRtype :: RRTYPE -> NsecTypes -> Bool Source #

Efficient NSEC/NSEC3 type bitmap membership predicate.

DSYNC RData

data T_dsync Source #

The DSYNC resource record (RFC 9859) — a child zone's published endpoint for generalised DNS notifications: for a given child-side RRTYPE, it names the Dscheme (contact method, e.g. NOTIFY), the contact Word16 port number, and the Domain to address the notification to.

                     1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RRtype                        | Scheme        | Port
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                | Target ...  /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-/

See T_csync for the other child-to-parent signalling RR type defined in this module.

Target comparison and equality are case-sensitive. The Ord instance is canonical.

Constructors

T_DSYNC 

Fields

Instances

Instances details
Presentable T_dsync Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

KnownRData T_dsync Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Associated Types

type RDataExtensionVal T_dsync 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Show T_dsync Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Eq T_dsync Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Methods

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

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

Ord T_dsync Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

type RDataExtensionVal T_dsync Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

newtype Dscheme Source #

DSYNC scheme numbers. The Presentable instance displays the registered mnemonic of the scheme name for known types, or else just the decimal value. See the IANA registry for the known mnemonics.

Constructors

DSCHEME Word8 

Bundled Patterns

pattern NOTIFY :: Dscheme

NOTIFY scheme.

Instances

Instances details
Presentable Dscheme Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Bounded Dscheme Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Enum Dscheme Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Num Dscheme Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Read Dscheme Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Integral Dscheme Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Real Dscheme Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Show Dscheme Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Eq Dscheme Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC

Methods

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

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

Ord Dscheme Source # 
Instance details

Defined in Net.DNSBase.RData.CSYNC