Skip to main content

Module wire

Module wire 

Source
Expand description

Zero-allocation RFC 1035 / RFC 3597 binary DNS wire parser & encoder.

Follows QualiaDB 0-A zero-heap hot path rules: operates over caller-supplied buffers without allocating Vec or String.

Structs§

DnsHeader
Fixed 12-byte DNS message header (RFC 1035 §4.1.1).
DnsQuestion
Zero-heap question view over a raw DNS packet.
DnsRecordView
A parsed Resource Record view pointing directly into packet bytes.

Enums§

DnsType
Standard RR Type identifiers (RFC 1035, RFC 3597, RFC 4034).

Constants§

CLASS_IN
Standard DNS class (IN = Internet).
FLAG_AA_AUTHORITATIVE
FLAG_AD_AUTHENTICATED_DATA
FLAG_CD_CHECKING_DISABLED
FLAG_QR_RESPONSE
DNS header flags bitmasks (RFC 1035 §4.1.1).
FLAG_RA_RECURSION_AVAILABLE
FLAG_RD_RECURSION_DESIRED
FLAG_TC_TRUNCATED
OPCODE_MASK
RCODE_MASK

Functions§

build_query_packet
Write a single standard DNS query packet into out.
decode_domain_name
Decode a domain name from wire format into a plain dotted string inside out_buf.
encode_domain_name
Encode a dotted ASCII domain name into DNS wire label format: [len, label..., 0].
parse_records
Parser for resource records out of a binary DNS packet.