Looking at the libvirtd objects with pfunct I knoticed that the method remoteDispatchClientRequest in remote.c was unusually large size: 11497, variables: 169, inline expansions: 159 (5144 bytes) Listing variables present its clear why - for every RPC call, we have a pair of local variables declared for the structs for the reply and response. Following by a memset() call for every single one. Any single call to this method only processes one RPC call, so I figured we could collapse all these variables down into a single pair by using a union for all args, and a union for all replies. This patch does just that with the result that the method changes to: /* size: 1386, variables: 10, inline expansions: 4 (89 bytes) */ If you want to see details list of variables before and after results then run $ pfunct -f remoteDispatchClientRequest libvirtd-remote.o NB pfunct is in the 'dwarves' RPM, along with some other interesting tools like 'pahole' In doing this I noticed that the dispatch function is O(n) on the number of RPC calls we have defined. This isn't a serious bottleneck since 'n' isn't very large, but while doing the refactoring for the union stuf, it was easy enough to also change it to declare an array of all the dispatch methods, which could simply be indexed on the RPC call number. This changes it to O(1) time to dispatch. b/qemud/Makefile.am | 24 - b/qemud/remote.c | 61 +- b/qemud/remote_dispatch_args.h | 92 ++++ b/qemud/remote_dispatch_ret.h | 75 +++ b/qemud/remote_dispatch_table.h | 529 ++++++++++++++++++++++++ b/qemud/remote_generate_stubs.pl | 189 ++------ qemud/remote_dispatch_localvars.h | 163 ------- qemud/remote_dispatch_proc_switch.h | 793 ------------------------------------ 8 files changed, 809 insertions(+), 1117 deletions(-) Two existing generated files go away remote_dispatch_localvars.h (the huge list of local vars) remote_dispatch_proc_switch.h (the switch dispatch func) And 3 new generated files are added remote_dispatch_args.h (the union of args) remote_dispatch_ret.h (the union of replies) remote_dispatch_table.h (the array of dispatch functions) In reviewing this patch, the only hand-written code is in 'remote.c' and the 'remote_generate_stubs.pl', the rest is generated code from remote_generate_stubs.pl. Regards, Daniel diff --git a/qemud/Makefile.am b/qemud/Makefile.am --- a/qemud/Makefile.am +++ b/qemud/Makefile.am @@ -7,8 +7,9 @@ DAEMON_SOURCES = \ qemud.c qemud.h \ remote.c \ remote_dispatch_prototypes.h \ - remote_dispatch_localvars.h \ - remote_dispatch_proc_switch.h \ + remote_dispatch_table.h \ + remote_dispatch_args.h \ + remote_dispatch_ret.h \ remote_protocol.h remote_protocol.c \ $(srcdir)/../src/util-lib.c @@ -148,17 +149,22 @@ endif remote.c: remote_dispatch_prototypes.h \ - remote_dispatch_localvars.h \ - remote_dispatch_proc_switch.h + remote_dispatch_table.h \ + remote_dispatch_args.h \ + remote_dispatch_ret.h remote_dispatch_prototypes.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x - perl -w $(srcdir)/remote_generate_stubs.pl -i $(srcdir)/remote_protocol.x > $@ + perl -w $(srcdir)/remote_generate_stubs.pl -p $(srcdir)/remote_protocol.x > $@ -remote_dispatch_localvars.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x - perl -w $(srcdir)/remote_generate_stubs.pl -v $(srcdir)/remote_protocol.x > $@ +remote_dispatch_table.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x + perl -w $(srcdir)/remote_generate_stubs.pl -t $(srcdir)/remote_protocol.x > $@ -remote_dispatch_proc_switch.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x - perl -w $(srcdir)/remote_generate_stubs.pl -w $(srcdir)/remote_protocol.x > $@ +remote_dispatch_args.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x + perl -w $(srcdir)/remote_generate_stubs.pl -a $(srcdir)/remote_protocol.x > $@ + +remote_dispatch_ret.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x + perl -w $(srcdir)/remote_generate_stubs.pl -r $(srcdir)/remote_protocol.x > $@ + if LIBVIRT_INIT_SCRIPTS_RED_HAT install-init: libvirtd.init diff --git a/qemud/remote.c b/qemud/remote.c --- a/qemud/remote.c +++ b/qemud/remote.c @@ -69,11 +69,30 @@ static void make_nonnull_storage_vol (re #include "remote_dispatch_prototypes.h" +typedef union { +#include "remote_dispatch_args.h" +} dispatch_args; + +typedef union { +#include "remote_dispatch_ret.h" +} dispatch_ret; + + typedef int (*dispatch_fn) (struct qemud_server *server, struct qemud_client *client, remote_message_header *req, - char *args, - char *ret); + dispatch_args *args, + dispatch_ret *ret); + +typedef struct { + dispatch_fn fn; + xdrproc_t args_filter; + xdrproc_t ret_filter; +} dispatch_data; + +static const dispatch_data const dispatch_table[] = { +#include "remote_dispatch_table.h" +}; /* This function gets called from qemud when it detects an incoming * remote protocol message. At this point, client->buffer contains @@ -85,13 +104,13 @@ remoteDispatchClientRequest (struct qemu { XDR xdr; remote_message_header req, rep; - dispatch_fn fn; - xdrproc_t args_filter = (xdrproc_t) xdr_void; - xdrproc_t ret_filter = (xdrproc_t) xdr_void; - char *args = NULL, *ret = NULL; + dispatch_args args; + dispatch_ret ret; + const dispatch_data *data = NULL; int rv, len; -#include "remote_dispatch_localvars.h" + memset(&args, 0, sizeof args); + memset(&ret, 0, sizeof ret); /* Parse the header. */ xdrmem_create (&xdr, client->buffer, client->bufferLength, XDR_DECODE); @@ -146,31 +165,27 @@ remoteDispatchClientRequest (struct qemu } } - /* Based on the procedure number, dispatch. In future we may base - * this on the version number as well. - */ - switch (req.proc) { -#include "remote_dispatch_proc_switch.h" - - default: + if (req.proc >= ARRAY_CARDINALITY(dispatch_table) || + dispatch_table[req.proc].fn == NULL) { remoteDispatchError (client, &req, _("unknown procedure: %d"), req.proc); xdr_destroy (&xdr); return; } - /* Parse args. */ - if (!(*args_filter) (&xdr, args)) { + data = &(dispatch_table[req.proc]); + + /* De-serialize args off the wire */ + if (!((data->args_filter)(&xdr, &args))) { remoteDispatchError (client, &req, "%s", _("parse args failed")); xdr_destroy (&xdr); - return; } xdr_destroy (&xdr); /* Call function. */ - rv = fn (server, client, &req, args, ret); - xdr_free (args_filter, args); + rv = (data->fn)(server, client, &req, &args, &ret); + xdr_free (data->args_filter, (char*)&args); /* Dispatch function must return -2, -1 or 0. Anything else is * an internal error. @@ -201,25 +216,25 @@ remoteDispatchClientRequest (struct qemu if (!xdr_int (&xdr, &len)) { remoteDispatchError (client, &req, "%s", _("dummy length")); xdr_destroy (&xdr); - if (rv == 0) xdr_free (ret_filter, ret); + if (rv == 0) xdr_free (data->ret_filter, (char*)&ret); return; } if (!xdr_remote_message_header (&xdr, &rep)) { remoteDispatchError (client, &req, "%s", _("serialise reply header")); xdr_destroy (&xdr); - if (rv == 0) xdr_free (ret_filter, ret); + if (rv == 0) xdr_free (data->ret_filter, (char*)&ret); return; } /* If OK, serialise return structure, if error serialise error. */ if (rv == 0) { - if (!(*ret_filter) (&xdr, ret)) { + if (!((data->ret_filter) (&xdr, &ret))) { remoteDispatchError (client, &req, "%s", _("serialise return struct")); xdr_destroy (&xdr); return; } - xdr_free (ret_filter, ret); + xdr_free (data->ret_filter, (char*)&ret); } else /* error */ { virErrorPtr verr; remote_error error; diff --git a/qemud/remote_dispatch_args.h b/qemud/remote_dispatch_args.h new file mode 100644 --- /dev/null +++ b/qemud/remote_dispatch_args.h @@ -0,0 +1,92 @@ +/* Automatically generated by remote_generate_stubs.pl. + * Do not edit this file. Any changes you make will be lost. + */ + + remote_open_args val_remote_open_args; + remote_get_max_vcpus_args val_remote_get_max_vcpus_args; + remote_domain_attach_device_args val_remote_domain_attach_device_args; + remote_domain_create_args val_remote_domain_create_args; + remote_domain_create_linux_args val_remote_domain_create_linux_args; + remote_domain_define_xml_args val_remote_domain_define_xml_args; + remote_domain_destroy_args val_remote_domain_destroy_args; + remote_domain_detach_device_args val_remote_domain_detach_device_args; + remote_domain_dump_xml_args val_remote_domain_dump_xml_args; + remote_domain_get_autostart_args val_remote_domain_get_autostart_args; + remote_domain_get_info_args val_remote_domain_get_info_args; + remote_domain_get_max_memory_args val_remote_domain_get_max_memory_args; + remote_domain_get_max_vcpus_args val_remote_domain_get_max_vcpus_args; + remote_domain_get_os_type_args val_remote_domain_get_os_type_args; + remote_domain_get_vcpus_args val_remote_domain_get_vcpus_args; + remote_list_defined_domains_args val_remote_list_defined_domains_args; + remote_domain_lookup_by_id_args val_remote_domain_lookup_by_id_args; + remote_domain_lookup_by_name_args val_remote_domain_lookup_by_name_args; + remote_domain_lookup_by_uuid_args val_remote_domain_lookup_by_uuid_args; + remote_domain_pin_vcpu_args val_remote_domain_pin_vcpu_args; + remote_domain_reboot_args val_remote_domain_reboot_args; + remote_domain_resume_args val_remote_domain_resume_args; + remote_domain_set_autostart_args val_remote_domain_set_autostart_args; + remote_domain_set_max_memory_args val_remote_domain_set_max_memory_args; + remote_domain_set_memory_args val_remote_domain_set_memory_args; + remote_domain_set_vcpus_args val_remote_domain_set_vcpus_args; + remote_domain_shutdown_args val_remote_domain_shutdown_args; + remote_domain_suspend_args val_remote_domain_suspend_args; + remote_domain_undefine_args val_remote_domain_undefine_args; + remote_list_defined_networks_args val_remote_list_defined_networks_args; + remote_list_domains_args val_remote_list_domains_args; + remote_list_networks_args val_remote_list_networks_args; + remote_network_create_args val_remote_network_create_args; + remote_network_create_xml_args val_remote_network_create_xml_args; + remote_network_define_xml_args val_remote_network_define_xml_args; + remote_network_destroy_args val_remote_network_destroy_args; + remote_network_dump_xml_args val_remote_network_dump_xml_args; + remote_network_get_autostart_args val_remote_network_get_autostart_args; + remote_network_get_bridge_name_args val_remote_network_get_bridge_name_args; + remote_network_lookup_by_name_args val_remote_network_lookup_by_name_args; + remote_network_lookup_by_uuid_args val_remote_network_lookup_by_uuid_args; + remote_network_set_autostart_args val_remote_network_set_autostart_args; + remote_network_undefine_args val_remote_network_undefine_args; + remote_domain_core_dump_args val_remote_domain_core_dump_args; + remote_domain_restore_args val_remote_domain_restore_args; + remote_domain_save_args val_remote_domain_save_args; + remote_domain_get_scheduler_type_args val_remote_domain_get_scheduler_type_args; + remote_domain_get_scheduler_parameters_args val_remote_domain_get_scheduler_parameters_args; + remote_domain_set_scheduler_parameters_args val_remote_domain_set_scheduler_parameters_args; + remote_supports_feature_args val_remote_supports_feature_args; + remote_domain_migrate_prepare_args val_remote_domain_migrate_prepare_args; + remote_domain_migrate_perform_args val_remote_domain_migrate_perform_args; + remote_domain_migrate_finish_args val_remote_domain_migrate_finish_args; + remote_domain_block_stats_args val_remote_domain_block_stats_args; + remote_domain_interface_stats_args val_remote_domain_interface_stats_args; + remote_auth_sasl_start_args val_remote_auth_sasl_start_args; + remote_auth_sasl_step_args val_remote_auth_sasl_step_args; + remote_list_storage_pools_args val_remote_list_storage_pools_args; + remote_list_defined_storage_pools_args val_remote_list_defined_storage_pools_args; + remote_find_storage_pool_sources_args val_remote_find_storage_pool_sources_args; + remote_storage_pool_create_xml_args val_remote_storage_pool_create_xml_args; + remote_storage_pool_define_xml_args val_remote_storage_pool_define_xml_args; + remote_storage_pool_create_args val_remote_storage_pool_create_args; + remote_storage_pool_build_args val_remote_storage_pool_build_args; + remote_storage_pool_destroy_args val_remote_storage_pool_destroy_args; + remote_storage_pool_delete_args val_remote_storage_pool_delete_args; + remote_storage_pool_undefine_args val_remote_storage_pool_undefine_args; + remote_storage_pool_refresh_args val_remote_storage_pool_refresh_args; + remote_storage_pool_lookup_by_name_args val_remote_storage_pool_lookup_by_name_args; + remote_storage_pool_lookup_by_uuid_args val_remote_storage_pool_lookup_by_uuid_args; + remote_storage_pool_lookup_by_volume_args val_remote_storage_pool_lookup_by_volume_args; + remote_storage_pool_get_info_args val_remote_storage_pool_get_info_args; + remote_storage_pool_dump_xml_args val_remote_storage_pool_dump_xml_args; + remote_storage_pool_get_autostart_args val_remote_storage_pool_get_autostart_args; + remote_storage_pool_set_autostart_args val_remote_storage_pool_set_autostart_args; + remote_storage_pool_num_of_volumes_args val_remote_storage_pool_num_of_volumes_args; + remote_storage_pool_list_volumes_args val_remote_storage_pool_list_volumes_args; + remote_storage_vol_create_xml_args val_remote_storage_vol_create_xml_args; + remote_storage_vol_delete_args val_remote_storage_vol_delete_args; + remote_storage_vol_lookup_by_name_args val_remote_storage_vol_lookup_by_name_args; + remote_storage_vol_lookup_by_key_args val_remote_storage_vol_lookup_by_key_args; + remote_storage_vol_lookup_by_path_args val_remote_storage_vol_lookup_by_path_args; + remote_storage_vol_get_info_args val_remote_storage_vol_get_info_args; + remote_storage_vol_dump_xml_args val_remote_storage_vol_dump_xml_args; + remote_storage_vol_get_path_args val_remote_storage_vol_get_path_args; + remote_node_get_cells_free_memory_args val_remote_node_get_cells_free_memory_args; + remote_domain_block_peek_args val_remote_domain_block_peek_args; + remote_domain_memory_peek_args val_remote_domain_memory_peek_args; diff --git a/qemud/remote_dispatch_localvars.h b/qemud/remote_dispatch_localvars.h deleted file mode 100644 --- a/qemud/remote_dispatch_localvars.h +++ /dev/null @@ -1,163 +0,0 @@ -/* Automatically generated by remote_generate_stubs.pl. - * Do not edit this file. Any changes you make will be lost. - */ - -remote_domain_lookup_by_uuid_args lv_remote_domain_lookup_by_uuid_args; -remote_domain_lookup_by_uuid_ret lv_remote_domain_lookup_by_uuid_ret; -remote_storage_pool_list_volumes_args lv_remote_storage_pool_list_volumes_args; -remote_storage_pool_list_volumes_ret lv_remote_storage_pool_list_volumes_ret; -remote_domain_shutdown_args lv_remote_domain_shutdown_args; -remote_list_defined_domains_args lv_remote_list_defined_domains_args; -remote_list_defined_domains_ret lv_remote_list_defined_domains_ret; -remote_get_capabilities_ret lv_remote_get_capabilities_ret; -remote_storage_vol_create_xml_args lv_remote_storage_vol_create_xml_args; -remote_storage_vol_create_xml_ret lv_remote_storage_vol_create_xml_ret; -remote_domain_set_max_memory_args lv_remote_domain_set_max_memory_args; -remote_auth_sasl_init_ret lv_remote_auth_sasl_init_ret; -remote_domain_get_os_type_args lv_remote_domain_get_os_type_args; -remote_domain_get_os_type_ret lv_remote_domain_get_os_type_ret; -remote_domain_get_autostart_args lv_remote_domain_get_autostart_args; -remote_domain_get_autostart_ret lv_remote_domain_get_autostart_ret; -remote_domain_set_vcpus_args lv_remote_domain_set_vcpus_args; -remote_get_hostname_ret lv_remote_get_hostname_ret; -remote_network_undefine_args lv_remote_network_undefine_args; -remote_domain_create_args lv_remote_domain_create_args; -remote_network_destroy_args lv_remote_network_destroy_args; -remote_storage_vol_lookup_by_key_args lv_remote_storage_vol_lookup_by_key_args; -remote_storage_vol_lookup_by_key_ret lv_remote_storage_vol_lookup_by_key_ret; -remote_storage_pool_lookup_by_uuid_args lv_remote_storage_pool_lookup_by_uuid_args; -remote_storage_pool_lookup_by_uuid_ret lv_remote_storage_pool_lookup_by_uuid_ret; -remote_domain_pin_vcpu_args lv_remote_domain_pin_vcpu_args; -remote_list_defined_networks_args lv_remote_list_defined_networks_args; -remote_list_defined_networks_ret lv_remote_list_defined_networks_ret; -remote_network_create_xml_args lv_remote_network_create_xml_args; -remote_network_create_xml_ret lv_remote_network_create_xml_ret; -remote_open_args lv_remote_open_args; -remote_storage_pool_refresh_args lv_remote_storage_pool_refresh_args; -remote_storage_vol_lookup_by_path_args lv_remote_storage_vol_lookup_by_path_args; -remote_storage_vol_lookup_by_path_ret lv_remote_storage_vol_lookup_by_path_ret; -remote_list_domains_args lv_remote_list_domains_args; -remote_list_domains_ret lv_remote_list_domains_ret; -remote_network_define_xml_args lv_remote_network_define_xml_args; -remote_network_define_xml_ret lv_remote_network_define_xml_ret; -remote_get_type_ret lv_remote_get_type_ret; -remote_domain_block_peek_args lv_remote_domain_block_peek_args; -remote_domain_block_peek_ret lv_remote_domain_block_peek_ret; -remote_storage_vol_delete_args lv_remote_storage_vol_delete_args; -remote_network_dump_xml_args lv_remote_network_dump_xml_args; -remote_network_dump_xml_ret lv_remote_network_dump_xml_ret; -remote_domain_reboot_args lv_remote_domain_reboot_args; -remote_domain_set_memory_args lv_remote_domain_set_memory_args; -remote_storage_pool_destroy_args lv_remote_storage_pool_destroy_args; -remote_domain_set_scheduler_parameters_args lv_remote_domain_set_scheduler_parameters_args; -remote_auth_polkit_ret lv_remote_auth_polkit_ret; -remote_auth_sasl_start_args lv_remote_auth_sasl_start_args; -remote_auth_sasl_start_ret lv_remote_auth_sasl_start_ret; -remote_domain_interface_stats_args lv_remote_domain_interface_stats_args; -remote_domain_interface_stats_ret lv_remote_domain_interface_stats_ret; -remote_storage_pool_dump_xml_args lv_remote_storage_pool_dump_xml_args; -remote_storage_pool_dump_xml_ret lv_remote_storage_pool_dump_xml_ret; -remote_storage_pool_create_xml_args lv_remote_storage_pool_create_xml_args; -remote_storage_pool_create_xml_ret lv_remote_storage_pool_create_xml_ret; -remote_storage_pool_build_args lv_remote_storage_pool_build_args; -remote_storage_pool_delete_args lv_remote_storage_pool_delete_args; -remote_storage_pool_lookup_by_volume_args lv_remote_storage_pool_lookup_by_volume_args; -remote_storage_pool_lookup_by_volume_ret lv_remote_storage_pool_lookup_by_volume_ret; -remote_domain_get_max_vcpus_args lv_remote_domain_get_max_vcpus_args; -remote_domain_get_max_vcpus_ret lv_remote_domain_get_max_vcpus_ret; -remote_domain_get_info_args lv_remote_domain_get_info_args; -remote_domain_get_info_ret lv_remote_domain_get_info_ret; -remote_storage_pool_num_of_volumes_args lv_remote_storage_pool_num_of_volumes_args; -remote_storage_pool_num_of_volumes_ret lv_remote_storage_pool_num_of_volumes_ret; -remote_supports_feature_args lv_remote_supports_feature_args; -remote_supports_feature_ret lv_remote_supports_feature_ret; -remote_domain_lookup_by_name_args lv_remote_domain_lookup_by_name_args; -remote_domain_lookup_by_name_ret lv_remote_domain_lookup_by_name_ret; -remote_storage_pool_set_autostart_args lv_remote_storage_pool_set_autostart_args; -remote_domain_resume_args lv_remote_domain_resume_args; -remote_network_get_bridge_name_args lv_remote_network_get_bridge_name_args; -remote_network_get_bridge_name_ret lv_remote_network_get_bridge_name_ret; -remote_domain_destroy_args lv_remote_domain_destroy_args; -remote_find_storage_pool_sources_args lv_remote_find_storage_pool_sources_args; -remote_find_storage_pool_sources_ret lv_remote_find_storage_pool_sources_ret; -remote_auth_sasl_step_args lv_remote_auth_sasl_step_args; -remote_auth_sasl_step_ret lv_remote_auth_sasl_step_ret; -remote_domain_migrate_finish_args lv_remote_domain_migrate_finish_args; -remote_domain_migrate_finish_ret lv_remote_domain_migrate_finish_ret; -remote_domain_get_vcpus_args lv_remote_domain_get_vcpus_args; -remote_domain_get_vcpus_ret lv_remote_domain_get_vcpus_ret; -remote_domain_get_scheduler_parameters_args lv_remote_domain_get_scheduler_parameters_args; -remote_domain_get_scheduler_parameters_ret lv_remote_domain_get_scheduler_parameters_ret; -remote_node_get_info_ret lv_remote_node_get_info_ret; -remote_network_lookup_by_name_args lv_remote_network_lookup_by_name_args; -remote_network_lookup_by_name_ret lv_remote_network_lookup_by_name_ret; -remote_domain_memory_peek_args lv_remote_domain_memory_peek_args; -remote_domain_memory_peek_ret lv_remote_domain_memory_peek_ret; -remote_num_of_defined_domains_ret lv_remote_num_of_defined_domains_ret; -remote_domain_block_stats_args lv_remote_domain_block_stats_args; -remote_domain_block_stats_ret lv_remote_domain_block_stats_ret; -remote_domain_detach_device_args lv_remote_domain_detach_device_args; -remote_num_of_storage_pools_ret lv_remote_num_of_storage_pools_ret; -remote_domain_save_args lv_remote_domain_save_args; -remote_domain_migrate_prepare_args lv_remote_domain_migrate_prepare_args; -remote_domain_migrate_prepare_ret lv_remote_domain_migrate_prepare_ret; -remote_domain_create_xml_args lv_remote_domain_create_xml_args; -remote_domain_create_xml_ret lv_remote_domain_create_xml_ret; -remote_domain_undefine_args lv_remote_domain_undefine_args; -remote_node_get_cells_free_memory_args lv_remote_node_get_cells_free_memory_args; -remote_node_get_cells_free_memory_ret lv_remote_node_get_cells_free_memory_ret; -remote_domain_get_scheduler_type_args lv_remote_domain_get_scheduler_type_args; -remote_domain_get_scheduler_type_ret lv_remote_domain_get_scheduler_type_ret; -remote_get_version_ret lv_remote_get_version_ret; -remote_domain_suspend_args lv_remote_domain_suspend_args; -remote_storage_pool_lookup_by_name_args lv_remote_storage_pool_lookup_by_name_args; -remote_storage_pool_lookup_by_name_ret lv_remote_storage_pool_lookup_by_name_ret; -remote_network_set_autostart_args lv_remote_network_set_autostart_args; -remote_network_get_autostart_args lv_remote_network_get_autostart_args; -remote_network_get_autostart_ret lv_remote_network_get_autostart_ret; -remote_storage_pool_create_args lv_remote_storage_pool_create_args; -remote_auth_list_ret lv_remote_auth_list_ret; -remote_num_of_defined_storage_pools_ret lv_remote_num_of_defined_storage_pools_ret; -remote_domain_core_dump_args lv_remote_domain_core_dump_args; -remote_list_defined_storage_pools_args lv_remote_list_defined_storage_pools_args; -remote_list_defined_storage_pools_ret lv_remote_list_defined_storage_pools_ret; -remote_domain_get_max_memory_args lv_remote_domain_get_max_memory_args; -remote_domain_get_max_memory_ret lv_remote_domain_get_max_memory_ret; -remote_num_of_domains_ret lv_remote_num_of_domains_ret; -remote_list_networks_args lv_remote_list_networks_args; -remote_list_networks_ret lv_remote_list_networks_ret; -remote_storage_pool_undefine_args lv_remote_storage_pool_undefine_args; -remote_domain_set_autostart_args lv_remote_domain_set_autostart_args; -remote_storage_pool_get_autostart_args lv_remote_storage_pool_get_autostart_args; -remote_storage_pool_get_autostart_ret lv_remote_storage_pool_get_autostart_ret; -remote_node_get_free_memory_ret lv_remote_node_get_free_memory_ret; -remote_storage_vol_get_path_args lv_remote_storage_vol_get_path_args; -remote_storage_vol_get_path_ret lv_remote_storage_vol_get_path_ret; -remote_domain_lookup_by_id_args lv_remote_domain_lookup_by_id_args; -remote_domain_lookup_by_id_ret lv_remote_domain_lookup_by_id_ret; -remote_domain_attach_device_args lv_remote_domain_attach_device_args; -remote_num_of_networks_ret lv_remote_num_of_networks_ret; -remote_storage_pool_get_info_args lv_remote_storage_pool_get_info_args; -remote_storage_pool_get_info_ret lv_remote_storage_pool_get_info_ret; -remote_list_storage_pools_args lv_remote_list_storage_pools_args; -remote_list_storage_pools_ret lv_remote_list_storage_pools_ret; -remote_domain_restore_args lv_remote_domain_restore_args; -remote_network_create_args lv_remote_network_create_args; -remote_num_of_defined_networks_ret lv_remote_num_of_defined_networks_ret; -remote_storage_vol_lookup_by_name_args lv_remote_storage_vol_lookup_by_name_args; -remote_storage_vol_lookup_by_name_ret lv_remote_storage_vol_lookup_by_name_ret; -remote_storage_pool_define_xml_args lv_remote_storage_pool_define_xml_args; -remote_storage_pool_define_xml_ret lv_remote_storage_pool_define_xml_ret; -remote_network_lookup_by_uuid_args lv_remote_network_lookup_by_uuid_args; -remote_network_lookup_by_uuid_ret lv_remote_network_lookup_by_uuid_ret; -remote_storage_vol_get_info_args lv_remote_storage_vol_get_info_args; -remote_storage_vol_get_info_ret lv_remote_storage_vol_get_info_ret; -remote_domain_define_xml_args lv_remote_domain_define_xml_args; -remote_domain_define_xml_ret lv_remote_domain_define_xml_ret; -remote_storage_vol_dump_xml_args lv_remote_storage_vol_dump_xml_args; -remote_storage_vol_dump_xml_ret lv_remote_storage_vol_dump_xml_ret; -remote_domain_dump_xml_args lv_remote_domain_dump_xml_args; -remote_domain_dump_xml_ret lv_remote_domain_dump_xml_ret; -remote_get_max_vcpus_args lv_remote_get_max_vcpus_args; -remote_get_max_vcpus_ret lv_remote_get_max_vcpus_ret; -remote_domain_migrate_perform_args lv_remote_domain_migrate_perform_args; diff --git a/qemud/remote_dispatch_proc_switch.h b/qemud/remote_dispatch_proc_switch.h deleted file mode 100644 --- a/qemud/remote_dispatch_proc_switch.h +++ /dev/null @@ -1,793 +0,0 @@ -/* Automatically generated by remote_generate_stubs.pl. - * Do not edit this file. Any changes you make will be lost. - */ - -case REMOTE_PROC_AUTH_LIST: - fn = (dispatch_fn) remoteDispatchAuthList; - ret_filter = (xdrproc_t) xdr_remote_auth_list_ret; - ret = (char *) &lv_remote_auth_list_ret; - memset (&lv_remote_auth_list_ret, 0, sizeof lv_remote_auth_list_ret); - break; -case REMOTE_PROC_AUTH_POLKIT: - fn = (dispatch_fn) remoteDispatchAuthPolkit; - ret_filter = (xdrproc_t) xdr_remote_auth_polkit_ret; - ret = (char *) &lv_remote_auth_polkit_ret; - memset (&lv_remote_auth_polkit_ret, 0, sizeof lv_remote_auth_polkit_ret); - break; -case REMOTE_PROC_AUTH_SASL_INIT: - fn = (dispatch_fn) remoteDispatchAuthSaslInit; - ret_filter = (xdrproc_t) xdr_remote_auth_sasl_init_ret; - ret = (char *) &lv_remote_auth_sasl_init_ret; - memset (&lv_remote_auth_sasl_init_ret, 0, sizeof lv_remote_auth_sasl_init_ret); - break; -case REMOTE_PROC_AUTH_SASL_START: - fn = (dispatch_fn) remoteDispatchAuthSaslStart; - args_filter = (xdrproc_t) xdr_remote_auth_sasl_start_args; - args = (char *) &lv_remote_auth_sasl_start_args; - memset (&lv_remote_auth_sasl_start_args, 0, sizeof lv_remote_auth_sasl_start_args); - ret_filter = (xdrproc_t) xdr_remote_auth_sasl_start_ret; - ret = (char *) &lv_remote_auth_sasl_start_ret; - memset (&lv_remote_auth_sasl_start_ret, 0, sizeof lv_remote_auth_sasl_start_ret); - break; -case REMOTE_PROC_AUTH_SASL_STEP: - fn = (dispatch_fn) remoteDispatchAuthSaslStep; - args_filter = (xdrproc_t) xdr_remote_auth_sasl_step_args; - args = (char *) &lv_remote_auth_sasl_step_args; - memset (&lv_remote_auth_sasl_step_args, 0, sizeof lv_remote_auth_sasl_step_args); - ret_filter = (xdrproc_t) xdr_remote_auth_sasl_step_ret; - ret = (char *) &lv_remote_auth_sasl_step_ret; - memset (&lv_remote_auth_sasl_step_ret, 0, sizeof lv_remote_auth_sasl_step_ret); - break; -case REMOTE_PROC_CLOSE: - fn = (dispatch_fn) remoteDispatchClose; - break; -case REMOTE_PROC_DOMAIN_ATTACH_DEVICE: - fn = (dispatch_fn) remoteDispatchDomainAttachDevice; - args_filter = (xdrproc_t) xdr_remote_domain_attach_device_args; - args = (char *) &lv_remote_domain_attach_device_args; - memset (&lv_remote_domain_attach_device_args, 0, sizeof lv_remote_domain_attach_device_args); - break; -case REMOTE_PROC_DOMAIN_BLOCK_PEEK: - fn = (dispatch_fn) remoteDispatchDomainBlockPeek; - args_filter = (xdrproc_t) xdr_remote_domain_block_peek_args; - args = (char *) &lv_remote_domain_block_peek_args; - memset (&lv_remote_domain_block_peek_args, 0, sizeof lv_remote_domain_block_peek_args); - ret_filter = (xdrproc_t) xdr_remote_domain_block_peek_ret; - ret = (char *) &lv_remote_domain_block_peek_ret; - memset (&lv_remote_domain_block_peek_ret, 0, sizeof lv_remote_domain_block_peek_ret); - break; -case REMOTE_PROC_DOMAIN_BLOCK_STATS: - fn = (dispatch_fn) remoteDispatchDomainBlockStats; - args_filter = (xdrproc_t) xdr_remote_domain_block_stats_args; - args = (char *) &lv_remote_domain_block_stats_args; - memset (&lv_remote_domain_block_stats_args, 0, sizeof lv_remote_domain_block_stats_args); - ret_filter = (xdrproc_t) xdr_remote_domain_block_stats_ret; - ret = (char *) &lv_remote_domain_block_stats_ret; - memset (&lv_remote_domain_block_stats_ret, 0, sizeof lv_remote_domain_block_stats_ret); - break; -case REMOTE_PROC_DOMAIN_CORE_DUMP: - fn = (dispatch_fn) remoteDispatchDomainCoreDump; - args_filter = (xdrproc_t) xdr_remote_domain_core_dump_args; - args = (char *) &lv_remote_domain_core_dump_args; - memset (&lv_remote_domain_core_dump_args, 0, sizeof lv_remote_domain_core_dump_args); - break; -case REMOTE_PROC_DOMAIN_CREATE: - fn = (dispatch_fn) remoteDispatchDomainCreate; - args_filter = (xdrproc_t) xdr_remote_domain_create_args; - args = (char *) &lv_remote_domain_create_args; - memset (&lv_remote_domain_create_args, 0, sizeof lv_remote_domain_create_args); - break; -case REMOTE_PROC_DOMAIN_CREATE_XML: - fn = (dispatch_fn) remoteDispatchDomainCreateXml; - args_filter = (xdrproc_t) xdr_remote_domain_create_xml_args; - args = (char *) &lv_remote_domain_create_xml_args; - memset (&lv_remote_domain_create_xml_args, 0, sizeof lv_remote_domain_create_xml_args); - ret_filter = (xdrproc_t) xdr_remote_domain_create_xml_ret; - ret = (char *) &lv_remote_domain_create_xml_ret; - memset (&lv_remote_domain_create_xml_ret, 0, sizeof lv_remote_domain_create_xml_ret); - break; -case REMOTE_PROC_DOMAIN_DEFINE_XML: - fn = (dispatch_fn) remoteDispatchDomainDefineXml; - args_filter = (xdrproc_t) xdr_remote_domain_define_xml_args; - args = (char *) &lv_remote_domain_define_xml_args; - memset (&lv_remote_domain_define_xml_args, 0, sizeof lv_remote_domain_define_xml_args); - ret_filter = (xdrproc_t) xdr_remote_domain_define_xml_ret; - ret = (char *) &lv_remote_domain_define_xml_ret; - memset (&lv_remote_domain_define_xml_ret, 0, sizeof lv_remote_domain_define_xml_ret); - break; -case REMOTE_PROC_DOMAIN_DESTROY: - fn = (dispatch_fn) remoteDispatchDomainDestroy; - args_filter = (xdrproc_t) xdr_remote_domain_destroy_args; - args = (char *) &lv_remote_domain_destroy_args; - memset (&lv_remote_domain_destroy_args, 0, sizeof lv_remote_domain_destroy_args); - break; -case REMOTE_PROC_DOMAIN_DETACH_DEVICE: - fn = (dispatch_fn) remoteDispatchDomainDetachDevice; - args_filter = (xdrproc_t) xdr_remote_domain_detach_device_args; - args = (char *) &lv_remote_domain_detach_device_args; - memset (&lv_remote_domain_detach_device_args, 0, sizeof lv_remote_domain_detach_device_args); - break; -case REMOTE_PROC_DOMAIN_DUMP_XML: - fn = (dispatch_fn) remoteDispatchDomainDumpXml; - args_filter = (xdrproc_t) xdr_remote_domain_dump_xml_args; - args = (char *) &lv_remote_domain_dump_xml_args; - memset (&lv_remote_domain_dump_xml_args, 0, sizeof lv_remote_domain_dump_xml_args); - ret_filter = (xdrproc_t) xdr_remote_domain_dump_xml_ret; - ret = (char *) &lv_remote_domain_dump_xml_ret; - memset (&lv_remote_domain_dump_xml_ret, 0, sizeof lv_remote_domain_dump_xml_ret); - break; -case REMOTE_PROC_DOMAIN_GET_AUTOSTART: - fn = (dispatch_fn) remoteDispatchDomainGetAutostart; - args_filter = (xdrproc_t) xdr_remote_domain_get_autostart_args; - args = (char *) &lv_remote_domain_get_autostart_args; - memset (&lv_remote_domain_get_autostart_args, 0, sizeof lv_remote_domain_get_autostart_args); - ret_filter = (xdrproc_t) xdr_remote_domain_get_autostart_ret; - ret = (char *) &lv_remote_domain_get_autostart_ret; - memset (&lv_remote_domain_get_autostart_ret, 0, sizeof lv_remote_domain_get_autostart_ret); - break; -case REMOTE_PROC_DOMAIN_GET_INFO: - fn = (dispatch_fn) remoteDispatchDomainGetInfo; - args_filter = (xdrproc_t) xdr_remote_domain_get_info_args; - args = (char *) &lv_remote_domain_get_info_args; - memset (&lv_remote_domain_get_info_args, 0, sizeof lv_remote_domain_get_info_args); - ret_filter = (xdrproc_t) xdr_remote_domain_get_info_ret; - ret = (char *) &lv_remote_domain_get_info_ret; - memset (&lv_remote_domain_get_info_ret, 0, sizeof lv_remote_domain_get_info_ret); - break; -case REMOTE_PROC_DOMAIN_GET_MAX_MEMORY: - fn = (dispatch_fn) remoteDispatchDomainGetMaxMemory; - args_filter = (xdrproc_t) xdr_remote_domain_get_max_memory_args; - args = (char *) &lv_remote_domain_get_max_memory_args; - memset (&lv_remote_domain_get_max_memory_args, 0, sizeof lv_remote_domain_get_max_memory_args); - ret_filter = (xdrproc_t) xdr_remote_domain_get_max_memory_ret; - ret = (char *) &lv_remote_domain_get_max_memory_ret; - memset (&lv_remote_domain_get_max_memory_ret, 0, sizeof lv_remote_domain_get_max_memory_ret); - break; -case REMOTE_PROC_DOMAIN_GET_MAX_VCPUS: - fn = (dispatch_fn) remoteDispatchDomainGetMaxVcpus; - args_filter = (xdrproc_t) xdr_remote_domain_get_max_vcpus_args; - args = (char *) &lv_remote_domain_get_max_vcpus_args; - memset (&lv_remote_domain_get_max_vcpus_args, 0, sizeof lv_remote_domain_get_max_vcpus_args); - ret_filter = (xdrproc_t) xdr_remote_domain_get_max_vcpus_ret; - ret = (char *) &lv_remote_domain_get_max_vcpus_ret; - memset (&lv_remote_domain_get_max_vcpus_ret, 0, sizeof lv_remote_domain_get_max_vcpus_ret); - break; -case REMOTE_PROC_DOMAIN_GET_OS_TYPE: - fn = (dispatch_fn) remoteDispatchDomainGetOsType; - args_filter = (xdrproc_t) xdr_remote_domain_get_os_type_args; - args = (char *) &lv_remote_domain_get_os_type_args; - memset (&lv_remote_domain_get_os_type_args, 0, sizeof lv_remote_domain_get_os_type_args); - ret_filter = (xdrproc_t) xdr_remote_domain_get_os_type_ret; - ret = (char *) &lv_remote_domain_get_os_type_ret; - memset (&lv_remote_domain_get_os_type_ret, 0, sizeof lv_remote_domain_get_os_type_ret); - break; -case REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS: - fn = (dispatch_fn) remoteDispatchDomainGetSchedulerParameters; - args_filter = (xdrproc_t) xdr_remote_domain_get_scheduler_parameters_args; - args = (char *) &lv_remote_domain_get_scheduler_parameters_args; - memset (&lv_remote_domain_get_scheduler_parameters_args, 0, sizeof lv_remote_domain_get_scheduler_parameters_args); - ret_filter = (xdrproc_t) xdr_remote_domain_get_scheduler_parameters_ret; - ret = (char *) &lv_remote_domain_get_scheduler_parameters_ret; - memset (&lv_remote_domain_get_scheduler_parameters_ret, 0, sizeof lv_remote_domain_get_scheduler_parameters_ret); - break; -case REMOTE_PROC_DOMAIN_GET_SCHEDULER_TYPE: - fn = (dispatch_fn) remoteDispatchDomainGetSchedulerType; - args_filter = (xdrproc_t) xdr_remote_domain_get_scheduler_type_args; - args = (char *) &lv_remote_domain_get_scheduler_type_args; - memset (&lv_remote_domain_get_scheduler_type_args, 0, sizeof lv_remote_domain_get_scheduler_type_args); - ret_filter = (xdrproc_t) xdr_remote_domain_get_scheduler_type_ret; - ret = (char *) &lv_remote_domain_get_scheduler_type_ret; - memset (&lv_remote_domain_get_scheduler_type_ret, 0, sizeof lv_remote_domain_get_scheduler_type_ret); - break; -case REMOTE_PROC_DOMAIN_GET_VCPUS: - fn = (dispatch_fn) remoteDispatchDomainGetVcpus; - args_filter = (xdrproc_t) xdr_remote_domain_get_vcpus_args; - args = (char *) &lv_remote_domain_get_vcpus_args; - memset (&lv_remote_domain_get_vcpus_args, 0, sizeof lv_remote_domain_get_vcpus_args); - ret_filter = (xdrproc_t) xdr_remote_domain_get_vcpus_ret; - ret = (char *) &lv_remote_domain_get_vcpus_ret; - memset (&lv_remote_domain_get_vcpus_ret, 0, sizeof lv_remote_domain_get_vcpus_ret); - break; -case REMOTE_PROC_DOMAIN_INTERFACE_STATS: - fn = (dispatch_fn) remoteDispatchDomainInterfaceStats; - args_filter = (xdrproc_t) xdr_remote_domain_interface_stats_args; - args = (char *) &lv_remote_domain_interface_stats_args; - memset (&lv_remote_domain_interface_stats_args, 0, sizeof lv_remote_domain_interface_stats_args); - ret_filter = (xdrproc_t) xdr_remote_domain_interface_stats_ret; - ret = (char *) &lv_remote_domain_interface_stats_ret; - memset (&lv_remote_domain_interface_stats_ret, 0, sizeof lv_remote_domain_interface_stats_ret); - break; -case REMOTE_PROC_DOMAIN_LOOKUP_BY_ID: - fn = (dispatch_fn) remoteDispatchDomainLookupById; - args_filter = (xdrproc_t) xdr_remote_domain_lookup_by_id_args; - args = (char *) &lv_remote_domain_lookup_by_id_args; - memset (&lv_remote_domain_lookup_by_id_args, 0, sizeof lv_remote_domain_lookup_by_id_args); - ret_filter = (xdrproc_t) xdr_remote_domain_lookup_by_id_ret; - ret = (char *) &lv_remote_domain_lookup_by_id_ret; - memset (&lv_remote_domain_lookup_by_id_ret, 0, sizeof lv_remote_domain_lookup_by_id_ret); - break; -case REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME: - fn = (dispatch_fn) remoteDispatchDomainLookupByName; - args_filter = (xdrproc_t) xdr_remote_domain_lookup_by_name_args; - args = (char *) &lv_remote_domain_lookup_by_name_args; - memset (&lv_remote_domain_lookup_by_name_args, 0, sizeof lv_remote_domain_lookup_by_name_args); - ret_filter = (xdrproc_t) xdr_remote_domain_lookup_by_name_ret; - ret = (char *) &lv_remote_domain_lookup_by_name_ret; - memset (&lv_remote_domain_lookup_by_name_ret, 0, sizeof lv_remote_domain_lookup_by_name_ret); - break; -case REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID: - fn = (dispatch_fn) remoteDispatchDomainLookupByUuid; - args_filter = (xdrproc_t) xdr_remote_domain_lookup_by_uuid_args; - args = (char *) &lv_remote_domain_lookup_by_uuid_args; - memset (&lv_remote_domain_lookup_by_uuid_args, 0, sizeof lv_remote_domain_lookup_by_uuid_args); - ret_filter = (xdrproc_t) xdr_remote_domain_lookup_by_uuid_ret; - ret = (char *) &lv_remote_domain_lookup_by_uuid_ret; - memset (&lv_remote_domain_lookup_by_uuid_ret, 0, sizeof lv_remote_domain_lookup_by_uuid_ret); - break; -case REMOTE_PROC_DOMAIN_MEMORY_PEEK: - fn = (dispatch_fn) remoteDispatchDomainMemoryPeek; - args_filter = (xdrproc_t) xdr_remote_domain_memory_peek_args; - args = (char *) &lv_remote_domain_memory_peek_args; - memset (&lv_remote_domain_memory_peek_args, 0, sizeof lv_remote_domain_memory_peek_args); - ret_filter = (xdrproc_t) xdr_remote_domain_memory_peek_ret; - ret = (char *) &lv_remote_domain_memory_peek_ret; - memset (&lv_remote_domain_memory_peek_ret, 0, sizeof lv_remote_domain_memory_peek_ret); - break; -case REMOTE_PROC_DOMAIN_MIGRATE_FINISH: - fn = (dispatch_fn) remoteDispatchDomainMigrateFinish; - args_filter = (xdrproc_t) xdr_remote_domain_migrate_finish_args; - args = (char *) &lv_remote_domain_migrate_finish_args; - memset (&lv_remote_domain_migrate_finish_args, 0, sizeof lv_remote_domain_migrate_finish_args); - ret_filter = (xdrproc_t) xdr_remote_domain_migrate_finish_ret; - ret = (char *) &lv_remote_domain_migrate_finish_ret; - memset (&lv_remote_domain_migrate_finish_ret, 0, sizeof lv_remote_domain_migrate_finish_ret); - break; -case REMOTE_PROC_DOMAIN_MIGRATE_PERFORM: - fn = (dispatch_fn) remoteDispatchDomainMigratePerform; - args_filter = (xdrproc_t) xdr_remote_domain_migrate_perform_args; - args = (char *) &lv_remote_domain_migrate_perform_args; - memset (&lv_remote_domain_migrate_perform_args, 0, sizeof lv_remote_domain_migrate_perform_args); - break; -case REMOTE_PROC_DOMAIN_MIGRATE_PREPARE: - fn = (dispatch_fn) remoteDispatchDomainMigratePrepare; - args_filter = (xdrproc_t) xdr_remote_domain_migrate_prepare_args; - args = (char *) &lv_remote_domain_migrate_prepare_args; - memset (&lv_remote_domain_migrate_prepare_args, 0, sizeof lv_remote_domain_migrate_prepare_args); - ret_filter = (xdrproc_t) xdr_remote_domain_migrate_prepare_ret; - ret = (char *) &lv_remote_domain_migrate_prepare_ret; - memset (&lv_remote_domain_migrate_prepare_ret, 0, sizeof lv_remote_domain_migrate_prepare_ret); - break; -case REMOTE_PROC_DOMAIN_PIN_VCPU: - fn = (dispatch_fn) remoteDispatchDomainPinVcpu; - args_filter = (xdrproc_t) xdr_remote_domain_pin_vcpu_args; - args = (char *) &lv_remote_domain_pin_vcpu_args; - memset (&lv_remote_domain_pin_vcpu_args, 0, sizeof lv_remote_domain_pin_vcpu_args); - break; -case REMOTE_PROC_DOMAIN_REBOOT: - fn = (dispatch_fn) remoteDispatchDomainReboot; - args_filter = (xdrproc_t) xdr_remote_domain_reboot_args; - args = (char *) &lv_remote_domain_reboot_args; - memset (&lv_remote_domain_reboot_args, 0, sizeof lv_remote_domain_reboot_args); - break; -case REMOTE_PROC_DOMAIN_RESTORE: - fn = (dispatch_fn) remoteDispatchDomainRestore; - args_filter = (xdrproc_t) xdr_remote_domain_restore_args; - args = (char *) &lv_remote_domain_restore_args; - memset (&lv_remote_domain_restore_args, 0, sizeof lv_remote_domain_restore_args); - break; -case REMOTE_PROC_DOMAIN_RESUME: - fn = (dispatch_fn) remoteDispatchDomainResume; - args_filter = (xdrproc_t) xdr_remote_domain_resume_args; - args = (char *) &lv_remote_domain_resume_args; - memset (&lv_remote_domain_resume_args, 0, sizeof lv_remote_domain_resume_args); - break; -case REMOTE_PROC_DOMAIN_SAVE: - fn = (dispatch_fn) remoteDispatchDomainSave; - args_filter = (xdrproc_t) xdr_remote_domain_save_args; - args = (char *) &lv_remote_domain_save_args; - memset (&lv_remote_domain_save_args, 0, sizeof lv_remote_domain_save_args); - break; -case REMOTE_PROC_DOMAIN_SET_AUTOSTART: - fn = (dispatch_fn) remoteDispatchDomainSetAutostart; - args_filter = (xdrproc_t) xdr_remote_domain_set_autostart_args; - args = (char *) &lv_remote_domain_set_autostart_args; - memset (&lv_remote_domain_set_autostart_args, 0, sizeof lv_remote_domain_set_autostart_args); - break; -case REMOTE_PROC_DOMAIN_SET_MAX_MEMORY: - fn = (dispatch_fn) remoteDispatchDomainSetMaxMemory; - args_filter = (xdrproc_t) xdr_remote_domain_set_max_memory_args; - args = (char *) &lv_remote_domain_set_max_memory_args; - memset (&lv_remote_domain_set_max_memory_args, 0, sizeof lv_remote_domain_set_max_memory_args); - break; -case REMOTE_PROC_DOMAIN_SET_MEMORY: - fn = (dispatch_fn) remoteDispatchDomainSetMemory; - args_filter = (xdrproc_t) xdr_remote_domain_set_memory_args; - args = (char *) &lv_remote_domain_set_memory_args; - memset (&lv_remote_domain_set_memory_args, 0, sizeof lv_remote_domain_set_memory_args); - break; -case REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS: - fn = (dispatch_fn) remoteDispatchDomainSetSchedulerParameters; - args_filter = (xdrproc_t) xdr_remote_domain_set_scheduler_parameters_args; - args = (char *) &lv_remote_domain_set_scheduler_parameters_args; - memset (&lv_remote_domain_set_scheduler_parameters_args, 0, sizeof lv_remote_domain_set_scheduler_parameters_args); - break; -case REMOTE_PROC_DOMAIN_SET_VCPUS: - fn = (dispatch_fn) remoteDispatchDomainSetVcpus; - args_filter = (xdrproc_t) xdr_remote_domain_set_vcpus_args; - args = (char *) &lv_remote_domain_set_vcpus_args; - memset (&lv_remote_domain_set_vcpus_args, 0, sizeof lv_remote_domain_set_vcpus_args); - break; -case REMOTE_PROC_DOMAIN_SHUTDOWN: - fn = (dispatch_fn) remoteDispatchDomainShutdown; - args_filter = (xdrproc_t) xdr_remote_domain_shutdown_args; - args = (char *) &lv_remote_domain_shutdown_args; - memset (&lv_remote_domain_shutdown_args, 0, sizeof lv_remote_domain_shutdown_args); - break; -case REMOTE_PROC_DOMAIN_SUSPEND: - fn = (dispatch_fn) remoteDispatchDomainSuspend; - args_filter = (xdrproc_t) xdr_remote_domain_suspend_args; - args = (char *) &lv_remote_domain_suspend_args; - memset (&lv_remote_domain_suspend_args, 0, sizeof lv_remote_domain_suspend_args); - break; -case REMOTE_PROC_DOMAIN_UNDEFINE: - fn = (dispatch_fn) remoteDispatchDomainUndefine; - args_filter = (xdrproc_t) xdr_remote_domain_undefine_args; - args = (char *) &lv_remote_domain_undefine_args; - memset (&lv_remote_domain_undefine_args, 0, sizeof lv_remote_domain_undefine_args); - break; -case REMOTE_PROC_FIND_STORAGE_POOL_SOURCES: - fn = (dispatch_fn) remoteDispatchFindStoragePoolSources; - args_filter = (xdrproc_t) xdr_remote_find_storage_pool_sources_args; - args = (char *) &lv_remote_find_storage_pool_sources_args; - memset (&lv_remote_find_storage_pool_sources_args, 0, sizeof lv_remote_find_storage_pool_sources_args); - ret_filter = (xdrproc_t) xdr_remote_find_storage_pool_sources_ret; - ret = (char *) &lv_remote_find_storage_pool_sources_ret; - memset (&lv_remote_find_storage_pool_sources_ret, 0, sizeof lv_remote_find_storage_pool_sources_ret); - break; -case REMOTE_PROC_GET_CAPABILITIES: - fn = (dispatch_fn) remoteDispatchGetCapabilities; - ret_filter = (xdrproc_t) xdr_remote_get_capabilities_ret; - ret = (char *) &lv_remote_get_capabilities_ret; - memset (&lv_remote_get_capabilities_ret, 0, sizeof lv_remote_get_capabilities_ret); - break; -case REMOTE_PROC_GET_HOSTNAME: - fn = (dispatch_fn) remoteDispatchGetHostname; - ret_filter = (xdrproc_t) xdr_remote_get_hostname_ret; - ret = (char *) &lv_remote_get_hostname_ret; - memset (&lv_remote_get_hostname_ret, 0, sizeof lv_remote_get_hostname_ret); - break; -case REMOTE_PROC_GET_MAX_VCPUS: - fn = (dispatch_fn) remoteDispatchGetMaxVcpus; - args_filter = (xdrproc_t) xdr_remote_get_max_vcpus_args; - args = (char *) &lv_remote_get_max_vcpus_args; - memset (&lv_remote_get_max_vcpus_args, 0, sizeof lv_remote_get_max_vcpus_args); - ret_filter = (xdrproc_t) xdr_remote_get_max_vcpus_ret; - ret = (char *) &lv_remote_get_max_vcpus_ret; - memset (&lv_remote_get_max_vcpus_ret, 0, sizeof lv_remote_get_max_vcpus_ret); - break; -case REMOTE_PROC_GET_TYPE: - fn = (dispatch_fn) remoteDispatchGetType; - ret_filter = (xdrproc_t) xdr_remote_get_type_ret; - ret = (char *) &lv_remote_get_type_ret; - memset (&lv_remote_get_type_ret, 0, sizeof lv_remote_get_type_ret); - break; -case REMOTE_PROC_GET_VERSION: - fn = (dispatch_fn) remoteDispatchGetVersion; - ret_filter = (xdrproc_t) xdr_remote_get_version_ret; - ret = (char *) &lv_remote_get_version_ret; - memset (&lv_remote_get_version_ret, 0, sizeof lv_remote_get_version_ret); - break; -case REMOTE_PROC_LIST_DEFINED_DOMAINS: - fn = (dispatch_fn) remoteDispatchListDefinedDomains; - args_filter = (xdrproc_t) xdr_remote_list_defined_domains_args; - args = (char *) &lv_remote_list_defined_domains_args; - memset (&lv_remote_list_defined_domains_args, 0, sizeof lv_remote_list_defined_domains_args); - ret_filter = (xdrproc_t) xdr_remote_list_defined_domains_ret; - ret = (char *) &lv_remote_list_defined_domains_ret; - memset (&lv_remote_list_defined_domains_ret, 0, sizeof lv_remote_list_defined_domains_ret); - break; -case REMOTE_PROC_LIST_DEFINED_NETWORKS: - fn = (dispatch_fn) remoteDispatchListDefinedNetworks; - args_filter = (xdrproc_t) xdr_remote_list_defined_networks_args; - args = (char *) &lv_remote_list_defined_networks_args; - memset (&lv_remote_list_defined_networks_args, 0, sizeof lv_remote_list_defined_networks_args); - ret_filter = (xdrproc_t) xdr_remote_list_defined_networks_ret; - ret = (char *) &lv_remote_list_defined_networks_ret; - memset (&lv_remote_list_defined_networks_ret, 0, sizeof lv_remote_list_defined_networks_ret); - break; -case REMOTE_PROC_LIST_DEFINED_STORAGE_POOLS: - fn = (dispatch_fn) remoteDispatchListDefinedStoragePools; - args_filter = (xdrproc_t) xdr_remote_list_defined_storage_pools_args; - args = (char *) &lv_remote_list_defined_storage_pools_args; - memset (&lv_remote_list_defined_storage_pools_args, 0, sizeof lv_remote_list_defined_storage_pools_args); - ret_filter = (xdrproc_t) xdr_remote_list_defined_storage_pools_ret; - ret = (char *) &lv_remote_list_defined_storage_pools_ret; - memset (&lv_remote_list_defined_storage_pools_ret, 0, sizeof lv_remote_list_defined_storage_pools_ret); - break; -case REMOTE_PROC_LIST_DOMAINS: - fn = (dispatch_fn) remoteDispatchListDomains; - args_filter = (xdrproc_t) xdr_remote_list_domains_args; - args = (char *) &lv_remote_list_domains_args; - memset (&lv_remote_list_domains_args, 0, sizeof lv_remote_list_domains_args); - ret_filter = (xdrproc_t) xdr_remote_list_domains_ret; - ret = (char *) &lv_remote_list_domains_ret; - memset (&lv_remote_list_domains_ret, 0, sizeof lv_remote_list_domains_ret); - break; -case REMOTE_PROC_LIST_NETWORKS: - fn = (dispatch_fn) remoteDispatchListNetworks; - args_filter = (xdrproc_t) xdr_remote_list_networks_args; - args = (char *) &lv_remote_list_networks_args; - memset (&lv_remote_list_networks_args, 0, sizeof lv_remote_list_networks_args); - ret_filter = (xdrproc_t) xdr_remote_list_networks_ret; - ret = (char *) &lv_remote_list_networks_ret; - memset (&lv_remote_list_networks_ret, 0, sizeof lv_remote_list_networks_ret); - break; -case REMOTE_PROC_LIST_STORAGE_POOLS: - fn = (dispatch_fn) remoteDispatchListStoragePools; - args_filter = (xdrproc_t) xdr_remote_list_storage_pools_args; - args = (char *) &lv_remote_list_storage_pools_args; - memset (&lv_remote_list_storage_pools_args, 0, sizeof lv_remote_list_storage_pools_args); - ret_filter = (xdrproc_t) xdr_remote_list_storage_pools_ret; - ret = (char *) &lv_remote_list_storage_pools_ret; - memset (&lv_remote_list_storage_pools_ret, 0, sizeof lv_remote_list_storage_pools_ret); - break; -case REMOTE_PROC_NETWORK_CREATE: - fn = (dispatch_fn) remoteDispatchNetworkCreate; - args_filter = (xdrproc_t) xdr_remote_network_create_args; - args = (char *) &lv_remote_network_create_args; - memset (&lv_remote_network_create_args, 0, sizeof lv_remote_network_create_args); - break; -case REMOTE_PROC_NETWORK_CREATE_XML: - fn = (dispatch_fn) remoteDispatchNetworkCreateXml; - args_filter = (xdrproc_t) xdr_remote_network_create_xml_args; - args = (char *) &lv_remote_network_create_xml_args; - memset (&lv_remote_network_create_xml_args, 0, sizeof lv_remote_network_create_xml_args); - ret_filter = (xdrproc_t) xdr_remote_network_create_xml_ret; - ret = (char *) &lv_remote_network_create_xml_ret; - memset (&lv_remote_network_create_xml_ret, 0, sizeof lv_remote_network_create_xml_ret); - break; -case REMOTE_PROC_NETWORK_DEFINE_XML: - fn = (dispatch_fn) remoteDispatchNetworkDefineXml; - args_filter = (xdrproc_t) xdr_remote_network_define_xml_args; - args = (char *) &lv_remote_network_define_xml_args; - memset (&lv_remote_network_define_xml_args, 0, sizeof lv_remote_network_define_xml_args); - ret_filter = (xdrproc_t) xdr_remote_network_define_xml_ret; - ret = (char *) &lv_remote_network_define_xml_ret; - memset (&lv_remote_network_define_xml_ret, 0, sizeof lv_remote_network_define_xml_ret); - break; -case REMOTE_PROC_NETWORK_DESTROY: - fn = (dispatch_fn) remoteDispatchNetworkDestroy; - args_filter = (xdrproc_t) xdr_remote_network_destroy_args; - args = (char *) &lv_remote_network_destroy_args; - memset (&lv_remote_network_destroy_args, 0, sizeof lv_remote_network_destroy_args); - break; -case REMOTE_PROC_NETWORK_DUMP_XML: - fn = (dispatch_fn) remoteDispatchNetworkDumpXml; - args_filter = (xdrproc_t) xdr_remote_network_dump_xml_args; - args = (char *) &lv_remote_network_dump_xml_args; - memset (&lv_remote_network_dump_xml_args, 0, sizeof lv_remote_network_dump_xml_args); - ret_filter = (xdrproc_t) xdr_remote_network_dump_xml_ret; - ret = (char *) &lv_remote_network_dump_xml_ret; - memset (&lv_remote_network_dump_xml_ret, 0, sizeof lv_remote_network_dump_xml_ret); - break; -case REMOTE_PROC_NETWORK_GET_AUTOSTART: - fn = (dispatch_fn) remoteDispatchNetworkGetAutostart; - args_filter = (xdrproc_t) xdr_remote_network_get_autostart_args; - args = (char *) &lv_remote_network_get_autostart_args; - memset (&lv_remote_network_get_autostart_args, 0, sizeof lv_remote_network_get_autostart_args); - ret_filter = (xdrproc_t) xdr_remote_network_get_autostart_ret; - ret = (char *) &lv_remote_network_get_autostart_ret; - memset (&lv_remote_network_get_autostart_ret, 0, sizeof lv_remote_network_get_autostart_ret); - break; -case REMOTE_PROC_NETWORK_GET_BRIDGE_NAME: - fn = (dispatch_fn) remoteDispatchNetworkGetBridgeName; - args_filter = (xdrproc_t) xdr_remote_network_get_bridge_name_args; - args = (char *) &lv_remote_network_get_bridge_name_args; - memset (&lv_remote_network_get_bridge_name_args, 0, sizeof lv_remote_network_get_bridge_name_args); - ret_filter = (xdrproc_t) xdr_remote_network_get_bridge_name_ret; - ret = (char *) &lv_remote_network_get_bridge_name_ret; - memset (&lv_remote_network_get_bridge_name_ret, 0, sizeof lv_remote_network_get_bridge_name_ret); - break; -case REMOTE_PROC_NETWORK_LOOKUP_BY_NAME: - fn = (dispatch_fn) remoteDispatchNetworkLookupByName; - args_filter = (xdrproc_t) xdr_remote_network_lookup_by_name_args; - args = (char *) &lv_remote_network_lookup_by_name_args; - memset (&lv_remote_network_lookup_by_name_args, 0, sizeof lv_remote_network_lookup_by_name_args); - ret_filter = (xdrproc_t) xdr_remote_network_lookup_by_name_ret; - ret = (char *) &lv_remote_network_lookup_by_name_ret; - memset (&lv_remote_network_lookup_by_name_ret, 0, sizeof lv_remote_network_lookup_by_name_ret); - break; -case REMOTE_PROC_NETWORK_LOOKUP_BY_UUID: - fn = (dispatch_fn) remoteDispatchNetworkLookupByUuid; - args_filter = (xdrproc_t) xdr_remote_network_lookup_by_uuid_args; - args = (char *) &lv_remote_network_lookup_by_uuid_args; - memset (&lv_remote_network_lookup_by_uuid_args, 0, sizeof lv_remote_network_lookup_by_uuid_args); - ret_filter = (xdrproc_t) xdr_remote_network_lookup_by_uuid_ret; - ret = (char *) &lv_remote_network_lookup_by_uuid_ret; - memset (&lv_remote_network_lookup_by_uuid_ret, 0, sizeof lv_remote_network_lookup_by_uuid_ret); - break; -case REMOTE_PROC_NETWORK_SET_AUTOSTART: - fn = (dispatch_fn) remoteDispatchNetworkSetAutostart; - args_filter = (xdrproc_t) xdr_remote_network_set_autostart_args; - args = (char *) &lv_remote_network_set_autostart_args; - memset (&lv_remote_network_set_autostart_args, 0, sizeof lv_remote_network_set_autostart_args); - break; -case REMOTE_PROC_NETWORK_UNDEFINE: - fn = (dispatch_fn) remoteDispatchNetworkUndefine; - args_filter = (xdrproc_t) xdr_remote_network_undefine_args; - args = (char *) &lv_remote_network_undefine_args; - memset (&lv_remote_network_undefine_args, 0, sizeof lv_remote_network_undefine_args); - break; -case REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY: - fn = (dispatch_fn) remoteDispatchNodeGetCellsFreeMemory; - args_filter = (xdrproc_t) xdr_remote_node_get_cells_free_memory_args; - args = (char *) &lv_remote_node_get_cells_free_memory_args; - memset (&lv_remote_node_get_cells_free_memory_args, 0, sizeof lv_remote_node_get_cells_free_memory_args); - ret_filter = (xdrproc_t) xdr_remote_node_get_cells_free_memory_ret; - ret = (char *) &lv_remote_node_get_cells_free_memory_ret; - memset (&lv_remote_node_get_cells_free_memory_ret, 0, sizeof lv_remote_node_get_cells_free_memory_ret); - break; -case REMOTE_PROC_NODE_GET_FREE_MEMORY: - fn = (dispatch_fn) remoteDispatchNodeGetFreeMemory; - ret_filter = (xdrproc_t) xdr_remote_node_get_free_memory_ret; - ret = (char *) &lv_remote_node_get_free_memory_ret; - memset (&lv_remote_node_get_free_memory_ret, 0, sizeof lv_remote_node_get_free_memory_ret); - break; -case REMOTE_PROC_NODE_GET_INFO: - fn = (dispatch_fn) remoteDispatchNodeGetInfo; - ret_filter = (xdrproc_t) xdr_remote_node_get_info_ret; - ret = (char *) &lv_remote_node_get_info_ret; - memset (&lv_remote_node_get_info_ret, 0, sizeof lv_remote_node_get_info_ret); - break; -case REMOTE_PROC_NUM_OF_DEFINED_DOMAINS: - fn = (dispatch_fn) remoteDispatchNumOfDefinedDomains; - ret_filter = (xdrproc_t) xdr_remote_num_of_defined_domains_ret; - ret = (char *) &lv_remote_num_of_defined_domains_ret; - memset (&lv_remote_num_of_defined_domains_ret, 0, sizeof lv_remote_num_of_defined_domains_ret); - break; -case REMOTE_PROC_NUM_OF_DEFINED_NETWORKS: - fn = (dispatch_fn) remoteDispatchNumOfDefinedNetworks; - ret_filter = (xdrproc_t) xdr_remote_num_of_defined_networks_ret; - ret = (char *) &lv_remote_num_of_defined_networks_ret; - memset (&lv_remote_num_of_defined_networks_ret, 0, sizeof lv_remote_num_of_defined_networks_ret); - break; -case REMOTE_PROC_NUM_OF_DEFINED_STORAGE_POOLS: - fn = (dispatch_fn) remoteDispatchNumOfDefinedStoragePools; - ret_filter = (xdrproc_t) xdr_remote_num_of_defined_storage_pools_ret; - ret = (char *) &lv_remote_num_of_defined_storage_pools_ret; - memset (&lv_remote_num_of_defined_storage_pools_ret, 0, sizeof lv_remote_num_of_defined_storage_pools_ret); - break; -case REMOTE_PROC_NUM_OF_DOMAINS: - fn = (dispatch_fn) remoteDispatchNumOfDomains; - ret_filter = (xdrproc_t) xdr_remote_num_of_domains_ret; - ret = (char *) &lv_remote_num_of_domains_ret; - memset (&lv_remote_num_of_domains_ret, 0, sizeof lv_remote_num_of_domains_ret); - break; -case REMOTE_PROC_NUM_OF_NETWORKS: - fn = (dispatch_fn) remoteDispatchNumOfNetworks; - ret_filter = (xdrproc_t) xdr_remote_num_of_networks_ret; - ret = (char *) &lv_remote_num_of_networks_ret; - memset (&lv_remote_num_of_networks_ret, 0, sizeof lv_remote_num_of_networks_ret); - break; -case REMOTE_PROC_NUM_OF_STORAGE_POOLS: - fn = (dispatch_fn) remoteDispatchNumOfStoragePools; - ret_filter = (xdrproc_t) xdr_remote_num_of_storage_pools_ret; - ret = (char *) &lv_remote_num_of_storage_pools_ret; - memset (&lv_remote_num_of_storage_pools_ret, 0, sizeof lv_remote_num_of_storage_pools_ret); - break; -case REMOTE_PROC_OPEN: - fn = (dispatch_fn) remoteDispatchOpen; - args_filter = (xdrproc_t) xdr_remote_open_args; - args = (char *) &lv_remote_open_args; - memset (&lv_remote_open_args, 0, sizeof lv_remote_open_args); - break; -case REMOTE_PROC_STORAGE_POOL_BUILD: - fn = (dispatch_fn) remoteDispatchStoragePoolBuild; - args_filter = (xdrproc_t) xdr_remote_storage_pool_build_args; - args = (char *) &lv_remote_storage_pool_build_args; - memset (&lv_remote_storage_pool_build_args, 0, sizeof lv_remote_storage_pool_build_args); - break; -case REMOTE_PROC_STORAGE_POOL_CREATE: - fn = (dispatch_fn) remoteDispatchStoragePoolCreate; - args_filter = (xdrproc_t) xdr_remote_storage_pool_create_args; - args = (char *) &lv_remote_storage_pool_create_args; - memset (&lv_remote_storage_pool_create_args, 0, sizeof lv_remote_storage_pool_create_args); - break; -case REMOTE_PROC_STORAGE_POOL_CREATE_XML: - fn = (dispatch_fn) remoteDispatchStoragePoolCreateXml; - args_filter = (xdrproc_t) xdr_remote_storage_pool_create_xml_args; - args = (char *) &lv_remote_storage_pool_create_xml_args; - memset (&lv_remote_storage_pool_create_xml_args, 0, sizeof lv_remote_storage_pool_create_xml_args); - ret_filter = (xdrproc_t) xdr_remote_storage_pool_create_xml_ret; - ret = (char *) &lv_remote_storage_pool_create_xml_ret; - memset (&lv_remote_storage_pool_create_xml_ret, 0, sizeof lv_remote_storage_pool_create_xml_ret); - break; -case REMOTE_PROC_STORAGE_POOL_DEFINE_XML: - fn = (dispatch_fn) remoteDispatchStoragePoolDefineXml; - args_filter = (xdrproc_t) xdr_remote_storage_pool_define_xml_args; - args = (char *) &lv_remote_storage_pool_define_xml_args; - memset (&lv_remote_storage_pool_define_xml_args, 0, sizeof lv_remote_storage_pool_define_xml_args); - ret_filter = (xdrproc_t) xdr_remote_storage_pool_define_xml_ret; - ret = (char *) &lv_remote_storage_pool_define_xml_ret; - memset (&lv_remote_storage_pool_define_xml_ret, 0, sizeof lv_remote_storage_pool_define_xml_ret); - break; -case REMOTE_PROC_STORAGE_POOL_DELETE: - fn = (dispatch_fn) remoteDispatchStoragePoolDelete; - args_filter = (xdrproc_t) xdr_remote_storage_pool_delete_args; - args = (char *) &lv_remote_storage_pool_delete_args; - memset (&lv_remote_storage_pool_delete_args, 0, sizeof lv_remote_storage_pool_delete_args); - break; -case REMOTE_PROC_STORAGE_POOL_DESTROY: - fn = (dispatch_fn) remoteDispatchStoragePoolDestroy; - args_filter = (xdrproc_t) xdr_remote_storage_pool_destroy_args; - args = (char *) &lv_remote_storage_pool_destroy_args; - memset (&lv_remote_storage_pool_destroy_args, 0, sizeof lv_remote_storage_pool_destroy_args); - break; -case REMOTE_PROC_STORAGE_POOL_DUMP_XML: - fn = (dispatch_fn) remoteDispatchStoragePoolDumpXml; - args_filter = (xdrproc_t) xdr_remote_storage_pool_dump_xml_args; - args = (char *) &lv_remote_storage_pool_dump_xml_args; - memset (&lv_remote_storage_pool_dump_xml_args, 0, sizeof lv_remote_storage_pool_dump_xml_args); - ret_filter = (xdrproc_t) xdr_remote_storage_pool_dump_xml_ret; - ret = (char *) &lv_remote_storage_pool_dump_xml_ret; - memset (&lv_remote_storage_pool_dump_xml_ret, 0, sizeof lv_remote_storage_pool_dump_xml_ret); - break; -case REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART: - fn = (dispatch_fn) remoteDispatchStoragePoolGetAutostart; - args_filter = (xdrproc_t) xdr_remote_storage_pool_get_autostart_args; - args = (char *) &lv_remote_storage_pool_get_autostart_args; - memset (&lv_remote_storage_pool_get_autostart_args, 0, sizeof lv_remote_storage_pool_get_autostart_args); - ret_filter = (xdrproc_t) xdr_remote_storage_pool_get_autostart_ret; - ret = (char *) &lv_remote_storage_pool_get_autostart_ret; - memset (&lv_remote_storage_pool_get_autostart_ret, 0, sizeof lv_remote_storage_pool_get_autostart_ret); - break; -case REMOTE_PROC_STORAGE_POOL_GET_INFO: - fn = (dispatch_fn) remoteDispatchStoragePoolGetInfo; - args_filter = (xdrproc_t) xdr_remote_storage_pool_get_info_args; - args = (char *) &lv_remote_storage_pool_get_info_args; - memset (&lv_remote_storage_pool_get_info_args, 0, sizeof lv_remote_storage_pool_get_info_args); - ret_filter = (xdrproc_t) xdr_remote_storage_pool_get_info_ret; - ret = (char *) &lv_remote_storage_pool_get_info_ret; - memset (&lv_remote_storage_pool_get_info_ret, 0, sizeof lv_remote_storage_pool_get_info_ret); - break; -case REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES: - fn = (dispatch_fn) remoteDispatchStoragePoolListVolumes; - args_filter = (xdrproc_t) xdr_remote_storage_pool_list_volumes_args; - args = (char *) &lv_remote_storage_pool_list_volumes_args; - memset (&lv_remote_storage_pool_list_volumes_args, 0, sizeof lv_remote_storage_pool_list_volumes_args); - ret_filter = (xdrproc_t) xdr_remote_storage_pool_list_volumes_ret; - ret = (char *) &lv_remote_storage_pool_list_volumes_ret; - memset (&lv_remote_storage_pool_list_volumes_ret, 0, sizeof lv_remote_storage_pool_list_volumes_ret); - break; -case REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME: - fn = (dispatch_fn) remoteDispatchStoragePoolLookupByName; - args_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_name_args; - args = (char *) &lv_remote_storage_pool_lookup_by_name_args; - memset (&lv_remote_storage_pool_lookup_by_name_args, 0, sizeof lv_remote_storage_pool_lookup_by_name_args); - ret_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_name_ret; - ret = (char *) &lv_remote_storage_pool_lookup_by_name_ret; - memset (&lv_remote_storage_pool_lookup_by_name_ret, 0, sizeof lv_remote_storage_pool_lookup_by_name_ret); - break; -case REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID: - fn = (dispatch_fn) remoteDispatchStoragePoolLookupByUuid; - args_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_uuid_args; - args = (char *) &lv_remote_storage_pool_lookup_by_uuid_args; - memset (&lv_remote_storage_pool_lookup_by_uuid_args, 0, sizeof lv_remote_storage_pool_lookup_by_uuid_args); - ret_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_uuid_ret; - ret = (char *) &lv_remote_storage_pool_lookup_by_uuid_ret; - memset (&lv_remote_storage_pool_lookup_by_uuid_ret, 0, sizeof lv_remote_storage_pool_lookup_by_uuid_ret); - break; -case REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME: - fn = (dispatch_fn) remoteDispatchStoragePoolLookupByVolume; - args_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_volume_args; - args = (char *) &lv_remote_storage_pool_lookup_by_volume_args; - memset (&lv_remote_storage_pool_lookup_by_volume_args, 0, sizeof lv_remote_storage_pool_lookup_by_volume_args); - ret_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_volume_ret; - ret = (char *) &lv_remote_storage_pool_lookup_by_volume_ret; - memset (&lv_remote_storage_pool_lookup_by_volume_ret, 0, sizeof lv_remote_storage_pool_lookup_by_volume_ret); - break; -case REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES: - fn = (dispatch_fn) remoteDispatchStoragePoolNumOfVolumes; - args_filter = (xdrproc_t) xdr_remote_storage_pool_num_of_volumes_args; - args = (char *) &lv_remote_storage_pool_num_of_volumes_args; - memset (&lv_remote_storage_pool_num_of_volumes_args, 0, sizeof lv_remote_storage_pool_num_of_volumes_args); - ret_filter = (xdrproc_t) xdr_remote_storage_pool_num_of_volumes_ret; - ret = (char *) &lv_remote_storage_pool_num_of_volumes_ret; - memset (&lv_remote_storage_pool_num_of_volumes_ret, 0, sizeof lv_remote_storage_pool_num_of_volumes_ret); - break; -case REMOTE_PROC_STORAGE_POOL_REFRESH: - fn = (dispatch_fn) remoteDispatchStoragePoolRefresh; - args_filter = (xdrproc_t) xdr_remote_storage_pool_refresh_args; - args = (char *) &lv_remote_storage_pool_refresh_args; - memset (&lv_remote_storage_pool_refresh_args, 0, sizeof lv_remote_storage_pool_refresh_args); - break; -case REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART: - fn = (dispatch_fn) remoteDispatchStoragePoolSetAutostart; - args_filter = (xdrproc_t) xdr_remote_storage_pool_set_autostart_args; - args = (char *) &lv_remote_storage_pool_set_autostart_args; - memset (&lv_remote_storage_pool_set_autostart_args, 0, sizeof lv_remote_storage_pool_set_autostart_args); - break; -case REMOTE_PROC_STORAGE_POOL_UNDEFINE: - fn = (dispatch_fn) remoteDispatchStoragePoolUndefine; - args_filter = (xdrproc_t) xdr_remote_storage_pool_undefine_args; - args = (char *) &lv_remote_storage_pool_undefine_args; - memset (&lv_remote_storage_pool_undefine_args, 0, sizeof lv_remote_storage_pool_undefine_args); - break; -case REMOTE_PROC_STORAGE_VOL_CREATE_XML: - fn = (dispatch_fn) remoteDispatchStorageVolCreateXml; - args_filter = (xdrproc_t) xdr_remote_storage_vol_create_xml_args; - args = (char *) &lv_remote_storage_vol_create_xml_args; - memset (&lv_remote_storage_vol_create_xml_args, 0, sizeof lv_remote_storage_vol_create_xml_args); - ret_filter = (xdrproc_t) xdr_remote_storage_vol_create_xml_ret; - ret = (char *) &lv_remote_storage_vol_create_xml_ret; - memset (&lv_remote_storage_vol_create_xml_ret, 0, sizeof lv_remote_storage_vol_create_xml_ret); - break; -case REMOTE_PROC_STORAGE_VOL_DELETE: - fn = (dispatch_fn) remoteDispatchStorageVolDelete; - args_filter = (xdrproc_t) xdr_remote_storage_vol_delete_args; - args = (char *) &lv_remote_storage_vol_delete_args; - memset (&lv_remote_storage_vol_delete_args, 0, sizeof lv_remote_storage_vol_delete_args); - break; -case REMOTE_PROC_STORAGE_VOL_DUMP_XML: - fn = (dispatch_fn) remoteDispatchStorageVolDumpXml; - args_filter = (xdrproc_t) xdr_remote_storage_vol_dump_xml_args; - args = (char *) &lv_remote_storage_vol_dump_xml_args; - memset (&lv_remote_storage_vol_dump_xml_args, 0, sizeof lv_remote_storage_vol_dump_xml_args); - ret_filter = (xdrproc_t) xdr_remote_storage_vol_dump_xml_ret; - ret = (char *) &lv_remote_storage_vol_dump_xml_ret; - memset (&lv_remote_storage_vol_dump_xml_ret, 0, sizeof lv_remote_storage_vol_dump_xml_ret); - break; -case REMOTE_PROC_STORAGE_VOL_GET_INFO: - fn = (dispatch_fn) remoteDispatchStorageVolGetInfo; - args_filter = (xdrproc_t) xdr_remote_storage_vol_get_info_args; - args = (char *) &lv_remote_storage_vol_get_info_args; - memset (&lv_remote_storage_vol_get_info_args, 0, sizeof lv_remote_storage_vol_get_info_args); - ret_filter = (xdrproc_t) xdr_remote_storage_vol_get_info_ret; - ret = (char *) &lv_remote_storage_vol_get_info_ret; - memset (&lv_remote_storage_vol_get_info_ret, 0, sizeof lv_remote_storage_vol_get_info_ret); - break; -case REMOTE_PROC_STORAGE_VOL_GET_PATH: - fn = (dispatch_fn) remoteDispatchStorageVolGetPath; - args_filter = (xdrproc_t) xdr_remote_storage_vol_get_path_args; - args = (char *) &lv_remote_storage_vol_get_path_args; - memset (&lv_remote_storage_vol_get_path_args, 0, sizeof lv_remote_storage_vol_get_path_args); - ret_filter = (xdrproc_t) xdr_remote_storage_vol_get_path_ret; - ret = (char *) &lv_remote_storage_vol_get_path_ret; - memset (&lv_remote_storage_vol_get_path_ret, 0, sizeof lv_remote_storage_vol_get_path_ret); - break; -case REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY: - fn = (dispatch_fn) remoteDispatchStorageVolLookupByKey; - args_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_key_args; - args = (char *) &lv_remote_storage_vol_lookup_by_key_args; - memset (&lv_remote_storage_vol_lookup_by_key_args, 0, sizeof lv_remote_storage_vol_lookup_by_key_args); - ret_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_key_ret; - ret = (char *) &lv_remote_storage_vol_lookup_by_key_ret; - memset (&lv_remote_storage_vol_lookup_by_key_ret, 0, sizeof lv_remote_storage_vol_lookup_by_key_ret); - break; -case REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME: - fn = (dispatch_fn) remoteDispatchStorageVolLookupByName; - args_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_name_args; - args = (char *) &lv_remote_storage_vol_lookup_by_name_args; - memset (&lv_remote_storage_vol_lookup_by_name_args, 0, sizeof lv_remote_storage_vol_lookup_by_name_args); - ret_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_name_ret; - ret = (char *) &lv_remote_storage_vol_lookup_by_name_ret; - memset (&lv_remote_storage_vol_lookup_by_name_ret, 0, sizeof lv_remote_storage_vol_lookup_by_name_ret); - break; -case REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH: - fn = (dispatch_fn) remoteDispatchStorageVolLookupByPath; - args_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_path_args; - args = (char *) &lv_remote_storage_vol_lookup_by_path_args; - memset (&lv_remote_storage_vol_lookup_by_path_args, 0, sizeof lv_remote_storage_vol_lookup_by_path_args); - ret_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_path_ret; - ret = (char *) &lv_remote_storage_vol_lookup_by_path_ret; - memset (&lv_remote_storage_vol_lookup_by_path_ret, 0, sizeof lv_remote_storage_vol_lookup_by_path_ret); - break; -case REMOTE_PROC_SUPPORTS_FEATURE: - fn = (dispatch_fn) remoteDispatchSupportsFeature; - args_filter = (xdrproc_t) xdr_remote_supports_feature_args; - args = (char *) &lv_remote_supports_feature_args; - memset (&lv_remote_supports_feature_args, 0, sizeof lv_remote_supports_feature_args); - ret_filter = (xdrproc_t) xdr_remote_supports_feature_ret; - ret = (char *) &lv_remote_supports_feature_ret; - memset (&lv_remote_supports_feature_ret, 0, sizeof lv_remote_supports_feature_ret); - break; diff --git a/qemud/remote_dispatch_ret.h b/qemud/remote_dispatch_ret.h new file mode 100644 --- /dev/null +++ b/qemud/remote_dispatch_ret.h @@ -0,0 +1,75 @@ +/* Automatically generated by remote_generate_stubs.pl. + * Do not edit this file. Any changes you make will be lost. + */ + + remote_get_type_ret val_remote_get_type_ret; + remote_get_version_ret val_remote_get_version_ret; + remote_get_max_vcpus_ret val_remote_get_max_vcpus_ret; + remote_node_get_info_ret val_remote_node_get_info_ret; + remote_get_capabilities_ret val_remote_get_capabilities_ret; + remote_domain_create_linux_ret val_remote_domain_create_linux_ret; + remote_domain_define_xml_ret val_remote_domain_define_xml_ret; + remote_domain_dump_xml_ret val_remote_domain_dump_xml_ret; + remote_domain_get_autostart_ret val_remote_domain_get_autostart_ret; + remote_domain_get_info_ret val_remote_domain_get_info_ret; + remote_domain_get_max_memory_ret val_remote_domain_get_max_memory_ret; + remote_domain_get_max_vcpus_ret val_remote_domain_get_max_vcpus_ret; + remote_domain_get_os_type_ret val_remote_domain_get_os_type_ret; + remote_domain_get_vcpus_ret val_remote_domain_get_vcpus_ret; + remote_list_defined_domains_ret val_remote_list_defined_domains_ret; + remote_domain_lookup_by_id_ret val_remote_domain_lookup_by_id_ret; + remote_domain_lookup_by_name_ret val_remote_domain_lookup_by_name_ret; + remote_domain_lookup_by_uuid_ret val_remote_domain_lookup_by_uuid_ret; + remote_num_of_defined_domains_ret val_remote_num_of_defined_domains_ret; + remote_list_defined_networks_ret val_remote_list_defined_networks_ret; + remote_list_domains_ret val_remote_list_domains_ret; + remote_list_networks_ret val_remote_list_networks_ret; + remote_network_create_xml_ret val_remote_network_create_xml_ret; + remote_network_define_xml_ret val_remote_network_define_xml_ret; + remote_network_dump_xml_ret val_remote_network_dump_xml_ret; + remote_network_get_autostart_ret val_remote_network_get_autostart_ret; + remote_network_get_bridge_name_ret val_remote_network_get_bridge_name_ret; + remote_network_lookup_by_name_ret val_remote_network_lookup_by_name_ret; + remote_network_lookup_by_uuid_ret val_remote_network_lookup_by_uuid_ret; + remote_num_of_defined_networks_ret val_remote_num_of_defined_networks_ret; + remote_num_of_domains_ret val_remote_num_of_domains_ret; + remote_num_of_networks_ret val_remote_num_of_networks_ret; + remote_domain_get_scheduler_type_ret val_remote_domain_get_scheduler_type_ret; + remote_domain_get_scheduler_parameters_ret val_remote_domain_get_scheduler_parameters_ret; + remote_get_hostname_ret val_remote_get_hostname_ret; + remote_supports_feature_ret val_remote_supports_feature_ret; + remote_domain_migrate_prepare_ret val_remote_domain_migrate_prepare_ret; + remote_domain_migrate_finish_ret val_remote_domain_migrate_finish_ret; + remote_domain_block_stats_ret val_remote_domain_block_stats_ret; + remote_domain_interface_stats_ret val_remote_domain_interface_stats_ret; + remote_auth_list_ret val_remote_auth_list_ret; + remote_auth_sasl_init_ret val_remote_auth_sasl_init_ret; + remote_auth_sasl_start_ret val_remote_auth_sasl_start_ret; + remote_auth_sasl_step_ret val_remote_auth_sasl_step_ret; + remote_auth_polkit_ret val_remote_auth_polkit_ret; + remote_num_of_storage_pools_ret val_remote_num_of_storage_pools_ret; + remote_list_storage_pools_ret val_remote_list_storage_pools_ret; + remote_num_of_defined_storage_pools_ret val_remote_num_of_defined_storage_pools_ret; + remote_list_defined_storage_pools_ret val_remote_list_defined_storage_pools_ret; + remote_find_storage_pool_sources_ret val_remote_find_storage_pool_sources_ret; + remote_storage_pool_create_xml_ret val_remote_storage_pool_create_xml_ret; + remote_storage_pool_define_xml_ret val_remote_storage_pool_define_xml_ret; + remote_storage_pool_lookup_by_name_ret val_remote_storage_pool_lookup_by_name_ret; + remote_storage_pool_lookup_by_uuid_ret val_remote_storage_pool_lookup_by_uuid_ret; + remote_storage_pool_lookup_by_volume_ret val_remote_storage_pool_lookup_by_volume_ret; + remote_storage_pool_get_info_ret val_remote_storage_pool_get_info_ret; + remote_storage_pool_dump_xml_ret val_remote_storage_pool_dump_xml_ret; + remote_storage_pool_get_autostart_ret val_remote_storage_pool_get_autostart_ret; + remote_storage_pool_num_of_volumes_ret val_remote_storage_pool_num_of_volumes_ret; + remote_storage_pool_list_volumes_ret val_remote_storage_pool_list_volumes_ret; + remote_storage_vol_create_xml_ret val_remote_storage_vol_create_xml_ret; + remote_storage_vol_lookup_by_name_ret val_remote_storage_vol_lookup_by_name_ret; + remote_storage_vol_lookup_by_key_ret val_remote_storage_vol_lookup_by_key_ret; + remote_storage_vol_lookup_by_path_ret val_remote_storage_vol_lookup_by_path_ret; + remote_storage_vol_get_info_ret val_remote_storage_vol_get_info_ret; + remote_storage_vol_dump_xml_ret val_remote_storage_vol_dump_xml_ret; + remote_storage_vol_get_path_ret val_remote_storage_vol_get_path_ret; + remote_node_get_cells_free_memory_ret val_remote_node_get_cells_free_memory_ret; + remote_node_get_free_memory_ret val_remote_node_get_free_memory_ret; + remote_domain_block_peek_ret val_remote_domain_block_peek_ret; + remote_domain_memory_peek_ret val_remote_domain_memory_peek_ret; diff --git a/qemud/remote_dispatch_table.h b/qemud/remote_dispatch_table.h new file mode 100644 --- /dev/null +++ b/qemud/remote_dispatch_table.h @@ -0,0 +1,529 @@ +/* Automatically generated by remote_generate_stubs.pl. + * Do not edit this file. Any changes you make will be lost. + */ + +{ /* (unused) => 0 */ + .fn = NULL, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* Open => 1 */ + .fn = (dispatch_fn) remoteDispatchOpen, + .args_filter = (xdrproc_t) xdr_remote_open_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* Close => 2 */ + .fn = (dispatch_fn) remoteDispatchClose, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* GetType => 3 */ + .fn = (dispatch_fn) remoteDispatchGetType, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_get_type_ret, +}, +{ /* GetVersion => 4 */ + .fn = (dispatch_fn) remoteDispatchGetVersion, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_get_version_ret, +}, +{ /* GetMaxVcpus => 5 */ + .fn = (dispatch_fn) remoteDispatchGetMaxVcpus, + .args_filter = (xdrproc_t) xdr_remote_get_max_vcpus_args, + .ret_filter = (xdrproc_t) xdr_remote_get_max_vcpus_ret, +}, +{ /* NodeGetInfo => 6 */ + .fn = (dispatch_fn) remoteDispatchNodeGetInfo, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_node_get_info_ret, +}, +{ /* GetCapabilities => 7 */ + .fn = (dispatch_fn) remoteDispatchGetCapabilities, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_get_capabilities_ret, +}, +{ /* DomainAttachDevice => 8 */ + .fn = (dispatch_fn) remoteDispatchDomainAttachDevice, + .args_filter = (xdrproc_t) xdr_remote_domain_attach_device_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainCreate => 9 */ + .fn = (dispatch_fn) remoteDispatchDomainCreate, + .args_filter = (xdrproc_t) xdr_remote_domain_create_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainCreateLinux => 10 */ + .fn = (dispatch_fn) remoteDispatchDomainCreateLinux, + .args_filter = (xdrproc_t) xdr_remote_domain_create_linux_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_create_linux_ret, +}, +{ /* DomainDefineXml => 11 */ + .fn = (dispatch_fn) remoteDispatchDomainDefineXml, + .args_filter = (xdrproc_t) xdr_remote_domain_define_xml_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_define_xml_ret, +}, +{ /* DomainDestroy => 12 */ + .fn = (dispatch_fn) remoteDispatchDomainDestroy, + .args_filter = (xdrproc_t) xdr_remote_domain_destroy_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainDetachDevice => 13 */ + .fn = (dispatch_fn) remoteDispatchDomainDetachDevice, + .args_filter = (xdrproc_t) xdr_remote_domain_detach_device_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainDumpXml => 14 */ + .fn = (dispatch_fn) remoteDispatchDomainDumpXml, + .args_filter = (xdrproc_t) xdr_remote_domain_dump_xml_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_dump_xml_ret, +}, +{ /* DomainGetAutostart => 15 */ + .fn = (dispatch_fn) remoteDispatchDomainGetAutostart, + .args_filter = (xdrproc_t) xdr_remote_domain_get_autostart_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_get_autostart_ret, +}, +{ /* DomainGetInfo => 16 */ + .fn = (dispatch_fn) remoteDispatchDomainGetInfo, + .args_filter = (xdrproc_t) xdr_remote_domain_get_info_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_get_info_ret, +}, +{ /* DomainGetMaxMemory => 17 */ + .fn = (dispatch_fn) remoteDispatchDomainGetMaxMemory, + .args_filter = (xdrproc_t) xdr_remote_domain_get_max_memory_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_get_max_memory_ret, +}, +{ /* DomainGetMaxVcpus => 18 */ + .fn = (dispatch_fn) remoteDispatchDomainGetMaxVcpus, + .args_filter = (xdrproc_t) xdr_remote_domain_get_max_vcpus_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_get_max_vcpus_ret, +}, +{ /* DomainGetOsType => 19 */ + .fn = (dispatch_fn) remoteDispatchDomainGetOsType, + .args_filter = (xdrproc_t) xdr_remote_domain_get_os_type_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_get_os_type_ret, +}, +{ /* DomainGetVcpus => 20 */ + .fn = (dispatch_fn) remoteDispatchDomainGetVcpus, + .args_filter = (xdrproc_t) xdr_remote_domain_get_vcpus_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_get_vcpus_ret, +}, +{ /* ListDefinedDomains => 21 */ + .fn = (dispatch_fn) remoteDispatchListDefinedDomains, + .args_filter = (xdrproc_t) xdr_remote_list_defined_domains_args, + .ret_filter = (xdrproc_t) xdr_remote_list_defined_domains_ret, +}, +{ /* DomainLookupById => 22 */ + .fn = (dispatch_fn) remoteDispatchDomainLookupById, + .args_filter = (xdrproc_t) xdr_remote_domain_lookup_by_id_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_lookup_by_id_ret, +}, +{ /* DomainLookupByName => 23 */ + .fn = (dispatch_fn) remoteDispatchDomainLookupByName, + .args_filter = (xdrproc_t) xdr_remote_domain_lookup_by_name_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_lookup_by_name_ret, +}, +{ /* DomainLookupByUuid => 24 */ + .fn = (dispatch_fn) remoteDispatchDomainLookupByUuid, + .args_filter = (xdrproc_t) xdr_remote_domain_lookup_by_uuid_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_lookup_by_uuid_ret, +}, +{ /* NumOfDefinedDomains => 25 */ + .fn = (dispatch_fn) remoteDispatchNumOfDefinedDomains, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_num_of_defined_domains_ret, +}, +{ /* DomainPinVcpu => 26 */ + .fn = (dispatch_fn) remoteDispatchDomainPinVcpu, + .args_filter = (xdrproc_t) xdr_remote_domain_pin_vcpu_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainReboot => 27 */ + .fn = (dispatch_fn) remoteDispatchDomainReboot, + .args_filter = (xdrproc_t) xdr_remote_domain_reboot_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainResume => 28 */ + .fn = (dispatch_fn) remoteDispatchDomainResume, + .args_filter = (xdrproc_t) xdr_remote_domain_resume_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainSetAutostart => 29 */ + .fn = (dispatch_fn) remoteDispatchDomainSetAutostart, + .args_filter = (xdrproc_t) xdr_remote_domain_set_autostart_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainSetMaxMemory => 30 */ + .fn = (dispatch_fn) remoteDispatchDomainSetMaxMemory, + .args_filter = (xdrproc_t) xdr_remote_domain_set_max_memory_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainSetMemory => 31 */ + .fn = (dispatch_fn) remoteDispatchDomainSetMemory, + .args_filter = (xdrproc_t) xdr_remote_domain_set_memory_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainSetVcpus => 32 */ + .fn = (dispatch_fn) remoteDispatchDomainSetVcpus, + .args_filter = (xdrproc_t) xdr_remote_domain_set_vcpus_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainShutdown => 33 */ + .fn = (dispatch_fn) remoteDispatchDomainShutdown, + .args_filter = (xdrproc_t) xdr_remote_domain_shutdown_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainSuspend => 34 */ + .fn = (dispatch_fn) remoteDispatchDomainSuspend, + .args_filter = (xdrproc_t) xdr_remote_domain_suspend_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainUndefine => 35 */ + .fn = (dispatch_fn) remoteDispatchDomainUndefine, + .args_filter = (xdrproc_t) xdr_remote_domain_undefine_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* ListDefinedNetworks => 36 */ + .fn = (dispatch_fn) remoteDispatchListDefinedNetworks, + .args_filter = (xdrproc_t) xdr_remote_list_defined_networks_args, + .ret_filter = (xdrproc_t) xdr_remote_list_defined_networks_ret, +}, +{ /* ListDomains => 37 */ + .fn = (dispatch_fn) remoteDispatchListDomains, + .args_filter = (xdrproc_t) xdr_remote_list_domains_args, + .ret_filter = (xdrproc_t) xdr_remote_list_domains_ret, +}, +{ /* ListNetworks => 38 */ + .fn = (dispatch_fn) remoteDispatchListNetworks, + .args_filter = (xdrproc_t) xdr_remote_list_networks_args, + .ret_filter = (xdrproc_t) xdr_remote_list_networks_ret, +}, +{ /* NetworkCreate => 39 */ + .fn = (dispatch_fn) remoteDispatchNetworkCreate, + .args_filter = (xdrproc_t) xdr_remote_network_create_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* NetworkCreateXml => 40 */ + .fn = (dispatch_fn) remoteDispatchNetworkCreateXml, + .args_filter = (xdrproc_t) xdr_remote_network_create_xml_args, + .ret_filter = (xdrproc_t) xdr_remote_network_create_xml_ret, +}, +{ /* NetworkDefineXml => 41 */ + .fn = (dispatch_fn) remoteDispatchNetworkDefineXml, + .args_filter = (xdrproc_t) xdr_remote_network_define_xml_args, + .ret_filter = (xdrproc_t) xdr_remote_network_define_xml_ret, +}, +{ /* NetworkDestroy => 42 */ + .fn = (dispatch_fn) remoteDispatchNetworkDestroy, + .args_filter = (xdrproc_t) xdr_remote_network_destroy_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* NetworkDumpXml => 43 */ + .fn = (dispatch_fn) remoteDispatchNetworkDumpXml, + .args_filter = (xdrproc_t) xdr_remote_network_dump_xml_args, + .ret_filter = (xdrproc_t) xdr_remote_network_dump_xml_ret, +}, +{ /* NetworkGetAutostart => 44 */ + .fn = (dispatch_fn) remoteDispatchNetworkGetAutostart, + .args_filter = (xdrproc_t) xdr_remote_network_get_autostart_args, + .ret_filter = (xdrproc_t) xdr_remote_network_get_autostart_ret, +}, +{ /* NetworkGetBridgeName => 45 */ + .fn = (dispatch_fn) remoteDispatchNetworkGetBridgeName, + .args_filter = (xdrproc_t) xdr_remote_network_get_bridge_name_args, + .ret_filter = (xdrproc_t) xdr_remote_network_get_bridge_name_ret, +}, +{ /* NetworkLookupByName => 46 */ + .fn = (dispatch_fn) remoteDispatchNetworkLookupByName, + .args_filter = (xdrproc_t) xdr_remote_network_lookup_by_name_args, + .ret_filter = (xdrproc_t) xdr_remote_network_lookup_by_name_ret, +}, +{ /* NetworkLookupByUuid => 47 */ + .fn = (dispatch_fn) remoteDispatchNetworkLookupByUuid, + .args_filter = (xdrproc_t) xdr_remote_network_lookup_by_uuid_args, + .ret_filter = (xdrproc_t) xdr_remote_network_lookup_by_uuid_ret, +}, +{ /* NetworkSetAutostart => 48 */ + .fn = (dispatch_fn) remoteDispatchNetworkSetAutostart, + .args_filter = (xdrproc_t) xdr_remote_network_set_autostart_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* NetworkUndefine => 49 */ + .fn = (dispatch_fn) remoteDispatchNetworkUndefine, + .args_filter = (xdrproc_t) xdr_remote_network_undefine_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* NumOfDefinedNetworks => 50 */ + .fn = (dispatch_fn) remoteDispatchNumOfDefinedNetworks, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_num_of_defined_networks_ret, +}, +{ /* NumOfDomains => 51 */ + .fn = (dispatch_fn) remoteDispatchNumOfDomains, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_num_of_domains_ret, +}, +{ /* NumOfNetworks => 52 */ + .fn = (dispatch_fn) remoteDispatchNumOfNetworks, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_num_of_networks_ret, +}, +{ /* DomainCoreDump => 53 */ + .fn = (dispatch_fn) remoteDispatchDomainCoreDump, + .args_filter = (xdrproc_t) xdr_remote_domain_core_dump_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainRestore => 54 */ + .fn = (dispatch_fn) remoteDispatchDomainRestore, + .args_filter = (xdrproc_t) xdr_remote_domain_restore_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainSave => 55 */ + .fn = (dispatch_fn) remoteDispatchDomainSave, + .args_filter = (xdrproc_t) xdr_remote_domain_save_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainGetSchedulerType => 56 */ + .fn = (dispatch_fn) remoteDispatchDomainGetSchedulerType, + .args_filter = (xdrproc_t) xdr_remote_domain_get_scheduler_type_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_get_scheduler_type_ret, +}, +{ /* DomainGetSchedulerParameters => 57 */ + .fn = (dispatch_fn) remoteDispatchDomainGetSchedulerParameters, + .args_filter = (xdrproc_t) xdr_remote_domain_get_scheduler_parameters_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_get_scheduler_parameters_ret, +}, +{ /* DomainSetSchedulerParameters => 58 */ + .fn = (dispatch_fn) remoteDispatchDomainSetSchedulerParameters, + .args_filter = (xdrproc_t) xdr_remote_domain_set_scheduler_parameters_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* GetHostname => 59 */ + .fn = (dispatch_fn) remoteDispatchGetHostname, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_get_hostname_ret, +}, +{ /* SupportsFeature => 60 */ + .fn = (dispatch_fn) remoteDispatchSupportsFeature, + .args_filter = (xdrproc_t) xdr_remote_supports_feature_args, + .ret_filter = (xdrproc_t) xdr_remote_supports_feature_ret, +}, +{ /* DomainMigratePrepare => 61 */ + .fn = (dispatch_fn) remoteDispatchDomainMigratePrepare, + .args_filter = (xdrproc_t) xdr_remote_domain_migrate_prepare_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_migrate_prepare_ret, +}, +{ /* DomainMigratePerform => 62 */ + .fn = (dispatch_fn) remoteDispatchDomainMigratePerform, + .args_filter = (xdrproc_t) xdr_remote_domain_migrate_perform_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* DomainMigrateFinish => 63 */ + .fn = (dispatch_fn) remoteDispatchDomainMigrateFinish, + .args_filter = (xdrproc_t) xdr_remote_domain_migrate_finish_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_migrate_finish_ret, +}, +{ /* DomainBlockStats => 64 */ + .fn = (dispatch_fn) remoteDispatchDomainBlockStats, + .args_filter = (xdrproc_t) xdr_remote_domain_block_stats_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_block_stats_ret, +}, +{ /* DomainInterfaceStats => 65 */ + .fn = (dispatch_fn) remoteDispatchDomainInterfaceStats, + .args_filter = (xdrproc_t) xdr_remote_domain_interface_stats_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_interface_stats_ret, +}, +{ /* AuthList => 66 */ + .fn = (dispatch_fn) remoteDispatchAuthList, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_auth_list_ret, +}, +{ /* AuthSaslInit => 67 */ + .fn = (dispatch_fn) remoteDispatchAuthSaslInit, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_auth_sasl_init_ret, +}, +{ /* AuthSaslStart => 68 */ + .fn = (dispatch_fn) remoteDispatchAuthSaslStart, + .args_filter = (xdrproc_t) xdr_remote_auth_sasl_start_args, + .ret_filter = (xdrproc_t) xdr_remote_auth_sasl_start_ret, +}, +{ /* AuthSaslStep => 69 */ + .fn = (dispatch_fn) remoteDispatchAuthSaslStep, + .args_filter = (xdrproc_t) xdr_remote_auth_sasl_step_args, + .ret_filter = (xdrproc_t) xdr_remote_auth_sasl_step_ret, +}, +{ /* AuthPolkit => 70 */ + .fn = (dispatch_fn) remoteDispatchAuthPolkit, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_auth_polkit_ret, +}, +{ /* NumOfStoragePools => 71 */ + .fn = (dispatch_fn) remoteDispatchNumOfStoragePools, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_num_of_storage_pools_ret, +}, +{ /* ListStoragePools => 72 */ + .fn = (dispatch_fn) remoteDispatchListStoragePools, + .args_filter = (xdrproc_t) xdr_remote_list_storage_pools_args, + .ret_filter = (xdrproc_t) xdr_remote_list_storage_pools_ret, +}, +{ /* NumOfDefinedStoragePools => 73 */ + .fn = (dispatch_fn) remoteDispatchNumOfDefinedStoragePools, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_num_of_defined_storage_pools_ret, +}, +{ /* ListDefinedStoragePools => 74 */ + .fn = (dispatch_fn) remoteDispatchListDefinedStoragePools, + .args_filter = (xdrproc_t) xdr_remote_list_defined_storage_pools_args, + .ret_filter = (xdrproc_t) xdr_remote_list_defined_storage_pools_ret, +}, +{ /* FindStoragePoolSources => 75 */ + .fn = (dispatch_fn) remoteDispatchFindStoragePoolSources, + .args_filter = (xdrproc_t) xdr_remote_find_storage_pool_sources_args, + .ret_filter = (xdrproc_t) xdr_remote_find_storage_pool_sources_ret, +}, +{ /* StoragePoolCreateXml => 76 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolCreateXml, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_create_xml_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_pool_create_xml_ret, +}, +{ /* StoragePoolDefineXml => 77 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolDefineXml, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_define_xml_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_pool_define_xml_ret, +}, +{ /* StoragePoolCreate => 78 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolCreate, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_create_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* StoragePoolBuild => 79 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolBuild, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_build_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* StoragePoolDestroy => 80 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolDestroy, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_destroy_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* StoragePoolDelete => 81 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolDelete, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_delete_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* StoragePoolUndefine => 82 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolUndefine, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_undefine_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* StoragePoolRefresh => 83 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolRefresh, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_refresh_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* StoragePoolLookupByName => 84 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolLookupByName, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_name_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_name_ret, +}, +{ /* StoragePoolLookupByUuid => 85 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolLookupByUuid, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_uuid_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_uuid_ret, +}, +{ /* StoragePoolLookupByVolume => 86 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolLookupByVolume, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_volume_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_pool_lookup_by_volume_ret, +}, +{ /* StoragePoolGetInfo => 87 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolGetInfo, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_get_info_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_pool_get_info_ret, +}, +{ /* StoragePoolDumpXml => 88 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolDumpXml, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_dump_xml_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_pool_dump_xml_ret, +}, +{ /* StoragePoolGetAutostart => 89 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolGetAutostart, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_get_autostart_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_pool_get_autostart_ret, +}, +{ /* StoragePoolSetAutostart => 90 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolSetAutostart, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_set_autostart_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* StoragePoolNumOfVolumes => 91 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolNumOfVolumes, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_num_of_volumes_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_pool_num_of_volumes_ret, +}, +{ /* StoragePoolListVolumes => 92 */ + .fn = (dispatch_fn) remoteDispatchStoragePoolListVolumes, + .args_filter = (xdrproc_t) xdr_remote_storage_pool_list_volumes_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_pool_list_volumes_ret, +}, +{ /* StorageVolCreateXml => 93 */ + .fn = (dispatch_fn) remoteDispatchStorageVolCreateXml, + .args_filter = (xdrproc_t) xdr_remote_storage_vol_create_xml_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_vol_create_xml_ret, +}, +{ /* StorageVolDelete => 94 */ + .fn = (dispatch_fn) remoteDispatchStorageVolDelete, + .args_filter = (xdrproc_t) xdr_remote_storage_vol_delete_args, + .ret_filter = (xdrproc_t) xdr_void, +}, +{ /* StorageVolLookupByName => 95 */ + .fn = (dispatch_fn) remoteDispatchStorageVolLookupByName, + .args_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_name_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_name_ret, +}, +{ /* StorageVolLookupByKey => 96 */ + .fn = (dispatch_fn) remoteDispatchStorageVolLookupByKey, + .args_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_key_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_key_ret, +}, +{ /* StorageVolLookupByPath => 97 */ + .fn = (dispatch_fn) remoteDispatchStorageVolLookupByPath, + .args_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_path_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_vol_lookup_by_path_ret, +}, +{ /* StorageVolGetInfo => 98 */ + .fn = (dispatch_fn) remoteDispatchStorageVolGetInfo, + .args_filter = (xdrproc_t) xdr_remote_storage_vol_get_info_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_vol_get_info_ret, +}, +{ /* StorageVolDumpXml => 99 */ + .fn = (dispatch_fn) remoteDispatchStorageVolDumpXml, + .args_filter = (xdrproc_t) xdr_remote_storage_vol_dump_xml_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_vol_dump_xml_ret, +}, +{ /* StorageVolGetPath => 100 */ + .fn = (dispatch_fn) remoteDispatchStorageVolGetPath, + .args_filter = (xdrproc_t) xdr_remote_storage_vol_get_path_args, + .ret_filter = (xdrproc_t) xdr_remote_storage_vol_get_path_ret, +}, +{ /* NodeGetCellsFreeMemory => 101 */ + .fn = (dispatch_fn) remoteDispatchNodeGetCellsFreeMemory, + .args_filter = (xdrproc_t) xdr_remote_node_get_cells_free_memory_args, + .ret_filter = (xdrproc_t) xdr_remote_node_get_cells_free_memory_ret, +}, +{ /* NodeGetFreeMemory => 102 */ + .fn = (dispatch_fn) remoteDispatchNodeGetFreeMemory, + .args_filter = (xdrproc_t) xdr_void, + .ret_filter = (xdrproc_t) xdr_remote_node_get_free_memory_ret, +}, +{ /* DomainBlockPeek => 103 */ + .fn = (dispatch_fn) remoteDispatchDomainBlockPeek, + .args_filter = (xdrproc_t) xdr_remote_domain_block_peek_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_block_peek_ret, +}, +{ /* DomainMemoryPeek => 104 */ + .fn = (dispatch_fn) remoteDispatchDomainMemoryPeek, + .args_filter = (xdrproc_t) xdr_remote_domain_memory_peek_args, + .ret_filter = (xdrproc_t) xdr_remote_domain_memory_peek_ret, +}, diff --git a/qemud/remote_generate_stubs.pl b/qemud/remote_generate_stubs.pl --- a/qemud/remote_generate_stubs.pl +++ b/qemud/remote_generate_stubs.pl @@ -12,8 +12,8 @@ use Getopt::Std; use Getopt::Std; # Command line options. -our ($opt_c, $opt_d, $opt_i, $opt_s, $opt_v, $opt_w); -getopts ('cdisvw'); +our ($opt_p, $opt_t, $opt_a, $opt_r, $opt_d); +getopts ('ptard'); # Convert name_of_call to NameOfCall. sub name_to_ProcName { @@ -25,7 +25,17 @@ sub name_to_ProcName { # Read the input file (usually remote_protocol.x) and form an # opinion about the name, args and return type of each RPC. -my ($name, $ProcName, %calls); +my ($name, $ProcName, $id, %calls, @calls); + +# REMOTE_PROC_CLOSE has no args or ret. +$calls{close} = { + name => "close", + ProcName => "Close", + UC_NAME => "CLOSE", + args => "void", + ret => "void", +}; + while (<>) { if (/^struct remote_(.*)_args/) { $name = $1; @@ -57,17 +67,14 @@ while (<>) { ret => "remote_${name}_ret" } } + } elsif (/^\s*REMOTE_PROC_(.*?)\s+=\s+(\d+),?$/) { + $name = lc $1; + $id = $2; + $ProcName = name_to_ProcName ($name); + + $calls[$id] = $calls{$name}; } } - -# REMOTE_PROC_CLOSE has no args or ret. -$calls{close} = { - name => "close", - ProcName => "Close", - UC_NAME => "CLOSE", - args => "void", - ret => "void", -}; #---------------------------------------------------------------------- # Output @@ -90,135 +97,59 @@ if ($opt_d) { } # Prototypes for dispatch functions ("remote_dispatch_prototypes.h"). -elsif ($opt_i) { +elsif ($opt_p) { my @keys = sort (keys %calls); foreach (@keys) { print "static int remoteDispatch$calls{$_}->{ProcName} (struct qemud_server *server, struct qemud_client *client, remote_message_header *req, $calls{$_}->{args} *args, $calls{$_}->{ret} *ret);\n"; } } -# Local variables used inside remoteDispatchClientRequest -# ("remote_dispatch_localvars.h"). -elsif ($opt_v) { - my @values = values %calls; - foreach (@values) { - if ($_->{args} ne "void") { - print "$_->{args} lv_$_->{args};\n"; +# Union of all arg types +# ("remote_dispatch_args.h"). +elsif ($opt_a) { + for ($id = 0 ; $id <= $#calls ; $id++) { + if (defined $calls[$id] && + $calls[$id]->{args} ne "void") { + print " $calls[$id]->{args} val_$calls[$id]->{args};\n"; } - if ($_->{ret} ne "void") { - print "$_->{ret} lv_$_->{ret};\n"; + } +} + +# Union of all arg types +# ("remote_dispatch_ret.h"). +elsif ($opt_r) { + for ($id = 0 ; $id <= $#calls ; $id++) { + if (defined $calls[$id] && + $calls[$id]->{ret} ne "void") { + print " $calls[$id]->{ret} val_$calls[$id]->{ret};\n"; } } } # Inside the switch statement, prepare the 'fn', 'args_filter', etc -# ("remote_dispatch_proc_switch.h"). -elsif ($opt_w) { - my @keys = sort (keys %calls); - foreach (@keys) { - print "case REMOTE_PROC_$calls{$_}->{UC_NAME}:\n"; - print " fn = (dispatch_fn) remoteDispatch$calls{$_}->{ProcName};\n"; - if ($calls{$_}->{args} ne "void") { - print " args_filter = (xdrproc_t) xdr_$calls{$_}->{args};\n"; - print " args = (char *) &lv_$calls{$_}->{args};\n"; - print " memset (&lv_$calls{$_}->{args}, 0, sizeof lv_$calls{$_}->{args});\n" +# ("remote_dispatch_table.h"). +elsif ($opt_t) { + for ($id = 0 ; $id <= $#calls ; $id++) { + if (defined $calls[$id]) { + print "{ /* $calls[$id]->{ProcName} => $id */\n"; + print " .fn = (dispatch_fn) remoteDispatch$calls[$id]->{ProcName},\n"; + if ($calls[$id]->{args} ne "void") { + print " .args_filter = (xdrproc_t) xdr_$calls[$id]->{args},\n"; + } else { + print " .args_filter = (xdrproc_t) xdr_void,\n"; + } + if ($calls[$id]->{ret} ne "void") { + print " .ret_filter = (xdrproc_t) xdr_$calls[$id]->{ret},\n"; + } else { + print " .ret_filter = (xdrproc_t) xdr_void,\n"; + } + print "},\n"; + } else { + print "{ /* (unused) => $id */\n"; + print " .fn = NULL,\n"; + print " .args_filter = (xdrproc_t) xdr_void,\n"; + print " .ret_filter = (xdrproc_t) xdr_void,\n"; + print "},\n"; } - if ($calls{$_}->{ret} ne "void") { - print " ret_filter = (xdrproc_t) xdr_$calls{$_}->{ret};\n"; - print " ret = (char *) &lv_$calls{$_}->{ret};\n"; - print " memset (&lv_$calls{$_}->{ret}, 0, sizeof lv_$calls{$_}->{ret});\n" - } - print " break;\n"; } } - -# Generate client stubs - just used to generate the first -# version of the stubs in remote_internal.c. They need -# hand-hacking afterwards. -elsif ($opt_c) { - my @keys = sort (keys %calls); - - foreach (@keys) { - my $args = $calls{$_}->{args}; - my $argsvoid = $args eq "void"; - my $ret = $calls{$_}->{ret}; - my $retvoid = $ret eq "void"; - - print "static @@\n"; - print "remote$calls{$_}->{ProcName} (@@)\n"; - print "{\n"; - if (!$argsvoid) { - print " $args args;\n"; - } - if (!$retvoid) { - print " $ret ret;\n"; - } - print " GET_PRIVATE (conn, @@);\n"; - print "\n"; - if (!$argsvoid) { - print " @@\n"; - print "\n"; - } - if (!$retvoid) { - print " memset (&ret, 0, sizeof ret);\n"; - } - print " if (call (conn, priv, 0, REMOTE_PROC_$calls{$_}->{UC_NAME},\n"; - print " (xdrproc_t) xdr_$args, (char *) "; - if ($argsvoid) { - print "NULL"; - } else { - print "&args"; - } - print ",\n"; - print " (xdrproc_t) xdr_$ret, (char *) "; - if ($retvoid) { - print "NULL"; - } else { - print "&ret"; - } - print ") == -1)\n"; - print " return -1;\n"; - print "\n @@\n"; - print "}\n\n"; - } -} - -# Generate server stubs - just used to generate the first -# version of the stubs in remote.c. They need hand-hacking -# afterwards. -elsif ($opt_s) { - my @keys = sort (keys %calls); - - foreach (@keys) { - my $args = $calls{$_}->{args}; - my $argsvoid = $args eq "void"; - my $ret = $calls{$_}->{ret}; - my $retvoid = $ret eq "void"; - - print "static int\n"; - print "remoteDispatch$calls{$_}->{ProcName} (struct qemud_server *server,\n"; - print " struct qemud_client *client,\n"; - print " remote_message_header *req,\n"; - print " remote_get_max_vcpus_args *args,\n"; - print " remote_get_max_vcpus_ret *ret)\n"; - print "{\n"; - if (!$argsvoid || !$retvoid) { - print " @@\n"; - } - print " CHECK_CONN;\n"; - print "\n"; - if (!$argsvoid) { - print " @@\n"; - print "\n"; - } - print " @@ = vir$calls{$_}->{ProcName} (@@);\n"; - print " if (@@) return -1;\n"; - print "\n"; - if (!$retvoid) { - print " @@\n"; - print "\n"; - } - print " return 0;\n"; - print "}\n\n"; - } -} -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list