2011-07-08 16:54:02 +00:00
|
|
|
/* -*- c -*- */
|
|
|
|
struct remote_nonnull_domain {
|
|
|
|
remote_nonnull_string name;
|
|
|
|
remote_uuid uuid;
|
|
|
|
int id;
|
|
|
|
};
|
2013-04-18 11:07:23 +00:00
|
|
|
struct qemu_domain_monitor_command_args {
|
2011-07-08 16:54:02 +00:00
|
|
|
remote_nonnull_domain dom;
|
|
|
|
remote_nonnull_string cmd;
|
2011-07-08 16:56:15 +00:00
|
|
|
u_int flags;
|
2011-07-08 16:54:02 +00:00
|
|
|
};
|
2013-04-18 11:07:23 +00:00
|
|
|
struct qemu_domain_monitor_command_ret {
|
2011-07-08 16:54:02 +00:00
|
|
|
remote_nonnull_string result;
|
|
|
|
};
|
2011-05-05 16:31:58 +00:00
|
|
|
struct qemu_domain_attach_args {
|
build: use correct type for pid and similar types
No thanks to 64-bit windows, with 64-bit pid_t, we have to avoid
constructs like 'int pid'. Our API in libvirt-qemu cannot be
changed without breaking ABI; but then again, libvirt-qemu can
only be used on systems that support UNIX sockets, which rules
out Windows (even if qemu could be compiled there) - so for all
points on the call chain that interact with this API decision,
we require a different variable name to make it clear that we
audited the use for safety.
Adding a syntax-check rule only solves half the battle; anywhere
that uses printf on a pid_t still needs to be converted, but that
will be a separate patch.
* cfg.mk (sc_correct_id_types): New syntax check.
* src/libvirt-qemu.c (virDomainQemuAttach): Document why we didn't
use pid_t for pid, and validate for overflow.
* include/libvirt/libvirt-qemu.h (virDomainQemuAttach): Tweak name
for syntax check.
* src/vmware/vmware_conf.c (vmwareExtractPid): Likewise.
* src/driver.h (virDrvDomainQemuAttach): Likewise.
* tools/virsh.c (cmdQemuAttach): Likewise.
* src/remote/qemu_protocol.x (qemu_domain_attach_args): Likewise.
* src/qemu_protocol-structs (qemu_domain_attach_args): Likewise.
* src/util/cgroup.c (virCgroupPidCode, virCgroupKillInternal):
Likewise.
* src/qemu/qemu_command.c(qemuParseProcFileStrings): Likewise.
(qemuParseCommandLinePid): Use pid_t for pid.
* daemon/libvirtd.c (daemonForkIntoBackground): Likewise.
* src/conf/domain_conf.h (_virDomainObj): Likewise.
* src/probes.d (rpc_socket_new): Likewise.
* src/qemu/qemu_command.h (qemuParseCommandLinePid): Likewise.
* src/qemu/qemu_driver.c (qemudGetProcessInfo, qemuDomainAttach):
Likewise.
* src/qemu/qemu_process.c (qemuProcessAttach): Likewise.
* src/qemu/qemu_process.h (qemuProcessAttach): Likewise.
* src/uml/uml_driver.c (umlGetProcessInfo): Likewise.
* src/util/virnetdev.h (virNetDevSetNamespace): Likewise.
* src/util/virnetdev.c (virNetDevSetNamespace): Likewise.
* tests/testutils.c (virtTestCaptureProgramOutput): Likewise.
* src/conf/storage_conf.h (_virStoragePerms): Use mode_t, uid_t,
and gid_t rather than int.
* src/security/security_dac.c (virSecurityDACSetOwnership): Likewise.
* src/conf/storage_conf.c (virStorageDefParsePerms): Avoid
compiler warning.
2012-02-10 23:08:11 +00:00
|
|
|
u_int pid_value;
|
2011-05-05 16:31:58 +00:00
|
|
|
u_int flags;
|
|
|
|
};
|
|
|
|
struct qemu_domain_attach_ret {
|
|
|
|
remote_nonnull_domain dom;
|
|
|
|
};
|
2012-08-23 03:29:25 +00:00
|
|
|
struct qemu_domain_agent_command_args {
|
|
|
|
remote_nonnull_domain dom;
|
|
|
|
remote_nonnull_string cmd;
|
|
|
|
int timeout;
|
|
|
|
u_int flags;
|
|
|
|
};
|
|
|
|
struct qemu_domain_agent_command_ret {
|
|
|
|
remote_string result;
|
|
|
|
};
|
2014-01-29 22:30:44 +00:00
|
|
|
struct qemu_connect_domain_monitor_event_register_args {
|
|
|
|
remote_domain dom;
|
|
|
|
remote_string event;
|
|
|
|
u_int flags;
|
|
|
|
};
|
|
|
|
struct qemu_connect_domain_monitor_event_register_ret {
|
|
|
|
int callbackID;
|
|
|
|
};
|
|
|
|
struct qemu_connect_domain_monitor_event_deregister_args {
|
|
|
|
int callbackID;
|
|
|
|
};
|
|
|
|
struct qemu_domain_monitor_event_msg {
|
|
|
|
int callbackID;
|
|
|
|
remote_nonnull_domain dom;
|
|
|
|
remote_nonnull_string event;
|
|
|
|
int64_t seconds;
|
|
|
|
u_int micros;
|
|
|
|
remote_string details;
|
|
|
|
};
|
2011-07-14 16:18:40 +00:00
|
|
|
enum qemu_procedure {
|
2013-04-18 11:07:23 +00:00
|
|
|
QEMU_PROC_DOMAIN_MONITOR_COMMAND = 1,
|
2011-07-14 16:18:40 +00:00
|
|
|
QEMU_PROC_DOMAIN_ATTACH = 2,
|
2012-08-23 03:29:25 +00:00
|
|
|
QEMU_PROC_DOMAIN_AGENT_COMMAND = 3,
|
2014-01-29 22:30:44 +00:00
|
|
|
QEMU_PROC_CONNECT_DOMAIN_MONITOR_EVENT_REGISTER = 4,
|
|
|
|
QEMU_PROC_CONNECT_DOMAIN_MONITOR_EVENT_DEREGISTER = 5,
|
|
|
|
QEMU_PROC_DOMAIN_MONITOR_EVENT = 6,
|
2011-07-14 16:18:40 +00:00
|
|
|
};
|