diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2012-08-02 22:23:04 +0300 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2012-08-27 09:13:01 +0300 |
commit | 1d2b071d15cb873d0a55cbf04359e2e6a0227ac2 (patch) | |
tree | de324862cf21bd815cdb9159e661a6b38e497a52 | |
parent | 8875e1da453c59ff6e9377bcae6eed0f0d8b4d34 (diff) | |
download | spice-1d2b071d15cb873d0a55cbf04359e2e6a0227ac2.tar.gz spice-1d2b071d15cb873d0a55cbf04359e2e6a0227ac2.tar.xz spice-1d2b071d15cb873d0a55cbf04359e2e6a0227ac2.zip |
migration_protocol: add migration data for char devices
-rw-r--r-- | server/migration_protocol.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/server/migration_protocol.h b/server/migration_protocol.h index 2b7f4c2c..7a1cb1dd 100644 --- a/server/migration_protocol.h +++ b/server/migration_protocol.h @@ -31,6 +31,26 @@ typedef struct __attribute__ ((__packed__)) SpiceMigrateDataHeader { uint32_t version; } SpiceMigrateDataHeader; +/* ******************** + * Char device base + * *******************/ + +/* increase the version of descendent char devices when this + * version is increased */ +#define SPICE_MIGRATE_DATA_CHAR_DEVICE_VERSION 1 + +/* Should be the first field of any of the char_devices migration data (see write_data_ptr) */ +typedef struct __attribute__ ((__packed__)) SpiceMigrateDataCharDevice { + uint32_t version; + uint8_t connected; + uint32_t num_client_tokens; + uint32_t num_send_tokens; + uint32_t write_size; /* write to dev */ + uint32_t write_num_client_tokens; /* how many messages from the client are part of the write_data */ + uint32_t write_data_ptr; /* offset from + SpiceMigrateDataCharDevice - sizeof(SpiceMigrateDataHeader) */ +} SpiceMigrateDataCharDevice; + static inline int migration_protocol_validate_header(SpiceMigrateDataHeader *header, uint32_t magic, uint32_t version) |