These commands show the information about active backend network devices.
Signed-off-by: Miguel Di Ciurcio Filho <[email protected]>
---
qemu-monitor.hx | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index f6a94f2..14a0ba1 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -1674,6 +1674,59 @@ show the various VLANs and the associated devices
ETEXI
STEXI
+...@item info netdev
+show information about the current backend network devices
+ETEXI
+SQMP
+query-netdev
+----------------
+
+Each device is represented by a json-object. The returned value is a json-array
+of all devices.
+
+Each json-object contain the following:
+
+- "id": the device's ID, must be unique (json-string)
+- "vlan": QEMU's internal vlan identification. Only present if the device is
+ attached to a VLAN (json-int, optional)
+- "peer": ID of the frontend device when on a 1:1 relationship (json-string,
+ optional)
+- "info": json-object containing the configuration information about the
device.
+
+Note: The supported device information is the same one supported by the '-net'
+command-line argument, which are listed in the '-help' output or QEMU's manual.
+
+Example:
+
+-> { "execute": "query-netdev" }
+<- {
+ "return": [
+ {
+ "id": "tap.0",
+ "type": "tap",
+ "vlan": 0,
+ "info": {
+ "script": "/etc/qemu-ifup",
+ "downscript": "/etc/qemu-ifdown",
+ "ifname": "tap0",
+ "vhost": true
+ },
+ },
+ {
+ "id": "user.0",
+ "type": "user",
+ "peer": "e1000.0",
+ "info": {
+ "net": "10.0.2.0",
+ "netmask": "255.255.255.0"
+ },
+ },
+ ]
+ }
+
+EQMP
+
+STEXI
@item info chardev
show the character devices
ETEXI
--
1.7.1