From 0d4d4dd840e06c18250d73f27de61261ff141944 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 3 Dec 2019 22:01:19 +0100 Subject: T1843: run interface-definitions though GCC preprocessor A lot of XML code is duplicated (VLAN, interface address) for instance. Such XML definitions should be moved to feature.xml.i files and then just pulled in via GCC preprocessor #include definition in e.g. bond or ethernet definitions. This will give us the ability to single-source repeating node definitions as: * Interface Address * Interface Description * Interface Disable * VLAN (both vif-s and vif-c) The .in suffix of the interface-definitions is a marker that those files are input files to the GCC preprocessor. They will be rendered into proper XML files in the build directory. Some node definitions have been reworder to remove escaped double quote occurances which would have been warned about by the GCC preprocessor. --- interface-definitions/interfaces-wireguard.xml.in | 150 ++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 interface-definitions/interfaces-wireguard.xml.in (limited to 'interface-definitions/interfaces-wireguard.xml.in') diff --git a/interface-definitions/interfaces-wireguard.xml.in b/interface-definitions/interfaces-wireguard.xml.in new file mode 100644 index 000000000..0c32a3bc1 --- /dev/null +++ b/interface-definitions/interfaces-wireguard.xml.in @@ -0,0 +1,150 @@ + + + + + + + WireGuard interface name + 459 + + + ^wg[0-9]{1,4} + + illegal interface name + + wgN + WireGuard interface name + + + + + + IP address + + + + + ipv4net + IPv4 address and prefix length + + + ipv6net + IPv6 address and prefix length + + + + + + + description + + ^.{1,100}$ + + interface description is too long (limit 100 characters) + + + + + disables interface + + + + + + Local port number to accept connections + + + + + + + + interface mtu size(default: 1420) + + + + + + + + A 32-bit fwmark value set on all outgoing packets + + number + value which marks the packet for QoS/shaper + + + + + + + + + Private key to use on that interface + + + + + + + + peer alias + + [^ ]{1,100}$ + + peer alias too long (limit 100 characters) + + + + + disables peer + + + + + + base64 encoded public key + + ^[0-9a-zA-Z\+/]{43}=$ + + Key is not valid 44-character (32-bytes) base64 + + + + + base64 encoded preshared key + + ^[0-9a-zA-Z\+/]{43}=$ + + Key is not valid 44-character (32-bytes) base64 + + + + + IP addresses allowed to traverse the peer + + + + + + + + + + Remote endpoint (IP:port) + + + + + how often send keep alives in seconds + + + + + + + + + + + + -- cgit v1.2.3