On Mon, Jun 7, 2010 at 10:48 AM, Anthony Liguori <anth...@codemonkey.ws> wrote: >>> >>> $ qemu -netdev tap,id=tap0 -device e1000,netdev=tap0 >>> >>> This makes a 1:1 relation. So clearly tap0 is a host device, e1000.0 >>> will be a guest device, and they are connected. >> >> Yes. I'd want separate queries for each, or perhaps a single query that >> returns >> >> { 'hostdev': some-object-with-host-device-properties-only, 'nic': >> some-object-that-describes-the-guest-nic } > > We need a query-netdev and then info qdm already provides the guest nic > properties. Just filter out devices that have a netdev property. >
How about this small draft: Possible values for "type": tap, user, vde and socket. The 'info' object contains all the parameters available via -netdev type,args. Notice: vlan is still there, unless the support for it is removed, IMHO. -> { "execute": "query-netdev" } <- { "return": [ { "device": "tap.0", "vlan": 0, "type": "tap", "info": { "script": "/etc/qemu-ifup", "downscript": "/etc/qemu-ifdown", "ifname": "tap0", }, { "device": "user.0", "type": "user", "info": { "net": "10.0.2.0", "netmask": "255.255.255.0" }, },