mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 07:36:19 +00:00
936565c701
This patch adds an optional attribute to the <bootp> tag, that allows to specify a TFTP server address other than the address of the DHCP server itself. This can be used to forward the BOOTP settings of the host down to the guest. This is something that configurations such as Xen's default network achieve naturally, but must be done manually for NAT. * docs/formatnetwork.html.in: Document new attribute. * docs/schemas/network.rng: Add it to schema. * src/conf/network_conf.h: Add it to struct. * src/conf/network_conf.c: Add it to parser and pretty printer. * src/network/bridge_driver.c: Put it in the dnsmasq command line. * tests/networkxml2xmlin/netboot-proxy-network.xml tests/networkxml2xmlout/netboot-proxy-network.xml tests/networkxml2xmltest.c: add new tests
122 lines
3.1 KiB
Plaintext
122 lines
3.1 KiB
Plaintext
<!-- A Relax NG schema for the libvirt network XML format -->
|
|
<element name="network" xmlns="http://relaxng.org/ns/structure/1.0"
|
|
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
<interleave>
|
|
|
|
<!-- The name of the network, used to refer to it through the API
|
|
and in virsh -->
|
|
<element name="name">
|
|
<text/>
|
|
</element>
|
|
|
|
<!-- <uuid> element -->
|
|
<optional>
|
|
<element name="uuid"><text/></element>
|
|
</optional>
|
|
|
|
<!-- <bridge> element -->
|
|
<optional>
|
|
<!-- The name of the network to be set up; this will back
|
|
the network on the host -->
|
|
<element name="bridge">
|
|
<optional>
|
|
<attribute name="name">
|
|
<text/>
|
|
</attribute>
|
|
</optional>
|
|
|
|
<optional>
|
|
<attribute name="stp">
|
|
<choice>
|
|
<value>on</value>
|
|
<value>off</value>
|
|
</choice>
|
|
</attribute>
|
|
</optional>
|
|
|
|
<optional>
|
|
<attribute name="delay">
|
|
<data type="integer"/>
|
|
</attribute>
|
|
</optional>
|
|
|
|
</element>
|
|
</optional>
|
|
|
|
<!-- <forward> element -->
|
|
<optional>
|
|
<!-- The device through which the bridge is connected to the
|
|
rest of the network -->
|
|
<element name="forward">
|
|
<optional>
|
|
<attribute name="dev">
|
|
<text/>
|
|
</attribute>
|
|
</optional>
|
|
|
|
<optional>
|
|
<attribute name="mode">
|
|
<choice>
|
|
<value>nat</value>
|
|
<value>route</value>
|
|
</choice>
|
|
</attribute>
|
|
</optional>
|
|
</element>
|
|
</optional>
|
|
|
|
<!-- <domain> element -->
|
|
<optional>
|
|
<element name="domain">
|
|
<attribute name="name"><text/></attribute>
|
|
</element>
|
|
</optional>
|
|
|
|
<!-- <ip> element -->
|
|
<optional>
|
|
<!-- The IP element sets up NAT'ing and an optional DHCP server
|
|
local to the host. -->
|
|
<!-- FIXME: address, netmask and the start and end of the ranges
|
|
are IP addresses, and should be validated as such in the scheme -->
|
|
<element name="ip">
|
|
<optional>
|
|
<attribute name="address"><text/></attribute>
|
|
</optional>
|
|
<optional>
|
|
<attribute name="netmask"><text/></attribute>
|
|
</optional>
|
|
<optional>
|
|
<element name="tftp">
|
|
<attribute name="root"><text/></attribute>
|
|
</element>
|
|
</optional>
|
|
<!-- Define the range(s) of IP addresses that the DHCP
|
|
server should hand out -->
|
|
<element name="dhcp">
|
|
<zeroOrMore>
|
|
<element name="range">
|
|
<attribute name="start"><text/></attribute>
|
|
<attribute name="end"><text/></attribute>
|
|
</element>
|
|
</zeroOrMore>
|
|
<zeroOrMore>
|
|
<element name="host">
|
|
<attribute name="mac"><text/></attribute>
|
|
<attribute name="name"><text/></attribute>
|
|
<attribute name="ip"><text/></attribute>
|
|
</element>
|
|
</zeroOrMore>
|
|
<optional>
|
|
<element name="bootp">
|
|
<attribute name="file"><text/></attribute>
|
|
<optional>
|
|
<attribute name="server"><text/></attribute>
|
|
</optional>
|
|
</element>
|
|
</optional>
|
|
</element>
|
|
</element>
|
|
</optional>
|
|
</interleave>
|
|
</element>
|