mirror of
https://github.com/NLnetLabs/domain.git
synced 2026-09-11 20:37:43 +02:00
This PR adds zonefile/parsed.rs, zonetree/ and related examples/, which together enable, and show a library user how, to go from a zone file in presentation format to an in-memory tree of zones which can be queried to provide an answer, or walked (iterated over). The tree also supports versioned write operations and a trait based zone implementation allowing for the in-memory tree for a zone to instead be some other (a)synchornous backing store (as demonstrated by the mysql-zone.rs example). The zonetree module is feature-gated behind the unstable-zonetree feature.
26 lines
836 B
Plaintext
26 lines
836 B
Plaintext
$ORIGIN example.com. ; 'default' domain as FQDN for this zone
|
|
$TTL 86400 ; default time-to-live for this zone
|
|
|
|
example.com. IN SOA ns.example.com. noc.dns.icann.org. (
|
|
2020080302 ;Serial
|
|
7200 ;Refresh
|
|
3600 ;Retry
|
|
1209600 ;Expire
|
|
3600 ;Negative response caching TTL
|
|
)
|
|
|
|
; The nameserver that are authoritative for this zone.
|
|
NS example.com.
|
|
|
|
; these A records below are equivalent
|
|
example.com. A 192.0.2.1
|
|
@ A 192.0.2.1
|
|
A 192.0.2.1
|
|
|
|
@ AAAA 2001:db8::3
|
|
|
|
; A CNAME redirect from www.exmaple.com to example.com
|
|
www CNAME example.com.
|
|
|
|
mail MX 10 example.com.
|