send-key: Implementing the remote protocol

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
This commit is contained in:
Lai Jiangshan 2011-06-07 17:11:15 +08:00 committed by Eric Blake
parent e138d31083
commit 4cff75a41b
3 changed files with 26 additions and 1 deletions

View File

@ -6338,6 +6338,7 @@ static virDriver remote_driver = {
.domainMigratePerform3 = remoteDomainMigratePerform3, /* 0.9.2 */
.domainMigrateFinish3 = remoteDomainMigrateFinish3, /* 0.9.2 */
.domainMigrateConfirm3 = remoteDomainMigrateConfirm3, /* 0.9.2 */
.domainSendKey = remoteDomainSendKey, /* 0.9.3 */
};
static virNetworkDriver network_driver = {

View File

@ -191,6 +191,11 @@ const REMOTE_SECRET_UUID_LIST_MAX = 16384;
*/
const REMOTE_CPU_BASELINE_MAX = 256;
/*
* Max number of sending keycodes.
*/
const REMOTE_DOMAIN_SEND_KEY_MAX = 16;
/* UUID. VIR_UUID_BUFLEN definition comes from libvirt.h */
typedef opaque remote_uuid[VIR_UUID_BUFLEN];
@ -811,6 +816,14 @@ struct remote_domain_inject_nmi_args {
unsigned int flags;
};
struct remote_domain_send_key_args {
remote_nonnull_domain dom;
unsigned int codeset;
unsigned int holdtime;
unsigned int keycodes<REMOTE_DOMAIN_SEND_KEY_MAX>;
unsigned int flags;
};
struct remote_domain_set_vcpus_args {
remote_nonnull_domain dom;
unsigned int nvcpus;
@ -2305,7 +2318,8 @@ enum remote_procedure {
REMOTE_PROC_INTERFACE_CHANGE_ROLLBACK = 222, /* autogen autogen */
REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS_FLAGS = 223, /* skipgen autogen */
REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR = 224, /* skipgen skipgen */
REMOTE_PROC_DOMAIN_PIN_VCPU_FLAGS = 225 /* skipgen autogen */
REMOTE_PROC_DOMAIN_PIN_VCPU_FLAGS = 225, /* skipgen autogen */
REMOTE_PROC_DOMAIN_SEND_KEY = 226 /* autogen autogen */
/*
* Notice how the entries are grouped in sets of 10 ?

View File

@ -505,6 +505,16 @@ struct remote_domain_inject_nmi_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_send_key_args {
remote_nonnull_domain dom;
u_int codeset;
u_int holdtime;
struct {
u_int keycodes_len;
u_int * keycodes_val;
} keycodes;
u_int flags;
};
struct remote_domain_set_vcpus_args {
remote_nonnull_domain dom;
u_int nvcpus;