Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxx> --- src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 19 ++++++++++++++++++- src/remote_protocol-structs | 11 +++++++++++ 3 files changed, 30 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 1691dab..6614250 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -6868,6 +6868,7 @@ static virDriver remote_driver = { .domainMigrateFinish3 = remoteDomainMigrateFinish3, /* 0.9.2 */ .domainMigrateConfirm3 = remoteDomainMigrateConfirm3, /* 0.9.2 */ .domainSetSchedulerParametersFlags = remoteDomainSetSchedulerParametersFlags, /* 0.9.2 */ + .domainSendKey = remoteDomainSendKey, /* 0.9.2 */ }; static virNetworkDriver network_driver = { diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index f0da95d..61504c4 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -191,6 +191,14 @@ const REMOTE_SECRET_UUID_LIST_MAX = 16384; */ const REMOTE_CPU_BASELINE_MAX = 256; +/* + * Max number of sending keycodes. + */ +const REMOTE_SEND_KEY_MAX = 16; + +/* define dynamic array's base type for unsigned int */ +typedef unsigned int u_int_DABT; + /* UUID. VIR_UUID_BUFLEN definition comes from libvirt.h */ typedef opaque remote_uuid[VIR_UUID_BUFLEN]; @@ -838,6 +846,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; + u_int_DABT keycodes<REMOTE_SEND_KEY_MAX>; + unsigned int flags; +}; + struct remote_domain_set_vcpus_args { remote_nonnull_domain dom; int nvcpus; @@ -2291,7 +2307,8 @@ enum remote_procedure { REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3 = 216, /* skipgen skipgen */ REMOTE_PROC_DOMAIN_MIGRATE_FINISH3 = 217, /* skipgen skipgen */ REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3 = 218, /* skipgen skipgen */ - REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS = 219 /* skipgen skipgen */ + REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS = 219, /* skipgen skipgen */ + REMOTE_PROC_DOMAIN_SEND_KEY = 220 /* autogen autogen */ /* * Notice how the entries are grouped in sets of 10 ? diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index 414b4d5..814821a 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -1553,3 +1553,14 @@ struct remote_message_header { u_int serial; remote_message_status status; }; + +struct remote_domain_send_key_args { + remote_nonnull_domain dom; + unsigned int codeset; + unsigned int holdtime; + struct { + unsigned int keycodes_len; + unsigned int * keycodes_val; + } keycodes; + unsigned int flags; +}; -- 1.7.4.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list