[Spice-devel] [RFC PATCH spice-protocol 3/4] Add error reports from server to guest

Frediano Ziglio fziglio at redhat.com
Wed Jun 14 15:30:19 UTC 2017


---
 spice/stream-device.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/spice/stream-device.h b/spice/stream-device.h
index 3ce74d0..a37b911 100644
--- a/spice/stream-device.h
+++ b/spice/stream-device.h
@@ -67,6 +67,8 @@ typedef enum StreamDevType {
     STREAM_TYPE_DATA,
     /* server ask to start a new stream */
     STREAM_TYPE_START_STOP,
+    /* server notify errors to guest */
+    STREAM_TYPE_NOTIFY_ERROR,
 } StreamDevType;
 
 /* generic extension capabilities */
@@ -109,4 +111,20 @@ typedef struct StreamMsgStartStop {
     uint8_t codecs[0];
 } StreamMsgStartStop;
 
+/* Tell guest about invalid protocol.
+ * This message is sent by the host to the guest.
+ * The server will stop processing data from the guest.
+ */
+typedef struct StreamMsgNotifyError {
+    /* numeric error code.
+     * Currently not defined, set to 0.
+     */
+    uint32_t error_code;
+    /* String message, UTF-8 encoded.
+     * This field terminate with the message.
+     * Not necessary NUL-terminated.
+     */
+    uint8_t msg[0];
+} StreamMsgNotifyError;
+
 #endif /* SPICE_STREAM_DEVICE_H_ */
-- 
2.9.4



More information about the Spice-devel mailing list