1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

docs: Add missed RNG schema for interface

We support <interface> of type "mcast", "server", and "client",
but the RNG schema for them are missed. Attribute "address" is
optional for "server" type. And these 3 types support
<mac address='MAC'/>, too.
This commit is contained in:
Osier Yang 2012-01-16 22:08:07 +08:00
parent 9a070e8341
commit a5f8a01abb
9 changed files with 161 additions and 0 deletions

View File

@ -2189,6 +2189,7 @@
<pre>
...
&lt;devices&gt;
&lt;mac address='52:54:00:6d:90:01'&gt;
&lt;interface type='mcast'&gt;
&lt;source address='230.0.0.1' port='5558'/&gt;
&lt;/interface&gt;
@ -2210,10 +2211,12 @@
...
&lt;devices&gt;
&lt;interface type='server'&gt;
&lt;mac address='52:54:00:22:c9:42'&gt;
&lt;source address='192.168.0.1' port='5558'/&gt;
&lt;/interface&gt;
...
&lt;interface type='client'&gt;
&lt;mac address='52:54:00:8b:c9:51'&gt;
&lt;source address='192.168.0.1' port='5558'/&gt;
&lt;/interface&gt;
&lt;/devices&gt;

View File

@ -1322,6 +1322,59 @@
<ref name="interface-options"/>
</interleave>
</group>
<group>
<attribute name="type">
<choice>
<value>mcast</value>
<value>client</value>
</choice>
</attribute>
<interleave>
<element name="source">
<attribute name="address">
<ref name="ipv4Addr"/>
</attribute>
<attribute name="port">
<ref name="PortNumber"/>
</attribute>
<empty/>
</element>
<optional>
<element name="mac">
<attribute name="address">
<ref name="macAddr"/>
</attribute>
<empty/>
</element>
</optional>
</interleave>
</group>
<group>
<attribute name="type">
<value>server</value>
</attribute>
<interleave>
<element name="source">
<optional>
<attribute name="address">
<ref name="ipv4Addr"/>
</attribute>
</optional>
<attribute name="port">
<ref name="PortNumber"/>
</attribute>
<empty/>
</element>
<optional>
<element name="mac">
<attribute name="address">
<ref name="macAddr"/>
</attribute>
<empty/>
</element>
</optional>
</interleave>
</group>
</choice>
</element>
</define>

View File

@ -0,0 +1,5 @@
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \
pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
-no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net nic,\
macaddr=52:54:00:8c:b9:05,vlan=0 -net socket,connect=192.168.0.1:5558,vlan=0 \
-serial none -parallel none -usb

View File

@ -0,0 +1,29 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory>219136</memory>
<currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='ide' index='0'/>
<interface type='client'>
<mac address='52:54:00:8c:b9:05'/>
<source address='192.168.0.1' port='5558'/>
</interface>
<memballoon model='virtio'/>
</devices>
</domain>

View File

@ -0,0 +1,5 @@
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \
pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
-no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net nic,\
macaddr=52:54:00:8c:b9:05,vlan=0 -net socket,mcast=192.0.0.1:5558,vlan=0 \
-serial none -parallel none -usb

View File

@ -0,0 +1,29 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory>219136</memory>
<currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='ide' index='0'/>
<interface type='mcast'>
<mac address='52:54:00:8c:b9:05'/>
<source address='192.0.0.1' port='5558'/>
</interface>
<memballoon model='virtio'/>
</devices>
</domain>

View File

@ -0,0 +1,5 @@
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \
pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
-no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net nic,\
macaddr=52:54:00:8c:b9:05,vlan=0 -net socket,listen=192.168.0.1:5558,vlan=0 \
-serial none -parallel none -usb

View File

@ -0,0 +1,29 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory>219136</memory>
<currentMemory>219136</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='ide' index='0'/>
<interface type='server'>
<mac address='52:54:00:8c:b9:05'/>
<source address='192.168.0.1' port='5558'/>
</interface>
<memballoon model='virtio'/>
</devices>
</domain>

View File

@ -519,6 +519,9 @@ mymain(void)
DO_TEST("net-eth", false, NONE);
DO_TEST("net-eth-ifname", false, NONE);
DO_TEST("net-eth-names", false, QEMU_CAPS_NET_NAME);
DO_TEST("net-client", false, NONE);
DO_TEST("net-server", false, NONE);
DO_TEST("net-mcast", false, NONE);
DO_TEST("serial-vc", false, NONE);
DO_TEST("serial-pty", false, NONE);