Skip to main content

Module dns

Module dns 

Source
Expand description

DNS protocol layer implementation (RFC 1035).

Provides full DNS parsing, building, and field access with:

  • Header flag fields (QR, opcode, AA, TC, RD, RA, Z, AD, CD, RCODE)
  • Question section with name compression
  • Resource record sections (answer, authority, additional)
  • All major RR types (A, AAAA, NS, CNAME, SOA, MX, TXT, SRV, etc.)
  • DNSSEC types (RRSIG, NSEC, NSEC3, DNSKEY, DS)
  • EDNS0 OPT records
  • SVCB/HTTPS service binding records
  • DNS name compression and decompression

Re-exports§

pub use builder::DnsBuilder;
pub use query::DnsQuestion;
pub use rdata::DnsRData;
pub use rr::DnsResourceRecord;

Modules§

bitmap
NSEC/NSEC3 type bitmap encoding and decoding (RFC 4034 Section 4.1.2).
builder
DNS packet builder with fluent API.
edns
EDNS0 (Extension Mechanisms for DNS) option types.
header
DNS header parsing (RFC 1035 Section 4.1.1).
query
DNS Question Record (DNSQR) - RFC 1035 Section 4.1.2.
rdata
DNS Resource Record Data (RDATA) parsing and building.
rr
DNS Resource Record (RFC 1035 Section 4.1.3).
svcb
SVCB/HTTPS Service Parameters (RFC 9460).
types

Structs§

DnsLayer
DNS layer — a zero-copy view into the packet buffer.

Constants§

DNS_FIELDS
DNS field names for dynamic access.
DNS_HEADER_LEN
DNS header length in bytes.