Pierre,

+See http://www.dur.ac.uk/c.c.dean/xvp/ for details of the reference
> >> +implementation, which allows shutdown, reboot and reset of virtual
> >> +machines running on Citrix XenServer.
> > > > Does this page add anything to the protocol definition? We don't have
> > official reference implementations for anything else, so I'm sceptical
> > about adding one here.
> > ... I put this wording in at Daniel's suggestion. >

This discussion must have been off-list, or on some other list, so I'm
not aware of the idea here.

Daniel's suggestion on this list, 27 May:

http://sourceforge.net/mailarchive/message.php?msg_name=20090527095936.GA31980%40berrange.com

However, I have now removed the offending paragraph.

We can drop the naming discussion. But I think the above issue needs to
be resolved, as does the issue of how future version numbers should be
handled. Since it's just you and Peter Rosin who have implemented this
extension, I'd say you're in a best position to specify the handling so
that it doesn't break anything existing.

In the attached patch, I have attempted to address version numbering
(see the server message description).

Regards,

Colin


Describe the xvp extension

The xvp extension allows a client to perform shutdown, reboot and reset
operations on the system whose framebuffer it is displaying.

Signed-off-by: Colin Dean <c.c.d...@durham.ac.uk>
---

Index: rfbproto.rst
===================================================================
--- rfbproto.rst	(revision 3825)
+++ rfbproto.rst	(working copy)
@@ -788,7 +788,7 @@
 253         `gii Client Message`_
 252         tight
 251         `SetDesktopSize`_
-250         Colin Dean xvp
+250         `xvp Client Message`_
 =========== ===========================================================
 
 Note that before sending a message with an optional message type a
@@ -1413,6 +1413,27 @@
 should make every effort to preserve the fields it does not wish to
 modify, including any unknown *flags* bits.
 
+xvp Client Message
+------------------
+
+A client supporting the *xvp* extension sends this to request that the
+server initiate a clean shutdown, clean reboot or abrupt reset of the
+system whose framebuffer the client is displaying.
+
+=============== ==================== ========== =======================
+No. of bytes    Type                 [Value]    Description
+=============== ==================== ========== =======================
+1               ``U8``               250        *message-type*
+1                                               *padding*
+1               ``U8``               1          *xvp-extension-version*
+1               ``U8``                          *xvp-message-code*
+=============== ==================== ========== =======================
+
+The possible values for *xvp-message-code* are: 2 - XVP_SHUTDOWN,
+3 - XVP_REBOOT, and 4 - XVP_RESET.  The client must have already
+established that the server supports this extension, by requesting the
+`xvp Pseudo-encoding`_.
+
 Server to Client Messages
 +++++++++++++++++++++++++
 
@@ -1436,7 +1457,7 @@
 254, 127    VMWare
 253         `gii Server Message`_
 252         tight
-250         Colin Dean xvp
+250         `xvp Server Message`_
 =========== ===========================================================
 
 Note that before sending a message with an optional message type a
@@ -1593,6 +1614,36 @@
 communications. A *device-origin* of zero indicates device creation
 failure.
 
+xvp Server Message
+------------------
+
+This has the following format:
+
+=============== ==================== ========== =======================
+No. of bytes    Type                 [Value]    Description
+=============== ==================== ========== =======================
+1               ``U8``               250        *message-type*
+1                                               *padding*
+1               ``U8``               1          *xvp-extension-version*
+1               ``U8``                          *xvp-message-code*
+=============== ==================== ========== =======================
+
+The possible values for *xvp-message-code* are: 0 - XVP_FAIL and 1 -
+XVP_INIT.
+
+A server which supports the *xvp* extension declares this by sending a
+message with an XVP_INIT *xvp-message-code* when it receives a request
+from the client to use the `xvp Pseudo-encoding`_.  The server must
+specify in this message the highest *xvp-extension-version* it supports:
+the client may assume that the server supports all versions from 1 up to
+this value.  The client is then free to use any supported version.
+Currently, only version 1 is defined.
+
+A server which subsequently receives an `xvp Client Message`_ requesting
+an operation which it is unable to perform, informs the client of this
+by sending a message with an XVP_FAIL *xvp-message-code*, and the same
+*xvp-extension-version* as included in the client's operation request.
+
 Encodings
 +++++++++
 
@@ -1613,6 +1664,7 @@
 -223        `DesktopSize Pseudo-encoding`_
 -305        `gii Pseudo-encoding`_
 -308        `ExtendedDesktopSize Pseudo-encoding`_
+-309        `xvp Pseudo-encoding`_
 =========== ===========================================================
 
 Other registered encodings are:
@@ -1630,7 +1682,6 @@
 -273 to -304                VMWare
 -306                        popa
 -307                        Peter Astrand DesktopName
--309                        Colin Dean xvp
 0x574d5600 to 0x574d56ff    VMWare
 =========================== ===========================================
 
@@ -2333,3 +2384,12 @@
 Note that a simple client which does not support multi head does not
 need to parse the list of screens and can simply display the entire
 framebuffer.
+
+xvp Pseudo-encoding
+-------------------
+
+A client which requests the *xvp* pseudo-encoding is declaring that it
+wishes to use the *xvp* extension.  If the server supports this, it
+replies with a message of type `xvp Server Message`_, using an
+*xvp-message-code* of *XVP_INIT*.  This informs the client that it may
+then subsequently send messages of type `xvp Client Message`_.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
tigervnc-rfbproto mailing list
tigervnc-rfbproto@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-rfbproto

Reply via email to