summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2012-07-02 13:23:32 +0300
committerYonit Halperin <yhalperi@redhat.com>2012-08-14 12:41:58 +0300
commit692f77d1cf2428442e724a19a1a204bf3c32be97 (patch)
tree968741e63335add333f02fc30bef10fab12d2935
parent7439137509f838f95d672454cb9c30def7f84f89 (diff)
support seamless migrationseamless-migration.v1
see spice-protocol for more details commit 1ad5d259cb4b695ec3106de7ccd082e031e7ae11
-rw-r--r--common/client_marshallers.h1
-rw-r--r--common/messages.h15
m---------spice-protocol0
-rw-r--r--spice.proto24
-rw-r--r--spice1.proto10
5 files changed, 43 insertions, 7 deletions
diff --git a/common/client_marshallers.h b/common/client_marshallers.h
index 1bd95ae..1da7ff9 100644
--- a/common/client_marshallers.h
+++ b/common/client_marshallers.h
@@ -42,6 +42,7 @@ typedef struct {
void (*msgc_main_mouse_mode_request)(SpiceMarshaller *m, SpiceMsgcMainMouseModeRequest *msg);
void (*msgc_main_agent_start)(SpiceMarshaller *m, SpiceMsgcMainAgentStart *msg);
void (*msgc_main_agent_token)(SpiceMarshaller *m, SpiceMsgcMainAgentTokens *msg);
+ void (*msgc_main_migrate_dst_do_seamless)(SpiceMarshaller *m, SpiceMsgcMainMigrateDstDoSeamless *msg);
void (*msgc_display_init)(SpiceMarshaller *m, SpiceMsgcDisplayInit *msg);
void (*msgc_inputs_key_down)(SpiceMarshaller *m, SpiceMsgcKeyDown *msg);
void (*msgc_inputs_key_up)(SpiceMarshaller *m, SpiceMsgcKeyUp *msg);
diff --git a/common/messages.h b/common/messages.h
index 6ab435d..8a01e9b 100644
--- a/common/messages.h
+++ b/common/messages.h
@@ -67,7 +67,7 @@ typedef struct SpiceMsgMainMultiMediaTime {
uint32_t time;
} SpiceMsgMainMultiMediaTime;
-typedef struct SpiceMsgMainMigrationBegin {
+typedef struct SpiceMigrationDstInfo {
uint16_t port;
uint16_t sport;
uint32_t host_size;
@@ -77,8 +77,21 @@ typedef struct SpiceMsgMainMigrationBegin {
uint8_t *pub_key_data;
uint32_t cert_subject_size;
uint8_t *cert_subject_data;
+} SpiceMigrationDstInfo;
+
+typedef struct SpiceMsgMainMigrationBegin {
+ SpiceMigrationDstInfo dst_info;
} SpiceMsgMainMigrationBegin;
+typedef struct SpiceMsgMainMigrateBeginSeamless {
+ SpiceMigrationDstInfo dst_info;
+ uint32_t src_mig_version;
+} SpiceMsgMainMigrateBeginSeamless;
+
+typedef struct SpiceMsgcMainMigrateDstDoSeamless {
+ uint32_t src_version;
+} SpiceMsgcMainMigrateDstDoSeamless;
+
typedef struct SpiceMsgMainMigrationSwitchHost {
uint16_t port;
uint16_t sport;
diff --git a/spice-protocol b/spice-protocol
-Subproject f6907ba2846134cb65104dd412eaf753b943c12
+Subproject 1ad5d259cb4b695ec3106de7ccd082e031e7ae1
diff --git a/spice.proto b/spice.proto
index ecce4ef..2cbb7bd 100644
--- a/spice.proto
+++ b/spice.proto
@@ -162,15 +162,19 @@ struct ChannelId {
uint8 id;
};
-channel MainChannel : BaseChannel {
- server:
- message {
+struct DstInfo {
uint16 port;
uint16 sport;
uint32 host_size;
uint8 *host_data[host_size] @zero_terminated @marshall @nonnull;
uint32 cert_subject_size;
uint8 *cert_subject_data[cert_subject_size] @zero_terminated @marshall;
+} @ctype(SpiceMigrationDstInfo);
+
+channel MainChannel : BaseChannel {
+ server:
+ message {
+ DstInfo dst_info;
} @ctype(SpiceMsgMainMigrationBegin) migrate_begin = 101;
Empty migrate_cancel;
@@ -236,6 +240,14 @@ channel MainChannel : BaseChannel {
uint32 num_tokens;
} agent_connected_tokens;
+ message {
+ DstInfo dst_info;
+ uint32 src_mig_version;
+ } migrate_begin_seamless;
+
+ Empty migrate_dst_seamless_ack;
+ Empty migrate_dst_seamless_nack;
+
client:
message {
uint64 cache_size;
@@ -262,6 +274,12 @@ channel MainChannel : BaseChannel {
} @ctype(SpiceMsgcMainAgentTokens) agent_token;
Empty migrate_end;
+
+ message {
+ uint32 src_version;
+ } migrate_dst_do_seamless;
+
+ Empty migrate_connected_seamless;
};
enum8 clip_type {
diff --git a/spice1.proto b/spice1.proto
index 2ed1058..2d22cdf 100644
--- a/spice1.proto
+++ b/spice1.proto
@@ -161,9 +161,7 @@ struct ChannelId {
uint8 id;
};
-channel MainChannel : BaseChannel {
- server:
- message {
+struct DstInfo {
uint16 port;
uint16 sport;
uint32 host_offset @zero;
@@ -173,6 +171,12 @@ channel MainChannel : BaseChannel {
uint32 pub_key_size @minor(1);
uint8 host_data[host_size] @as_ptr @zero_terminated;
uint8 pub_key_data[pub_key_size] @minor(1) @as_ptr @zero_terminated;
+} @ctype(SpiceMigrationDstInfo);
+
+channel MainChannel : BaseChannel {
+ server:
+ message {
+ DstInfo dst_info;
} @ctype(SpiceMsgMainMigrationBegin) migrate_begin = 101;
Empty migrate_cancel;