[Spice-devel] [spice PATCH 29/55] migration_protocol: add migration data for smartcard

Yonit Halperin yhalperi at redhat.com
Wed Aug 15 00:56:09 PDT 2012


---
 server/migration_protocol.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/server/migration_protocol.h b/server/migration_protocol.h
index 127ab0a..67ad1bf 100644
--- a/server/migration_protocol.h
+++ b/server/migration_protocol.h
@@ -62,6 +62,20 @@ typedef struct __attribute__ ((__packed__)) SpiceMigrateDataSpiceVmc {
     SpiceMigrateDataCharDevice base;
 } SpiceMigrateDataSpiceVmc;
 
+/* *********
+ * smartcard
+ * *********/
+
+#define SPICE_MIGRATE_DATA_SMARTCARD_VERSION 1 /* NOTE: increase version when CHAR_DEVICE_VERSION
+                                                  is increased */
+#define SPICE_MIGRATE_DATA_SMARTCARD_MAGIC (*(uint32_t *)"SCMD")
+typedef struct __attribute__ ((__packed__)) SpiceMigrateDataSmartcard {
+    SpiceMigrateDataCharDevice base;
+    uint8_t reader_added;
+    uint32_t read_size; /* partial data read from dev */
+    uint32_t read_data_ptr;
+} SpiceMigrateDataSmartcard;
+
 static inline int migration_protocol_validate_header(SpiceMigrateDataHeader *header,
                                                      uint32_t magic,
                                                      uint32_t version)
-- 
1.7.7.6



More information about the Spice-devel mailing list