]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: define and parse USB redirection filter XML
authorGuannan Ren <gren@redhat.com>
Thu, 13 Sep 2012 07:25:45 +0000 (15:25 +0800)
committerGuannan Ren <gren@redhat.com>
Thu, 13 Sep 2012 09:22:27 +0000 (17:22 +0800)
commit5b35cc532b5efd85d4d21263f7d8c7c756256040
tree4e6e7e24aeb1293da84150930f602d6593ac4804
parentaa81db3ff883582493b0d03b29b39ff4bd78a68f
qemu: define and parse USB redirection filter XML

https://bugzilla.redhat.com/show_bug.cgi?id=795929
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=6af165892cf900291046f1d25f95416f379504c2

This patch define and parse the input XML of USB redirection filter.
<devices>
...
  <redirdev bus='usb' type='spicevmc'>
    <address type='usb' bus='0' port='4'/>
  </redirdev>
  <redirfilter>
    <usbdev class='0x08' vendor='0x1234' product='0xbeef' \
            version='2.00' allow='yes'/>
    <usbdev allow='no'/>
  </redirfilter>
...
</devices>

There is no 1:1 mapping between ports and redirected devices and
qemu and spicy client couldn't decide into which usbredir ports
the client can 'plug' redirected devices. So it make sense to apply
all of filter rules global to all existing usb redirection devices.
class attribute is USB Class codes. version is bcdDevice value
of USB device. vendor and product is USB vendorId and productId.
-1 can be used to allow any value for a field. Except allow attribute
the other four are optional, default value is -1.
src/conf/domain_conf.c
src/conf/domain_conf.h