Files
NLnetLabs-domain/test-data/zonefiles/basic.yaml
T
Martin HoffmannandGitHub cd88889557 Redesign zone file parsing. (#142)
This commit completely redesigns zone file parsing. The primary change is to
convert the scanner into a trait in order to allow multiple zone parser
implementations for different sources and purposes. A number of changes had
to be made in order to make this possible.

The commit also contains an initial implementation of a scanner that modifies
data in-place and can thus returned parsed data with only a minimal amount
of additional allocations. While working, this scanner is more a
proof-of-concept at this point to ensure that the API design is sound.

This commit is based on ideas and code proposed by @not-my-profile in #106.

This commit increases the minimal supported Rust version to 1.59.0.
2022-11-07 15:11:36 +01:00

45 lines
906 B
YAML

origin: example.com.
zonefile: |
$ORIGIN com.
example 345600 IN SOA ns0.Example.org. dingdong.Example.com. (
4 3600 28800 2419200 ; comment
3600 )
3600 IN NS bigserv.example.net.
3600 IN A 192.0.2.11
www.example.com. A 192.0.2.12
$ORIGIN example.com.
@ A 192.0.2.13
result:
- owner: example.com.
class: IN
ttl: 345600
data: !Soa
mname: ns0.Example.org.
rname: dingdong.Example.com.
serial: 4
refresh: 3600
retry: 28800
expire: 2419200
minimum: 3600
- owner: example.com.
class: IN
ttl: 3600
data: !Ns
nsdname: bigserv.example.net.
- owner: example.com.
class: IN
ttl: 3600
data: !A
addr: 192.0.2.11
- owner: www.example.com.
class: IN
ttl: 3600
data: !A
addr: 192.0.2.12
- owner: example.com.
class: IN
ttl: 3600
data: !A
addr: 192.0.2.13