libvirt/src/remote_protocol-structs

3372 lines
116 KiB
Plaintext
Raw Normal View History

/* -*- c -*- */
enum {
VIR_TYPED_PARAM_INT = 1,
VIR_TYPED_PARAM_UINT = 2,
VIR_TYPED_PARAM_LLONG = 3,
VIR_TYPED_PARAM_ULLONG = 4,
VIR_TYPED_PARAM_DOUBLE = 5,
VIR_TYPED_PARAM_BOOLEAN = 6,
VIR_TYPED_PARAM_STRING = 7,
};
struct remote_nonnull_domain {
remote_nonnull_string name;
remote_uuid uuid;
int id;
};
struct remote_nonnull_network {
remote_nonnull_string name;
remote_uuid uuid;
};
struct remote_nonnull_nwfilter {
remote_nonnull_string name;
remote_uuid uuid;
};
struct remote_nonnull_nwfilter_binding {
remote_nonnull_string portdev;
remote_nonnull_string filtername;
};
struct remote_nonnull_interface {
remote_nonnull_string name;
remote_nonnull_string mac;
};
struct remote_nonnull_storage_pool {
remote_nonnull_string name;
remote_uuid uuid;
};
struct remote_nonnull_storage_vol {
remote_nonnull_string pool;
remote_nonnull_string name;
remote_nonnull_string key;
};
struct remote_nonnull_node_device {
remote_nonnull_string name;
};
struct remote_nonnull_secret {
remote_uuid uuid;
int usageType;
remote_nonnull_string usageID;
};
struct remote_nonnull_domain_snapshot {
remote_nonnull_string name;
remote_nonnull_domain dom;
};
struct remote_error {
int code;
int domain;
remote_string message;
int level;
remote_domain dom;
remote_string str1;
remote_string str2;
remote_string str3;
int int1;
int int2;
remote_network net;
};
enum remote_auth_type {
REMOTE_AUTH_NONE = 0,
REMOTE_AUTH_SASL = 1,
REMOTE_AUTH_POLKIT = 2,
};
struct remote_vcpu_info {
u_int number;
int state;
uint64_t cpu_time;
int cpu;
};
struct remote_typed_param_value {
int type;
union {
int i;
u_int ui;
int64_t l;
uint64_t ul;
double d;
int b;
remote_nonnull_string s;
} remote_typed_param_value_u;
};
struct remote_typed_param {
remote_nonnull_string field;
remote_typed_param_value value;
};
struct remote_node_get_cpu_stats {
remote_nonnull_string field;
uint64_t value;
};
struct remote_node_get_memory_stats {
remote_nonnull_string field;
uint64_t value;
};
struct remote_domain_disk_error {
remote_nonnull_string disk;
int error;
};
struct remote_connect_open_args {
remote_string name;
drivers: prefer unsigned int for flags Now that the public APIs always use unsigned flags, the internal driver callbacks might as well do likewise. * src/driver.h (vrDrvOpen, virDrvDomainCoreDump) (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc) (virDrvNWFilterGetXMLDesc): Update type. * src/remote/remote_protocol.x (remote_open_args) (remote_domain_core_dump_args, remote_domain_get_xml_desc_args) (remote_network_get_xml_desc_args) (remote_nwfilter_get_xml_desc_args): Likewise. * src/test/test_driver.c: Update clients. * src/remote/remote_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xend_internal.h: Likewise. * src/xen/xm_internal.c: Likewise. * src/xen/xm_internal.h: Likewise. * src/xen/xs_internal.c: Likewise. * src/xen/xs_internal.h: Likewise. * src/xen/xen_inotify.c: Likewise. * src/xen/xen_inotify.h: Likewise. * src/phyp/phyp_driver.c: Likewise. * src/openvz/openvz_driver.c: Likewise. * src/vmware/vmware_driver.c: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_interface_driver.c: Likewise. * src/esx/esx_network_driver.c: Likewise. * src/esx/esx_storage_driver.c: Likewise. * src/esx/esx_device_monitor.c: Likewise. * src/esx/esx_secret_driver.c: Likewise. * src/esx/esx_nwfilter_driver.c: Likewise. * src/interface/netcf_driver.c: Likewise. * src/nwfilter/nwfilter_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/secret/secret_driver.c: Likewise. * src/storage/storage_driver.c: Likewise. * src/node_device/node_device_hal.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/remote_protocol-structs: Likewise.
2011-07-06 20:40:19 +00:00
u_int flags;
};
struct remote_connect_supports_feature_args {
int feature;
};
struct remote_connect_supports_feature_ret {
int supported;
};
struct remote_connect_get_type_ret {
remote_nonnull_string type;
};
struct remote_connect_get_version_ret {
uint64_t hv_ver;
};
struct remote_connect_get_lib_version_ret {
uint64_t lib_ver;
};
struct remote_connect_get_hostname_ret {
remote_nonnull_string hostname;
};
struct remote_connect_get_sysinfo_args {
u_int flags;
};
struct remote_connect_get_sysinfo_ret {
remote_nonnull_string sysinfo;
};
struct remote_connect_get_uri_ret {
remote_nonnull_string uri;
};
struct remote_connect_get_max_vcpus_args {
remote_string type;
};
struct remote_connect_get_max_vcpus_ret {
int max_vcpus;
};
struct remote_node_get_info_ret {
char model[32];
uint64_t memory;
int cpus;
int mhz;
int nodes;
int sockets;
int cores;
int threads;
};
struct remote_connect_get_capabilities_ret {
remote_nonnull_string capabilities;
};
struct remote_connect_get_domain_capabilities_args {
remote_string emulatorbin;
remote_string arch;
remote_string machine;
remote_string virttype;
u_int flags;
};
struct remote_connect_get_domain_capabilities_ret {
remote_nonnull_string capabilities;
};
struct remote_node_get_cpu_stats_args {
int cpuNum;
int nparams;
u_int flags;
};
struct remote_node_get_cpu_stats_ret {
struct {
u_int params_len;
remote_node_get_cpu_stats * params_val;
} params;
int nparams;
};
struct remote_node_get_memory_stats_args {
int nparams;
int cellNum;
u_int flags;
};
struct remote_node_get_memory_stats_ret {
struct {
u_int params_len;
remote_node_get_memory_stats * params_val;
} params;
int nparams;
};
struct remote_node_get_cells_free_memory_args {
int startCell;
int maxcells;
};
struct remote_node_get_cells_free_memory_ret {
struct {
u_int cells_len;
uint64_t * cells_val;
} cells;
};
struct remote_node_get_free_memory_ret {
uint64_t freeMem;
};
struct remote_domain_get_scheduler_type_args {
remote_nonnull_domain dom;
};
struct remote_domain_get_scheduler_type_ret {
remote_nonnull_string type;
int nparams;
};
struct remote_domain_get_scheduler_parameters_args {
remote_nonnull_domain dom;
int nparams;
};
struct remote_domain_get_scheduler_parameters_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
};
struct remote_domain_get_scheduler_parameters_flags_args {
remote_nonnull_domain dom;
int nparams;
u_int flags;
};
struct remote_domain_get_scheduler_parameters_flags_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
};
struct remote_domain_set_scheduler_parameters_args {
remote_nonnull_domain dom;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
};
struct remote_domain_set_scheduler_parameters_flags_args {
remote_nonnull_domain dom;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
u_int flags;
};
struct remote_domain_set_blkio_parameters_args {
remote_nonnull_domain dom;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
u_int flags;
};
struct remote_domain_get_blkio_parameters_args {
remote_nonnull_domain dom;
int nparams;
u_int flags;
};
struct remote_domain_get_blkio_parameters_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
int nparams;
};
struct remote_domain_set_memory_parameters_args {
remote_nonnull_domain dom;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
u_int flags;
};
struct remote_domain_get_memory_parameters_args {
remote_nonnull_domain dom;
int nparams;
u_int flags;
};
struct remote_domain_get_memory_parameters_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
int nparams;
};
struct remote_domain_block_resize_args {
remote_nonnull_domain dom;
remote_nonnull_string disk;
uint64_t size;
u_int flags;
};
struct remote_domain_set_numa_parameters_args {
remote_nonnull_domain dom;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
u_int flags;
};
struct remote_domain_get_numa_parameters_args {
remote_nonnull_domain dom;
int nparams;
u_int flags;
};
struct remote_domain_get_numa_parameters_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
int nparams;
};
struct remote_domain_set_perf_events_args {
remote_nonnull_domain dom;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
u_int flags;
};
struct remote_domain_get_perf_events_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_perf_events_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
};
struct remote_domain_block_stats_args {
remote_nonnull_domain dom;
remote_nonnull_string path;
};
struct remote_domain_block_stats_ret {
int64_t rd_req;
int64_t rd_bytes;
int64_t wr_req;
int64_t wr_bytes;
int64_t errs;
};
struct remote_domain_block_stats_flags_args {
remote_nonnull_domain dom;
remote_nonnull_string path;
int nparams;
u_int flags;
};
struct remote_domain_block_stats_flags_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
int nparams;
};
struct remote_domain_interface_stats_args {
remote_nonnull_domain dom;
remote_nonnull_string device;
};
struct remote_domain_interface_stats_ret {
int64_t rx_bytes;
int64_t rx_packets;
int64_t rx_errs;
int64_t rx_drop;
int64_t tx_bytes;
int64_t tx_packets;
int64_t tx_errs;
int64_t tx_drop;
};
struct remote_domain_set_interface_parameters_args {
remote_nonnull_domain dom;
remote_nonnull_string device;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
u_int flags;
};
struct remote_domain_get_interface_parameters_args {
remote_nonnull_domain dom;
remote_nonnull_string device;
int nparams;
u_int flags;
};
struct remote_domain_get_interface_parameters_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
int nparams;
};
struct remote_domain_memory_stats_args {
remote_nonnull_domain dom;
u_int maxStats;
u_int flags;
};
struct remote_domain_memory_stat {
int tag;
uint64_t val;
};
struct remote_domain_memory_stats_ret {
struct {
u_int stats_len;
remote_domain_memory_stat * stats_val;
} stats;
};
struct remote_domain_block_peek_args {
remote_nonnull_domain dom;
remote_nonnull_string path;
uint64_t offset;
u_int size;
u_int flags;
};
struct remote_domain_block_peek_ret {
struct {
u_int buffer_len;
char * buffer_val;
} buffer;
};
struct remote_domain_memory_peek_args {
remote_nonnull_domain dom;
uint64_t offset;
u_int size;
u_int flags;
};
struct remote_domain_memory_peek_ret {
struct {
u_int buffer_len;
char * buffer_val;
} buffer;
};
struct remote_domain_get_block_info_args {
remote_nonnull_domain dom;
remote_nonnull_string path;
u_int flags;
};
struct remote_domain_get_block_info_ret {
uint64_t allocation;
uint64_t capacity;
uint64_t physical;
};
struct remote_connect_list_domains_args {
int maxids;
};
struct remote_connect_list_domains_ret {
struct {
u_int ids_len;
int * ids_val;
} ids;
};
struct remote_connect_num_of_domains_ret {
int num;
};
struct remote_domain_create_xml_args {
remote_nonnull_string xml_desc;
u_int flags;
};
struct remote_domain_create_xml_ret {
remote_nonnull_domain dom;
};
struct remote_domain_create_xml_with_files_args {
remote_nonnull_string xml_desc;
u_int flags;
};
struct remote_domain_create_xml_with_files_ret {
remote_nonnull_domain dom;
};
struct remote_domain_lookup_by_id_args {
int id;
};
struct remote_domain_lookup_by_id_ret {
remote_nonnull_domain dom;
};
struct remote_domain_lookup_by_uuid_args {
remote_uuid uuid;
};
struct remote_domain_lookup_by_uuid_ret {
remote_nonnull_domain dom;
};
struct remote_domain_lookup_by_name_args {
remote_nonnull_string name;
};
struct remote_domain_lookup_by_name_ret {
remote_nonnull_domain dom;
};
struct remote_domain_suspend_args {
remote_nonnull_domain dom;
};
struct remote_domain_resume_args {
remote_nonnull_domain dom;
};
struct remote_domain_pm_suspend_for_duration_args {
remote_nonnull_domain dom;
u_int target;
uint64_t duration;
u_int flags;
};
struct remote_domain_pm_wakeup_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_shutdown_args {
remote_nonnull_domain dom;
};
struct remote_domain_reboot_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_reset_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_destroy_args {
remote_nonnull_domain dom;
};
2011-07-20 16:33:23 +00:00
struct remote_domain_destroy_flags_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_os_type_args {
remote_nonnull_domain dom;
};
struct remote_domain_get_os_type_ret {
remote_nonnull_string type;
};
struct remote_domain_get_max_memory_args {
remote_nonnull_domain dom;
};
struct remote_domain_get_max_memory_ret {
uint64_t memory;
};
struct remote_domain_set_max_memory_args {
remote_nonnull_domain dom;
uint64_t memory;
};
struct remote_domain_set_memory_args {
remote_nonnull_domain dom;
uint64_t memory;
};
struct remote_domain_set_memory_flags_args {
remote_nonnull_domain dom;
uint64_t memory;
u_int flags;
};
struct remote_domain_set_memory_stats_period_args {
remote_nonnull_domain dom;
int period;
u_int flags;
};
struct remote_domain_get_info_args {
remote_nonnull_domain dom;
};
struct remote_domain_get_info_ret {
u_char state;
uint64_t maxMem;
uint64_t memory;
u_short nrVirtCpu;
uint64_t cpuTime;
};
struct remote_domain_save_args {
remote_nonnull_domain dom;
remote_nonnull_string to;
};
struct remote_domain_save_flags_args {
remote_nonnull_domain dom;
remote_nonnull_string to;
remote_string dxml;
u_int flags;
};
struct remote_domain_restore_args {
remote_nonnull_string from;
};
struct remote_domain_restore_flags_args {
remote_nonnull_string from;
remote_string dxml;
u_int flags;
};
struct remote_domain_save_image_get_xml_desc_args {
remote_nonnull_string file;
u_int flags;
};
struct remote_domain_save_image_get_xml_desc_ret {
remote_nonnull_string xml;
};
struct remote_domain_save_image_define_xml_args {
remote_nonnull_string file;
remote_nonnull_string dxml;
u_int flags;
};
struct remote_domain_core_dump_args {
remote_nonnull_domain dom;
remote_nonnull_string to;
drivers: prefer unsigned int for flags Now that the public APIs always use unsigned flags, the internal driver callbacks might as well do likewise. * src/driver.h (vrDrvOpen, virDrvDomainCoreDump) (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc) (virDrvNWFilterGetXMLDesc): Update type. * src/remote/remote_protocol.x (remote_open_args) (remote_domain_core_dump_args, remote_domain_get_xml_desc_args) (remote_network_get_xml_desc_args) (remote_nwfilter_get_xml_desc_args): Likewise. * src/test/test_driver.c: Update clients. * src/remote/remote_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xend_internal.h: Likewise. * src/xen/xm_internal.c: Likewise. * src/xen/xm_internal.h: Likewise. * src/xen/xs_internal.c: Likewise. * src/xen/xs_internal.h: Likewise. * src/xen/xen_inotify.c: Likewise. * src/xen/xen_inotify.h: Likewise. * src/phyp/phyp_driver.c: Likewise. * src/openvz/openvz_driver.c: Likewise. * src/vmware/vmware_driver.c: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_interface_driver.c: Likewise. * src/esx/esx_network_driver.c: Likewise. * src/esx/esx_storage_driver.c: Likewise. * src/esx/esx_device_monitor.c: Likewise. * src/esx/esx_secret_driver.c: Likewise. * src/esx/esx_nwfilter_driver.c: Likewise. * src/interface/netcf_driver.c: Likewise. * src/nwfilter/nwfilter_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/secret/secret_driver.c: Likewise. * src/storage/storage_driver.c: Likewise. * src/node_device/node_device_hal.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/remote_protocol-structs: Likewise.
2011-07-06 20:40:19 +00:00
u_int flags;
};
struct remote_domain_core_dump_with_format_args {
remote_nonnull_domain dom;
remote_nonnull_string to;
u_int dumpformat;
u_int flags;
};
struct remote_domain_screenshot_args {
remote_nonnull_domain dom;
u_int screen;
u_int flags;
};
struct remote_domain_screenshot_ret {
remote_string mime;
};
struct remote_domain_get_xml_desc_args {
remote_nonnull_domain dom;
drivers: prefer unsigned int for flags Now that the public APIs always use unsigned flags, the internal driver callbacks might as well do likewise. * src/driver.h (vrDrvOpen, virDrvDomainCoreDump) (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc) (virDrvNWFilterGetXMLDesc): Update type. * src/remote/remote_protocol.x (remote_open_args) (remote_domain_core_dump_args, remote_domain_get_xml_desc_args) (remote_network_get_xml_desc_args) (remote_nwfilter_get_xml_desc_args): Likewise. * src/test/test_driver.c: Update clients. * src/remote/remote_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xend_internal.h: Likewise. * src/xen/xm_internal.c: Likewise. * src/xen/xm_internal.h: Likewise. * src/xen/xs_internal.c: Likewise. * src/xen/xs_internal.h: Likewise. * src/xen/xen_inotify.c: Likewise. * src/xen/xen_inotify.h: Likewise. * src/phyp/phyp_driver.c: Likewise. * src/openvz/openvz_driver.c: Likewise. * src/vmware/vmware_driver.c: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_interface_driver.c: Likewise. * src/esx/esx_network_driver.c: Likewise. * src/esx/esx_storage_driver.c: Likewise. * src/esx/esx_device_monitor.c: Likewise. * src/esx/esx_secret_driver.c: Likewise. * src/esx/esx_nwfilter_driver.c: Likewise. * src/interface/netcf_driver.c: Likewise. * src/nwfilter/nwfilter_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/secret/secret_driver.c: Likewise. * src/storage/storage_driver.c: Likewise. * src/node_device/node_device_hal.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/remote_protocol-structs: Likewise.
2011-07-06 20:40:19 +00:00
u_int flags;
};
struct remote_domain_get_xml_desc_ret {
remote_nonnull_string xml;
};
struct remote_domain_migrate_prepare_args {
remote_string uri_in;
uint64_t flags;
remote_string dname;
uint64_t resource;
};
struct remote_domain_migrate_prepare_ret {
struct {
u_int cookie_len;
char * cookie_val;
} cookie;
remote_string uri_out;
};
struct remote_domain_migrate_perform_args {
remote_nonnull_domain dom;
struct {
u_int cookie_len;
char * cookie_val;
} cookie;
remote_nonnull_string uri;
uint64_t flags;
remote_string dname;
uint64_t resource;
};
struct remote_domain_migrate_finish_args {
remote_nonnull_string dname;
struct {
u_int cookie_len;
char * cookie_val;
} cookie;
remote_nonnull_string uri;
uint64_t flags;
};
struct remote_domain_migrate_finish_ret {
remote_nonnull_domain ddom;
};
struct remote_domain_migrate_prepare2_args {
remote_string uri_in;
uint64_t flags;
remote_string dname;
uint64_t resource;
remote_nonnull_string dom_xml;
};
struct remote_domain_migrate_prepare2_ret {
struct {
u_int cookie_len;
char * cookie_val;
} cookie;
remote_string uri_out;
};
struct remote_domain_migrate_finish2_args {
remote_nonnull_string dname;
struct {
u_int cookie_len;
char * cookie_val;
} cookie;
remote_nonnull_string uri;
uint64_t flags;
int retcode;
};
struct remote_domain_migrate_finish2_ret {
remote_nonnull_domain ddom;
};
struct remote_connect_list_defined_domains_args {
int maxnames;
};
struct remote_connect_list_defined_domains_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_connect_num_of_defined_domains_ret {
int num;
};
struct remote_domain_create_args {
remote_nonnull_domain dom;
};
struct remote_domain_create_with_flags_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_create_with_flags_ret {
remote_nonnull_domain dom;
};
struct remote_domain_create_with_files_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_create_with_files_ret {
remote_nonnull_domain dom;
};
struct remote_domain_define_xml_args {
remote_nonnull_string xml;
};
struct remote_domain_define_xml_ret {
remote_nonnull_domain dom;
};
struct remote_domain_define_xml_flags_args {
remote_nonnull_string xml;
u_int flags;
};
struct remote_domain_define_xml_flags_ret {
remote_nonnull_domain dom;
};
struct remote_domain_undefine_args {
remote_nonnull_domain dom;
};
2011-07-20 03:01:45 +00:00
struct remote_domain_undefine_flags_args {
remote_nonnull_domain dom;
u_int flags;
};
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_send_process_signal_args {
remote_nonnull_domain dom;
int64_t pid_value;
u_int signum;
u_int flags;
};
struct remote_domain_set_vcpus_args {
remote_nonnull_domain dom;
u_int nvcpus;
};
struct remote_domain_set_vcpus_flags_args {
remote_nonnull_domain dom;
u_int nvcpus;
u_int flags;
};
struct remote_domain_get_vcpus_flags_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_vcpus_flags_ret {
int num;
};
struct remote_domain_pin_vcpu_args {
remote_nonnull_domain dom;
u_int vcpu;
struct {
u_int cpumap_len;
char * cpumap_val;
} cpumap;
};
struct remote_domain_pin_vcpu_flags_args {
remote_nonnull_domain dom;
u_int vcpu;
struct {
u_int cpumap_len;
char * cpumap_val;
} cpumap;
u_int flags;
};
struct remote_domain_get_vcpu_pin_info_args {
remote_nonnull_domain dom;
int ncpumaps;
int maplen;
u_int flags;
};
struct remote_domain_get_vcpu_pin_info_ret {
struct {
u_int cpumaps_len;
char * cpumaps_val;
} cpumaps;
int num;
};
struct remote_domain_pin_emulator_args {
remote_nonnull_domain dom;
struct {
u_int cpumap_len;
char * cpumap_val;
} cpumap;
u_int flags;
};
struct remote_domain_get_emulator_pin_info_args {
remote_nonnull_domain dom;
int maplen;
u_int flags;
};
struct remote_domain_get_emulator_pin_info_ret {
struct {
u_int cpumaps_len;
char * cpumaps_val;
} cpumaps;
int ret;
};
struct remote_domain_get_vcpus_args {
remote_nonnull_domain dom;
int maxinfo;
int maplen;
};
struct remote_domain_get_vcpus_ret {
struct {
u_int info_len;
remote_vcpu_info * info_val;
} info;
struct {
u_int cpumaps_len;
char * cpumaps_val;
} cpumaps;
};
struct remote_domain_get_max_vcpus_args {
remote_nonnull_domain dom;
};
struct remote_domain_get_max_vcpus_ret {
int num;
};
struct remote_domain_iothread_info {
u_int iothread_id;
struct {
u_int cpumap_len;
char * cpumap_val;
} cpumap;
};
struct remote_domain_get_iothread_info_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_iothread_info_ret {
struct {
u_int info_len;
remote_domain_iothread_info * info_val;
} info;
u_int ret;
};
struct remote_domain_pin_iothread_args {
remote_nonnull_domain dom;
u_int iothreads_id;
struct {
u_int cpumap_len;
char * cpumap_val;
} cpumap;
u_int flags;
};
struct remote_domain_add_iothread_args {
remote_nonnull_domain dom;
u_int iothread_id;
u_int flags;
};
struct remote_domain_del_iothread_args {
remote_nonnull_domain dom;
u_int iothread_id;
u_int flags;
};
struct remote_domain_get_security_label_args {
remote_nonnull_domain dom;
};
struct remote_domain_get_security_label_ret {
struct {
u_int label_len;
char * label_val;
} label;
int enforcing;
};
struct remote_domain_get_security_label_list_args {
remote_nonnull_domain dom;
};
struct remote_domain_get_security_label_list_ret {
struct {
u_int labels_len;
remote_domain_get_security_label_ret * labels_val;
} labels;
int ret;
};
struct remote_node_get_security_model_ret {
struct {
u_int model_len;
char * model_val;
} model;
struct {
u_int doi_len;
char * doi_val;
} doi;
};
struct remote_domain_attach_device_args {
remote_nonnull_domain dom;
remote_nonnull_string xml;
};
struct remote_domain_attach_device_flags_args {
remote_nonnull_domain dom;
remote_nonnull_string xml;
u_int flags;
};
struct remote_domain_detach_device_args {
remote_nonnull_domain dom;
remote_nonnull_string xml;
};
struct remote_domain_detach_device_flags_args {
remote_nonnull_domain dom;
remote_nonnull_string xml;
u_int flags;
};
struct remote_domain_update_device_flags_args {
remote_nonnull_domain dom;
remote_nonnull_string xml;
u_int flags;
};
struct remote_domain_detach_device_alias_args {
remote_nonnull_domain dom;
remote_nonnull_string alias;
u_int flags;
};
struct remote_domain_get_autostart_args {
remote_nonnull_domain dom;
};
struct remote_domain_get_autostart_ret {
int autostart;
};
struct remote_domain_set_autostart_args {
remote_nonnull_domain dom;
int autostart;
};
struct remote_domain_set_metadata_args {
remote_nonnull_domain dom;
int type;
remote_string metadata;
remote_string key;
remote_string uri;
u_int flags;
};
struct remote_domain_get_metadata_args {
remote_nonnull_domain dom;
int type;
remote_string uri;
u_int flags;
};
struct remote_domain_get_metadata_ret {
remote_nonnull_string metadata;
};
struct remote_domain_block_job_abort_args {
remote_nonnull_domain dom;
remote_nonnull_string path;
u_int flags;
};
struct remote_domain_get_block_job_info_args {
remote_nonnull_domain dom;
remote_nonnull_string path;
u_int flags;
};
struct remote_domain_get_block_job_info_ret {
int found;
int type;
uint64_t bandwidth;
uint64_t cur;
uint64_t end;
};
struct remote_domain_block_job_set_speed_args {
remote_nonnull_domain dom;
remote_nonnull_string path;
uint64_t bandwidth;
u_int flags;
};
struct remote_domain_block_pull_args {
remote_nonnull_domain dom;
remote_nonnull_string path;
uint64_t bandwidth;
u_int flags;
};
struct remote_domain_block_rebase_args {
remote_nonnull_domain dom;
remote_nonnull_string path;
remote_string base;
uint64_t bandwidth;
u_int flags;
};
struct remote_domain_block_copy_args {
remote_nonnull_domain dom;
remote_nonnull_string path;
remote_nonnull_string destxml;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
u_int flags;
};
struct remote_domain_block_commit_args {
remote_nonnull_domain dom;
remote_nonnull_string disk;
remote_string base;
remote_string top;
uint64_t bandwidth;
u_int flags;
};
struct remote_domain_set_block_io_tune_args {
remote_nonnull_domain dom;
remote_nonnull_string disk;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
u_int flags;
};
struct remote_domain_get_block_io_tune_args {
remote_nonnull_domain dom;
remote_string disk;
int nparams;
u_int flags;
};
struct remote_domain_get_block_io_tune_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
int nparams;
};
struct remote_domain_get_cpu_stats_args {
remote_nonnull_domain dom;
u_int nparams;
int start_cpu;
u_int ncpus;
u_int flags;
};
struct remote_domain_get_cpu_stats_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
int nparams;
};
struct remote_domain_get_hostname_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_hostname_ret {
remote_nonnull_string hostname;
};
struct remote_connect_num_of_networks_ret {
int num;
};
struct remote_connect_list_networks_args {
int maxnames;
};
struct remote_connect_list_networks_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_connect_num_of_defined_networks_ret {
int num;
};
struct remote_connect_list_defined_networks_args {
int maxnames;
};
struct remote_connect_list_defined_networks_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_network_lookup_by_uuid_args {
remote_uuid uuid;
};
struct remote_network_lookup_by_uuid_ret {
remote_nonnull_network net;
};
struct remote_network_lookup_by_name_args {
remote_nonnull_string name;
};
struct remote_network_lookup_by_name_ret {
remote_nonnull_network net;
};
struct remote_network_create_xml_args {
remote_nonnull_string xml;
};
struct remote_network_create_xml_ret {
remote_nonnull_network net;
};
struct remote_network_define_xml_args {
remote_nonnull_string xml;
};
struct remote_network_define_xml_ret {
remote_nonnull_network net;
};
struct remote_network_undefine_args {
remote_nonnull_network net;
};
struct remote_network_update_args {
remote_nonnull_network net;
u_int command;
u_int section;
int parentIndex;
remote_nonnull_string xml;
u_int flags;
};
struct remote_network_create_args {
remote_nonnull_network net;
};
struct remote_network_destroy_args {
remote_nonnull_network net;
};
struct remote_network_get_xml_desc_args {
remote_nonnull_network net;
drivers: prefer unsigned int for flags Now that the public APIs always use unsigned flags, the internal driver callbacks might as well do likewise. * src/driver.h (vrDrvOpen, virDrvDomainCoreDump) (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc) (virDrvNWFilterGetXMLDesc): Update type. * src/remote/remote_protocol.x (remote_open_args) (remote_domain_core_dump_args, remote_domain_get_xml_desc_args) (remote_network_get_xml_desc_args) (remote_nwfilter_get_xml_desc_args): Likewise. * src/test/test_driver.c: Update clients. * src/remote/remote_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xend_internal.h: Likewise. * src/xen/xm_internal.c: Likewise. * src/xen/xm_internal.h: Likewise. * src/xen/xs_internal.c: Likewise. * src/xen/xs_internal.h: Likewise. * src/xen/xen_inotify.c: Likewise. * src/xen/xen_inotify.h: Likewise. * src/phyp/phyp_driver.c: Likewise. * src/openvz/openvz_driver.c: Likewise. * src/vmware/vmware_driver.c: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_interface_driver.c: Likewise. * src/esx/esx_network_driver.c: Likewise. * src/esx/esx_storage_driver.c: Likewise. * src/esx/esx_device_monitor.c: Likewise. * src/esx/esx_secret_driver.c: Likewise. * src/esx/esx_nwfilter_driver.c: Likewise. * src/interface/netcf_driver.c: Likewise. * src/nwfilter/nwfilter_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/secret/secret_driver.c: Likewise. * src/storage/storage_driver.c: Likewise. * src/node_device/node_device_hal.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/remote_protocol-structs: Likewise.
2011-07-06 20:40:19 +00:00
u_int flags;
};
struct remote_network_get_xml_desc_ret {
remote_nonnull_string xml;
};
struct remote_network_get_bridge_name_args {
remote_nonnull_network net;
};
struct remote_network_get_bridge_name_ret {
remote_nonnull_string name;
};
struct remote_network_get_autostart_args {
remote_nonnull_network net;
};
struct remote_network_get_autostart_ret {
int autostart;
};
struct remote_network_set_autostart_args {
remote_nonnull_network net;
int autostart;
};
struct remote_connect_num_of_nwfilters_ret {
int num;
};
struct remote_connect_list_nwfilters_args {
int maxnames;
};
struct remote_connect_list_nwfilters_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_nwfilter_lookup_by_uuid_args {
remote_uuid uuid;
};
struct remote_nwfilter_lookup_by_uuid_ret {
remote_nonnull_nwfilter nwfilter;
};
struct remote_nwfilter_lookup_by_name_args {
remote_nonnull_string name;
};
struct remote_nwfilter_lookup_by_name_ret {
remote_nonnull_nwfilter nwfilter;
};
struct remote_nwfilter_define_xml_args {
remote_nonnull_string xml;
};
struct remote_nwfilter_define_xml_ret {
remote_nonnull_nwfilter nwfilter;
};
struct remote_nwfilter_undefine_args {
remote_nonnull_nwfilter nwfilter;
};
struct remote_nwfilter_get_xml_desc_args {
remote_nonnull_nwfilter nwfilter;
drivers: prefer unsigned int for flags Now that the public APIs always use unsigned flags, the internal driver callbacks might as well do likewise. * src/driver.h (vrDrvOpen, virDrvDomainCoreDump) (virDrvDomainGetXMLDesc, virDrvNetworkGetXMLDesc) (virDrvNWFilterGetXMLDesc): Update type. * src/remote/remote_protocol.x (remote_open_args) (remote_domain_core_dump_args, remote_domain_get_xml_desc_args) (remote_network_get_xml_desc_args) (remote_nwfilter_get_xml_desc_args): Likewise. * src/test/test_driver.c: Update clients. * src/remote/remote_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xend_internal.c: Likewise. * src/xen/xend_internal.h: Likewise. * src/xen/xm_internal.c: Likewise. * src/xen/xm_internal.h: Likewise. * src/xen/xs_internal.c: Likewise. * src/xen/xs_internal.h: Likewise. * src/xen/xen_inotify.c: Likewise. * src/xen/xen_inotify.h: Likewise. * src/phyp/phyp_driver.c: Likewise. * src/openvz/openvz_driver.c: Likewise. * src/vmware/vmware_driver.c: Likewise. * src/vbox/vbox_driver.c: Likewise. * src/vbox/vbox_tmpl.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/esx/esx_interface_driver.c: Likewise. * src/esx/esx_network_driver.c: Likewise. * src/esx/esx_storage_driver.c: Likewise. * src/esx/esx_device_monitor.c: Likewise. * src/esx/esx_secret_driver.c: Likewise. * src/esx/esx_nwfilter_driver.c: Likewise. * src/interface/netcf_driver.c: Likewise. * src/nwfilter/nwfilter_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/uml/uml_driver.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/secret/secret_driver.c: Likewise. * src/storage/storage_driver.c: Likewise. * src/node_device/node_device_hal.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/remote_protocol-structs: Likewise.
2011-07-06 20:40:19 +00:00
u_int flags;
};
struct remote_nwfilter_get_xml_desc_ret {
remote_nonnull_string xml;
};
struct remote_connect_num_of_interfaces_ret {
int num;
};
struct remote_connect_list_interfaces_args {
int maxnames;
};
struct remote_connect_list_interfaces_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_connect_num_of_defined_interfaces_ret {
int num;
};
struct remote_connect_list_defined_interfaces_args {
int maxnames;
};
struct remote_connect_list_defined_interfaces_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_interface_lookup_by_name_args {
remote_nonnull_string name;
};
struct remote_interface_lookup_by_name_ret {
remote_nonnull_interface iface;
};
struct remote_interface_lookup_by_mac_string_args {
remote_nonnull_string mac;
};
struct remote_interface_lookup_by_mac_string_ret {
remote_nonnull_interface iface;
};
struct remote_interface_get_xml_desc_args {
remote_nonnull_interface iface;
u_int flags;
};
struct remote_interface_get_xml_desc_ret {
remote_nonnull_string xml;
};
struct remote_interface_define_xml_args {
remote_nonnull_string xml;
u_int flags;
};
struct remote_interface_define_xml_ret {
remote_nonnull_interface iface;
};
struct remote_interface_undefine_args {
remote_nonnull_interface iface;
};
struct remote_interface_create_args {
remote_nonnull_interface iface;
u_int flags;
};
struct remote_interface_destroy_args {
remote_nonnull_interface iface;
u_int flags;
};
struct remote_interface_change_begin_args {
u_int flags;
};
struct remote_interface_change_commit_args {
u_int flags;
};
struct remote_interface_change_rollback_args {
u_int flags;
};
struct remote_auth_list_ret {
struct {
u_int types_len;
remote_auth_type * types_val;
} types;
};
struct remote_auth_sasl_init_ret {
remote_nonnull_string mechlist;
};
struct remote_auth_sasl_start_args {
remote_nonnull_string mech;
int nil;
struct {
u_int data_len;
char * data_val;
} data;
};
struct remote_auth_sasl_start_ret {
int complete;
int nil;
struct {
u_int data_len;
char * data_val;
} data;
};
struct remote_auth_sasl_step_args {
int nil;
struct {
u_int data_len;
char * data_val;
} data;
};
struct remote_auth_sasl_step_ret {
int complete;
int nil;
struct {
u_int data_len;
char * data_val;
} data;
};
struct remote_auth_polkit_ret {
int complete;
};
struct remote_connect_num_of_storage_pools_ret {
int num;
};
struct remote_connect_list_storage_pools_args {
int maxnames;
};
struct remote_connect_list_storage_pools_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_connect_num_of_defined_storage_pools_ret {
int num;
};
struct remote_connect_list_defined_storage_pools_args {
int maxnames;
};
struct remote_connect_list_defined_storage_pools_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_connect_find_storage_pool_sources_args {
remote_nonnull_string type;
remote_string srcSpec;
u_int flags;
};
struct remote_connect_find_storage_pool_sources_ret {
remote_nonnull_string xml;
};
struct remote_storage_pool_lookup_by_uuid_args {
remote_uuid uuid;
};
struct remote_storage_pool_lookup_by_uuid_ret {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_lookup_by_name_args {
remote_nonnull_string name;
};
struct remote_storage_pool_lookup_by_name_ret {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_lookup_by_volume_args {
remote_nonnull_storage_vol vol;
};
struct remote_storage_pool_lookup_by_volume_ret {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_lookup_by_target_path_args {
remote_nonnull_string path;
};
struct remote_storage_pool_lookup_by_target_path_ret {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_create_xml_args {
remote_nonnull_string xml;
u_int flags;
};
struct remote_storage_pool_create_xml_ret {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_define_xml_args {
remote_nonnull_string xml;
u_int flags;
};
struct remote_storage_pool_define_xml_ret {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_build_args {
remote_nonnull_storage_pool pool;
u_int flags;
};
struct remote_storage_pool_undefine_args {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_create_args {
remote_nonnull_storage_pool pool;
u_int flags;
};
struct remote_storage_pool_destroy_args {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_delete_args {
remote_nonnull_storage_pool pool;
u_int flags;
};
struct remote_storage_pool_refresh_args {
remote_nonnull_storage_pool pool;
u_int flags;
};
struct remote_storage_pool_get_xml_desc_args {
remote_nonnull_storage_pool pool;
u_int flags;
};
struct remote_storage_pool_get_xml_desc_ret {
remote_nonnull_string xml;
};
struct remote_storage_pool_get_info_args {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_get_info_ret {
u_char state;
uint64_t capacity;
uint64_t allocation;
uint64_t available;
};
struct remote_storage_pool_get_autostart_args {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_get_autostart_ret {
int autostart;
};
struct remote_storage_pool_set_autostart_args {
remote_nonnull_storage_pool pool;
int autostart;
};
struct remote_storage_pool_num_of_volumes_args {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_num_of_volumes_ret {
int num;
};
struct remote_storage_pool_list_volumes_args {
remote_nonnull_storage_pool pool;
int maxnames;
};
struct remote_storage_pool_list_volumes_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_storage_vol_lookup_by_name_args {
remote_nonnull_storage_pool pool;
remote_nonnull_string name;
};
struct remote_storage_vol_lookup_by_name_ret {
remote_nonnull_storage_vol vol;
};
struct remote_storage_vol_lookup_by_key_args {
remote_nonnull_string key;
};
struct remote_storage_vol_lookup_by_key_ret {
remote_nonnull_storage_vol vol;
};
struct remote_storage_vol_lookup_by_path_args {
remote_nonnull_string path;
};
struct remote_storage_vol_lookup_by_path_ret {
remote_nonnull_storage_vol vol;
};
struct remote_storage_vol_create_xml_args {
remote_nonnull_storage_pool pool;
remote_nonnull_string xml;
u_int flags;
};
struct remote_storage_vol_create_xml_ret {
remote_nonnull_storage_vol vol;
};
struct remote_storage_vol_create_xml_from_args {
remote_nonnull_storage_pool pool;
remote_nonnull_string xml;
remote_nonnull_storage_vol clonevol;
u_int flags;
};
struct remote_storage_vol_create_xml_from_ret {
remote_nonnull_storage_vol vol;
};
struct remote_storage_vol_delete_args {
remote_nonnull_storage_vol vol;
u_int flags;
};
struct remote_storage_vol_wipe_args {
remote_nonnull_storage_vol vol;
u_int flags;
};
struct remote_storage_vol_wipe_pattern_args {
remote_nonnull_storage_vol vol;
u_int algorithm;
u_int flags;
};
struct remote_storage_vol_get_xml_desc_args {
remote_nonnull_storage_vol vol;
u_int flags;
};
struct remote_storage_vol_get_xml_desc_ret {
remote_nonnull_string xml;
};
struct remote_storage_vol_get_info_args {
remote_nonnull_storage_vol vol;
};
struct remote_storage_vol_get_info_ret {
char type;
uint64_t capacity;
uint64_t allocation;
};
struct remote_storage_vol_get_info_flags_args {
remote_nonnull_storage_vol vol;
u_int flags;
};
struct remote_storage_vol_get_info_flags_ret {
char type;
uint64_t capacity;
uint64_t allocation;
};
struct remote_storage_vol_get_path_args {
remote_nonnull_storage_vol vol;
};
struct remote_storage_vol_get_path_ret {
remote_nonnull_string name;
};
struct remote_storage_vol_resize_args {
remote_nonnull_storage_vol vol;
uint64_t capacity;
u_int flags;
};
struct remote_node_num_of_devices_args {
remote_string cap;
u_int flags;
};
struct remote_node_num_of_devices_ret {
int num;
};
struct remote_node_list_devices_args {
remote_string cap;
int maxnames;
u_int flags;
};
struct remote_node_list_devices_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_node_device_lookup_by_name_args {
remote_nonnull_string name;
};
struct remote_node_device_lookup_by_name_ret {
remote_nonnull_node_device dev;
};
struct remote_node_device_lookup_scsi_host_by_wwn_args {
remote_nonnull_string wwnn;
remote_nonnull_string wwpn;
u_int flags;
};
struct remote_node_device_lookup_scsi_host_by_wwn_ret {
remote_nonnull_node_device dev;
};
struct remote_node_device_get_xml_desc_args {
remote_nonnull_string name;
u_int flags;
};
struct remote_node_device_get_xml_desc_ret {
remote_nonnull_string xml;
};
struct remote_node_device_get_parent_args {
remote_nonnull_string name;
};
struct remote_node_device_get_parent_ret {
remote_string parentName;
};
struct remote_node_device_num_of_caps_args {
remote_nonnull_string name;
};
struct remote_node_device_num_of_caps_ret {
int num;
};
struct remote_node_device_list_caps_args {
remote_nonnull_string name;
int maxnames;
};
struct remote_node_device_list_caps_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_node_device_dettach_args {
remote_nonnull_string name;
};
struct remote_node_device_detach_flags_args {
remote_nonnull_string name;
remote_string driverName;
u_int flags;
};
struct remote_node_device_re_attach_args {
remote_nonnull_string name;
};
struct remote_node_device_reset_args {
remote_nonnull_string name;
};
struct remote_node_device_create_xml_args {
remote_nonnull_string xml_desc;
u_int flags;
};
struct remote_node_device_create_xml_ret {
remote_nonnull_node_device dev;
};
struct remote_node_device_destroy_args {
remote_nonnull_string name;
};
struct remote_connect_domain_event_register_ret {
int cb_registered;
};
struct remote_connect_domain_event_deregister_ret {
int cb_registered;
};
struct remote_domain_event_lifecycle_msg {
remote_nonnull_domain dom;
int event;
int detail;
};
event: server RPC protocol tweaks for domain lifecycle events This patch adds some new RPC call numbers, but for ease of review, they sit idle until a later patch adds the client counterpart to drive the new RPCs. Also for ease of review, I limited this patch to just the lifecycle event; although converting the remaining 15 domain events will be quite mechanical. On the server side, we have to have a function per RPC call, largely with duplicated bodies (the key difference being that we store in our callback opaque pointer whether events should be fired with old or new style); meanwhile, a single function can drive multiple RPC messages. With a strategic choice of XDR struct layout, we can make the event generation code for both styles fairly compact. I debated about adding a tri-state witness variable per connection (values 'unknown', 'legacy', 'modern'). It would start as 'unknown', move to 'legacy' if any RPC call is made to a legacy event call, and move to 'modern' if the feature probe is made; then the event code could issue an error if the witness state is incorrect (a legacy RPC call while in 'modern', a modern RPC call while in 'unknown' or 'legacy', and a feature probe while in 'legacy' or 'modern'). But while it might prevent odd behavior caused by protocol fuzzing, I don't see that it would prevent any security holes, so I considered it bloat. Note that sticking @acl markers on the new RPCs generates unused functions in access/viraccessapicheck.c, because there is no new API call that needs to use the new checks; however, having a consistent .x file is worth the dead code. * src/libvirt_internal.h (VIR_DRV_FEATURE_REMOTE_EVENT_CALLBACK): New feature. * src/remote/remote_protocol.x (REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_REGISTER_ANY) (REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_DEREGISTER_ANY) (REMOTE_PROC_DOMAIN_EVENT_CALLBACK_LIFECYCLE): New RPCs. * daemon/remote.c (daemonClientCallback): Add field. (remoteDispatchConnectDomainEventCallbackRegisterAny) (remoteDispatchConnectDomainEventCallbackDeregisterAny): New functions. (remoteDispatchConnectDomainEventRegisterAny) (remoteDispatchConnectDomainEventDeregisterAny): Mark legacy use. (remoteRelayDomainEventLifecycle): Change message based on legacy or new use. (remoteDispatchConnectSupportsFeature): Advertise new feature. * src/remote_protocol-structs: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-08 20:59:35 +00:00
struct remote_domain_event_callback_lifecycle_msg {
int callbackID;
remote_domain_event_lifecycle_msg msg;
};
struct remote_connect_domain_xml_from_native_args {
remote_nonnull_string nativeFormat;
remote_nonnull_string nativeConfig;
u_int flags;
};
struct remote_connect_domain_xml_from_native_ret {
remote_nonnull_string domainXml;
};
struct remote_connect_domain_xml_to_native_args {
remote_nonnull_string nativeFormat;
remote_nonnull_string domainXml;
u_int flags;
};
struct remote_connect_domain_xml_to_native_ret {
remote_nonnull_string nativeConfig;
};
struct remote_connect_num_of_secrets_ret {
int num;
};
struct remote_connect_list_secrets_args {
int maxuuids;
};
struct remote_connect_list_secrets_ret {
struct {
u_int uuids_len;
remote_nonnull_string * uuids_val;
} uuids;
};
struct remote_secret_lookup_by_uuid_args {
remote_uuid uuid;
};
struct remote_secret_lookup_by_uuid_ret {
remote_nonnull_secret secret;
};
struct remote_secret_define_xml_args {
remote_nonnull_string xml;
u_int flags;
};
struct remote_secret_define_xml_ret {
remote_nonnull_secret secret;
};
struct remote_secret_get_xml_desc_args {
remote_nonnull_secret secret;
u_int flags;
};
struct remote_secret_get_xml_desc_ret {
remote_nonnull_string xml;
};
struct remote_secret_set_value_args {
remote_nonnull_secret secret;
struct {
u_int value_len;
char * value_val;
} value;
u_int flags;
};
struct remote_secret_get_value_args {
remote_nonnull_secret secret;
u_int flags;
};
struct remote_secret_get_value_ret {
struct {
u_int value_len;
char * value_val;
} value;
};
struct remote_secret_undefine_args {
remote_nonnull_secret secret;
};
struct remote_secret_lookup_by_usage_args {
int usageType;
remote_nonnull_string usageID;
};
struct remote_secret_lookup_by_usage_ret {
remote_nonnull_secret secret;
};
struct remote_domain_migrate_prepare_tunnel_args {
uint64_t flags;
remote_string dname;
uint64_t resource;
remote_nonnull_string dom_xml;
};
struct remote_connect_is_secure_ret {
int secure;
};
struct remote_domain_is_active_args {
remote_nonnull_domain dom;
};
struct remote_domain_is_active_ret {
int active;
};
struct remote_domain_is_persistent_args {
remote_nonnull_domain dom;
};
struct remote_domain_is_persistent_ret {
int persistent;
};
struct remote_domain_is_updated_args {
remote_nonnull_domain dom;
};
struct remote_domain_is_updated_ret {
int updated;
};
struct remote_network_is_active_args {
remote_nonnull_network net;
};
struct remote_network_is_active_ret {
int active;
};
struct remote_network_is_persistent_args {
remote_nonnull_network net;
};
struct remote_network_is_persistent_ret {
int persistent;
};
struct remote_storage_pool_is_active_args {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_is_active_ret {
int active;
};
struct remote_storage_pool_is_persistent_args {
remote_nonnull_storage_pool pool;
};
struct remote_storage_pool_is_persistent_ret {
int persistent;
};
struct remote_interface_is_active_args {
remote_nonnull_interface iface;
};
struct remote_interface_is_active_ret {
int active;
};
struct remote_connect_compare_cpu_args {
remote_nonnull_string xml;
u_int flags;
};
struct remote_connect_compare_cpu_ret {
int result;
};
struct remote_connect_baseline_cpu_args {
struct {
u_int xmlCPUs_len;
remote_nonnull_string * xmlCPUs_val;
} xmlCPUs;
u_int flags;
};
struct remote_connect_baseline_cpu_ret {
remote_nonnull_string cpu;
};
struct remote_domain_get_job_info_args {
remote_nonnull_domain dom;
};
struct remote_domain_get_job_info_ret {
int type;
uint64_t timeElapsed;
uint64_t timeRemaining;
uint64_t dataTotal;
uint64_t dataProcessed;
uint64_t dataRemaining;
uint64_t memTotal;
uint64_t memProcessed;
uint64_t memRemaining;
uint64_t fileTotal;
uint64_t fileProcessed;
uint64_t fileRemaining;
};
2013-01-30 09:49:28 +00:00
struct remote_domain_get_job_stats_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_job_stats_ret {
int type;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
};
struct remote_domain_abort_job_args {
remote_nonnull_domain dom;
};
struct remote_domain_migrate_get_max_downtime_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_migrate_get_max_downtime_ret {
uint64_t downtime;
};
struct remote_domain_migrate_set_max_downtime_args {
remote_nonnull_domain dom;
uint64_t downtime;
u_int flags;
};
struct remote_domain_migrate_get_compression_cache_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_migrate_get_compression_cache_ret {
uint64_t cacheSize;
};
struct remote_domain_migrate_set_compression_cache_args {
remote_nonnull_domain dom;
uint64_t cacheSize;
u_int flags;
};
struct remote_domain_migrate_set_max_speed_args {
remote_nonnull_domain dom;
uint64_t bandwidth;
u_int flags;
};
struct remote_domain_migrate_get_max_speed_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_migrate_get_max_speed_ret {
uint64_t bandwidth;
};
struct remote_connect_domain_event_register_any_args {
int eventID;
};
struct remote_connect_domain_event_deregister_any_args {
int eventID;
};
event: server RPC protocol tweaks for domain lifecycle events This patch adds some new RPC call numbers, but for ease of review, they sit idle until a later patch adds the client counterpart to drive the new RPCs. Also for ease of review, I limited this patch to just the lifecycle event; although converting the remaining 15 domain events will be quite mechanical. On the server side, we have to have a function per RPC call, largely with duplicated bodies (the key difference being that we store in our callback opaque pointer whether events should be fired with old or new style); meanwhile, a single function can drive multiple RPC messages. With a strategic choice of XDR struct layout, we can make the event generation code for both styles fairly compact. I debated about adding a tri-state witness variable per connection (values 'unknown', 'legacy', 'modern'). It would start as 'unknown', move to 'legacy' if any RPC call is made to a legacy event call, and move to 'modern' if the feature probe is made; then the event code could issue an error if the witness state is incorrect (a legacy RPC call while in 'modern', a modern RPC call while in 'unknown' or 'legacy', and a feature probe while in 'legacy' or 'modern'). But while it might prevent odd behavior caused by protocol fuzzing, I don't see that it would prevent any security holes, so I considered it bloat. Note that sticking @acl markers on the new RPCs generates unused functions in access/viraccessapicheck.c, because there is no new API call that needs to use the new checks; however, having a consistent .x file is worth the dead code. * src/libvirt_internal.h (VIR_DRV_FEATURE_REMOTE_EVENT_CALLBACK): New feature. * src/remote/remote_protocol.x (REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_REGISTER_ANY) (REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_DEREGISTER_ANY) (REMOTE_PROC_DOMAIN_EVENT_CALLBACK_LIFECYCLE): New RPCs. * daemon/remote.c (daemonClientCallback): Add field. (remoteDispatchConnectDomainEventCallbackRegisterAny) (remoteDispatchConnectDomainEventCallbackDeregisterAny): New functions. (remoteDispatchConnectDomainEventRegisterAny) (remoteDispatchConnectDomainEventDeregisterAny): Mark legacy use. (remoteRelayDomainEventLifecycle): Change message based on legacy or new use. (remoteDispatchConnectSupportsFeature): Advertise new feature. * src/remote_protocol-structs: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-08 20:59:35 +00:00
struct remote_connect_domain_event_callback_register_any_args {
int eventID;
remote_domain dom;
};
struct remote_connect_domain_event_callback_register_any_ret {
int callbackID;
};
struct remote_connect_domain_event_callback_deregister_any_args {
int callbackID;
};
struct remote_domain_event_reboot_msg {
remote_nonnull_domain dom;
};
struct remote_domain_event_callback_reboot_msg {
int callbackID;
remote_domain_event_reboot_msg msg;
};
struct remote_domain_event_rtc_change_msg {
remote_nonnull_domain dom;
int64_t offset;
};
struct remote_domain_event_callback_rtc_change_msg {
int callbackID;
remote_domain_event_rtc_change_msg msg;
};
struct remote_domain_event_watchdog_msg {
remote_nonnull_domain dom;
int action;
};
struct remote_domain_event_callback_watchdog_msg {
int callbackID;
remote_domain_event_watchdog_msg msg;
};
struct remote_domain_event_io_error_msg {
remote_nonnull_domain dom;
remote_nonnull_string srcPath;
remote_nonnull_string devAlias;
int action;
};
struct remote_domain_event_callback_io_error_msg {
int callbackID;
remote_domain_event_io_error_msg msg;
};
struct remote_domain_event_io_error_reason_msg {
remote_nonnull_domain dom;
remote_nonnull_string srcPath;
remote_nonnull_string devAlias;
int action;
remote_nonnull_string reason;
};
struct remote_domain_event_callback_io_error_reason_msg {
int callbackID;
remote_domain_event_io_error_reason_msg msg;
};
struct remote_domain_event_graphics_address {
int family;
remote_nonnull_string node;
remote_nonnull_string service;
};
struct remote_domain_event_graphics_identity {
remote_nonnull_string type;
remote_nonnull_string name;
};
struct remote_domain_event_graphics_msg {
remote_nonnull_domain dom;
int phase;
remote_domain_event_graphics_address local;
remote_domain_event_graphics_address remote;
remote_nonnull_string authScheme;
struct {
u_int subject_len;
remote_domain_event_graphics_identity * subject_val;
} subject;
};
struct remote_domain_event_callback_graphics_msg {
int callbackID;
remote_domain_event_graphics_msg msg;
};
struct remote_domain_event_block_job_msg {
remote_nonnull_domain dom;
remote_nonnull_string path;
int type;
int status;
};
struct remote_domain_event_callback_block_job_msg {
int callbackID;
remote_domain_event_block_job_msg msg;
};
struct remote_domain_event_disk_change_msg {
remote_nonnull_domain dom;
remote_string oldSrcPath;
remote_string newSrcPath;
remote_nonnull_string devAlias;
int reason;
};
struct remote_domain_event_callback_disk_change_msg {
int callbackID;
remote_domain_event_disk_change_msg msg;
};
struct remote_domain_event_tray_change_msg {
remote_nonnull_domain dom;
remote_nonnull_string devAlias;
int reason;
};
struct remote_domain_event_callback_tray_change_msg {
int callbackID;
remote_domain_event_tray_change_msg msg;
};
struct remote_domain_event_pmwakeup_msg {
remote_nonnull_domain dom;
};
struct remote_domain_event_callback_pmwakeup_msg {
int callbackID;
event: pass reason for PM events Commit 57ddcc23 (v0.9.11) introduced the pmwakeup event, with an optional 'reason' field reserved for possible future expansion. But it failed to wire the field through RPC, so even if we do add a reason in the future, we will be unable to get it back to the user. Worse, commit 7ba5defb (v1.0.0) repeated the same mistake with the pmsuspend_disk event. As long as we are adding new RPC calls, we might as well fix the events to actually match the signature so that we don't have to add yet another RPC in the future if we do decide to start using the reason field. * src/remote/remote_protocol.x (remote_domain_event_callback_pmwakeup_msg) (remote_domain_event_callback_pmsuspend_msg) (remote_domain_event_callback_pmsuspend_disk_msg): Add reason field. * daemon/remote.c (remoteRelayDomainEventPMWakeup) (remoteRelayDomainEventPMSuspend) (remoteRelayDomainEventPMSuspendDisk): Pass reason to client. * src/conf/domain_event.h (virDomainEventPMWakeupNewFromDom) (virDomainEventPMSuspendNewFromDom) (virDomainEventPMSuspendDiskNewFromDom): Require additional parameter. * src/conf/domain_event.c (virDomainEventPMClass): New class. (virDomainEventPMDispose): New function. (virDomainEventPMWakeupNew*, virDomainEventPMSuspendNew*) (virDomainEventPMSuspendDiskNew*) (virDomainEventDispatchDefaultFunc): Use new class. * src/remote/remote_driver.c (remoteDomainBuildEvent*PM*): Pass reason through. * src/remote_protocol-structs: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-29 00:41:34 +00:00
int reason;
remote_domain_event_pmwakeup_msg msg;
};
struct remote_domain_event_pmsuspend_msg {
remote_nonnull_domain dom;
};
struct remote_domain_event_callback_pmsuspend_msg {
int callbackID;
event: pass reason for PM events Commit 57ddcc23 (v0.9.11) introduced the pmwakeup event, with an optional 'reason' field reserved for possible future expansion. But it failed to wire the field through RPC, so even if we do add a reason in the future, we will be unable to get it back to the user. Worse, commit 7ba5defb (v1.0.0) repeated the same mistake with the pmsuspend_disk event. As long as we are adding new RPC calls, we might as well fix the events to actually match the signature so that we don't have to add yet another RPC in the future if we do decide to start using the reason field. * src/remote/remote_protocol.x (remote_domain_event_callback_pmwakeup_msg) (remote_domain_event_callback_pmsuspend_msg) (remote_domain_event_callback_pmsuspend_disk_msg): Add reason field. * daemon/remote.c (remoteRelayDomainEventPMWakeup) (remoteRelayDomainEventPMSuspend) (remoteRelayDomainEventPMSuspendDisk): Pass reason to client. * src/conf/domain_event.h (virDomainEventPMWakeupNewFromDom) (virDomainEventPMSuspendNewFromDom) (virDomainEventPMSuspendDiskNewFromDom): Require additional parameter. * src/conf/domain_event.c (virDomainEventPMClass): New class. (virDomainEventPMDispose): New function. (virDomainEventPMWakeupNew*, virDomainEventPMSuspendNew*) (virDomainEventPMSuspendDiskNew*) (virDomainEventDispatchDefaultFunc): Use new class. * src/remote/remote_driver.c (remoteDomainBuildEvent*PM*): Pass reason through. * src/remote_protocol-structs: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-29 00:41:34 +00:00
int reason;
remote_domain_event_pmsuspend_msg msg;
};
struct remote_domain_event_balloon_change_msg {
remote_nonnull_domain dom;
uint64_t actual;
};
struct remote_domain_event_callback_balloon_change_msg {
int callbackID;
remote_domain_event_balloon_change_msg msg;
};
struct remote_domain_event_pmsuspend_disk_msg {
remote_nonnull_domain dom;
};
struct remote_domain_event_callback_pmsuspend_disk_msg {
int callbackID;
event: pass reason for PM events Commit 57ddcc23 (v0.9.11) introduced the pmwakeup event, with an optional 'reason' field reserved for possible future expansion. But it failed to wire the field through RPC, so even if we do add a reason in the future, we will be unable to get it back to the user. Worse, commit 7ba5defb (v1.0.0) repeated the same mistake with the pmsuspend_disk event. As long as we are adding new RPC calls, we might as well fix the events to actually match the signature so that we don't have to add yet another RPC in the future if we do decide to start using the reason field. * src/remote/remote_protocol.x (remote_domain_event_callback_pmwakeup_msg) (remote_domain_event_callback_pmsuspend_msg) (remote_domain_event_callback_pmsuspend_disk_msg): Add reason field. * daemon/remote.c (remoteRelayDomainEventPMWakeup) (remoteRelayDomainEventPMSuspend) (remoteRelayDomainEventPMSuspendDisk): Pass reason to client. * src/conf/domain_event.h (virDomainEventPMWakeupNewFromDom) (virDomainEventPMSuspendNewFromDom) (virDomainEventPMSuspendDiskNewFromDom): Require additional parameter. * src/conf/domain_event.c (virDomainEventPMClass): New class. (virDomainEventPMDispose): New function. (virDomainEventPMWakeupNew*, virDomainEventPMSuspendNew*) (virDomainEventPMSuspendDiskNew*) (virDomainEventDispatchDefaultFunc): Use new class. * src/remote/remote_driver.c (remoteDomainBuildEvent*PM*): Pass reason through. * src/remote_protocol-structs: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-29 00:41:34 +00:00
int reason;
remote_domain_event_pmsuspend_disk_msg msg;
};
struct remote_domain_managed_save_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_has_managed_save_image_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_has_managed_save_image_ret {
int result;
};
struct remote_domain_managed_save_remove_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_managed_save_get_xml_desc_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_managed_save_get_xml_desc_ret {
remote_nonnull_string xml;
};
struct remote_domain_managed_save_define_xml_args {
remote_nonnull_domain dom;
remote_string dxml;
u_int flags;
};
struct remote_domain_snapshot_create_xml_args {
remote_nonnull_domain dom;
remote_nonnull_string xml_desc;
u_int flags;
};
struct remote_domain_snapshot_create_xml_ret {
remote_nonnull_domain_snapshot snap;
};
struct remote_domain_snapshot_get_xml_desc_args {
remote_nonnull_domain_snapshot snap;
u_int flags;
};
struct remote_domain_snapshot_get_xml_desc_ret {
remote_nonnull_string xml;
};
struct remote_domain_snapshot_num_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_snapshot_num_ret {
int num;
};
struct remote_domain_snapshot_list_names_args {
remote_nonnull_domain dom;
int maxnames;
u_int flags;
};
struct remote_domain_snapshot_list_names_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_domain_list_all_snapshots_args {
remote_nonnull_domain dom;
int need_results;
u_int flags;
};
struct remote_domain_list_all_snapshots_ret {
struct {
u_int snapshots_len;
remote_nonnull_domain_snapshot * snapshots_val;
} snapshots;
int ret;
};
struct remote_domain_snapshot_num_children_args {
remote_nonnull_domain_snapshot snap;
u_int flags;
};
struct remote_domain_snapshot_num_children_ret {
int num;
};
struct remote_domain_snapshot_list_children_names_args {
remote_nonnull_domain_snapshot snap;
int maxnames;
u_int flags;
};
struct remote_domain_snapshot_list_children_names_ret {
struct {
u_int names_len;
remote_nonnull_string * names_val;
} names;
};
struct remote_domain_snapshot_list_all_children_args {
remote_nonnull_domain_snapshot snapshot;
int need_results;
u_int flags;
};
struct remote_domain_snapshot_list_all_children_ret {
struct {
u_int snapshots_len;
remote_nonnull_domain_snapshot * snapshots_val;
} snapshots;
int ret;
};
struct remote_domain_snapshot_lookup_by_name_args {
remote_nonnull_domain dom;
remote_nonnull_string name;
u_int flags;
};
struct remote_domain_snapshot_lookup_by_name_ret {
remote_nonnull_domain_snapshot snap;
};
struct remote_domain_has_current_snapshot_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_has_current_snapshot_ret {
int result;
};
struct remote_domain_snapshot_get_parent_args {
remote_nonnull_domain_snapshot snap;
u_int flags;
};
struct remote_domain_snapshot_get_parent_ret {
remote_nonnull_domain_snapshot snap;
};
struct remote_domain_snapshot_current_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_snapshot_current_ret {
remote_nonnull_domain_snapshot snap;
};
struct remote_domain_snapshot_is_current_args {
remote_nonnull_domain_snapshot snap;
u_int flags;
};
struct remote_domain_snapshot_is_current_ret {
int current;
};
struct remote_domain_snapshot_has_metadata_args {
remote_nonnull_domain_snapshot snap;
u_int flags;
};
struct remote_domain_snapshot_has_metadata_ret {
int metadata;
};
struct remote_domain_revert_to_snapshot_args {
remote_nonnull_domain_snapshot snap;
u_int flags;
};
struct remote_domain_snapshot_delete_args {
remote_nonnull_domain_snapshot snap;
u_int flags;
};
struct remote_domain_open_console_args {
remote_nonnull_domain dom;
remote_string dev_name;
u_int flags;
};
struct remote_domain_open_channel_args {
remote_nonnull_domain dom;
remote_string name;
u_int flags;
};
struct remote_storage_vol_upload_args {
remote_nonnull_storage_vol vol;
uint64_t offset;
uint64_t length;
u_int flags;
};
struct remote_storage_vol_download_args {
remote_nonnull_storage_vol vol;
uint64_t offset;
uint64_t length;
u_int flags;
};
struct remote_domain_get_state_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_state_ret {
int state;
int reason;
};
struct remote_domain_migrate_begin3_args {
remote_nonnull_domain dom;
remote_string xmlin;
uint64_t flags;
remote_string dname;
uint64_t resource;
};
struct remote_domain_migrate_begin3_ret {
struct {
u_int cookie_out_len;
char * cookie_out_val;
} cookie_out;
remote_nonnull_string xml;
};
struct remote_domain_migrate_prepare3_args {
struct {
u_int cookie_in_len;
char * cookie_in_val;
} cookie_in;
remote_string uri_in;
uint64_t flags;
remote_string dname;
uint64_t resource;
remote_nonnull_string dom_xml;
};
struct remote_domain_migrate_prepare3_ret {
struct {
u_int cookie_out_len;
char * cookie_out_val;
} cookie_out;
remote_string uri_out;
};
struct remote_domain_migrate_prepare_tunnel3_args {
struct {
u_int cookie_in_len;
char * cookie_in_val;
} cookie_in;
uint64_t flags;
remote_string dname;
uint64_t resource;
remote_nonnull_string dom_xml;
};
struct remote_domain_migrate_prepare_tunnel3_ret {
struct {
u_int cookie_out_len;
char * cookie_out_val;
} cookie_out;
};
struct remote_domain_migrate_perform3_args {
remote_nonnull_domain dom;
remote_string xmlin;
struct {
u_int cookie_in_len;
char * cookie_in_val;
} cookie_in;
remote_string dconnuri;
remote_string uri;
uint64_t flags;
remote_string dname;
uint64_t resource;
};
struct remote_domain_migrate_perform3_ret {
struct {
u_int cookie_out_len;
char * cookie_out_val;
} cookie_out;
};
struct remote_domain_migrate_finish3_args {
remote_nonnull_string dname;
struct {
u_int cookie_in_len;
char * cookie_in_val;
} cookie_in;
remote_string dconnuri;
remote_string uri;
uint64_t flags;
int cancelled;
};
struct remote_domain_migrate_finish3_ret {
remote_nonnull_domain dom;
struct {
u_int cookie_out_len;
char * cookie_out_val;
} cookie_out;
};
struct remote_domain_migrate_confirm3_args {
remote_nonnull_domain dom;
struct {
u_int cookie_in_len;
char * cookie_in_val;
} cookie_in;
uint64_t flags;
int cancelled;
};
struct remote_domain_event_control_error_msg {
remote_nonnull_domain dom;
};
struct remote_domain_event_callback_control_error_msg {
int callbackID;
remote_domain_event_control_error_msg msg;
};
struct remote_domain_get_control_info_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_control_info_ret {
u_int state;
u_int details;
uint64_t stateTime;
};
struct remote_domain_open_graphics_args {
remote_nonnull_domain dom;
u_int idx;
u_int flags;
};
struct remote_domain_open_graphics_fd_args {
remote_nonnull_domain dom;
u_int idx;
u_int flags;
};
struct remote_node_suspend_for_duration_args {
u_int target;
uint64_t duration;
u_int flags;
};
struct remote_domain_shutdown_flags_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_disk_errors_args {
remote_nonnull_domain dom;
u_int maxerrors;
u_int flags;
};
struct remote_domain_get_disk_errors_ret {
struct {
u_int errors_len;
remote_domain_disk_error * errors_val;
} errors;
int nerrors;
};
struct remote_connect_list_all_domains_args {
int need_results;
u_int flags;
};
struct remote_connect_list_all_domains_ret {
struct {
u_int domains_len;
remote_nonnull_domain * domains_val;
} domains;
u_int ret;
};
struct remote_connect_list_all_storage_pools_args {
int need_results;
u_int flags;
};
struct remote_connect_list_all_storage_pools_ret {
struct {
u_int pools_len;
remote_nonnull_storage_pool * pools_val;
} pools;
u_int ret;
};
struct remote_storage_pool_list_all_volumes_args {
remote_nonnull_storage_pool pool;
int need_results;
u_int flags;
};
struct remote_storage_pool_list_all_volumes_ret {
struct {
u_int vols_len;
remote_nonnull_storage_vol * vols_val;
} vols;
u_int ret;
};
struct remote_connect_list_all_networks_args {
int need_results;
u_int flags;
};
struct remote_connect_list_all_networks_ret {
struct {
u_int nets_len;
remote_nonnull_network * nets_val;
} nets;
u_int ret;
};
struct remote_connect_list_all_interfaces_args {
int need_results;
u_int flags;
};
struct remote_connect_list_all_interfaces_ret {
struct {
u_int ifaces_len;
remote_nonnull_interface * ifaces_val;
} ifaces;
u_int ret;
};
struct remote_connect_list_all_node_devices_args {
int need_results;
u_int flags;
};
struct remote_connect_list_all_node_devices_ret {
struct {
u_int devices_len;
remote_nonnull_node_device * devices_val;
} devices;
u_int ret;
};
struct remote_connect_list_all_nwfilters_args {
int need_results;
u_int flags;
};
struct remote_connect_list_all_nwfilters_ret {
struct {
u_int filters_len;
remote_nonnull_nwfilter * filters_val;
} filters;
u_int ret;
};
struct remote_connect_list_all_secrets_args {
int need_results;
u_int flags;
};
struct remote_connect_list_all_secrets_ret {
struct {
u_int secrets_len;
remote_nonnull_secret * secrets_val;
} secrets;
u_int ret;
};
struct remote_node_set_memory_parameters_args {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
u_int flags;
};
struct remote_node_get_memory_parameters_args {
int nparams;
u_int flags;
};
struct remote_node_get_memory_parameters_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
int nparams;
};
struct remote_node_get_cpu_map_args {
int need_map;
int need_online;
u_int flags;
};
struct remote_node_get_cpu_map_ret {
struct {
u_int cpumap_len;
char * cpumap_val;
} cpumap;
u_int online;
int ret;
};
struct remote_domain_fstrim_args {
remote_nonnull_domain dom;
remote_string mountPoint;
uint64_t minimum;
u_int flags;
};
struct remote_domain_get_time_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_time_ret {
int64_t seconds;
u_int nseconds;
};
struct remote_domain_set_time_args {
remote_nonnull_domain dom;
int64_t seconds;
u_int nseconds;
u_int flags;
};
struct remote_domain_migrate_begin3_params_args {
remote_nonnull_domain dom;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
u_int flags;
};
struct remote_domain_migrate_begin3_params_ret {
struct {
u_int cookie_out_len;
char * cookie_out_val;
} cookie_out;
remote_nonnull_string xml;
};
struct remote_domain_migrate_prepare3_params_args {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
struct {
u_int cookie_in_len;
char * cookie_in_val;
} cookie_in;
u_int flags;
};
struct remote_domain_migrate_prepare3_params_ret {
struct {
u_int cookie_out_len;
char * cookie_out_val;
} cookie_out;
remote_string uri_out;
};
struct remote_domain_migrate_prepare_tunnel3_params_args {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
struct {
u_int cookie_in_len;
char * cookie_in_val;
} cookie_in;
u_int flags;
};
struct remote_domain_migrate_prepare_tunnel3_params_ret {
struct {
u_int cookie_out_len;
char * cookie_out_val;
} cookie_out;
};
struct remote_domain_migrate_perform3_params_args {
remote_nonnull_domain dom;
remote_string dconnuri;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
struct {
u_int cookie_in_len;
char * cookie_in_val;
} cookie_in;
u_int flags;
};
struct remote_domain_migrate_perform3_params_ret {
struct {
u_int cookie_out_len;
char * cookie_out_val;
} cookie_out;
};
struct remote_domain_migrate_finish3_params_args {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
struct {
u_int cookie_in_len;
char * cookie_in_val;
} cookie_in;
u_int flags;
int cancelled;
};
struct remote_domain_migrate_finish3_params_ret {
remote_nonnull_domain dom;
struct {
u_int cookie_out_len;
char * cookie_out_val;
} cookie_out;
};
struct remote_domain_migrate_confirm3_params_args {
remote_nonnull_domain dom;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
struct {
u_int cookie_in_len;
char * cookie_in_val;
} cookie_in;
u_int flags;
int cancelled;
};
struct remote_domain_event_device_removed_msg {
remote_nonnull_domain dom;
remote_nonnull_string devAlias;
};
struct remote_domain_event_callback_device_removed_msg {
int callbackID;
remote_domain_event_device_removed_msg msg;
};
blockjob: use stable disk string in job event When the block job event was first added, it was for block pull, where the active layer of the disk remains the same name. It was also in a day where we only cared about local files, and so we always had a canonical absolute file name. But two things have changed since then: we now have network disks, where determining a single absolute string does not really make sense; and we have two-phase jobs (copy and active commit) where the name of the active layer changes between the first event (ready, on the old name) and second (complete, on the pivoted name). Adam Litke reported that having an unstable string between events makes life harder for clients. Furthermore, all of our API that operate on a particular disk of a domain accept multiple strings: not only the absolute name of the active layer, but also the destination device name (such as 'vda'). As this latter name is stable, even for network sources, it serves as a better string to supply in block job events. But backwards-compatibility demands that we should not change the name handed to users unless they explicitly request it. Therefore, this patch adds a new event, BLOCK_JOB_2 (alas, I couldn't think of any nicer name - but at least Migrate2 and Migrate3 are precedent for a number suffix). We must double up on emitting both old-style and new-style events according to what clients have registered for (see also how IOError and IOErrorReason emits double events, but there the difference was a larger struct rather than changed meaning of one of the struct members). Unfortunately, adding a new event isn't something that can easily be broken into pieces, so the commit is rather large. * include/libvirt/libvirt.h.in (virDomainEventID): Add a new id for VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2. (virConnectDomainEventBlockJobCallback): Document new semantics. * src/conf/domain_event.c (_virDomainEventBlockJob): Rename field, to ensure we catch all clients. (virDomainEventBlockJobNew): Add parameter. (virDomainEventBlockJobDispose) (virDomainEventBlockJobNewFromObj) (virDomainEventBlockJobNewFromDom) (virDomainEventDispatchDefaultFunc): Adjust clients. (virDomainEventBlockJob2NewFromObj) (virDomainEventBlockJob2NewFromDom): New functions. * src/conf/domain_event.h: Add new prototypes. * src/libvirt_private.syms (domain_event.h): Export new functions. * src/qemu/qemu_driver.c (qemuDomainBlockJobImpl): Generate two different events. * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Likewise. * src/remote/remote_protocol.x (remote_domain_event_block_job_2_msg): New struct. (REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_2): New RPC. * src/remote/remote_driver.c (remoteDomainBuildEventBlockJob2): New handler. (remoteEvents): Register new event. * daemon/remote.c (remoteRelayDomainEventBlockJob2): New handler. (domainEventCallbacks): Register new event. * tools/virsh-domain.c (vshEventCallbacks): Likewise. (vshEventBlockJobPrint): Adjust client. * src/remote_protocol-structs: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2014-06-14 13:18:04 +00:00
struct remote_domain_event_block_job_2_msg {
int callbackID;
remote_nonnull_domain dom;
remote_nonnull_string dst;
int type;
int status;
};
struct remote_domain_event_block_threshold_msg {
int callbackID;
remote_nonnull_domain dom;
remote_nonnull_string dev;
remote_string path;
uint64_t threshold;
uint64_t excess;
};
struct remote_domain_event_callback_tunable_msg {
int callbackID;
remote_nonnull_domain dom;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
};
struct remote_domain_event_callback_device_added_msg {
int callbackID;
remote_nonnull_domain dom;
remote_nonnull_string devAlias;
};
struct remote_connect_event_connection_closed_msg {
int reason;
};
struct remote_connect_get_cpu_model_names_args {
remote_nonnull_string arch;
int need_results;
u_int flags;
};
struct remote_connect_get_cpu_model_names_ret {
struct {
u_int models_len;
remote_nonnull_string * models_val;
} models;
int ret;
};
struct remote_connect_network_event_register_any_args {
int eventID;
event: wire up RPC for server-side network event filtering We haven't had a release with network events yet, so we are free to fix the RPC so that it actually does what we want. Doing client-side filtering of per-network events is inefficient if a connection is only interested in events on a single network out of hundreds available on the server. But to do server-side per-network filtering, the server needs to know which network to filter on - so we need to pass an optional network over on registration. Furthermore, it is possible to have a client with both a global and per-network filter; in the existing code, the server sends only one event and the client replicates to both callbacks. But with server-side filtering, the server will send the event twice, so we need a way for the client to know which callbackID is sending an event, to ensure that the client can filter out events from a registration that does not match the callbackID from the server. Likewise, the existing style of deregistering by eventID alone is fine; but in the new style, we have to remember which callbackID to delete. This patch fixes the RPC wire definition to contain all the needed pieces of information, and hooks into the server and client side improvements of the previous patches, in order to switch over to full server-side filtering of network events. Also, since we fixed this in time, all released versions of libvirtd that support network events also support per-network filtering, so we can hard-code that assumption into network_event.c. Converting domain events to server-side filtering will require the introduction of new RPC numbers, as well as a server feature bit that the client can use to tell whether to use old-style (server only supports global events) or new-style (server supports filtered events), so that is deferred to a later set of patches. * src/conf/network_event.c (virNetworkEventStateRegisterClient): Assume server-side filtering. * src/remote/remote_protocol.x (remote_connect_network_event_register_any_args): Add network argument. (remote_connect_network_event_register_any_ret): Return callbackID instead of count. (remote_connect_network_event_deregister_any_args): Pass callbackID instead of eventID. (remote_connect_network_event_deregister_any_ret): Drop unused type. (remote_network_event_lifecycle_msg): Add callbackID. * daemon/remote.c (remoteDispatchConnectNetworkEventDeregisterAny): Drop unused arg, and deal with callbackID from client. (remoteRelayNetworkEventLifecycle): Pass callbackID. (remoteDispatchConnectNetworkEventRegisterAny): Likewise, and recognize non-NULL network. * src/remote/remote_driver.c (remoteConnectNetworkEventRegisterAny): Pass network, and track server side id. (remoteConnectNetworkEventDeregisterAny): Deregister by callback id. (remoteNetworkBuildEventLifecycle): Pass remote id to event queue. * src/remote_protocol-structs: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-08 20:24:22 +00:00
remote_network net;
};
struct remote_connect_network_event_register_any_ret {
event: wire up RPC for server-side network event filtering We haven't had a release with network events yet, so we are free to fix the RPC so that it actually does what we want. Doing client-side filtering of per-network events is inefficient if a connection is only interested in events on a single network out of hundreds available on the server. But to do server-side per-network filtering, the server needs to know which network to filter on - so we need to pass an optional network over on registration. Furthermore, it is possible to have a client with both a global and per-network filter; in the existing code, the server sends only one event and the client replicates to both callbacks. But with server-side filtering, the server will send the event twice, so we need a way for the client to know which callbackID is sending an event, to ensure that the client can filter out events from a registration that does not match the callbackID from the server. Likewise, the existing style of deregistering by eventID alone is fine; but in the new style, we have to remember which callbackID to delete. This patch fixes the RPC wire definition to contain all the needed pieces of information, and hooks into the server and client side improvements of the previous patches, in order to switch over to full server-side filtering of network events. Also, since we fixed this in time, all released versions of libvirtd that support network events also support per-network filtering, so we can hard-code that assumption into network_event.c. Converting domain events to server-side filtering will require the introduction of new RPC numbers, as well as a server feature bit that the client can use to tell whether to use old-style (server only supports global events) or new-style (server supports filtered events), so that is deferred to a later set of patches. * src/conf/network_event.c (virNetworkEventStateRegisterClient): Assume server-side filtering. * src/remote/remote_protocol.x (remote_connect_network_event_register_any_args): Add network argument. (remote_connect_network_event_register_any_ret): Return callbackID instead of count. (remote_connect_network_event_deregister_any_args): Pass callbackID instead of eventID. (remote_connect_network_event_deregister_any_ret): Drop unused type. (remote_network_event_lifecycle_msg): Add callbackID. * daemon/remote.c (remoteDispatchConnectNetworkEventDeregisterAny): Drop unused arg, and deal with callbackID from client. (remoteRelayNetworkEventLifecycle): Pass callbackID. (remoteDispatchConnectNetworkEventRegisterAny): Likewise, and recognize non-NULL network. * src/remote/remote_driver.c (remoteConnectNetworkEventRegisterAny): Pass network, and track server side id. (remoteConnectNetworkEventDeregisterAny): Deregister by callback id. (remoteNetworkBuildEventLifecycle): Pass remote id to event queue. * src/remote_protocol-structs: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-08 20:24:22 +00:00
int callbackID;
};
struct remote_connect_network_event_deregister_any_args {
event: wire up RPC for server-side network event filtering We haven't had a release with network events yet, so we are free to fix the RPC so that it actually does what we want. Doing client-side filtering of per-network events is inefficient if a connection is only interested in events on a single network out of hundreds available on the server. But to do server-side per-network filtering, the server needs to know which network to filter on - so we need to pass an optional network over on registration. Furthermore, it is possible to have a client with both a global and per-network filter; in the existing code, the server sends only one event and the client replicates to both callbacks. But with server-side filtering, the server will send the event twice, so we need a way for the client to know which callbackID is sending an event, to ensure that the client can filter out events from a registration that does not match the callbackID from the server. Likewise, the existing style of deregistering by eventID alone is fine; but in the new style, we have to remember which callbackID to delete. This patch fixes the RPC wire definition to contain all the needed pieces of information, and hooks into the server and client side improvements of the previous patches, in order to switch over to full server-side filtering of network events. Also, since we fixed this in time, all released versions of libvirtd that support network events also support per-network filtering, so we can hard-code that assumption into network_event.c. Converting domain events to server-side filtering will require the introduction of new RPC numbers, as well as a server feature bit that the client can use to tell whether to use old-style (server only supports global events) or new-style (server supports filtered events), so that is deferred to a later set of patches. * src/conf/network_event.c (virNetworkEventStateRegisterClient): Assume server-side filtering. * src/remote/remote_protocol.x (remote_connect_network_event_register_any_args): Add network argument. (remote_connect_network_event_register_any_ret): Return callbackID instead of count. (remote_connect_network_event_deregister_any_args): Pass callbackID instead of eventID. (remote_connect_network_event_deregister_any_ret): Drop unused type. (remote_network_event_lifecycle_msg): Add callbackID. * daemon/remote.c (remoteDispatchConnectNetworkEventDeregisterAny): Drop unused arg, and deal with callbackID from client. (remoteRelayNetworkEventLifecycle): Pass callbackID. (remoteDispatchConnectNetworkEventRegisterAny): Likewise, and recognize non-NULL network. * src/remote/remote_driver.c (remoteConnectNetworkEventRegisterAny): Pass network, and track server side id. (remoteConnectNetworkEventDeregisterAny): Deregister by callback id. (remoteNetworkBuildEventLifecycle): Pass remote id to event queue. * src/remote_protocol-structs: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-08 20:24:22 +00:00
int callbackID;
};
struct remote_network_event_lifecycle_msg {
event: wire up RPC for server-side network event filtering We haven't had a release with network events yet, so we are free to fix the RPC so that it actually does what we want. Doing client-side filtering of per-network events is inefficient if a connection is only interested in events on a single network out of hundreds available on the server. But to do server-side per-network filtering, the server needs to know which network to filter on - so we need to pass an optional network over on registration. Furthermore, it is possible to have a client with both a global and per-network filter; in the existing code, the server sends only one event and the client replicates to both callbacks. But with server-side filtering, the server will send the event twice, so we need a way for the client to know which callbackID is sending an event, to ensure that the client can filter out events from a registration that does not match the callbackID from the server. Likewise, the existing style of deregistering by eventID alone is fine; but in the new style, we have to remember which callbackID to delete. This patch fixes the RPC wire definition to contain all the needed pieces of information, and hooks into the server and client side improvements of the previous patches, in order to switch over to full server-side filtering of network events. Also, since we fixed this in time, all released versions of libvirtd that support network events also support per-network filtering, so we can hard-code that assumption into network_event.c. Converting domain events to server-side filtering will require the introduction of new RPC numbers, as well as a server feature bit that the client can use to tell whether to use old-style (server only supports global events) or new-style (server supports filtered events), so that is deferred to a later set of patches. * src/conf/network_event.c (virNetworkEventStateRegisterClient): Assume server-side filtering. * src/remote/remote_protocol.x (remote_connect_network_event_register_any_args): Add network argument. (remote_connect_network_event_register_any_ret): Return callbackID instead of count. (remote_connect_network_event_deregister_any_args): Pass callbackID instead of eventID. (remote_connect_network_event_deregister_any_ret): Drop unused type. (remote_network_event_lifecycle_msg): Add callbackID. * daemon/remote.c (remoteDispatchConnectNetworkEventDeregisterAny): Drop unused arg, and deal with callbackID from client. (remoteRelayNetworkEventLifecycle): Pass callbackID. (remoteDispatchConnectNetworkEventRegisterAny): Likewise, and recognize non-NULL network. * src/remote/remote_driver.c (remoteConnectNetworkEventRegisterAny): Pass network, and track server side id. (remoteConnectNetworkEventDeregisterAny): Deregister by callback id. (remoteNetworkBuildEventLifecycle): Pass remote id to event queue. * src/remote_protocol-structs: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-08 20:24:22 +00:00
int callbackID;
remote_nonnull_network net;
int event;
int detail;
};
struct remote_connect_storage_pool_event_register_any_args {
int eventID;
remote_storage_pool pool;
};
struct remote_connect_storage_pool_event_register_any_ret {
int callbackID;
};
struct remote_connect_storage_pool_event_deregister_any_args {
int callbackID;
};
struct remote_storage_pool_event_lifecycle_msg {
int callbackID;
remote_nonnull_storage_pool pool;
int event;
int detail;
};
struct remote_storage_pool_event_refresh_msg {
int callbackID;
remote_nonnull_storage_pool pool;
};
struct remote_connect_node_device_event_register_any_args {
int eventID;
remote_node_device dev;
};
struct remote_connect_node_device_event_register_any_ret {
int callbackID;
};
struct remote_connect_node_device_event_deregister_any_args {
int callbackID;
};
struct remote_node_device_event_lifecycle_msg {
int callbackID;
remote_nonnull_node_device dev;
int event;
int detail;
};
struct remote_node_device_event_update_msg {
int callbackID;
remote_nonnull_node_device dev;
};
struct remote_domain_fsfreeze_args {
remote_nonnull_domain dom;
struct {
u_int mountpoints_len;
remote_nonnull_string * mountpoints_val;
} mountpoints;
u_int flags;
};
struct remote_domain_fsfreeze_ret {
int filesystems;
};
struct remote_domain_fsthaw_args {
remote_nonnull_domain dom;
struct {
u_int mountpoints_len;
remote_nonnull_string * mountpoints_val;
} mountpoints;
u_int flags;
};
struct remote_domain_fsthaw_ret {
int filesystems;
};
struct remote_node_get_free_pages_args {
struct {
u_int pages_len;
u_int * pages_val;
} pages;
int startCell;
u_int cellCount;
u_int flags;
};
struct remote_node_get_free_pages_ret {
struct {
u_int counts_len;
uint64_t * counts_val;
} counts;
};
struct remote_node_alloc_pages_args {
struct {
u_int pageSizes_len;
u_int * pageSizes_val;
} pageSizes;
struct {
u_int pageCounts_len;
uint64_t * pageCounts_val;
} pageCounts;
int startCell;
u_int cellCount;
u_int flags;
};
struct remote_node_alloc_pages_ret {
int ret;
};
struct remote_network_dhcp_lease {
remote_nonnull_string iface;
int64_t expirytime;
int type;
remote_string mac;
remote_string iaid;
remote_nonnull_string ipaddr;
u_int prefix;
remote_string hostname;
remote_string clientid;
};
struct remote_network_get_dhcp_leases_args {
remote_nonnull_network net;
remote_string mac;
int need_results;
u_int flags;
};
struct remote_network_get_dhcp_leases_ret {
struct {
u_int leases_len;
remote_network_dhcp_lease * leases_val;
} leases;
u_int ret;
};
struct remote_domain_stats_record {
remote_nonnull_domain dom;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
};
struct remote_connect_get_all_domain_stats_args {
struct {
u_int doms_len;
remote_nonnull_domain * doms_val;
} doms;
u_int stats;
u_int flags;
};
struct remote_domain_event_callback_agent_lifecycle_msg {
int callbackID;
remote_nonnull_domain dom;
int state;
int reason;
};
struct remote_connect_get_all_domain_stats_ret {
struct {
u_int retStats_len;
remote_domain_stats_record * retStats_val;
} retStats;
};
struct remote_domain_fsinfo {
remote_nonnull_string mountpoint;
remote_nonnull_string name;
remote_nonnull_string fstype;
struct {
u_int dev_aliases_len;
remote_nonnull_string * dev_aliases_val;
} dev_aliases;
};
struct remote_domain_get_fsinfo_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_fsinfo_ret {
struct {
u_int info_len;
remote_domain_fsinfo * info_val;
} info;
u_int ret;
};
struct remote_domain_ip_addr {
int type;
remote_nonnull_string addr;
u_int prefix;
};
struct remote_domain_interface {
remote_nonnull_string name;
remote_string hwaddr;
struct {
u_int addrs_len;
remote_domain_ip_addr * addrs_val;
} addrs;
};
struct remote_domain_interface_addresses_args {
remote_nonnull_domain dom;
u_int source;
u_int flags;
};
struct remote_domain_interface_addresses_ret {
struct {
u_int ifaces_len;
remote_domain_interface * ifaces_val;
} ifaces;
};
struct remote_domain_set_user_password_args {
remote_nonnull_domain dom;
remote_string user;
remote_string password;
u_int flags;
};
struct remote_domain_rename_args {
remote_nonnull_domain dom;
remote_string new_name;
u_int flags;
};
struct remote_domain_rename_ret {
int retcode;
};
struct remote_domain_event_callback_migration_iteration_msg {
int callbackID;
remote_nonnull_domain dom;
int iteration;
};
struct remote_domain_event_callback_job_completed_msg {
int callbackID;
remote_nonnull_domain dom;
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
};
struct remote_domain_migrate_start_post_copy_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_event_callback_device_removal_failed_msg {
int callbackID;
remote_nonnull_domain dom;
remote_nonnull_string devAlias;
};
struct remote_domain_get_guest_vcpus_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_guest_vcpus_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
};
struct remote_domain_set_guest_vcpus_args {
remote_nonnull_domain dom;
remote_nonnull_string cpumap;
int state;
u_int flags;
};
struct remote_domain_set_vcpu_args {
remote_nonnull_domain dom;
remote_nonnull_string cpumap;
int state;
u_int flags;
};
struct remote_domain_event_callback_metadata_change_msg {
int callbackID;
remote_nonnull_domain dom;
int type;
remote_string nsuri;
};
struct remote_connect_secret_event_register_any_args {
int eventID;
remote_secret secret;
};
struct remote_connect_secret_event_register_any_ret {
int callbackID;
};
struct remote_connect_secret_event_deregister_any_args {
int callbackID;
};
struct remote_secret_event_lifecycle_msg {
int callbackID;
remote_nonnull_secret secret;
int event;
int detail;
};
struct remote_secret_event_value_changed_msg {
int callbackID;
remote_nonnull_secret secret;
};
struct remote_domain_set_block_threshold_args {
remote_nonnull_domain dom;
remote_nonnull_string dev;
uint64_t threshold;
u_int flags;
};
struct remote_domain_set_lifecycle_action_args {
remote_nonnull_domain dom;
u_int type;
u_int action;
u_int flags;
};
struct remote_connect_compare_hypervisor_cpu_args {
remote_string emulator;
remote_string arch;
remote_string machine;
remote_string virttype;
remote_nonnull_string xmlCPU;
u_int flags;
};
struct remote_connect_compare_hypervisor_cpu_ret {
int result;
};
struct remote_connect_baseline_hypervisor_cpu_args {
remote_string emulator;
remote_string arch;
remote_string machine;
remote_string virttype;
struct {
u_int xmlCPUs_len;
remote_nonnull_string * xmlCPUs_val;
} xmlCPUs;
u_int flags;
};
struct remote_connect_baseline_hypervisor_cpu_ret {
remote_nonnull_string cpu;
};
struct remote_node_get_sev_info_args {
int nparams;
u_int flags;
};
struct remote_node_get_sev_info_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
int nparams;
};
struct remote_domain_get_launch_security_info_args {
remote_nonnull_domain dom;
u_int flags;
};
struct remote_domain_get_launch_security_info_ret {
struct {
u_int params_len;
remote_typed_param * params_val;
} params;
};
struct remote_nwfilter_binding_lookup_by_port_dev_args {
remote_nonnull_string name;
};
struct remote_nwfilter_binding_lookup_by_port_dev_ret {
remote_nonnull_nwfilter_binding nwfilter;
};
struct remote_nwfilter_binding_create_xml_args {
remote_nonnull_string xml;
u_int flags;
};
struct remote_nwfilter_binding_create_xml_ret {
remote_nonnull_nwfilter_binding nwfilter;
};
struct remote_nwfilter_binding_delete_args {
remote_nonnull_nwfilter_binding nwfilter;
};
struct remote_nwfilter_binding_get_xml_desc_args {
remote_nonnull_nwfilter_binding nwfilter;
u_int flags;
};
struct remote_nwfilter_binding_get_xml_desc_ret {
remote_nonnull_string xml;
};
struct remote_connect_list_all_nwfilter_bindings_args {
int need_results;
u_int flags;
};
struct remote_connect_list_all_nwfilter_bindings_ret {
struct {
u_int bindings_len;
remote_nonnull_nwfilter_binding * bindings_val;
} bindings;
u_int ret;
};
enum remote_procedure {
REMOTE_PROC_CONNECT_OPEN = 1,
REMOTE_PROC_CONNECT_CLOSE = 2,
REMOTE_PROC_CONNECT_GET_TYPE = 3,
REMOTE_PROC_CONNECT_GET_VERSION = 4,
REMOTE_PROC_CONNECT_GET_MAX_VCPUS = 5,
REMOTE_PROC_NODE_GET_INFO = 6,
REMOTE_PROC_CONNECT_GET_CAPABILITIES = 7,
REMOTE_PROC_DOMAIN_ATTACH_DEVICE = 8,
REMOTE_PROC_DOMAIN_CREATE = 9,
REMOTE_PROC_DOMAIN_CREATE_XML = 10,
REMOTE_PROC_DOMAIN_DEFINE_XML = 11,
REMOTE_PROC_DOMAIN_DESTROY = 12,
REMOTE_PROC_DOMAIN_DETACH_DEVICE = 13,
REMOTE_PROC_DOMAIN_GET_XML_DESC = 14,
REMOTE_PROC_DOMAIN_GET_AUTOSTART = 15,
REMOTE_PROC_DOMAIN_GET_INFO = 16,
REMOTE_PROC_DOMAIN_GET_MAX_MEMORY = 17,
REMOTE_PROC_DOMAIN_GET_MAX_VCPUS = 18,
REMOTE_PROC_DOMAIN_GET_OS_TYPE = 19,
REMOTE_PROC_DOMAIN_GET_VCPUS = 20,
REMOTE_PROC_CONNECT_LIST_DEFINED_DOMAINS = 21,
REMOTE_PROC_DOMAIN_LOOKUP_BY_ID = 22,
REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME = 23,
REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID = 24,
REMOTE_PROC_CONNECT_NUM_OF_DEFINED_DOMAINS = 25,
REMOTE_PROC_DOMAIN_PIN_VCPU = 26,
REMOTE_PROC_DOMAIN_REBOOT = 27,
REMOTE_PROC_DOMAIN_RESUME = 28,
REMOTE_PROC_DOMAIN_SET_AUTOSTART = 29,
REMOTE_PROC_DOMAIN_SET_MAX_MEMORY = 30,
REMOTE_PROC_DOMAIN_SET_MEMORY = 31,
REMOTE_PROC_DOMAIN_SET_VCPUS = 32,
REMOTE_PROC_DOMAIN_SHUTDOWN = 33,
REMOTE_PROC_DOMAIN_SUSPEND = 34,
REMOTE_PROC_DOMAIN_UNDEFINE = 35,
REMOTE_PROC_CONNECT_LIST_DEFINED_NETWORKS = 36,
REMOTE_PROC_CONNECT_LIST_DOMAINS = 37,
REMOTE_PROC_CONNECT_LIST_NETWORKS = 38,
REMOTE_PROC_NETWORK_CREATE = 39,
REMOTE_PROC_NETWORK_CREATE_XML = 40,
REMOTE_PROC_NETWORK_DEFINE_XML = 41,
REMOTE_PROC_NETWORK_DESTROY = 42,
REMOTE_PROC_NETWORK_GET_XML_DESC = 43,
REMOTE_PROC_NETWORK_GET_AUTOSTART = 44,
REMOTE_PROC_NETWORK_GET_BRIDGE_NAME = 45,
REMOTE_PROC_NETWORK_LOOKUP_BY_NAME = 46,
REMOTE_PROC_NETWORK_LOOKUP_BY_UUID = 47,
REMOTE_PROC_NETWORK_SET_AUTOSTART = 48,
REMOTE_PROC_NETWORK_UNDEFINE = 49,
REMOTE_PROC_CONNECT_NUM_OF_DEFINED_NETWORKS = 50,
REMOTE_PROC_CONNECT_NUM_OF_DOMAINS = 51,
REMOTE_PROC_CONNECT_NUM_OF_NETWORKS = 52,
REMOTE_PROC_DOMAIN_CORE_DUMP = 53,
REMOTE_PROC_DOMAIN_RESTORE = 54,
REMOTE_PROC_DOMAIN_SAVE = 55,
REMOTE_PROC_DOMAIN_GET_SCHEDULER_TYPE = 56,
REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS = 57,
REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS = 58,
REMOTE_PROC_CONNECT_GET_HOSTNAME = 59,
REMOTE_PROC_CONNECT_SUPPORTS_FEATURE = 60,
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE = 61,
REMOTE_PROC_DOMAIN_MIGRATE_PERFORM = 62,
REMOTE_PROC_DOMAIN_MIGRATE_FINISH = 63,
REMOTE_PROC_DOMAIN_BLOCK_STATS = 64,
REMOTE_PROC_DOMAIN_INTERFACE_STATS = 65,
REMOTE_PROC_AUTH_LIST = 66,
REMOTE_PROC_AUTH_SASL_INIT = 67,
REMOTE_PROC_AUTH_SASL_START = 68,
REMOTE_PROC_AUTH_SASL_STEP = 69,
REMOTE_PROC_AUTH_POLKIT = 70,
REMOTE_PROC_CONNECT_NUM_OF_STORAGE_POOLS = 71,
REMOTE_PROC_CONNECT_LIST_STORAGE_POOLS = 72,
REMOTE_PROC_CONNECT_NUM_OF_DEFINED_STORAGE_POOLS = 73,
REMOTE_PROC_CONNECT_LIST_DEFINED_STORAGE_POOLS = 74,
REMOTE_PROC_CONNECT_FIND_STORAGE_POOL_SOURCES = 75,
REMOTE_PROC_STORAGE_POOL_CREATE_XML = 76,
REMOTE_PROC_STORAGE_POOL_DEFINE_XML = 77,
REMOTE_PROC_STORAGE_POOL_CREATE = 78,
REMOTE_PROC_STORAGE_POOL_BUILD = 79,
REMOTE_PROC_STORAGE_POOL_DESTROY = 80,
REMOTE_PROC_STORAGE_POOL_DELETE = 81,
REMOTE_PROC_STORAGE_POOL_UNDEFINE = 82,
REMOTE_PROC_STORAGE_POOL_REFRESH = 83,
REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME = 84,
REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID = 85,
REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME = 86,
REMOTE_PROC_STORAGE_POOL_GET_INFO = 87,
REMOTE_PROC_STORAGE_POOL_GET_XML_DESC = 88,
REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART = 89,
REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART = 90,
REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES = 91,
REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES = 92,
REMOTE_PROC_STORAGE_VOL_CREATE_XML = 93,
REMOTE_PROC_STORAGE_VOL_DELETE = 94,
REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME = 95,
REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY = 96,
REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH = 97,
REMOTE_PROC_STORAGE_VOL_GET_INFO = 98,
REMOTE_PROC_STORAGE_VOL_GET_XML_DESC = 99,
REMOTE_PROC_STORAGE_VOL_GET_PATH = 100,
REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY = 101,
REMOTE_PROC_NODE_GET_FREE_MEMORY = 102,
REMOTE_PROC_DOMAIN_BLOCK_PEEK = 103,
REMOTE_PROC_DOMAIN_MEMORY_PEEK = 104,
REMOTE_PROC_CONNECT_DOMAIN_EVENT_REGISTER = 105,
REMOTE_PROC_CONNECT_DOMAIN_EVENT_DEREGISTER = 106,
REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE = 107,
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE2 = 108,
REMOTE_PROC_DOMAIN_MIGRATE_FINISH2 = 109,
REMOTE_PROC_CONNECT_GET_URI = 110,
REMOTE_PROC_NODE_NUM_OF_DEVICES = 111,
REMOTE_PROC_NODE_LIST_DEVICES = 112,
REMOTE_PROC_NODE_DEVICE_LOOKUP_BY_NAME = 113,
REMOTE_PROC_NODE_DEVICE_GET_XML_DESC = 114,
REMOTE_PROC_NODE_DEVICE_GET_PARENT = 115,
REMOTE_PROC_NODE_DEVICE_NUM_OF_CAPS = 116,
REMOTE_PROC_NODE_DEVICE_LIST_CAPS = 117,
REMOTE_PROC_NODE_DEVICE_DETTACH = 118,
REMOTE_PROC_NODE_DEVICE_RE_ATTACH = 119,
REMOTE_PROC_NODE_DEVICE_RESET = 120,
REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL = 121,
REMOTE_PROC_NODE_GET_SECURITY_MODEL = 122,
REMOTE_PROC_NODE_DEVICE_CREATE_XML = 123,
REMOTE_PROC_NODE_DEVICE_DESTROY = 124,
REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM = 125,
REMOTE_PROC_CONNECT_NUM_OF_INTERFACES = 126,
REMOTE_PROC_CONNECT_LIST_INTERFACES = 127,
REMOTE_PROC_INTERFACE_LOOKUP_BY_NAME = 128,
REMOTE_PROC_INTERFACE_LOOKUP_BY_MAC_STRING = 129,
REMOTE_PROC_INTERFACE_GET_XML_DESC = 130,
REMOTE_PROC_INTERFACE_DEFINE_XML = 131,
REMOTE_PROC_INTERFACE_UNDEFINE = 132,
REMOTE_PROC_INTERFACE_CREATE = 133,
REMOTE_PROC_INTERFACE_DESTROY = 134,
REMOTE_PROC_CONNECT_DOMAIN_XML_FROM_NATIVE = 135,
REMOTE_PROC_CONNECT_DOMAIN_XML_TO_NATIVE = 136,
REMOTE_PROC_CONNECT_NUM_OF_DEFINED_INTERFACES = 137,
REMOTE_PROC_CONNECT_LIST_DEFINED_INTERFACES = 138,
REMOTE_PROC_CONNECT_NUM_OF_SECRETS = 139,
REMOTE_PROC_CONNECT_LIST_SECRETS = 140,
REMOTE_PROC_SECRET_LOOKUP_BY_UUID = 141,
REMOTE_PROC_SECRET_DEFINE_XML = 142,
REMOTE_PROC_SECRET_GET_XML_DESC = 143,
REMOTE_PROC_SECRET_SET_VALUE = 144,
REMOTE_PROC_SECRET_GET_VALUE = 145,
REMOTE_PROC_SECRET_UNDEFINE = 146,
REMOTE_PROC_SECRET_LOOKUP_BY_USAGE = 147,
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL = 148,
REMOTE_PROC_CONNECT_IS_SECURE = 149,
REMOTE_PROC_DOMAIN_IS_ACTIVE = 150,
REMOTE_PROC_DOMAIN_IS_PERSISTENT = 151,
REMOTE_PROC_NETWORK_IS_ACTIVE = 152,
REMOTE_PROC_NETWORK_IS_PERSISTENT = 153,
REMOTE_PROC_STORAGE_POOL_IS_ACTIVE = 154,
REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT = 155,
REMOTE_PROC_INTERFACE_IS_ACTIVE = 156,
REMOTE_PROC_CONNECT_GET_LIB_VERSION = 157,
REMOTE_PROC_CONNECT_COMPARE_CPU = 158,
REMOTE_PROC_DOMAIN_MEMORY_STATS = 159,
REMOTE_PROC_DOMAIN_ATTACH_DEVICE_FLAGS = 160,
REMOTE_PROC_DOMAIN_DETACH_DEVICE_FLAGS = 161,
REMOTE_PROC_CONNECT_BASELINE_CPU = 162,
REMOTE_PROC_DOMAIN_GET_JOB_INFO = 163,
REMOTE_PROC_DOMAIN_ABORT_JOB = 164,
REMOTE_PROC_STORAGE_VOL_WIPE = 165,
REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_DOWNTIME = 166,
REMOTE_PROC_CONNECT_DOMAIN_EVENT_REGISTER_ANY = 167,
REMOTE_PROC_CONNECT_DOMAIN_EVENT_DEREGISTER_ANY = 168,
REMOTE_PROC_DOMAIN_EVENT_REBOOT = 169,
REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE = 170,
REMOTE_PROC_DOMAIN_EVENT_WATCHDOG = 171,
REMOTE_PROC_DOMAIN_EVENT_IO_ERROR = 172,
REMOTE_PROC_DOMAIN_EVENT_GRAPHICS = 173,
REMOTE_PROC_DOMAIN_UPDATE_DEVICE_FLAGS = 174,
REMOTE_PROC_NWFILTER_LOOKUP_BY_NAME = 175,
REMOTE_PROC_NWFILTER_LOOKUP_BY_UUID = 176,
REMOTE_PROC_NWFILTER_GET_XML_DESC = 177,
REMOTE_PROC_CONNECT_NUM_OF_NWFILTERS = 178,
REMOTE_PROC_CONNECT_LIST_NWFILTERS = 179,
REMOTE_PROC_NWFILTER_DEFINE_XML = 180,
REMOTE_PROC_NWFILTER_UNDEFINE = 181,
REMOTE_PROC_DOMAIN_MANAGED_SAVE = 182,
REMOTE_PROC_DOMAIN_HAS_MANAGED_SAVE_IMAGE = 183,
REMOTE_PROC_DOMAIN_MANAGED_SAVE_REMOVE = 184,
REMOTE_PROC_DOMAIN_SNAPSHOT_CREATE_XML = 185,
REMOTE_PROC_DOMAIN_SNAPSHOT_GET_XML_DESC = 186,
REMOTE_PROC_DOMAIN_SNAPSHOT_NUM = 187,
REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_NAMES = 188,
REMOTE_PROC_DOMAIN_SNAPSHOT_LOOKUP_BY_NAME = 189,
REMOTE_PROC_DOMAIN_HAS_CURRENT_SNAPSHOT = 190,
REMOTE_PROC_DOMAIN_SNAPSHOT_CURRENT = 191,
REMOTE_PROC_DOMAIN_REVERT_TO_SNAPSHOT = 192,
REMOTE_PROC_DOMAIN_SNAPSHOT_DELETE = 193,
REMOTE_PROC_DOMAIN_GET_BLOCK_INFO = 194,
REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON = 195,
REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS = 196,
REMOTE_PROC_DOMAIN_SET_MEMORY_PARAMETERS = 197,
REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS = 198,
REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS = 199,
REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS = 200,
REMOTE_PROC_DOMAIN_OPEN_CONSOLE = 201,
REMOTE_PROC_DOMAIN_IS_UPDATED = 202,
REMOTE_PROC_CONNECT_GET_SYSINFO = 203,
REMOTE_PROC_DOMAIN_SET_MEMORY_FLAGS = 204,
REMOTE_PROC_DOMAIN_SET_BLKIO_PARAMETERS = 205,
REMOTE_PROC_DOMAIN_GET_BLKIO_PARAMETERS = 206,
REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207,
REMOTE_PROC_STORAGE_VOL_UPLOAD = 208,
REMOTE_PROC_STORAGE_VOL_DOWNLOAD = 209,
REMOTE_PROC_DOMAIN_INJECT_NMI = 210,
REMOTE_PROC_DOMAIN_SCREENSHOT = 211,
REMOTE_PROC_DOMAIN_GET_STATE = 212,
REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3 = 213,
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3 = 214,
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3 = 215,
REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3 = 216,
REMOTE_PROC_DOMAIN_MIGRATE_FINISH3 = 217,
REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3 = 218,
REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS = 219,
REMOTE_PROC_INTERFACE_CHANGE_BEGIN = 220,
REMOTE_PROC_INTERFACE_CHANGE_COMMIT = 221,
REMOTE_PROC_INTERFACE_CHANGE_ROLLBACK = 222,
REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS_FLAGS = 223,
REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR = 224,
REMOTE_PROC_DOMAIN_PIN_VCPU_FLAGS = 225,
REMOTE_PROC_DOMAIN_SEND_KEY = 226,
REMOTE_PROC_NODE_GET_CPU_STATS = 227,
REMOTE_PROC_NODE_GET_MEMORY_STATS = 228,
REMOTE_PROC_DOMAIN_GET_CONTROL_INFO = 229,
REMOTE_PROC_DOMAIN_GET_VCPU_PIN_INFO = 230,
REMOTE_PROC_DOMAIN_UNDEFINE_FLAGS = 231,
REMOTE_PROC_DOMAIN_SAVE_FLAGS = 232,
REMOTE_PROC_DOMAIN_RESTORE_FLAGS = 233,
2011-07-20 16:33:23 +00:00
REMOTE_PROC_DOMAIN_DESTROY_FLAGS = 234,
REMOTE_PROC_DOMAIN_SAVE_IMAGE_GET_XML_DESC = 235,
REMOTE_PROC_DOMAIN_SAVE_IMAGE_DEFINE_XML = 236,
REMOTE_PROC_DOMAIN_BLOCK_JOB_ABORT = 237,
REMOTE_PROC_DOMAIN_GET_BLOCK_JOB_INFO = 238,
REMOTE_PROC_DOMAIN_BLOCK_JOB_SET_SPEED = 239,
REMOTE_PROC_DOMAIN_BLOCK_PULL = 240,
REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB = 241,
REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_SPEED = 242,
REMOTE_PROC_DOMAIN_BLOCK_STATS_FLAGS = 243,
REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT = 244,
REMOTE_PROC_DOMAIN_RESET = 245,
REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN = 246,
REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247,
REMOTE_PROC_DOMAIN_EVENT_DISK_CHANGE = 248,
REMOTE_PROC_DOMAIN_OPEN_GRAPHICS = 249,
REMOTE_PROC_NODE_SUSPEND_FOR_DURATION = 250,
REMOTE_PROC_DOMAIN_BLOCK_RESIZE = 251,
REMOTE_PROC_DOMAIN_SET_BLOCK_IO_TUNE = 252,
REMOTE_PROC_DOMAIN_GET_BLOCK_IO_TUNE = 253,
REMOTE_PROC_DOMAIN_SET_NUMA_PARAMETERS = 254,
REMOTE_PROC_DOMAIN_GET_NUMA_PARAMETERS = 255,
REMOTE_PROC_DOMAIN_SET_INTERFACE_PARAMETERS = 256,
REMOTE_PROC_DOMAIN_GET_INTERFACE_PARAMETERS = 257,
REMOTE_PROC_DOMAIN_SHUTDOWN_FLAGS = 258,
REMOTE_PROC_STORAGE_VOL_WIPE_PATTERN = 259,
REMOTE_PROC_STORAGE_VOL_RESIZE = 260,
REMOTE_PROC_DOMAIN_PM_SUSPEND_FOR_DURATION = 261,
REMOTE_PROC_DOMAIN_GET_CPU_STATS = 262,
REMOTE_PROC_DOMAIN_GET_DISK_ERRORS = 263,
REMOTE_PROC_DOMAIN_SET_METADATA = 264,
REMOTE_PROC_DOMAIN_GET_METADATA = 265,
REMOTE_PROC_DOMAIN_BLOCK_REBASE = 266,
REMOTE_PROC_DOMAIN_PM_WAKEUP = 267,
REMOTE_PROC_DOMAIN_EVENT_TRAY_CHANGE = 268,
REMOTE_PROC_DOMAIN_EVENT_PMWAKEUP = 269,
REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND = 270,
REMOTE_PROC_DOMAIN_SNAPSHOT_IS_CURRENT = 271,
REMOTE_PROC_DOMAIN_SNAPSHOT_HAS_METADATA = 272,
REMOTE_PROC_CONNECT_LIST_ALL_DOMAINS = 273,
REMOTE_PROC_DOMAIN_LIST_ALL_SNAPSHOTS = 274,
REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_ALL_CHILDREN = 275,
REMOTE_PROC_DOMAIN_EVENT_BALLOON_CHANGE = 276,
REMOTE_PROC_DOMAIN_GET_HOSTNAME = 277,
REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL_LIST = 278,
REMOTE_PROC_DOMAIN_PIN_EMULATOR = 279,
REMOTE_PROC_DOMAIN_GET_EMULATOR_PIN_INFO = 280,
REMOTE_PROC_CONNECT_LIST_ALL_STORAGE_POOLS = 281,
REMOTE_PROC_STORAGE_POOL_LIST_ALL_VOLUMES = 282,
REMOTE_PROC_CONNECT_LIST_ALL_NETWORKS = 283,
REMOTE_PROC_CONNECT_LIST_ALL_INTERFACES = 284,
REMOTE_PROC_CONNECT_LIST_ALL_NODE_DEVICES = 285,
REMOTE_PROC_CONNECT_LIST_ALL_NWFILTERS = 286,
REMOTE_PROC_CONNECT_LIST_ALL_SECRETS = 287,
REMOTE_PROC_NODE_SET_MEMORY_PARAMETERS = 288,
REMOTE_PROC_NODE_GET_MEMORY_PARAMETERS = 289,
REMOTE_PROC_DOMAIN_BLOCK_COMMIT = 290,
REMOTE_PROC_NETWORK_UPDATE = 291,
REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND_DISK = 292,
REMOTE_PROC_NODE_GET_CPU_MAP = 293,
REMOTE_PROC_DOMAIN_FSTRIM = 294,
REMOTE_PROC_DOMAIN_SEND_PROCESS_SIGNAL = 295,
REMOTE_PROC_DOMAIN_OPEN_CHANNEL = 296,
REMOTE_PROC_NODE_DEVICE_LOOKUP_SCSI_HOST_BY_WWN = 297,
2013-01-30 09:49:28 +00:00
REMOTE_PROC_DOMAIN_GET_JOB_STATS = 298,
REMOTE_PROC_DOMAIN_MIGRATE_GET_COMPRESSION_CACHE = 299,
REMOTE_PROC_DOMAIN_MIGRATE_SET_COMPRESSION_CACHE = 300,
REMOTE_PROC_NODE_DEVICE_DETACH_FLAGS = 301,
REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3_PARAMS = 302,
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3_PARAMS = 303,
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3_PARAMS = 304,
REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3_PARAMS = 305,
REMOTE_PROC_DOMAIN_MIGRATE_FINISH3_PARAMS = 306,
REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3_PARAMS = 307,
REMOTE_PROC_DOMAIN_SET_MEMORY_STATS_PERIOD = 308,
REMOTE_PROC_DOMAIN_CREATE_XML_WITH_FILES = 309,
REMOTE_PROC_DOMAIN_CREATE_WITH_FILES = 310,
REMOTE_PROC_DOMAIN_EVENT_DEVICE_REMOVED = 311,
REMOTE_PROC_CONNECT_GET_CPU_MODEL_NAMES = 312,
REMOTE_PROC_CONNECT_NETWORK_EVENT_REGISTER_ANY = 313,
REMOTE_PROC_CONNECT_NETWORK_EVENT_DEREGISTER_ANY = 314,
REMOTE_PROC_NETWORK_EVENT_LIFECYCLE = 315,
event: server RPC protocol tweaks for domain lifecycle events This patch adds some new RPC call numbers, but for ease of review, they sit idle until a later patch adds the client counterpart to drive the new RPCs. Also for ease of review, I limited this patch to just the lifecycle event; although converting the remaining 15 domain events will be quite mechanical. On the server side, we have to have a function per RPC call, largely with duplicated bodies (the key difference being that we store in our callback opaque pointer whether events should be fired with old or new style); meanwhile, a single function can drive multiple RPC messages. With a strategic choice of XDR struct layout, we can make the event generation code for both styles fairly compact. I debated about adding a tri-state witness variable per connection (values 'unknown', 'legacy', 'modern'). It would start as 'unknown', move to 'legacy' if any RPC call is made to a legacy event call, and move to 'modern' if the feature probe is made; then the event code could issue an error if the witness state is incorrect (a legacy RPC call while in 'modern', a modern RPC call while in 'unknown' or 'legacy', and a feature probe while in 'legacy' or 'modern'). But while it might prevent odd behavior caused by protocol fuzzing, I don't see that it would prevent any security holes, so I considered it bloat. Note that sticking @acl markers on the new RPCs generates unused functions in access/viraccessapicheck.c, because there is no new API call that needs to use the new checks; however, having a consistent .x file is worth the dead code. * src/libvirt_internal.h (VIR_DRV_FEATURE_REMOTE_EVENT_CALLBACK): New feature. * src/remote/remote_protocol.x (REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_REGISTER_ANY) (REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_DEREGISTER_ANY) (REMOTE_PROC_DOMAIN_EVENT_CALLBACK_LIFECYCLE): New RPCs. * daemon/remote.c (daemonClientCallback): Add field. (remoteDispatchConnectDomainEventCallbackRegisterAny) (remoteDispatchConnectDomainEventCallbackDeregisterAny): New functions. (remoteDispatchConnectDomainEventRegisterAny) (remoteDispatchConnectDomainEventDeregisterAny): Mark legacy use. (remoteRelayDomainEventLifecycle): Change message based on legacy or new use. (remoteDispatchConnectSupportsFeature): Advertise new feature. * src/remote_protocol-structs: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-08 20:59:35 +00:00
REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_REGISTER_ANY = 316,
REMOTE_PROC_CONNECT_DOMAIN_EVENT_CALLBACK_DEREGISTER_ANY = 317,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_LIFECYCLE = 318,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_REBOOT = 319,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_RTC_CHANGE = 320,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_WATCHDOG = 321,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_IO_ERROR = 322,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_GRAPHICS = 323,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_IO_ERROR_REASON = 324,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_CONTROL_ERROR = 325,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_BLOCK_JOB = 326,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DISK_CHANGE = 327,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TRAY_CHANGE = 328,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMWAKEUP = 329,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMSUSPEND = 330,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_BALLOON_CHANGE = 331,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_PMSUSPEND_DISK = 332,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_REMOVED = 333,
REMOTE_PROC_DOMAIN_CORE_DUMP_WITH_FORMAT = 334,
REMOTE_PROC_DOMAIN_FSFREEZE = 335,
REMOTE_PROC_DOMAIN_FSTHAW = 336,
REMOTE_PROC_DOMAIN_GET_TIME = 337,
REMOTE_PROC_DOMAIN_SET_TIME = 338,
blockjob: use stable disk string in job event When the block job event was first added, it was for block pull, where the active layer of the disk remains the same name. It was also in a day where we only cared about local files, and so we always had a canonical absolute file name. But two things have changed since then: we now have network disks, where determining a single absolute string does not really make sense; and we have two-phase jobs (copy and active commit) where the name of the active layer changes between the first event (ready, on the old name) and second (complete, on the pivoted name). Adam Litke reported that having an unstable string between events makes life harder for clients. Furthermore, all of our API that operate on a particular disk of a domain accept multiple strings: not only the absolute name of the active layer, but also the destination device name (such as 'vda'). As this latter name is stable, even for network sources, it serves as a better string to supply in block job events. But backwards-compatibility demands that we should not change the name handed to users unless they explicitly request it. Therefore, this patch adds a new event, BLOCK_JOB_2 (alas, I couldn't think of any nicer name - but at least Migrate2 and Migrate3 are precedent for a number suffix). We must double up on emitting both old-style and new-style events according to what clients have registered for (see also how IOError and IOErrorReason emits double events, but there the difference was a larger struct rather than changed meaning of one of the struct members). Unfortunately, adding a new event isn't something that can easily be broken into pieces, so the commit is rather large. * include/libvirt/libvirt.h.in (virDomainEventID): Add a new id for VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2. (virConnectDomainEventBlockJobCallback): Document new semantics. * src/conf/domain_event.c (_virDomainEventBlockJob): Rename field, to ensure we catch all clients. (virDomainEventBlockJobNew): Add parameter. (virDomainEventBlockJobDispose) (virDomainEventBlockJobNewFromObj) (virDomainEventBlockJobNewFromDom) (virDomainEventDispatchDefaultFunc): Adjust clients. (virDomainEventBlockJob2NewFromObj) (virDomainEventBlockJob2NewFromDom): New functions. * src/conf/domain_event.h: Add new prototypes. * src/libvirt_private.syms (domain_event.h): Export new functions. * src/qemu/qemu_driver.c (qemuDomainBlockJobImpl): Generate two different events. * src/qemu/qemu_process.c (qemuProcessHandleBlockJob): Likewise. * src/remote/remote_protocol.x (remote_domain_event_block_job_2_msg): New struct. (REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_2): New RPC. * src/remote/remote_driver.c (remoteDomainBuildEventBlockJob2): New handler. (remoteEvents): Register new event. * daemon/remote.c (remoteRelayDomainEventBlockJob2): New handler. (domainEventCallbacks): Register new event. * tools/virsh-domain.c (vshEventCallbacks): Likewise. (vshEventBlockJobPrint): Adjust client. * src/remote_protocol-structs: Regenerate. Signed-off-by: Eric Blake <eblake@redhat.com>
2014-06-14 13:18:04 +00:00
REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB_2 = 339,
REMOTE_PROC_NODE_GET_FREE_PAGES = 340,
REMOTE_PROC_NETWORK_GET_DHCP_LEASES = 341,
REMOTE_PROC_CONNECT_GET_DOMAIN_CAPABILITIES = 342,
REMOTE_PROC_DOMAIN_OPEN_GRAPHICS_FD = 343,
REMOTE_PROC_CONNECT_GET_ALL_DOMAIN_STATS = 344,
REMOTE_PROC_DOMAIN_BLOCK_COPY = 345,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_TUNABLE = 346,
REMOTE_PROC_NODE_ALLOC_PAGES = 347,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_AGENT_LIFECYCLE = 348,
REMOTE_PROC_DOMAIN_GET_FSINFO = 349,
REMOTE_PROC_DOMAIN_DEFINE_XML_FLAGS = 350,
REMOTE_PROC_DOMAIN_GET_IOTHREAD_INFO = 351,
REMOTE_PROC_DOMAIN_PIN_IOTHREAD = 352,
REMOTE_PROC_DOMAIN_INTERFACE_ADDRESSES = 353,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_ADDED = 354,
REMOTE_PROC_DOMAIN_ADD_IOTHREAD = 355,
REMOTE_PROC_DOMAIN_DEL_IOTHREAD = 356,
REMOTE_PROC_DOMAIN_SET_USER_PASSWORD = 357,
REMOTE_PROC_DOMAIN_RENAME = 358,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_MIGRATION_ITERATION = 359,
REMOTE_PROC_CONNECT_REGISTER_CLOSE_CALLBACK = 360,
REMOTE_PROC_CONNECT_UNREGISTER_CLOSE_CALLBACK = 361,
REMOTE_PROC_CONNECT_EVENT_CONNECTION_CLOSED = 362,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_JOB_COMPLETED = 363,
REMOTE_PROC_DOMAIN_MIGRATE_START_POST_COPY = 364,
REMOTE_PROC_DOMAIN_GET_PERF_EVENTS = 365,
REMOTE_PROC_DOMAIN_SET_PERF_EVENTS = 366,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_DEVICE_REMOVAL_FAILED = 367,
REMOTE_PROC_CONNECT_STORAGE_POOL_EVENT_REGISTER_ANY = 368,
REMOTE_PROC_CONNECT_STORAGE_POOL_EVENT_DEREGISTER_ANY = 369,
REMOTE_PROC_STORAGE_POOL_EVENT_LIFECYCLE = 370,
REMOTE_PROC_DOMAIN_GET_GUEST_VCPUS = 371,
REMOTE_PROC_DOMAIN_SET_GUEST_VCPUS = 372,
REMOTE_PROC_STORAGE_POOL_EVENT_REFRESH = 373,
REMOTE_PROC_CONNECT_NODE_DEVICE_EVENT_REGISTER_ANY = 374,
REMOTE_PROC_CONNECT_NODE_DEVICE_EVENT_DEREGISTER_ANY = 375,
REMOTE_PROC_NODE_DEVICE_EVENT_LIFECYCLE = 376,
REMOTE_PROC_NODE_DEVICE_EVENT_UPDATE = 377,
REMOTE_PROC_STORAGE_VOL_GET_INFO_FLAGS = 378,
REMOTE_PROC_DOMAIN_EVENT_CALLBACK_METADATA_CHANGE = 379,
REMOTE_PROC_CONNECT_SECRET_EVENT_REGISTER_ANY = 380,
REMOTE_PROC_CONNECT_SECRET_EVENT_DEREGISTER_ANY = 381,
REMOTE_PROC_SECRET_EVENT_LIFECYCLE = 382,
REMOTE_PROC_SECRET_EVENT_VALUE_CHANGED = 383,
REMOTE_PROC_DOMAIN_SET_VCPU = 384,
REMOTE_PROC_DOMAIN_EVENT_BLOCK_THRESHOLD = 385,
REMOTE_PROC_DOMAIN_SET_BLOCK_THRESHOLD = 386,
REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_DOWNTIME = 387,
REMOTE_PROC_DOMAIN_MANAGED_SAVE_GET_XML_DESC = 388,
REMOTE_PROC_DOMAIN_MANAGED_SAVE_DEFINE_XML = 389,
REMOTE_PROC_DOMAIN_SET_LIFECYCLE_ACTION = 390,
REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_TARGET_PATH = 391,
REMOTE_PROC_DOMAIN_DETACH_DEVICE_ALIAS = 392,
REMOTE_PROC_CONNECT_COMPARE_HYPERVISOR_CPU = 393,
REMOTE_PROC_CONNECT_BASELINE_HYPERVISOR_CPU = 394,
REMOTE_PROC_NODE_GET_SEV_INFO = 395,
REMOTE_PROC_DOMAIN_GET_LAUNCH_SECURITY_INFO = 396,
REMOTE_PROC_NWFILTER_BINDING_LOOKUP_BY_PORT_DEV = 397,
REMOTE_PROC_NWFILTER_BINDING_GET_XML_DESC = 398,
REMOTE_PROC_NWFILTER_BINDING_CREATE_XML = 399,
REMOTE_PROC_NWFILTER_BINDING_DELETE = 400,
REMOTE_PROC_CONNECT_LIST_ALL_NWFILTER_BINDINGS = 401,
};