From: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
To: qemu-devel@nongnu.org
Cc: lcapitulino@redhat.com, avi@redhat.com, armbru@redhat.com
Subject: [Qemu-devel] [RFC] QMP: Introduce query-netdevices documentation
Date: Fri, 4 Jun 2010 11:06:00 -0300 [thread overview]
Message-ID: <1275660360-12137-1-git-send-email-miguel.filho@gmail.com> (raw)
This introduces the protocol specification for querying information about
network devices available on a VM and a new monitor command that show the same
information.
Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
---
qemu-monitor.hx | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 69 insertions(+), 0 deletions(-)
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index f6a94f2..8600129 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -1674,6 +1674,75 @@ show the various VLANs and the associated devices
ETEXI
STEXI
+@item info netdevices
+show information about network devices
+ETEXI
+SQMP
+query-netdevices
+----------------
+
+Each device is represented by a json-object. The returned value is a json-array
+of all devices.
+
+Each json-object contain the following:
+
+- "device": device name (json-string)
+- "vlan": only present if the device is attached to a VLAN (json-int)
+- "info": json-object containing the following:
+ - "model": type of the device (json-string)
+ - Possible values: "tap", "socket", "xen", "slirp", "dump",
+ "vde", "ne2k_pci", "i82551", "i82557b",
+ "i82559er", "rtl8139", "e1000", "pcnet",
+ "virtio", "dp83932", "lan9118", "mcf_fec",
+ "xilinx-ethlite", "lance", "stellaris",
+ "smc91c111", "ne2k_isa", "mv88w8618",
+ "mipsnet", "fseth", "dp83932", "usb"
+ - "macaddr": MAC address, only present if the device is a NIC
+ (json-string)
+ - "script": path to script used to configure the device, only present
+ if "model" is "tap" (json-string)
+ - "downscript": path to script used to deconfigure the device, only
+ present if "model" is "tap" (json-string)
+ - "fd": handle to the device, only present if "model" is "vde"
+ (json-int)
+ - "ifname": name of the host device connected to the guest device,
+ only present if "model" is "tap" (json-string)
+ - "host": IP address, only present if "model" is "socket"
+ (json-string)
+ - "service": port number, only present if "model" is "socket"
+ - "family": address familyi, only present if "model" is "socket"
+ (json-string)
+ - Possible values: "ipv4"
+
+Example:
+
+-> { "execute": "query-netdevices" }
+<- {
+ "return": [
+ {
+ "device": "tap.0",
+ "vlan": 0,
+ "info": {
+ "script": "/etc/kvm/kvm-ifup",
+ "downscript": "/etc/qemu-ifdown",
+ "ifname": "tap0",
+ "model": "tap"
+ },
+ },
+ {
+ "device": "e1000.0",
+ "vlan": 0,
+ "info": {
+ "model": "e1000",
+ "macaddr": "52:54:00:12:34:56"
+ },
+ }
+ ]
+ }
+
+EQMP
+
+STEXI
@item info chardev
show the character devices
ETEXI
--
1.7.1
next reply other threads:[~2010-06-04 14:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 14:06 Miguel Di Ciurcio Filho [this message]
2010-06-06 15:50 ` [Qemu-devel] Re: [RFC] QMP: Introduce query-netdevices documentation Avi Kivity
2010-06-07 12:57 ` Miguel Di Ciurcio Filho
2010-06-07 13:39 ` Avi Kivity
2010-06-07 13:48 ` Anthony Liguori
2010-06-07 14:41 ` Miguel Di Ciurcio Filho
2010-06-07 14:48 ` Anthony Liguori
2010-06-07 19:39 ` Miguel Di Ciurcio Filho
2010-06-07 15:01 ` Markus Armbruster
2010-06-07 19:48 ` Miguel Di Ciurcio Filho
2010-06-07 15:54 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1275660360-12137-1-git-send-email-miguel.filho@gmail.com \
--to=miguel.filho@gmail.com \
--cc=armbru@redhat.com \
--cc=avi@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).