qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3 v5] vnc: added initial websocket protocol support
@ 2013-01-02 13:29 Tim Hardeck
  2013-01-02 13:29 ` [Qemu-devel] [PATCH 1/3] vnc: added buffer_advance function Tim Hardeck
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Tim Hardeck @ 2013-01-02 13:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: aliguori, stefanha, github, Tim Hardeck, alevy, kraxel,
	corentin.chary

This patch set adds basic Websocket Protocol version 13 - RFC 6455 - support
to QEMU VNC. Binary encoding support on the client side is mandatory.

Because of the GnuTLS requirement the Websockets implementation is
optional (--enable-vnc-ws).

To activate Websocket support the VNC option "websocket" is used, for
example "-vnc :0,websocket".
The listen port for Websocket connections is (5700 + display) so if
QEMU VNC is started with :0 the Websocket port would be 5700.
As an alternative the Websocket port could be manually specified by
using ",websocket=<port>" instead.

Changes v2
* removed automatic websocket recognition
* added new lwebsock socket on port 5700 + display when the vnc option
  "websocket" is passed on
* adapted vnc_connect vnc_listen_read to differ between websocket
* added separate event handler to read the Websocket handshake

Changes v3
* added manual port specification by using ",websocket=<port>"
* switched from memmem() to g_strstr_len()
* removed masked_size from vncws_decode_frame()
* resetted vnc_tls variable to default in the configure script

Changes v4
* incorporated suggestions from Stefan Hajnoczi
* moved websockets encoding from vnc_write to its own client_write function
* moved websockets decoding to its own client_read function
* added initialization checks to vnc_disconnect to prevent crashes if a regular client connects to the websocket port

Changes v5
* added initialized variable to VncState to prevent crashes during vnc_disconnect - the previously added initialization checks didn't prevent segfaults when a websocket client was connected

Tim Hardeck (3):
  vnc: added buffer_advance function
  vnc: added initial websocket protocol support
  vnc: fix possible uninitialized removals

 configure        |   27 +++++-
 qemu-options.hx  |    8 ++
 ui/Makefile.objs |    1 +
 ui/vnc-ws.c      |  282 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ui/vnc-ws.h      |   92 ++++++++++++++++++
 ui/vnc.c         |  211 +++++++++++++++++++++++++++++++++++-----
 ui/vnc.h         |   21 ++++
 7 files changed, 614 insertions(+), 28 deletions(-)
 create mode 100644 ui/vnc-ws.c
 create mode 100644 ui/vnc-ws.h

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 0/3 v6] vnc: added initial websocket protocol support
@ 2013-01-08 10:27 Tim Hardeck
  2013-01-08 10:27 ` [Qemu-devel] [PATCH 2/3] " Tim Hardeck
  0 siblings, 1 reply; 14+ messages in thread
From: Tim Hardeck @ 2013-01-08 10:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: aliguori, stefanha, github, blauwirbel, Tim Hardeck, alevy,
	kraxel, corentin.chary

This patch set adds basic Websocket Protocol version 13 - RFC 6455 - support
to QEMU VNC. Binary encoding support on the client side is mandatory.

Because of the GnuTLS requirement the Websockets implementation is
optional (--enable-vnc-ws).

To activate Websocket support the VNC option "websocket" is used, for 
example "-vnc :0,websocket".
The listen port for Websocket connections is (5700 + display) so if
QEMU VNC is started with :0 the Websocket port would be 5700.
As an alternative the Websocket port could be manually specified by
using ",websocket=<port>" instead.

Changes v2
* removed automatic websocket recognition
* added new lwebsock socket on port 5700 + display when the vnc option
  "websocket" is passed on
* adapted vnc_connect vnc_listen_read to differ between websocket
* added separate event handler to read the Websocket handshake

Changes v3
* added manual port specification by using ",websocket=<port>"
* switched from memmem() to g_strstr_len()
* removed masked_size from vncws_decode_frame()
* resetted vnc_tls variable to default in the configure script

Changes v4
* incorporated suggestions from Stefan Hajnoczi
* moved websockets encoding from vnc_write to its own client_write function
* moved websockets decoding to its own client_read function
* added initialization checks to vnc_disconnect to prevent crashes if a regular client connects to the websocket port

Changes v5
* added initialized variable to VncState to prevent crashes during vnc_disconnect - the previously added initialization checks didn't prevent segfaults when a websocket client was connected

Changes v6
* incorporated suggestions from "Blue Swirl"
* updated vncws_handshake_read to check for the header end tag and to not reset the buffer afterwards

Tim Hardeck (3):
  vnc: added buffer_advance function
  vnc: added initial websocket protocol support
  vnc: fix possible uninitialized removals

 configure        |   27 +++++-
 qemu-options.hx  |    8 ++
 ui/Makefile.objs |    1 +
 ui/vnc-ws.c      |  284 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ui/vnc-ws.h      |   86 +++++++++++++++++
 ui/vnc.c         |  211 +++++++++++++++++++++++++++++++++++-----
 ui/vnc.h         |   21 ++++
 7 files changed, 610 insertions(+), 28 deletions(-)
 create mode 100644 ui/vnc-ws.c
 create mode 100644 ui/vnc-ws.h

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [Qemu-devel] [PATCH 0/3 v7] vnc: added initial websocket protocol support
@ 2013-01-21 10:04 Tim Hardeck
  2013-01-21 10:04 ` [Qemu-devel] [PATCH 2/3] " Tim Hardeck
  0 siblings, 1 reply; 14+ messages in thread
From: Tim Hardeck @ 2013-01-21 10:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: aliguori, stefanha, github, blauwirbel, Tim Hardeck, alevy,
	kraxel, corentin.chary

This patch set adds basic Websocket Protocol version 13 - RFC 6455 - support
to QEMU VNC. Binary encoding support on the client side is mandatory.

Because of the GnuTLS requirement the Websockets implementation is
optional (--enable-vnc-ws).

To activate Websocket support the VNC option "websocket" is used, for
example "-vnc :0,websocket".
The listen port for Websocket connections is (5700 + display) so if
QEMU VNC is started with :0 the Websocket port would be 5700.
As an alternative the Websocket port could be manually specified by
using ",websocket=<port>" instead.

Changes v2
* removed automatic websocket recognition
* added new lwebsock socket on port 5700 + display when the vnc option
  "websocket" is passed on
* adapted vnc_connect vnc_listen_read to differ between websocket
* added separate event handler to read the Websocket handshake

Changes v3
* added manual port specification by using ",websocket=<port>"
* switched from memmem() to g_strstr_len()
* removed masked_size from vncws_decode_frame()
* resetted vnc_tls variable to default in the configure script

Changes v4
* incorporated suggestions from Stefan Hajnoczi
* moved websockets encoding from vnc_write to its own client_write function
* moved websockets decoding to its own client_read function
* added initialization checks to vnc_disconnect to prevent crashes if a regular client connects to the websocket port

Changes v5
* added initialized variable to VncState to prevent crashes during vnc_disconnect - the previously added initialization checks didn't prevent segfaults when a websocket client was connected

Changes v6
* incorporated suggestions from "Blue Swirl"
* updated vncws_handshake_read to check for the header end tag and to not reset the buffer afterwards

Changes v7
* fixed vnc-ws header define

Tim Hardeck (3):
  vnc: added buffer_advance function
  vnc: added initial websocket protocol support
  vnc: fix possible uninitialized removals

 configure        |   27 +++++-
 qemu-options.hx  |    8 ++
 ui/Makefile.objs |    1 +
 ui/vnc-ws.c      |  284 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ui/vnc-ws.h      |   86 +++++++++++++++++
 ui/vnc.c         |  211 +++++++++++++++++++++++++++++++++++-----
 ui/vnc.h         |   21 ++++
 7 files changed, 610 insertions(+), 28 deletions(-)
 create mode 100644 ui/vnc-ws.c
 create mode 100644 ui/vnc-ws.h

--
1.7.10.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-01-21 10:05 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-02 13:29 [Qemu-devel] [PATCH 0/3 v5] vnc: added initial websocket protocol support Tim Hardeck
2013-01-02 13:29 ` [Qemu-devel] [PATCH 1/3] vnc: added buffer_advance function Tim Hardeck
2013-01-07 19:38   ` Anthony Liguori
2013-01-02 13:29 ` [Qemu-devel] [PATCH 2/3] vnc: added initial websocket protocol support Tim Hardeck
2013-01-04 20:20   ` Blue Swirl
2013-01-05 18:02     ` Tim Hardeck
2013-01-07 19:52   ` Anthony Liguori
2013-01-07 23:57     ` Tim Hardeck
2013-01-08  0:38       ` Anthony Liguori
2013-01-11 14:12         ` Tim Hardeck
2013-01-02 13:29 ` [Qemu-devel] [PATCH 3/3] vnc: fix possible uninitialized removals Tim Hardeck
  -- strict thread matches above, loose matches on Subject: below --
2013-01-08 10:27 [Qemu-devel] [PATCH 0/3 v6] vnc: added initial websocket protocol support Tim Hardeck
2013-01-08 10:27 ` [Qemu-devel] [PATCH 2/3] " Tim Hardeck
2013-01-09 20:47   ` Blue Swirl
2013-01-21 10:04 [Qemu-devel] [PATCH 0/3 v7] " Tim Hardeck
2013-01-21 10:04 ` [Qemu-devel] [PATCH 2/3] " Tim Hardeck

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).