From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Anthony Liguori <aliguori@amazon.com>,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: [Qemu-devel] [PULL 10/10] monitor: add vnc websockets
Date: Fri, 19 Dec 2014 10:04:26 +0100 [thread overview]
Message-ID: <1418979866-1615-11-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1418979866-1615-1-git-send-email-kraxel@redhat.com>
Add websockets bool to VncBasicInfo, report websocket server sockets,
flag websocket client connections.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
qapi-schema.json | 5 ++++-
ui/vnc.c | 15 ++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index 2d45d4c..07deb71 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -672,12 +672,15 @@
#
# @family: address family
#
+# @websocket: true in case the socket is a websocket (since 2.3).
+#
# Since: 2.1
##
{ 'type': 'VncBasicInfo',
'data': { 'host': 'str',
'service': 'str',
- 'family': 'NetworkAddressFamily' } }
+ 'family': 'NetworkAddressFamily',
+ 'websocket': 'bool' } }
##
# @VncServerInfo
diff --git a/ui/vnc.c b/ui/vnc.c
index e730059..fb8068f 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -353,6 +353,9 @@ static VncClientInfo *qmp_query_vnc_client(const VncState *client)
info->base->host = g_strdup(host);
info->base->service = g_strdup(serv);
info->base->family = inet_netfamily(sa.ss_family);
+#ifdef CONFIG_VNC_WS
+ info->base->websocket = client->websocket;
+#endif
#ifdef CONFIG_VNC_TLS
if (client->tls.session && client->tls.dname) {
@@ -457,6 +460,7 @@ out_error:
}
static VncBasicInfoList *qmp_query_server_entry(int socket,
+ bool websocket,
VncBasicInfoList *prev)
{
VncBasicInfoList *list;
@@ -477,6 +481,7 @@ static VncBasicInfoList *qmp_query_server_entry(int socket,
info->host = g_strdup(host);
info->service = g_strdup(serv);
info->family = inet_netfamily(sa.ss_family);
+ info->websocket = websocket;
list = g_new0(VncBasicInfoList, 1);
list->value = info;
@@ -572,12 +577,13 @@ VncInfo2List *qmp_query_vnc2(Error **errp)
info->display = g_strdup(dev->id);
}
if (vd->lsock != -1) {
- info->server = qmp_query_server_entry(vd->lsock,
+ info->server = qmp_query_server_entry(vd->lsock, false,
info->server);
}
#ifdef CONFIG_VNC_WS
if (vd->lwebsock != -1) {
- /* TODO */
+ info->server = qmp_query_server_entry(vd->lwebsock, true,
+ info->server);
}
#endif
@@ -3304,10 +3310,13 @@ void vnc_display_open(const char *id, Error **errp)
{
VncDisplay *vs = vnc_display_find(id);
QemuOpts *opts = qemu_opts_find(&qemu_vnc_opts, id);
- const char *display, *websocket, *share, *device_id;
+ const char *display, *share, *device_id;
QemuConsole *con;
int password = 0;
int reverse = 0;
+#ifdef CONFIG_VNC_WS
+ const char *websocket;
+#endif
#ifdef CONFIG_VNC_TLS
int tls = 0, x509 = 0;
const char *path;
--
1.8.3.1
next prev parent reply other threads:[~2014-12-19 9:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-19 9:04 [Qemu-devel] [PULL 00/10] vnc: add support for multiple vnc displays Gerd Hoffmann
2014-12-19 9:04 ` [Qemu-devel] [PULL 01/10] vnc: remove vnc_display global Gerd Hoffmann
2014-12-19 9:04 ` [Qemu-devel] [PULL 02/10] vnc: remove unused DisplayState parameter, add id instead Gerd Hoffmann
2014-12-19 9:04 ` [Qemu-devel] [PULL 03/10] vnc: add display id to acl names Gerd Hoffmann
2014-12-19 9:04 ` [Qemu-devel] [PULL 04/10] vnc: switch to QemuOpts, allow multiple servers Gerd Hoffmann
2014-12-19 9:04 ` [Qemu-devel] [PULL 05/10] vnc: allow binding servers to qemu consoles Gerd Hoffmann
2014-12-19 9:04 ` [Qemu-devel] [PULL 06/10] vnc: update docs/multiseat.txt Gerd Hoffmann
2014-12-19 9:04 ` [Qemu-devel] [PULL 07/10] vnc: track & limit connections Gerd Hoffmann
2014-12-19 9:04 ` [Qemu-devel] [PULL 08/10] vnc: factor out qmp_query_client_list Gerd Hoffmann
2014-12-19 9:04 ` [Qemu-devel] [PULL 09/10] monitor: add query-vnc2 command Gerd Hoffmann
2014-12-19 13:04 ` Markus Armbruster
2014-12-19 18:05 ` Eric Blake
2015-01-06 10:39 ` Gerd Hoffmann
2015-01-12 15:53 ` Markus Armbruster
2015-01-06 10:36 ` Gerd Hoffmann
2015-01-08 15:44 ` Gerd Hoffmann
2014-12-19 9:04 ` Gerd Hoffmann [this message]
2014-12-19 13:06 ` [Qemu-devel] [PULL 10/10] monitor: add vnc websockets Markus Armbruster
2014-12-19 18:09 ` Eric Blake
2014-12-19 12:51 ` [Qemu-devel] [PULL 00/10] vnc: add support for multiple vnc displays Markus Armbruster
-- strict thread matches above, loose matches on Subject: below --
2015-01-22 11:03 Gerd Hoffmann
2015-01-22 11:04 ` [Qemu-devel] [PULL 10/10] monitor: add vnc websockets Gerd Hoffmann
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=1418979866-1615-11-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@amazon.com \
--cc=armbru@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).