2019-12-08 00:29:43 -05:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2019-12-08 00:36:53 -05:00
|
|
|
<xs:schema targetNamespace="http://schema.xml.r00t2.io/net.xsd"
|
2019-12-08 03:27:20 -05:00
|
|
|
xmlns="http://schema.xml.r00t2.io/net.xsd"
|
2019-12-08 00:36:53 -05:00
|
|
|
xmlns:net="http://schema.xml.r00t2.io/net.xsd"
|
2019-12-08 05:30:06 -05:00
|
|
|
xmlns:std="http://schema.xml.r00t2.io/std.xsd"
|
2019-12-08 00:29:43 -05:00
|
|
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
|
|
elementFormDefault="qualified"
|
|
|
|
attributeFormDefault="qualified">
|
2019-12-08 01:42:33 -05:00
|
|
|
|
2019-12-08 05:30:06 -05:00
|
|
|
<xs:import namespace="http://schema.xml.r00t2.io/std.xsd" schemaLocation="http://schema.xml.r00t2.io/std.xsd"/>
|
2019-12-08 03:27:20 -05:00
|
|
|
|
2019-12-08 01:42:33 -05:00
|
|
|
<xs:simpleType name="t_addr_ip4">
|
|
|
|
<xs:restriction base="xs:string">
|
|
|
|
<!-- This is a REALLY LAZY regex. Matching IPv4 in regex is ugly as heck, so we do that in-code.
|
|
|
|
This is just a gatekeeper. -->
|
|
|
|
<xs:pattern value="[0-9.]{7,15}"/>
|
|
|
|
<xs:whiteSpace value="collapse"/>
|
|
|
|
</xs:restriction>
|
|
|
|
</xs:simpleType>
|
|
|
|
|
|
|
|
<xs:simpleType name="t_addr_ip6">
|
|
|
|
<xs:restriction base="xs:string">
|
|
|
|
<!-- This is a REALLY LAZY regex. Matching IPv6 in regex is ugly as heck, so we do that in-code.
|
|
|
|
This is just a gatekeeper. -->
|
|
|
|
<xs:pattern value="[A-Za-z0-9:]+"/>
|
|
|
|
<xs:whiteSpace value="collapse"/>
|
|
|
|
</xs:restriction>
|
|
|
|
</xs:simpleType>
|
|
|
|
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:simpleType name="t_authselect">
|
|
|
|
<xs:restriction base="xs:token">
|
|
|
|
<xs:enumeration value="basic"/>
|
|
|
|
<xs:enumeration value="digest"/>
|
|
|
|
<xs:enumeration value="none"/>
|
|
|
|
<xs:whiteSpace value="collapse"/>
|
|
|
|
</xs:restriction>
|
2019-12-08 01:42:33 -05:00
|
|
|
</xs:simpleType>
|
|
|
|
|
|
|
|
<xs:simpleType name="t_auto_ip6">
|
|
|
|
<xs:restriction base="xs:string">
|
|
|
|
<xs:enumeration value="slaac"/>
|
|
|
|
<xs:enumeration value="dhcp6"/>
|
|
|
|
</xs:restriction>
|
|
|
|
</xs:simpleType>
|
|
|
|
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:simpleType name="t_both_addr">
|
|
|
|
<xs:union memberTypes="net:t_addr_ip4 net:t_addr_ip6"/>
|
|
|
|
</xs:simpleType>
|
|
|
|
|
|
|
|
<xs:simpleType name="t_both_qualified_addr">
|
|
|
|
<xs:union memberTypes="net:t_qualified_addr_ip4 net:t_qualified_addr_ip6"/>
|
|
|
|
</xs:simpleType>
|
|
|
|
|
|
|
|
<xs:complexType name="t_http_resource">
|
|
|
|
<xs:simpleContent>
|
|
|
|
<xs:extension base="std:t_uri">
|
|
|
|
<xs:attribute name="user" type="std:t_nonempty" use="optional"/>
|
|
|
|
<xs:attribute name="password" type="std:t_nonempty" use="optional"/>
|
|
|
|
<xs:attribute name="realm" type="std:t_nonempty" use="optional"/>
|
|
|
|
<xs:attribute name="authtype" type="net:t_authselect" use="optional" default="none"/>
|
|
|
|
</xs:extension>
|
|
|
|
</xs:simpleContent>
|
|
|
|
</xs:complexType>
|
|
|
|
|
2019-12-08 01:42:33 -05:00
|
|
|
<xs:simpleType name="t_mac_addr">
|
|
|
|
<xs:restriction base="xs:token">
|
|
|
|
<!-- EUI48[RFC7043§3] (previously MAC48[RFC7042§2.1]) -->
|
|
|
|
<xs:pattern value="([A-Fa-f0-9]{2}[:-]?){5}[A-Fa-f0-9]{2}"/>
|
|
|
|
<!-- EUI64[RFC7043§4, RFC4291§2.5.1] -->
|
|
|
|
<xs:pattern value="([A-Fa-f0-9]{2}[:-]?){3}[Ff]{3}[FfEe][:-]?([A-Fa-f0-9]{2}[:-]?){2}[A-Fa-f0-9]{2}"/>
|
|
|
|
<xs:pattern value="([A-Fa-f0-9]{2}[:-]?){3}[A-Fa-f0-9]{4}[:-]?([A-Fa-f0-9]{2}[:-]?){2}[A-Fa-f0-9]{2}"/>
|
|
|
|
<xs:whiteSpace value="collapse"/>
|
|
|
|
</xs:restriction>
|
|
|
|
</xs:simpleType>
|
|
|
|
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:simpleType name="t_netproto">
|
|
|
|
<xs:restriction base="xs:token">
|
|
|
|
<xs:enumeration value="ipv4"/>
|
|
|
|
<xs:enumeration value="ipv6"/>
|
|
|
|
<xs:whiteSpace value="collapse"/>
|
|
|
|
</xs:restriction>
|
|
|
|
</xs:simpleType>
|
|
|
|
|
|
|
|
<xs:simpleType name="t_proto">
|
|
|
|
<!-- TODO: expand? Remove gre? -->
|
|
|
|
<xs:restriction base="xs:string">
|
|
|
|
<xs:enumeration value="tcp"/>
|
|
|
|
<xs:enumeration value="udp"/>
|
|
|
|
<xs:enumeration value="icmp"/>
|
|
|
|
<xs:enumeration value="gre"/>
|
|
|
|
</xs:restriction>
|
|
|
|
</xs:simpleType>
|
|
|
|
|
|
|
|
<xs:simpleType name="t_qualified_addr_ip4">
|
|
|
|
<!-- This is a REALLY LAZY regex. Matching IPv4 in regex is ugly as heck, so we do that in-code.
|
|
|
|
This is just a gatekeeper. -->
|
|
|
|
<xs:restriction base="xs:string">
|
|
|
|
<xs:pattern value="[0-9.]{7,15}/[0-9]{1,2}"/>
|
|
|
|
<xs:whiteSpace value="collapse"/>
|
|
|
|
</xs:restriction>
|
|
|
|
</xs:simpleType>
|
|
|
|
|
|
|
|
<xs:simpleType name="t_qualified_addr_ip6">
|
|
|
|
<!-- This is a REALLY LAZY regex. Matching IPv6 in regex is ugly as heck, so we do that in-code.
|
|
|
|
This is just a gatekeeper. -->
|
|
|
|
<xs:restriction base="xs:string">
|
|
|
|
<xs:pattern value="[A-Za-z0-9:]+/[0-9]{1,3}"/>
|
|
|
|
<xs:whiteSpace value="collapse"/>
|
|
|
|
</xs:restriction>
|
|
|
|
</xs:simpleType>
|
|
|
|
|
2019-12-08 01:42:33 -05:00
|
|
|
<!-- TODO: "enterprise" WPA2 (add'l details)?
|
|
|
|
WPA3?
|
|
|
|
EAP,
|
|
|
|
eduroam (https://github.com/rst0git/netctl-eduroam-config/blob/master/eduroam), etc. -->
|
|
|
|
<!-- wep64, wep128, wpa-psk:tkip, wpa-psk:aes, wpa2-psk:tkip, wpa2-psk:aes, wpa2-psk:tkip/aes -->
|
|
|
|
<xs:complexType name="t_wifi_crypto">
|
|
|
|
<xs:all>
|
|
|
|
<xs:element name="type" minOccurs="1" maxOccurs="1" default="wpa2">
|
|
|
|
<xs:simpleType>
|
|
|
|
<xs:restriction base="xs:token">
|
|
|
|
<!-- <xs:enumeration value="wep"/> -->
|
|
|
|
<xs:enumeration value="wpa"/>
|
|
|
|
<xs:enumeration value="wpa2"/>
|
|
|
|
<!-- <xs:enumeration value="wpa3"/> -->
|
|
|
|
<xs:whiteSpace value="collapse"/>
|
|
|
|
</xs:restriction>
|
|
|
|
</xs:simpleType>
|
|
|
|
</xs:element>
|
|
|
|
<!-- Only valid for WPA/WPA2 (and maybe WPA3 once supported?) -->
|
|
|
|
<xs:element name="creds" minOccurs="1" maxOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:choice minOccurs="1" maxOccurs="1">
|
|
|
|
<!-- "personal" -->
|
|
|
|
<xs:element name="psk">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:simpleContent>
|
|
|
|
<xs:extension base="xs:string">
|
|
|
|
<!-- A key can be generated via "wpa_passphrase <ssid> <passphrase>" -->
|
|
|
|
<!-- or via genPSK.py in extras/ -->
|
|
|
|
<xs:attribute name="isKey" type="xs:boolean" use="optional" default="false"/>
|
|
|
|
</xs:extension>
|
|
|
|
</xs:simpleContent>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
<!-- TODO -->
|
|
|
|
<!-- <xs:element name="enterprise"></xs:element> -->
|
|
|
|
</xs:choice>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
</xs:all>
|
|
|
|
</xs:complexType>
|
|
|
|
|
2019-12-08 00:29:43 -05:00
|
|
|
</xs:schema>
|