⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module dns

Module dns 

Source
Expand description

DNS resolver for VeridianOS

Provides DNS name resolution with caching, label compression, and support for common record types (A, AAAA, CNAME, MX, TXT, PTR, SRV).

Structs§

DnsCache
DNS cache with LRU eviction and TTL-based expiry
DnsHeader
DNS message header (12 bytes)
DnsQuestion
DNS question section entry
DnsRecord
DNS resource record
DnsResolver
DNS resolver with caching and multiple nameserver support
HostEntry
Static host entry (from /etc/hosts)

Enums§

DnsClass
DNS class codes
DnsError
DNS-specific errors
DnsRecordData
DNS resource record data
DnsRecordType
DNS record type codes
DnsResponseCode
DNS response codes (RCODE)

Constants§

DNS_PORT
DNS default port

Functions§

add_host
Add a host entry to the global resolver
add_nameserver
Add a nameserver to the global resolver
build_query
Build a DNS query message for the given name and record type.
decode_name
Decode a DNS label sequence from a message buffer, handling pointer compression.
encode_name
Encode a dotted domain name into DNS label format.
init
Initialize the global DNS resolver
parse_response
Parse a DNS response message and extract resource records.
resolve
Resolve a domain name using the global resolver