summaryrefslogtreecommitdiff
path: root/qmp-commands.hx
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-11-30 11:02:51 +0100
committerGerd Hoffmann <kraxel@redhat.com>2010-12-09 14:23:24 +0100
commitcb42a870c3f5b38911b1428cb785dd702bc47d0f (patch)
tree3a750ea2bf0233d076784c3ab7fcfc6baf67953b /qmp-commands.hx
parent6f8c63fbd7edc0b41c09f8f8e2d41a3a65464a43 (diff)
downloadqemu-cb42a870c3f5b38911b1428cb785dd702bc47d0f.tar.gz
spice: add qmp 'query-spice' and hmp 'info spice' commands.
The patch adds a 'query-spice' monitor command which returns informations about the spice server configuration and also a list of channel connections. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r--qmp-commands.hx70
1 files changed, 70 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx
index e5f157fe10..b4e601751f 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1439,6 +1439,76 @@ Example:
EQMP
SQMP
+query-spice
+-----------
+
+Show SPICE server information.
+
+Return a json-object with server information. Connected clients are returned
+as a json-array of json-objects.
+
+The main json-object contains the following:
+
+- "enabled": true or false (json-bool)
+- "host": server's IP address (json-string)
+- "port": server's port number (json-int, optional)
+- "tls-port": server's port number (json-int, optional)
+- "auth": authentication method (json-string)
+ - Possible values: "none", "spice"
+- "channels": a json-array of all active channels clients
+
+Channels are described by a json-object, each one contain the following:
+
+- "host": client's IP address (json-string)
+- "family": address family (json-string)
+ - Possible values: "ipv4", "ipv6", "unix", "unknown"
+- "port": client's port number (json-string)
+- "connection-id": spice connection id. All channels with the same id
+ belong to the same spice session (json-int)
+- "channel-type": channel type. "1" is the main control channel, filter for
+ this one if you want track spice sessions only (json-int)
+- "channel-id": channel id. Usually "0", might be different needed when
+ multiple channels of the same type exist, such as multiple
+ display channels in a multihead setup (json-int)
+- "tls": whevener the channel is encrypted (json-bool)
+
+Example:
+
+-> { "execute": "query-spice" }
+<- {
+ "return": {
+ "enabled": true,
+ "auth": "spice",
+ "port": 5920,
+ "tls-port": 5921,
+ "host": "0.0.0.0",
+ "channels": [
+ {
+ "port": "54924",
+ "family": "ipv4",
+ "channel-type": 1,
+ "connection-id": 1804289383,
+ "host": "127.0.0.1",
+ "channel-id": 0,
+ "tls": true
+ },
+ {
+ "port": "36710",
+ "family": "ipv4",
+ "channel-type": 4,
+ "connection-id": 1804289383,
+ "host": "127.0.0.1",
+ "channel-id": 0,
+ "tls": false
+ },
+ [ ... more channels follow ... ]
+ ]
+ }
+ }
+
+EQMP
+
+SQMP
query-name
----------