Module wire
dns and std only.Expand description
DNS wire-format vocabulary and parsing.
This module contains protocol data, not request-context extensions.
Name handles case-preserving DNS names and RFC 1035 compression;
ServiceBinding represents the common RDATA wire format used by both
RecordType::SVCB and RecordType::HTTPS resource records.
Message assembles that vocabulary into an RFC 1035 message parser for
the header, question section, and answer section. It stops there: the
authority and additional sections are skipped, and telemetry policy such as
answer caps, name normalisation, and string flattening stays with the
caller. Parsing is lenient by default and keeps every record decoded before
a failure; Message::parse_strict rejects such a message instead, while
still handing that partial result back with the error.
Structs§
- Address
Rdata Parse Error - Error returned when address-record RDATA has the wrong wire length.
- Alpn
List - A validated ALPN protocol-name list backed by one shared wire buffer.
- Message
- A parsed DNS message header, question section, and answer section.
- Message
Header - The fixed twelve-octet header of a DNS message.
- Message
Parse Error - Error returned when a DNS message cannot be decoded.
- Name
- A fully qualified DNS name in uncompressed wire format.
- Name
Parse Error - Error returned when a DNS name cannot be decoded.
- Question
- One entry of a DNS message’s question section.
- Resource
Record - One resource record of a DNS message’s answer section.
- Service
Binding - Decoded RDATA shared by SVCB and HTTPS resource records.
- Service
Binding Parse Error - Error returned when SVCB-compatible RDATA is malformed or inconsistent.
- Txt
- One validated TXT-record RDATA value.
- TxtParse
Error - Error returned when TXT RDATA or decoded strings violate RFC 1035 framing.
Enums§
- Record
Class - A DNS resource-record class from the IANA DNS CLASSes registry.
- Record
Data - Decoded RDATA of an answer record.
- Record
Type - A DNS resource-record type from the IANA DNS Parameters registry.
- Response
Code - A DNS response code (RCODE) from the IANA DNS RCODEs registry.
- SvcParam
- A decoded service binding parameter.
- SvcParam
Key - Numeric key for a service binding parameter.
Functions§
- parse_
a_ rdata - Parse one complete A-record RDATA value.
- parse_
aaaa_ rdata - Parse one complete AAAA-record RDATA value.