DNS.Message.Record.Data.OPT (DNS v0.4.1)

View Source

DNS OPT Record (Type 41)

The OPT pseudo-RR is used to implement EDNS0 (Extension Mechanisms for DNS). It doesn't carry DNS data but contains control information for DNS transactions.

RFC 6891 defines the OPT record format:

  • NAME: MUST be 0 (root domain)
  • TYPE: 41 (OPT)
  • CLASS: requestor's UDP payload size
  • TTL: extended RCODE and flags
  • RDLEN: length of all RDATA
  • RDATA: EDNS0 options

Summary

Types

t()

@type t() :: %DNS.Message.Record.Data.OPT{
  data: DNS.Message.EDNS0.t(),
  raw: bitstring(),
  rdlength: 0..65535,
  type: DNS.ResourceRecordType.t()
}

Functions

from_iodata(raw, message \\ nil)

@spec from_iodata(bitstring(), bitstring() | nil) :: t()

new(edns0)

@spec new(DNS.Message.EDNS0.t()) :: t()