mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-05 10:14:04 +00:00
[host/client] kvmfr: update to include extra user data about the VM
This change allows the host to provide information to the client about how the VM is configured, information such as the UUID, CPU configuration and capture method both for informational display in the client as well as debugging in the client's logs. The format of the records allows this to be extended later with new record types without needing to bump the KVMFR version.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include "types.h"
|
||||
|
||||
#define KVMFR_MAGIC "KVMFR---"
|
||||
#define KVMFR_VERSION 14
|
||||
#define KVMFR_VERSION 15
|
||||
|
||||
#define KVMFR_MAX_DAMAGE_RECTS 64
|
||||
|
||||
@@ -67,9 +67,50 @@ typedef struct KVMFR
|
||||
uint32_t version;
|
||||
char hostver[32];
|
||||
KVMFRFeatureFlags features;
|
||||
//KVMFRRecords start here if there are any
|
||||
}
|
||||
KVMFR;
|
||||
|
||||
typedef struct KVMFRRecord
|
||||
{
|
||||
uint8_t type;
|
||||
uint32_t size;
|
||||
uint8_t data[];
|
||||
}
|
||||
KVMFRRecord;
|
||||
|
||||
enum
|
||||
{
|
||||
KVMFR_RECORD_VMINFO = 1,
|
||||
KVMFR_RECORD_OSINFO
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
KVMFR_OS_LINUX,
|
||||
KVMFR_OS_BSD,
|
||||
KVMFR_OS_OSX,
|
||||
KVMFR_OS_WINDOWS,
|
||||
KVMFR_OS_OTHER
|
||||
};
|
||||
|
||||
typedef struct KVMFRRecord_VMInfo
|
||||
{
|
||||
uint8_t uuid [16]; // the guest's UUID
|
||||
char capture[32]; // the capture device in use
|
||||
uint8_t cpus; // number of CPUs
|
||||
uint8_t cores; // number of CPU cores
|
||||
char model[];
|
||||
}
|
||||
KVMFRRecord_VMInfo;
|
||||
|
||||
typedef struct KVMFRRecord_OSInfo
|
||||
{
|
||||
uint8_t os; // KVMFR_OS_*
|
||||
char name[]; // friendly name
|
||||
}
|
||||
KVMFRRecord_OSInfo;
|
||||
|
||||
typedef struct KVMFRCursor
|
||||
{
|
||||
int16_t x, y; // cursor x & y position
|
||||
|
Reference in New Issue
Block a user