Zone Record Types Reference¶
All DNS resource record types supported by Hornet's zone file parser.
ZoneFile¶
| Field | Type | Description |
|---|---|---|
entries |
Vec<Entry> |
Ordered list of directives and records |
Convenience method¶
Returns only the Entry::Record entries, skipping directives.
Entry enum¶
| Variant | Description |
|---|---|
Entry::Origin(String) |
$ORIGIN directive |
Entry::Ttl(u32) |
$TTL directive (seconds) |
Entry::Include(String) |
$INCLUDE directive (path only; file not read) |
Entry::Generate { start, stop, step, lhs, rtype, rhs } |
$GENERATE directive |
Entry::Record(ResourceRecord) |
A DNS resource record |
ResourceRecord¶
| Field | Type | Description |
|---|---|---|
name |
Option<String> |
Owner name (None = same as previous record) |
ttl |
Option<u32> |
Record TTL in seconds (None = use $TTL) |
class |
Option<DnsClass> |
DNS class (almost always IN) |
rdata |
RData |
Type-specific record data |
RData variants¶
RData::A(Ipv4Addr)¶
IPv4 address record.
RData::Aaaa(Ipv6Addr)¶
IPv6 address record.
RData::Ns(DomainName)¶
Name server record.
RData::Mx { priority: u16, exchange: DomainName }¶
Mail exchange record.
RData::Soa { primary_ns, admin_email, serial, refresh, retry, expire, minimum }¶
Start of authority record.
| Field | Type | Description |
|---|---|---|
primary_ns |
DomainName |
Primary name server |
admin_email |
DomainName |
Admin contact (. replaces @) |
serial |
u32 |
Zone serial number |
refresh |
u32 |
Secondary refresh interval (seconds) |
retry |
u32 |
Retry interval after failed refresh (seconds) |
expire |
u32 |
Secondary expiry time (seconds) |
minimum |
u32 |
Negative caching TTL (seconds) |
@ IN SOA ns1.example.com. admin.example.com. (
2024010101 ; serial
86400 ; refresh
7200 ; retry
2419200 ; expire
300 ) ; minimum
RData::Cname(DomainName)¶
Canonical name alias.
RData::Ptr(DomainName)¶
Pointer record (reverse DNS).
RData::Hinfo { cpu: String, os: String }¶
Host information (rarely used).
RData::Txt(Vec<String>)¶
Text record. Multiple strings are stored as separate chunks.
@ IN TXT "v=spf1 include:_spf.example.com ~all"
_dmarc IN TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com"
RData::Srv { priority: u16, weight: u16, port: u16, target: DomainName }¶
Service location record.
RData::Caa { flags: u8, tag: String, value: String }¶
Certification Authority Authorization.
| Tag | Meaning |
|---|---|
issue |
CA authorised to issue DV certificates |
issuewild |
CA authorised to issue wildcard certificates |
iodef |
URL for reporting CA policy violations |
RData::Sshfp { algorithm: u8, fp_type: u8, fingerprint: String }¶
SSH public key fingerprint.
| Algorithm | Value |
|---|---|
| RSA | 1 |
| DSA | 2 |
| ECDSA | 3 |
| Ed25519 | 4 |
RData::Tlsa { usage: u8, selector: u8, matching_type: u8, cert_data: String }¶
TLS certificate association (DANE).
RData::Naptr { order, pref, flags, service, regexp, replacement }¶
Naming authority pointer (used in VoIP / SIP / ENUM).
RData::Ds { key_tag: u16, algorithm: u8, digest_type: u8, digest: String }¶
Delegation signer (DNSSEC).
RData::Dnskey { flags: u16, protocol: u8, algorithm: u8, public_key: String }¶
DNS public key (DNSSEC).
RData::Rrsig { … }¶
Resource record signature (DNSSEC). Fields include type_covered, algorithm, labels, original_ttl, sig_expiration, sig_inception, key_tag, signer_name, and signature.
RData::Nsec { next_domain: DomainName, types: Vec<String> }¶
Next secure record (DNSSEC).
RData::Nsec3 { … } / RData::Nsec3Param { … }¶
NSEC3 and NSEC3PARAM (DNSSEC with hashing).
RData::Https { priority: u16, target: DomainName, params: Vec<SvcParam> }¶
HTTPS service binding (RFC 9460).
RData::Svcb { priority: u16, target: DomainName, params: Vec<SvcParam> }¶
Generic service binding (RFC 9460).
RData::Aname(DomainName) / RData::Alias(DomainName)¶
Root-flattening alias (non-standard; supported by some providers).
RData::Unknown { rtype: String, data: String }¶
Unknown record type, preserved verbatim. The rtype field contains the TYPE<N> string.
Next Steps¶
- Zone Files Concept — Zone file format overview
- Validating — Zone file validation checks