forked from kirei/dper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dper.rnc
40 lines (29 loc) · 1.15 KB
/
dper.rnc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# DNS Peering Protocol XML Relax NG Compact Schema
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
start = element dper {
# A peer defines a name server source, typically a logical node
element peer {
attribute name { xsd:string }?,
# Define master name severs
element primary {
# TSIG secret name (optional). Secret is transmitted OOB.
tsig?,
# IPv4/IPv6 address of primary name server
ip_address
}*,
element zone {
fqdn
}*
}+
}
tsig = attribute tsig { fqdn }
fqdn = xsd:token {
pattern = "[A-Za-z0-9\.\-_]+"
}
ip_address = (ipv4 | ipv6)
ipv4 = xsd:token {
pattern = "(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])"
}
ipv6 = xsd:token {
pattern = "(([0-9A-Fa-f]{1,4}(:[0-9A-Fa-f]{1,4}){7}|([0-9A-Fa-f]{1,4}:){1,6}(:[0-9A-Fa-f]{1,4}){1}|([0-9A-Fa-f]{1,4}:){1,5}(:[0-9A-Fa-f]{1,4}){1,2}|([0-9A-Fa-f]{1,4}:){1,4}(:[0-9A-Fa-f]{1,4}){1,3}|([0-9A-Fa-f]{1,4}:){1,3}(:[0-9A-Fa-f]{1,4}){1,4}|([0-9A-Fa-f]{1,4}:){1,2}(:[0-9A-Fa-f]{1,4}){1,5}|([0-9A-Fa-f]{1,4}:){1}(:[0-9A-Fa-f]{1,4}){1,6}))"
}