remote_protocol.x 76.2 KB
Newer Older
1 2 3 4 5
/* -*- c -*-
 * remote_protocol.x: private protocol for communicating between
 *   remote_internal driver and libvirtd.  This protocol is
 *   internal and may change at any time.
 *
6
 * Copyright (C) 2006-2012 Red Hat, Inc.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 *
 * Author: Richard Jones <rjones@redhat.com>
 */

/* Notes:
 *
 * (1) The protocol is internal and may change at any time, without
 * notice.  Do not use it.  Instead link to libvirt and use the remote
 * driver.
 *
 * (2) See bottom of this file for a description of the home-brew RPC.
 *
 * (3) Authentication/encryption is done outside this protocol.
 *
 * (4) For namespace reasons, all exported names begin 'remote_' or
 * 'REMOTE_'.  This makes names quite long.
 */

39
%#include <libvirt/libvirt.h>
40
%#include "internal.h"
41
%#include <arpa/inet.h>
42

43 44 45 46 47 48 49 50 51 52 53 54
/* cygwin's xdr implementation defines xdr_u_int64_t instead of xdr_uint64_t
 * and lacks IXDR_PUT_INT32 and IXDR_GET_INT32
 */
%#ifdef HAVE_XDR_U_INT64_T
%# define xdr_uint64_t xdr_u_int64_t
%#endif
%#ifndef IXDR_PUT_INT32
%# define IXDR_PUT_INT32 IXDR_PUT_LONG
%#endif
%#ifndef IXDR_GET_INT32
%# define IXDR_GET_INT32 IXDR_GET_LONG
%#endif
S
Stefan Berger 已提交
55 56 57 58 59 60
%#ifndef IXDR_PUT_U_INT32
%# define IXDR_PUT_U_INT32 IXDR_PUT_U_LONG
%#endif
%#ifndef IXDR_GET_U_INT32
%# define IXDR_GET_U_INT32 IXDR_GET_U_LONG
%#endif
61

62 63 64 65 66 67
/*----- Data types. -----*/

/* Length of long, but not unbounded, strings.
 * This is an arbitrary limit designed to stop the decoder from trying
 * to allocate unbounded amounts of memory when fed with a bad message.
 */
M
Michal Privoznik 已提交
68
const REMOTE_STRING_MAX = 1048576;
69 70 71 72 73 74 75 76 77 78 79 80 81

/* A long string, which may NOT be NULL. */
typedef string remote_nonnull_string<REMOTE_STRING_MAX>;

/* A long string, which may be NULL. */
typedef remote_nonnull_string *remote_string;

/* This just places an upper limit on the length of lists of
 * domain IDs which may be sent via the protocol.
 */
const REMOTE_DOMAIN_ID_LIST_MAX = 16384;

/* Upper limit on lists of domain names. */
M
Michal Privoznik 已提交
82
const REMOTE_DOMAIN_NAME_LIST_MAX = 16384;
83 84 85 86 87 88 89 90 91 92

/* Upper limit on cpumap (bytes) passed to virDomainPinVcpu. */
const REMOTE_CPUMAP_MAX = 256;

/* Upper limit on number of info fields returned by virDomainGetVcpus. */
const REMOTE_VCPUINFO_MAX = 2048;

/* Upper limit on cpumaps (bytes) passed to virDomainGetVcpus. */
const REMOTE_CPUMAPS_MAX = 16384;

93
/* Upper limit on migrate cookie. */
94
const REMOTE_MIGRATE_COOKIE_MAX = 16384;
95

96
/* Upper limit on lists of network names. */
M
Michal Privoznik 已提交
97
const REMOTE_NETWORK_NAME_LIST_MAX = 16384;
98

D
Daniel Veillard 已提交
99
/* Upper limit on lists of interface names. */
M
Michal Privoznik 已提交
100
const REMOTE_INTERFACE_NAME_LIST_MAX = 16384;
D
Daniel Veillard 已提交
101

102
/* Upper limit on lists of defined interface names. */
M
Michal Privoznik 已提交
103
const REMOTE_DEFINED_INTERFACE_NAME_LIST_MAX = 16384;
104

105
/* Upper limit on lists of storage pool names. */
M
Michal Privoznik 已提交
106
const REMOTE_STORAGE_POOL_NAME_LIST_MAX = 4096;
107 108

/* Upper limit on lists of storage vol names. */
M
Michal Privoznik 已提交
109
const REMOTE_STORAGE_VOL_NAME_LIST_MAX = 16384;
110

111 112 113 114
/* Upper limit on lists of node device names. */
const REMOTE_NODE_DEVICE_NAME_LIST_MAX = 16384;

/* Upper limit on lists of node device capabilities. */
M
Michal Privoznik 已提交
115
const REMOTE_NODE_DEVICE_CAPS_LIST_MAX = 65536;
116

117 118 119
/* Upper limit on lists of network filter names. */
const REMOTE_NWFILTER_NAME_LIST_MAX = 1024;

120 121 122
/* Upper limit on list of scheduler parameters. */
const REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX = 16;

123 124 125
/* Upper limit on list of blkio parameters. */
const REMOTE_DOMAIN_BLKIO_PARAMETERS_MAX = 16;

126 127 128
/* Upper limit on list of memory parameters. */
const REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX = 16;

129 130 131
/* Upper limit on list of blockio tuning parameters. */
const REMOTE_DOMAIN_BLOCK_IO_TUNE_PARAMETERS_MAX = 16;

132 133 134
/* Upper limit on list of numa parameters. */
const REMOTE_DOMAIN_NUMA_PARAMETERS_MAX = 16;

135 136 137
/* Upper limit on list of node cpu stats. */
const REMOTE_NODE_CPU_STATS_MAX = 16;

138 139 140
/* Upper limit on list of node memory stats. */
const REMOTE_NODE_MEMORY_STATS_MAX = 16;

141 142 143
/* Upper limit on list of block stats. */
const REMOTE_DOMAIN_BLOCK_STATS_PARAMETERS_MAX = 16;

144 145 146
/* Upper limit on number of NUMA cells */
const REMOTE_NODE_MAX_CELLS = 1024;

147 148 149 150 151 152
/* Upper limit on SASL auth negotiation packet */
const REMOTE_AUTH_SASL_DATA_MAX = 65536;

/* Maximum number of auth types */
const REMOTE_AUTH_TYPE_LIST_MAX = 20;

153 154 155
/* Upper limit on list of memory stats */
const REMOTE_DOMAIN_MEMORY_STATS_MAX = 1024;

C
Chris Lalancette 已提交
156 157 158
/* Upper limit on lists of domain snapshots. */
const REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX = 1024;

R
Richard W.M. Jones 已提交
159
/* Maximum length of a block peek buffer message.
160 161 162
 * Note applications need to be aware of this limit and issue multiple
 * requests for large amounts of data.
 */
M
Michal Privoznik 已提交
163
const REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX = 1048576;
164

R
Richard W.M. Jones 已提交
165 166 167 168
/* Maximum length of a memory peek buffer message.
 * Note applications need to be aware of this limit and issue multiple
 * requests for large amounts of data.
 */
M
Michal Privoznik 已提交
169
const REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX = 1048576;
R
Richard W.M. Jones 已提交
170

171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
/*
 * Maximum length of a security model field.
 */
const REMOTE_SECURITY_MODEL_MAX = VIR_SECURITY_MODEL_BUFLEN;

/*
 * Maximum length of a security label field.
 */
const REMOTE_SECURITY_LABEL_MAX = VIR_SECURITY_LABEL_BUFLEN;

/*
 * Maximum length of a security DOI field.
 */
const REMOTE_SECURITY_DOI_MAX = VIR_SECURITY_DOI_BUFLEN;

186 187 188 189 190 191 192 193 194 195
/*
 * Maximum size of a secret value.
 */
const REMOTE_SECRET_VALUE_MAX = 65536;

/*
 * Upper limit on list of secrets.
 */
const REMOTE_SECRET_UUID_LIST_MAX = 16384;

196 197 198 199 200
/*
 * Upper limit on list of CPUs accepted when computing a baseline CPU.
 */
const REMOTE_CPU_BASELINE_MAX = 256;

201 202 203 204 205
/*
 * Max number of sending keycodes.
 */
const REMOTE_DOMAIN_SEND_KEY_MAX = 16;

206 207 208 209 210
/*
 * Upper limit on list of interface parameters
 */
const REMOTE_DOMAIN_INTERFACE_PARAMETERS_MAX = 16;

211 212 213 214 215 216 217 218 219 220 221
/*
 * Upper limit on cpus involved in per-cpu stats
 */
const REMOTE_DOMAIN_GET_CPU_STATS_NCPUS_MAX = 128;

/*
 * Upper limit on list of per-cpu stats:
 *  REMOTE_NODE_CPU_STATS_MAX * REMOTE_DOMAIN_GET_CPU_STATS_MAX
 */
const REMOTE_DOMAIN_GET_CPU_STATS_MAX = 2048;

222 223 224 225 226
/*
 * Upper limit on number of disks with errors
 */
const REMOTE_DOMAIN_DISK_ERRORS_MAX = 256;

227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
/* UUID.  VIR_UUID_BUFLEN definition comes from libvirt.h */
typedef opaque remote_uuid[VIR_UUID_BUFLEN];

/* A domain which may not be NULL. */
struct remote_nonnull_domain {
    remote_nonnull_string name;
    remote_uuid uuid;
    int id;
};

/* A network which may not be NULL. */
struct remote_nonnull_network {
    remote_nonnull_string name;
    remote_uuid uuid;
};

243 244 245 246 247 248
/* A network filter which may not be NULL. */
struct remote_nonnull_nwfilter {
    remote_nonnull_string name;
    remote_uuid uuid;
};

D
Daniel Veillard 已提交
249 250 251 252 253 254
/* An interface which may not be NULL. */
struct remote_nonnull_interface {
    remote_nonnull_string name;
    remote_nonnull_string mac;
};

255 256 257 258 259 260 261 262 263 264 265 266 267
/* A storage pool which may not be NULL. */
struct remote_nonnull_storage_pool {
    remote_nonnull_string name;
    remote_uuid uuid;
};

/* A storage vol which may not be NULL. */
struct remote_nonnull_storage_vol {
    remote_nonnull_string pool;
    remote_nonnull_string name;
    remote_nonnull_string key;
};

268 269 270 271 272
/* A node device which may not be NULL. */
struct remote_nonnull_node_device {
    remote_nonnull_string name;
};

273 274
/* A secret which may not be null. */
struct remote_nonnull_secret {
275
    remote_uuid uuid;
276 277
    int usageType;
    remote_nonnull_string usageID;
278 279
};

C
Chris Lalancette 已提交
280 281 282
/* A snapshot which may not be NULL. */
struct remote_nonnull_domain_snapshot {
    remote_nonnull_string name;
283
    remote_nonnull_domain dom;
C
Chris Lalancette 已提交
284 285
};

286 287 288
/* A domain or network which may be NULL. */
typedef remote_nonnull_domain *remote_domain;
typedef remote_nonnull_network *remote_network;
289
typedef remote_nonnull_nwfilter *remote_nwfilter;
290 291
typedef remote_nonnull_storage_pool *remote_storage_pool;
typedef remote_nonnull_storage_vol *remote_storage_vol;
292
typedef remote_nonnull_node_device *remote_node_device;
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315

/* Error message. See <virterror.h> for explanation of fields. */

/* NB. Fields "code", "domain" and "level" are really enums.  The
 * numeric value should remain compatible between libvirt and
 * libvirtd.  This means, no changing or reordering the enums as
 * defined in <virterror.h> (but we don't do that anyway, for separate
 * ABI reasons).
 */
struct remote_error {
    int code;
    int domain;
    remote_string message;
    int level;
    remote_domain dom;
    remote_string str1;
    remote_string str2;
    remote_string str3;
    int int1;
    int int2;
    remote_network net;
};

316 317 318
/* Authentication types available thus far.... */
enum remote_auth_type {
    REMOTE_AUTH_NONE = 0,
319 320
    REMOTE_AUTH_SASL = 1,
    REMOTE_AUTH_POLKIT = 2
321 322 323
};


324 325 326 327 328 329 330 331
/* Wire encoding of virVcpuInfo. */
struct remote_vcpu_info {
    unsigned int number;
    int state;
    unsigned hyper cpu_time;
    int cpu;
};

332
/* Wire encoding of virTypedParameter.
333 334
 * Note the enum (type) which must remain binary compatible.
 */
335 336
union remote_typed_param_value switch (int type) {
 case VIR_TYPED_PARAM_INT:
337
     int i;
338
 case VIR_TYPED_PARAM_UINT:
339
     unsigned int ui;
340
 case VIR_TYPED_PARAM_LLONG:
341
     hyper l;
342
 case VIR_TYPED_PARAM_ULLONG:
343
     unsigned hyper ul;
344
 case VIR_TYPED_PARAM_DOUBLE:
345
     double d;
346
 case VIR_TYPED_PARAM_BOOLEAN:
347
     int b;
348 349
 case VIR_TYPED_PARAM_STRING:
     remote_nonnull_string s;
350 351
};

352
struct remote_typed_param {
353
    remote_nonnull_string field;
354
    remote_typed_param_value value;
355 356
};

357 358 359 360 361
struct remote_node_get_cpu_stats {
    remote_nonnull_string field;
    unsigned hyper value;
};

362 363 364 365 366
struct remote_node_get_memory_stats {
    remote_nonnull_string field;
    unsigned hyper value;
};

367 368 369 370
struct remote_domain_disk_error {
    remote_nonnull_string disk;
    int error;
};
371

372 373 374 375 376 377 378 379
/*----- Calls. -----*/

/* For each call we may have a 'remote_CALL_args' and 'remote_CALL_ret'
 * type.  These are omitted when they are void.  The virConnectPtr
 * is not passed at all (it is inferred on the remote server from the
 * connection).  Errors are returned implicitly in the RPC protocol.
 *
 * Please follow the naming convention carefully - this file is
380
 * parsed by 'gendispatch.pl'.
381 382 383
 *
 * 'remote_CALL_ret' members that are filled via call-by-reference must be
 * annotated with a insert@<offset> comment to indicate the offset in the
384 385 386 387 388
 * parameter list of the function to be called.
 *
 * If the 'remote_CALL_ret' maps to a struct in the public API then it is
 * also filled via call-by-reference and must be annotated with a
 * insert@<offset> comment to indicate the offset in the parameter list of
389 390 391 392
 * the function to be called.
 *
 * Dynamic opaque and remote_nonnull_string arrays can be annotated with an
 * optional typecast */
393 394 395 396 397 398

struct remote_open_args {
    /* NB. "name" might be NULL although in practice you can't
     * yet do that using the remote_internal driver.
     */
    remote_string name;
399
    unsigned int flags;
400 401
};

402 403 404 405 406 407 408 409
struct remote_supports_feature_args {
    int feature;
};

struct remote_supports_feature_ret {
    int supported;
};

410 411 412 413 414
struct remote_get_type_ret {
    remote_nonnull_string type;
};

struct remote_get_version_ret {
415
    unsigned hyper hv_ver;
416 417
};

418
struct remote_get_lib_version_ret {
419
    unsigned hyper lib_ver;
420 421
};

422 423 424 425
struct remote_get_hostname_ret {
    remote_nonnull_string hostname;
};

426 427 428 429 430 431 432 433
struct remote_get_sysinfo_args {
    unsigned int flags;
};

struct remote_get_sysinfo_ret {
    remote_nonnull_string sysinfo;
};

434 435 436 437
struct remote_get_uri_ret {
    remote_nonnull_string uri;
};

438 439 440 441 442 443 444 445 446 447 448
struct remote_get_max_vcpus_args {
    /* The only backend which supports this call is Xen HV, and
     * there the type is ignored so it could be NULL.
     */
    remote_string type;
};

struct remote_get_max_vcpus_ret {
    int max_vcpus;
};

449
struct remote_node_get_info_ret { /* insert@1 */
450
    char model[32];
451
    unsigned hyper memory;
452 453 454 455 456 457 458 459 460 461 462 463
    int cpus;
    int mhz;
    int nodes;
    int sockets;
    int cores;
    int threads;
};

struct remote_get_capabilities_ret {
    remote_nonnull_string capabilities;
};

464 465 466 467 468 469 470 471 472 473 474
struct remote_node_get_cpu_stats_args {
    int cpuNum;
    int nparams;
    unsigned int flags;
};

struct remote_node_get_cpu_stats_ret {
    remote_node_get_cpu_stats params<REMOTE_NODE_CPU_STATS_MAX>;
    int nparams;
};

475 476 477 478 479 480 481 482 483 484 485
struct remote_node_get_memory_stats_args {
    int nparams;
    int cellNum;
    unsigned int flags;
};

struct remote_node_get_memory_stats_ret {
    remote_node_get_memory_stats params<REMOTE_NODE_MEMORY_STATS_MAX>;
    int nparams;
};

486 487
struct remote_node_get_cells_free_memory_args {
    int startCell;
488
    int maxcells;
489 490 491
};

struct remote_node_get_cells_free_memory_ret {
492
    unsigned hyper cells<REMOTE_NODE_MAX_CELLS>; /* insert@1 */
493 494 495
};

struct remote_node_get_free_memory_ret {
496
    unsigned hyper freeMem;
497 498
};

499 500 501 502 503 504 505 506 507 508 509
struct remote_domain_get_scheduler_type_args {
    remote_nonnull_domain dom;
};

struct remote_domain_get_scheduler_type_ret {
    remote_nonnull_string type;
    int nparams;
};

struct remote_domain_get_scheduler_parameters_args {
    remote_nonnull_domain dom;
510
    int nparams; /* call-by-reference */
511 512 513
};

struct remote_domain_get_scheduler_parameters_ret {
514
    remote_typed_param params<REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX>; /* insert@1 */
515 516
};

517 518
struct remote_domain_get_scheduler_parameters_flags_args {
    remote_nonnull_domain dom;
519
    int nparams; /* call-by-reference */
520 521 522 523
    unsigned int flags;
};

struct remote_domain_get_scheduler_parameters_flags_ret {
524
    remote_typed_param params<REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX>; /* insert@1 */
525 526
};

527 528
struct remote_domain_set_scheduler_parameters_args {
    remote_nonnull_domain dom;
529
    remote_typed_param params<REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX>;
530 531
};

532 533
struct remote_domain_set_scheduler_parameters_flags_args {
    remote_nonnull_domain dom;
534
    remote_typed_param params<REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX>;
535 536 537
    unsigned int flags;
};

538 539
struct remote_domain_set_blkio_parameters_args {
    remote_nonnull_domain dom;
540
    remote_typed_param params<REMOTE_DOMAIN_BLKIO_PARAMETERS_MAX>;
541 542 543 544 545 546 547 548 549 550
    unsigned int flags;
};

struct remote_domain_get_blkio_parameters_args {
    remote_nonnull_domain dom;
    int nparams;
    unsigned int flags;
};

struct remote_domain_get_blkio_parameters_ret {
551
    remote_typed_param params<REMOTE_DOMAIN_BLKIO_PARAMETERS_MAX>;
552 553 554
    int nparams;
};

555 556
struct remote_domain_set_memory_parameters_args {
    remote_nonnull_domain dom;
557
    remote_typed_param params<REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX>;
558 559 560 561 562 563 564 565 566 567
    unsigned int flags;
};

struct remote_domain_get_memory_parameters_args {
    remote_nonnull_domain dom;
    int nparams;
    unsigned int flags;
};

struct remote_domain_get_memory_parameters_ret {
568
    remote_typed_param params<REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX>;
569 570 571
    int nparams;
};

572 573 574 575 576 577 578
struct remote_domain_block_resize_args {
    remote_nonnull_domain dom;
    remote_nonnull_string disk;
    unsigned hyper size;
    unsigned int flags;
};

579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595
struct remote_domain_set_numa_parameters_args {
    remote_nonnull_domain dom;
    remote_typed_param params<REMOTE_DOMAIN_NUMA_PARAMETERS_MAX>;
    unsigned int flags;
};

struct remote_domain_get_numa_parameters_args {
    remote_nonnull_domain dom;
    int nparams;
    unsigned int flags;
};

struct remote_domain_get_numa_parameters_ret {
    remote_typed_param params<REMOTE_DOMAIN_NUMA_PARAMETERS_MAX>;
    int nparams;
};

596 597 598 599 600
struct remote_domain_block_stats_args {
    remote_nonnull_domain dom;
    remote_nonnull_string path;
};

601
struct remote_domain_block_stats_ret { /* insert@2 */
602 603 604 605 606 607 608
    hyper rd_req;
    hyper rd_bytes;
    hyper wr_req;
    hyper wr_bytes;
    hyper errs;
};

609 610 611 612 613 614 615 616 617 618 619 620
struct remote_domain_block_stats_flags_args {
    remote_nonnull_domain dom;
    remote_nonnull_string path;
    int nparams;
    unsigned int flags;
};

struct remote_domain_block_stats_flags_ret {
    remote_typed_param params<REMOTE_DOMAIN_BLOCK_STATS_PARAMETERS_MAX>;
    int nparams;
};

621 622 623 624 625
struct remote_domain_interface_stats_args {
    remote_nonnull_domain dom;
    remote_nonnull_string path;
};

626
struct remote_domain_interface_stats_ret { /* insert@2 */
627 628 629 630 631 632 633 634 635 636
    hyper rx_bytes;
    hyper rx_packets;
    hyper rx_errs;
    hyper rx_drop;
    hyper tx_bytes;
    hyper tx_packets;
    hyper tx_errs;
    hyper tx_drop;
};

637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655
struct remote_domain_set_interface_parameters_args {
    remote_nonnull_domain dom;
    remote_nonnull_string device;
    remote_typed_param params<REMOTE_DOMAIN_INTERFACE_PARAMETERS_MAX>;
    unsigned int flags;
};

struct remote_domain_get_interface_parameters_args {
    remote_nonnull_domain dom;
    remote_nonnull_string device;
    int nparams;
    unsigned int flags;
};

struct remote_domain_get_interface_parameters_ret {
    remote_typed_param params<REMOTE_DOMAIN_INTERFACE_PARAMETERS_MAX>;
    int nparams;
};

656
struct remote_domain_memory_stats_args {
657
    remote_nonnull_domain dom;
658 659
    unsigned int maxStats;
    unsigned int flags;
660 661 662 663 664 665 666 667 668 669 670
};

struct remote_domain_memory_stat {
    int tag;
    unsigned hyper val;
};

struct remote_domain_memory_stats_ret {
    remote_domain_memory_stat stats<REMOTE_DOMAIN_MEMORY_STATS_MAX>;
};

671 672 673 674
struct remote_domain_block_peek_args {
    remote_nonnull_domain dom;
    remote_nonnull_string path;
    unsigned hyper offset;
675 676
    unsigned int size;
    unsigned int flags;
677 678 679 680 681 682
};

struct remote_domain_block_peek_ret {
    opaque buffer<REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX>;
};

R
Richard W.M. Jones 已提交
683 684 685
struct remote_domain_memory_peek_args {
    remote_nonnull_domain dom;
    unsigned hyper offset;
686 687
    unsigned int size;
    unsigned int flags;
R
Richard W.M. Jones 已提交
688 689 690 691 692 693
};

struct remote_domain_memory_peek_ret {
    opaque buffer<REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX>;
};

694 695 696
struct remote_domain_get_block_info_args {
    remote_nonnull_domain dom;
    remote_nonnull_string path;
697
    unsigned int flags;
698 699
};

700
struct remote_domain_get_block_info_ret { /* insert@2 */
701 702 703 704 705
    unsigned hyper allocation;
    unsigned hyper capacity;
    unsigned hyper physical;
};

706 707 708 709 710
struct remote_list_domains_args {
    int maxids;
};

struct remote_list_domains_ret {
711
    int ids<REMOTE_DOMAIN_ID_LIST_MAX>; /* insert@1 */
712 713 714 715 716 717
};

struct remote_num_of_domains_ret {
    int num;
};

718
struct remote_domain_create_xml_args {
719
    remote_nonnull_string xml_desc;
720
    unsigned int flags;
721 722
};

723
struct remote_domain_create_xml_ret {
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754
    remote_nonnull_domain dom;
};

struct remote_domain_lookup_by_id_args {
    int id;
};

struct remote_domain_lookup_by_id_ret {
    remote_nonnull_domain dom;
};

struct remote_domain_lookup_by_uuid_args {
    remote_uuid uuid;
};

struct remote_domain_lookup_by_uuid_ret {
    remote_nonnull_domain dom;
};

struct remote_domain_lookup_by_name_args {
    remote_nonnull_string name;
};

struct remote_domain_lookup_by_name_ret {
    remote_nonnull_domain dom;
};

struct remote_domain_suspend_args {
    remote_nonnull_domain dom;
};

755 756 757 758
struct remote_domain_resume_args {
    remote_nonnull_domain dom;
};

759 760 761 762 763 764 765
struct remote_domain_pm_suspend_for_duration_args {
    remote_nonnull_domain dom;
    unsigned int target;
    unsigned hyper duration;
    unsigned int flags;
};

766
struct remote_domain_pm_wakeup_args {
767
    remote_nonnull_domain dom;
768
    unsigned int flags;
769 770 771 772 773 774 775 776
};

struct remote_domain_shutdown_args {
    remote_nonnull_domain dom;
};

struct remote_domain_reboot_args {
    remote_nonnull_domain dom;
777
    unsigned int flags;
778 779
};

780 781 782 783 784
struct remote_domain_reset_args {
    remote_nonnull_domain dom;
    unsigned int flags;
};

785 786 787 788
struct remote_domain_destroy_args {
    remote_nonnull_domain dom;
};

789 790 791 792 793
struct remote_domain_destroy_flags_args {
    remote_nonnull_domain dom;
    unsigned int flags;
};

794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819
struct remote_domain_get_os_type_args {
    remote_nonnull_domain dom;
};

struct remote_domain_get_os_type_ret {
    remote_nonnull_string type;
};

struct remote_domain_get_max_memory_args {
    remote_nonnull_domain dom;
};

struct remote_domain_get_max_memory_ret {
    unsigned hyper memory;
};

struct remote_domain_set_max_memory_args {
    remote_nonnull_domain dom;
    unsigned hyper memory;
};

struct remote_domain_set_memory_args {
    remote_nonnull_domain dom;
    unsigned hyper memory;
};

820 821 822 823 824 825
struct remote_domain_set_memory_flags_args {
    remote_nonnull_domain dom;
    unsigned hyper memory;
    unsigned int flags;
};

826 827 828 829
struct remote_domain_get_info_args {
    remote_nonnull_domain dom;
};

830
struct remote_domain_get_info_ret { /* insert@1 */
831
    unsigned char state;
832
    unsigned hyper maxMem;
833
    unsigned hyper memory;
834 835
    unsigned short nrVirtCpu;
    unsigned hyper cpuTime;
836 837 838 839 840 841 842
};

struct remote_domain_save_args {
    remote_nonnull_domain dom;
    remote_nonnull_string to;
};

E
Eric Blake 已提交
843 844 845 846 847 848 849
struct remote_domain_save_flags_args {
    remote_nonnull_domain dom;
    remote_nonnull_string to;
    remote_string dxml;
    unsigned int flags;
};

850 851 852 853
struct remote_domain_restore_args {
    remote_nonnull_string from;
};

E
Eric Blake 已提交
854 855 856 857 858 859
struct remote_domain_restore_flags_args {
    remote_nonnull_string from;
    remote_string dxml;
    unsigned int flags;
};

E
Eric Blake 已提交
860 861 862 863 864 865 866 867 868 869 870 871 872 873 874
struct remote_domain_save_image_get_xml_desc_args {
    remote_nonnull_string file;
    unsigned int flags;
};

struct remote_domain_save_image_get_xml_desc_ret {
    remote_nonnull_string xml;
};

struct remote_domain_save_image_define_xml_args {
    remote_nonnull_string file;
    remote_nonnull_string dxml;
    unsigned int flags;
};

875 876 877
struct remote_domain_core_dump_args {
    remote_nonnull_domain dom;
    remote_nonnull_string to;
878
    unsigned int flags;
879 880
};

881 882 883 884 885 886 887 888 889 890
struct remote_domain_screenshot_args {
    remote_nonnull_domain dom;
    unsigned int screen;
    unsigned int flags;
};

struct remote_domain_screenshot_ret {
    remote_string mime;
};

891
struct remote_domain_get_xml_desc_args {
892
    remote_nonnull_domain dom;
893
    unsigned int flags;
894 895
};

896
struct remote_domain_get_xml_desc_ret {
897 898 899
    remote_nonnull_string xml;
};

900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931
struct remote_domain_migrate_prepare_args {
    remote_string uri_in;
    unsigned hyper flags;
    remote_string dname;
    unsigned hyper resource;
};

struct remote_domain_migrate_prepare_ret {
    opaque cookie<REMOTE_MIGRATE_COOKIE_MAX>;
    remote_string uri_out;
};

struct remote_domain_migrate_perform_args {
    remote_nonnull_domain dom;
    opaque cookie<REMOTE_MIGRATE_COOKIE_MAX>;
    remote_nonnull_string uri;
    unsigned hyper flags;
    remote_string dname;
    unsigned hyper resource;
};

struct remote_domain_migrate_finish_args {
    remote_nonnull_string dname;
    opaque cookie<REMOTE_MIGRATE_COOKIE_MAX>;
    remote_nonnull_string uri;
    unsigned hyper flags;
};

struct remote_domain_migrate_finish_ret {
    remote_nonnull_domain ddom;
};

D
Daniel Veillard 已提交
932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956
struct remote_domain_migrate_prepare2_args {
    remote_string uri_in;
    unsigned hyper flags;
    remote_string dname;
    unsigned hyper resource;
    remote_nonnull_string dom_xml;
};

struct remote_domain_migrate_prepare2_ret {
    opaque cookie<REMOTE_MIGRATE_COOKIE_MAX>;
    remote_string uri_out;
};

struct remote_domain_migrate_finish2_args {
    remote_nonnull_string dname;
    opaque cookie<REMOTE_MIGRATE_COOKIE_MAX>;
    remote_nonnull_string uri;
    unsigned hyper flags;
    int retcode;
};

struct remote_domain_migrate_finish2_ret {
    remote_nonnull_domain ddom;
};

957 958 959 960 961
struct remote_list_defined_domains_args {
    int maxnames;
};

struct remote_list_defined_domains_ret {
962
    remote_nonnull_string names<REMOTE_DOMAIN_NAME_LIST_MAX>; /* insert@1 */
963 964 965 966 967 968 969 970 971 972
};

struct remote_num_of_defined_domains_ret {
    int num;
};

struct remote_domain_create_args {
    remote_nonnull_domain dom;
};

973 974 975 976 977 978 979 980 981
struct remote_domain_create_with_flags_args {
    remote_nonnull_domain dom;
    unsigned int flags;
};

struct remote_domain_create_with_flags_ret {
    remote_nonnull_domain dom;
};

982 983 984 985 986 987 988 989 990 991 992 993
struct remote_domain_define_xml_args {
    remote_nonnull_string xml;
};

struct remote_domain_define_xml_ret {
    remote_nonnull_domain dom;
};

struct remote_domain_undefine_args {
    remote_nonnull_domain dom;
};

994 995 996 997 998
struct remote_domain_undefine_flags_args {
    remote_nonnull_domain dom;
    unsigned int flags;
};

999 1000 1001 1002 1003
struct remote_domain_inject_nmi_args {
    remote_nonnull_domain dom;
    unsigned int flags;
};

1004 1005 1006 1007 1008 1009 1010 1011
struct remote_domain_send_key_args {
    remote_nonnull_domain dom;
    unsigned int codeset;
    unsigned int holdtime;
    unsigned int keycodes<REMOTE_DOMAIN_SEND_KEY_MAX>;
    unsigned int flags;
};

1012 1013
struct remote_domain_set_vcpus_args {
    remote_nonnull_domain dom;
1014
    unsigned int nvcpus;
1015 1016
};

E
Eric Blake 已提交
1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031
struct remote_domain_set_vcpus_flags_args {
    remote_nonnull_domain dom;
    unsigned int nvcpus;
    unsigned int flags;
};

struct remote_domain_get_vcpus_flags_args {
    remote_nonnull_domain dom;
    unsigned int flags;
};

struct remote_domain_get_vcpus_flags_ret {
    int num;
};

1032 1033
struct remote_domain_pin_vcpu_args {
    remote_nonnull_domain dom;
1034
    unsigned int vcpu;
1035
    opaque cpumap<REMOTE_CPUMAP_MAX>; /* (unsigned char *) */
1036 1037
};

1038 1039 1040
struct remote_domain_pin_vcpu_flags_args {
    remote_nonnull_domain dom;
    unsigned int vcpu;
1041
    opaque cpumap<REMOTE_CPUMAP_MAX>; /* (unsigned char *) */
1042 1043 1044
    unsigned int flags;
};

E
Eric Blake 已提交
1045
struct remote_domain_get_vcpu_pin_info_args {
1046 1047 1048 1049 1050 1051
    remote_nonnull_domain dom;
    int ncpumaps;
    int maplen;
    unsigned int flags;
};

E
Eric Blake 已提交
1052
struct remote_domain_get_vcpu_pin_info_ret {
1053 1054 1055 1056
    opaque cpumaps<REMOTE_CPUMAPS_MAX>;
    int num;
};

1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075
struct remote_domain_get_vcpus_args {
    remote_nonnull_domain dom;
    int maxinfo;
    int maplen;
};

struct remote_domain_get_vcpus_ret {
    remote_vcpu_info info<REMOTE_VCPUINFO_MAX>;
    opaque cpumaps<REMOTE_CPUMAPS_MAX>;
};

struct remote_domain_get_max_vcpus_args {
    remote_nonnull_domain dom;
};

struct remote_domain_get_max_vcpus_ret {
    int num;
};

1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089
struct remote_domain_get_security_label_args {
    remote_nonnull_domain dom;
};

struct remote_domain_get_security_label_ret {
    char label<REMOTE_SECURITY_LABEL_MAX>;
    int enforcing;
};

struct remote_node_get_security_model_ret {
    char model<REMOTE_SECURITY_MODEL_MAX>;
    char doi<REMOTE_SECURITY_DOI_MAX>;
};

1090 1091 1092 1093 1094
struct remote_domain_attach_device_args {
    remote_nonnull_domain dom;
    remote_nonnull_string xml;
};

J
Jim Fehlig 已提交
1095 1096 1097 1098 1099 1100
struct remote_domain_attach_device_flags_args {
    remote_nonnull_domain dom;
    remote_nonnull_string xml;
    unsigned int flags;
};

1101 1102 1103 1104 1105
struct remote_domain_detach_device_args {
    remote_nonnull_domain dom;
    remote_nonnull_string xml;
};

J
Jim Fehlig 已提交
1106 1107 1108 1109 1110 1111
struct remote_domain_detach_device_flags_args {
    remote_nonnull_domain dom;
    remote_nonnull_string xml;
    unsigned int flags;
};

1112 1113 1114 1115 1116 1117
struct remote_domain_update_device_flags_args {
    remote_nonnull_domain dom;
    remote_nonnull_string xml;
    unsigned int flags;
};

1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130
struct remote_domain_get_autostart_args {
    remote_nonnull_domain dom;
};

struct remote_domain_get_autostart_ret {
    int autostart;
};

struct remote_domain_set_autostart_args {
    remote_nonnull_domain dom;
    int autostart;
};

1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150
struct remote_domain_set_metadata_args {
    remote_nonnull_domain dom;
    int type;
    remote_string metadata;
    remote_string key;
    remote_string uri;
    unsigned int flags;
};

struct remote_domain_get_metadata_args {
    remote_nonnull_domain dom;
    int type;
    remote_string uri;
    unsigned int flags;
};

struct remote_domain_get_metadata_ret {
    remote_nonnull_string metadata;
};

1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183
struct remote_domain_block_job_abort_args {
    remote_nonnull_domain dom;
    remote_nonnull_string path;
    unsigned int flags;
};

struct remote_domain_get_block_job_info_args {
    remote_nonnull_domain dom;
    remote_nonnull_string path;
    unsigned int flags;
};

struct remote_domain_get_block_job_info_ret {
    int found;
    int type;
    unsigned hyper bandwidth;
    unsigned hyper cur;
    unsigned hyper end;
};

struct remote_domain_block_job_set_speed_args {
    remote_nonnull_domain dom;
    remote_nonnull_string path;
    unsigned hyper bandwidth;
    unsigned int flags;
};

struct remote_domain_block_pull_args {
    remote_nonnull_domain dom;
    remote_nonnull_string path;
    unsigned hyper bandwidth;
    unsigned int flags;
};
1184 1185 1186 1187 1188 1189 1190
struct remote_domain_block_rebase_args {
    remote_nonnull_domain dom;
    remote_nonnull_string path;
    remote_string base;
    unsigned hyper bandwidth;
    unsigned int flags;
};
1191

1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
struct remote_domain_set_block_io_tune_args {
    remote_nonnull_domain dom;
    remote_nonnull_string disk;
    remote_typed_param params<REMOTE_DOMAIN_BLOCK_IO_TUNE_PARAMETERS_MAX>;
    unsigned int flags;
};

struct remote_domain_get_block_io_tune_args {
    remote_nonnull_domain dom;
    remote_string disk;
    int nparams;
    unsigned int flags;
};

struct remote_domain_get_block_io_tune_ret {
    remote_typed_param params<REMOTE_DOMAIN_BLOCK_IO_TUNE_PARAMETERS_MAX>;
    int nparams;
};

1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223
struct remote_domain_get_cpu_stats_args {
    remote_nonnull_domain dom;
    unsigned int nparams;
    int          start_cpu;
    unsigned int ncpus;
    unsigned int flags;
};

struct remote_domain_get_cpu_stats_ret {
    remote_typed_param params<REMOTE_DOMAIN_GET_CPU_STATS_MAX>;
    int nparams;
};

1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234
/* Network calls: */

struct remote_num_of_networks_ret {
    int num;
};

struct remote_list_networks_args {
    int maxnames;
};

struct remote_list_networks_ret {
1235
    remote_nonnull_string names<REMOTE_NETWORK_NAME_LIST_MAX>; /* insert@1 */
1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246
};

struct remote_num_of_defined_networks_ret {
    int num;
};

struct remote_list_defined_networks_args {
    int maxnames;
};

struct remote_list_defined_networks_ret {
1247
    remote_nonnull_string names<REMOTE_NETWORK_NAME_LIST_MAX>; /* insert@1 */
1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293
};

struct remote_network_lookup_by_uuid_args {
    remote_uuid uuid;
};

struct remote_network_lookup_by_uuid_ret {
    remote_nonnull_network net;
};

struct remote_network_lookup_by_name_args {
    remote_nonnull_string name;
};

struct remote_network_lookup_by_name_ret {
    remote_nonnull_network net;
};

struct remote_network_create_xml_args {
    remote_nonnull_string xml;
};

struct remote_network_create_xml_ret {
    remote_nonnull_network net;
};

struct remote_network_define_xml_args {
    remote_nonnull_string xml;
};

struct remote_network_define_xml_ret {
    remote_nonnull_network net;
};

struct remote_network_undefine_args {
    remote_nonnull_network net;
};

struct remote_network_create_args {
    remote_nonnull_network net;
};

struct remote_network_destroy_args {
    remote_nonnull_network net;
};

1294
struct remote_network_get_xml_desc_args {
1295
    remote_nonnull_network net;
1296
    unsigned int flags;
1297 1298
};

1299
struct remote_network_get_xml_desc_ret {
1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323
    remote_nonnull_string xml;
};

struct remote_network_get_bridge_name_args {
    remote_nonnull_network net;
};

struct remote_network_get_bridge_name_ret {
    remote_nonnull_string name;
};

struct remote_network_get_autostart_args {
    remote_nonnull_network net;
};

struct remote_network_get_autostart_ret {
    int autostart;
};

struct remote_network_set_autostart_args {
    remote_nonnull_network net;
    int autostart;
};

1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334
/* network filter calls */

struct remote_num_of_nwfilters_ret {
    int num;
};

struct remote_list_nwfilters_args {
    int maxnames;
};

struct remote_list_nwfilters_ret {
1335
    remote_nonnull_string names<REMOTE_NWFILTER_NAME_LIST_MAX>; /* insert@1 */
1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367
};

struct remote_nwfilter_lookup_by_uuid_args {
    remote_uuid uuid;
};

struct remote_nwfilter_lookup_by_uuid_ret {
    remote_nonnull_nwfilter nwfilter;
};

struct remote_nwfilter_lookup_by_name_args {
    remote_nonnull_string name;
};

struct remote_nwfilter_lookup_by_name_ret {
    remote_nonnull_nwfilter nwfilter;
};

struct remote_nwfilter_define_xml_args {
    remote_nonnull_string xml;
};

struct remote_nwfilter_define_xml_ret {
    remote_nonnull_nwfilter nwfilter;
};

struct remote_nwfilter_undefine_args {
    remote_nonnull_nwfilter nwfilter;
};

struct remote_nwfilter_get_xml_desc_args {
    remote_nonnull_nwfilter nwfilter;
1368
    unsigned int flags;
1369 1370 1371 1372 1373 1374
};

struct remote_nwfilter_get_xml_desc_ret {
    remote_nonnull_string xml;
};

1375

D
Daniel Veillard 已提交
1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386
/* Interface calls: */

struct remote_num_of_interfaces_ret {
    int num;
};

struct remote_list_interfaces_args {
    int maxnames;
};

struct remote_list_interfaces_ret {
1387
    remote_nonnull_string names<REMOTE_INTERFACE_NAME_LIST_MAX>; /* insert@1 */
D
Daniel Veillard 已提交
1388 1389
};

1390 1391 1392 1393 1394 1395 1396 1397 1398
struct remote_num_of_defined_interfaces_ret {
    int num;
};

struct remote_list_defined_interfaces_args {
    int maxnames;
};

struct remote_list_defined_interfaces_ret {
1399
    remote_nonnull_string names<REMOTE_DEFINED_INTERFACE_NAME_LIST_MAX>; /* insert@1 */
1400 1401
};

D
Daniel Veillard 已提交
1402 1403 1404 1405 1406
struct remote_interface_lookup_by_name_args {
    remote_nonnull_string name;
};

struct remote_interface_lookup_by_name_ret {
1407
    remote_nonnull_interface iface;
D
Daniel Veillard 已提交
1408 1409 1410 1411 1412 1413 1414
};

struct remote_interface_lookup_by_mac_string_args {
    remote_nonnull_string mac;
};

struct remote_interface_lookup_by_mac_string_ret {
1415
    remote_nonnull_interface iface;
D
Daniel Veillard 已提交
1416 1417 1418
};

struct remote_interface_get_xml_desc_args {
1419
    remote_nonnull_interface iface;
D
Daniel Veillard 已提交
1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432
    unsigned int flags;
};

struct remote_interface_get_xml_desc_ret {
    remote_nonnull_string xml;
};

struct remote_interface_define_xml_args {
    remote_nonnull_string xml;
    unsigned int flags;
};

struct remote_interface_define_xml_ret {
1433
    remote_nonnull_interface iface;
D
Daniel Veillard 已提交
1434 1435 1436
};

struct remote_interface_undefine_args {
1437
    remote_nonnull_interface iface;
D
Daniel Veillard 已提交
1438 1439 1440
};

struct remote_interface_create_args {
1441
    remote_nonnull_interface iface;
D
Daniel Veillard 已提交
1442 1443 1444 1445
    unsigned int flags;
};

struct remote_interface_destroy_args {
1446
    remote_nonnull_interface iface;
D
Daniel Veillard 已提交
1447 1448 1449
    unsigned int flags;
};

1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461
struct remote_interface_change_begin_args {
    unsigned int flags;
};

struct remote_interface_change_commit_args {
    unsigned int flags;
};

struct remote_interface_change_rollback_args {
    unsigned int flags;
};

D
Daniel Veillard 已提交
1462 1463 1464

/* Auth calls: */

1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495
struct remote_auth_list_ret {
    remote_auth_type types<REMOTE_AUTH_TYPE_LIST_MAX>;
};

struct remote_auth_sasl_init_ret {
    remote_nonnull_string mechlist;
};

struct remote_auth_sasl_start_args {
    remote_nonnull_string mech;
    int nil;
    char data<REMOTE_AUTH_SASL_DATA_MAX>;
};

struct remote_auth_sasl_start_ret {
    int complete;
    int nil;
    char data<REMOTE_AUTH_SASL_DATA_MAX>;
};

struct remote_auth_sasl_step_args {
    int nil;
    char data<REMOTE_AUTH_SASL_DATA_MAX>;
};

struct remote_auth_sasl_step_ret {
    int complete;
    int nil;
    char data<REMOTE_AUTH_SASL_DATA_MAX>;
};

1496 1497 1498 1499
struct remote_auth_polkit_ret {
    int complete;
};

1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512


/* Storage pool calls: */

struct remote_num_of_storage_pools_ret {
    int num;
};

struct remote_list_storage_pools_args {
    int maxnames;
};

struct remote_list_storage_pools_ret {
1513
    remote_nonnull_string names<REMOTE_STORAGE_POOL_NAME_LIST_MAX>; /* insert@1 */
1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524
};

struct remote_num_of_defined_storage_pools_ret {
    int num;
};

struct remote_list_defined_storage_pools_args {
    int maxnames;
};

struct remote_list_defined_storage_pools_ret {
1525
    remote_nonnull_string names<REMOTE_STORAGE_POOL_NAME_LIST_MAX>; /* insert@1 */
1526 1527
};

1528 1529 1530
struct remote_find_storage_pool_sources_args {
    remote_nonnull_string type;
    remote_string srcSpec;
1531
    unsigned int flags;
1532 1533 1534 1535 1536 1537
};

struct remote_find_storage_pool_sources_ret {
    remote_nonnull_string xml;
};

1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563
struct remote_storage_pool_lookup_by_uuid_args {
    remote_uuid uuid;
};

struct remote_storage_pool_lookup_by_uuid_ret {
    remote_nonnull_storage_pool pool;
};

struct remote_storage_pool_lookup_by_name_args {
    remote_nonnull_string name;
};

struct remote_storage_pool_lookup_by_name_ret {
    remote_nonnull_storage_pool pool;
};

struct remote_storage_pool_lookup_by_volume_args {
    remote_nonnull_storage_vol vol;
};

struct remote_storage_pool_lookup_by_volume_ret {
    remote_nonnull_storage_pool pool;
};

struct remote_storage_pool_create_xml_args {
    remote_nonnull_string xml;
1564
    unsigned int flags;
1565 1566 1567 1568 1569 1570 1571 1572
};

struct remote_storage_pool_create_xml_ret {
    remote_nonnull_storage_pool pool;
};

struct remote_storage_pool_define_xml_args {
    remote_nonnull_string xml;
1573
    unsigned int flags;
1574 1575 1576 1577 1578 1579 1580 1581
};

struct remote_storage_pool_define_xml_ret {
    remote_nonnull_storage_pool pool;
};

struct remote_storage_pool_build_args {
    remote_nonnull_storage_pool pool;
1582
    unsigned int flags;
1583 1584 1585 1586 1587 1588 1589 1590
};

struct remote_storage_pool_undefine_args {
    remote_nonnull_storage_pool pool;
};

struct remote_storage_pool_create_args {
    remote_nonnull_storage_pool pool;
1591
    unsigned int flags;
1592 1593 1594 1595 1596 1597 1598 1599
};

struct remote_storage_pool_destroy_args {
    remote_nonnull_storage_pool pool;
};

struct remote_storage_pool_delete_args {
    remote_nonnull_storage_pool pool;
1600
    unsigned int flags;
1601 1602 1603 1604
};

struct remote_storage_pool_refresh_args {
    remote_nonnull_storage_pool pool;
1605
    unsigned int flags;
1606 1607
};

1608
struct remote_storage_pool_get_xml_desc_args {
1609
    remote_nonnull_storage_pool pool;
1610
    unsigned int flags;
1611 1612
};

1613
struct remote_storage_pool_get_xml_desc_ret {
1614 1615 1616 1617 1618 1619 1620
    remote_nonnull_string xml;
};

struct remote_storage_pool_get_info_args {
    remote_nonnull_storage_pool pool;
};

1621
struct remote_storage_pool_get_info_ret { /* insert@1 */
1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654
    unsigned char state;
    unsigned hyper capacity;
    unsigned hyper allocation;
    unsigned hyper available;
};

struct remote_storage_pool_get_autostart_args {
    remote_nonnull_storage_pool pool;
};

struct remote_storage_pool_get_autostart_ret {
    int autostart;
};

struct remote_storage_pool_set_autostart_args {
    remote_nonnull_storage_pool pool;
    int autostart;
};

struct remote_storage_pool_num_of_volumes_args {
    remote_nonnull_storage_pool pool;
};

struct remote_storage_pool_num_of_volumes_ret {
    int num;
};

struct remote_storage_pool_list_volumes_args {
    remote_nonnull_storage_pool pool;
    int maxnames;
};

struct remote_storage_pool_list_volumes_ret {
1655
    remote_nonnull_string names<REMOTE_STORAGE_VOL_NAME_LIST_MAX>; /* insert@1 */
1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689
};



/* Storage vol calls: */

struct remote_storage_vol_lookup_by_name_args {
    remote_nonnull_storage_pool pool;
    remote_nonnull_string name;
};

struct remote_storage_vol_lookup_by_name_ret {
    remote_nonnull_storage_vol vol;
};

struct remote_storage_vol_lookup_by_key_args {
    remote_nonnull_string key;
};

struct remote_storage_vol_lookup_by_key_ret {
    remote_nonnull_storage_vol vol;
};

struct remote_storage_vol_lookup_by_path_args {
    remote_nonnull_string path;
};

struct remote_storage_vol_lookup_by_path_ret {
    remote_nonnull_storage_vol vol;
};

struct remote_storage_vol_create_xml_args {
    remote_nonnull_storage_pool pool;
    remote_nonnull_string xml;
1690
    unsigned int flags;
1691 1692 1693 1694 1695 1696
};

struct remote_storage_vol_create_xml_ret {
    remote_nonnull_storage_vol vol;
};

1697 1698 1699 1700
struct remote_storage_vol_create_xml_from_args {
    remote_nonnull_storage_pool pool;
    remote_nonnull_string xml;
    remote_nonnull_storage_vol clonevol;
1701
    unsigned int flags;
1702 1703 1704 1705 1706 1707
};

struct remote_storage_vol_create_xml_from_ret {
    remote_nonnull_storage_vol vol;
};

1708 1709
struct remote_storage_vol_delete_args {
    remote_nonnull_storage_vol vol;
1710
    unsigned int flags;
1711 1712
};

1713 1714
struct remote_storage_vol_wipe_args {
    remote_nonnull_storage_vol vol;
1715
    unsigned int flags;
1716 1717
};

1718 1719 1720 1721 1722 1723
struct remote_storage_vol_wipe_pattern_args {
    remote_nonnull_storage_vol vol;
    unsigned int algorithm;
    unsigned int flags;
};

1724
struct remote_storage_vol_get_xml_desc_args {
1725
    remote_nonnull_storage_vol vol;
1726
    unsigned int flags;
1727 1728
};

1729
struct remote_storage_vol_get_xml_desc_ret {
1730 1731 1732 1733 1734 1735 1736
    remote_nonnull_string xml;
};

struct remote_storage_vol_get_info_args {
    remote_nonnull_storage_vol vol;
};

1737
struct remote_storage_vol_get_info_ret { /* insert@1 */
1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750
    char type;
    unsigned hyper capacity;
    unsigned hyper allocation;
};

struct remote_storage_vol_get_path_args {
    remote_nonnull_storage_vol vol;
};

struct remote_storage_vol_get_path_ret {
    remote_nonnull_string name;
};

1751 1752
struct remote_storage_vol_resize_args {
    remote_nonnull_storage_vol vol;
E
Eric Blake 已提交
1753
    unsigned hyper capacity;
1754 1755 1756
    unsigned int flags;
};

1757 1758 1759 1760
/* Node driver calls: */

struct remote_node_num_of_devices_args {
    remote_string cap;
1761
    unsigned int flags;
1762 1763 1764 1765 1766 1767 1768 1769 1770
};

struct remote_node_num_of_devices_ret {
    int num;
};

struct remote_node_list_devices_args {
    remote_string cap;
    int maxnames;
1771
    unsigned int flags;
1772 1773 1774
};

struct remote_node_list_devices_ret {
1775
    remote_nonnull_string names<REMOTE_NODE_DEVICE_NAME_LIST_MAX>; /* insert@2 */
1776 1777 1778 1779 1780 1781 1782 1783 1784 1785
};

struct remote_node_device_lookup_by_name_args {
    remote_nonnull_string name;
};

struct remote_node_device_lookup_by_name_ret {
    remote_nonnull_node_device dev;
};

1786
struct remote_node_device_get_xml_desc_args {
1787
    remote_nonnull_string name;
1788
    unsigned int flags;
1789 1790
};

1791
struct remote_node_device_get_xml_desc_ret {
1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816
    remote_nonnull_string xml;
};

struct remote_node_device_get_parent_args {
    remote_nonnull_string name;
};

struct remote_node_device_get_parent_ret {
    remote_string parent;
};

struct remote_node_device_num_of_caps_args {
    remote_nonnull_string name;
};

struct remote_node_device_num_of_caps_ret {
    int num;
};

struct remote_node_device_list_caps_args {
    remote_nonnull_string name;
    int maxnames;
};

struct remote_node_device_list_caps_ret {
1817
    remote_nonnull_string names<REMOTE_NODE_DEVICE_CAPS_LIST_MAX>; /* insert@1 */
1818 1819
};

1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831
struct remote_node_device_dettach_args {
    remote_nonnull_string name;
};

struct remote_node_device_re_attach_args {
    remote_nonnull_string name;
};

struct remote_node_device_reset_args {
    remote_nonnull_string name;
};

1832 1833
struct remote_node_device_create_xml_args {
    remote_nonnull_string xml_desc;
1834
    unsigned int flags;
1835 1836 1837 1838 1839 1840 1841 1842 1843 1844
};

struct remote_node_device_create_xml_ret {
    remote_nonnull_node_device dev;
};

struct remote_node_device_destroy_args {
    remote_nonnull_string name;
};

1845

1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859
/**
 * Events Register/Deregister:
 * It would seem rpcgen does not like both args, and ret
 * to be null. It will not generate the prototype otherwise.
 * Pass back a redundant boolean to force prototype generation.
 */
struct remote_domain_events_register_ret {
    int cb_registered;
};

struct remote_domain_events_deregister_ret {
    int cb_registered;
};

1860
struct remote_domain_event_lifecycle_msg {
1861 1862
    remote_nonnull_domain dom;
    int event;
1863
    int detail;
1864 1865
};

1866 1867 1868 1869

struct remote_domain_xml_from_native_args {
    remote_nonnull_string nativeFormat;
    remote_nonnull_string nativeConfig;
1870
    unsigned int flags;
1871 1872 1873 1874 1875 1876 1877 1878 1879 1880
};

struct remote_domain_xml_from_native_ret {
    remote_nonnull_string domainXml;
};


struct remote_domain_xml_to_native_args {
    remote_nonnull_string nativeFormat;
    remote_nonnull_string domainXml;
1881
    unsigned int flags;
1882 1883 1884 1885 1886 1887 1888
};

struct remote_domain_xml_to_native_ret {
    remote_nonnull_string nativeConfig;
};


1889 1890 1891 1892 1893 1894 1895 1896 1897
struct remote_num_of_secrets_ret {
    int num;
};

struct remote_list_secrets_args {
    int maxuuids;
};

struct remote_list_secrets_ret {
1898
    remote_nonnull_string uuids<REMOTE_SECRET_UUID_LIST_MAX>; /* insert@1 */
1899 1900
};

1901 1902
struct remote_secret_lookup_by_uuid_args {
    remote_uuid uuid;
1903 1904
};

1905
struct remote_secret_lookup_by_uuid_ret {
1906 1907 1908 1909 1910
    remote_nonnull_secret secret;
};

struct remote_secret_define_xml_args {
    remote_nonnull_string xml;
1911
    unsigned int flags;
1912 1913 1914 1915 1916 1917 1918 1919
};

struct remote_secret_define_xml_ret {
    remote_nonnull_secret secret;
};

struct remote_secret_get_xml_desc_args {
    remote_nonnull_secret secret;
1920
    unsigned int flags;
1921 1922 1923 1924 1925 1926 1927 1928
};

struct remote_secret_get_xml_desc_ret {
    remote_nonnull_string xml;
};

struct remote_secret_set_value_args {
    remote_nonnull_secret secret;
1929
    opaque value<REMOTE_SECRET_VALUE_MAX>; /* (const unsigned char *) */
1930
    unsigned int flags;
1931 1932 1933 1934
};

struct remote_secret_get_value_args {
    remote_nonnull_secret secret;
1935
    unsigned int flags;
1936 1937 1938 1939 1940 1941 1942 1943 1944 1945
};

struct remote_secret_get_value_ret {
    opaque value<REMOTE_SECRET_VALUE_MAX>;
};

struct remote_secret_undefine_args {
    remote_nonnull_secret secret;
};

1946 1947 1948 1949 1950 1951 1952 1953 1954
struct remote_secret_lookup_by_usage_args {
    int usageType;
    remote_nonnull_string usageID;
};

struct remote_secret_lookup_by_usage_ret {
    remote_nonnull_secret secret;
};

C
Chris Lalancette 已提交
1955 1956 1957 1958 1959 1960 1961
struct remote_domain_migrate_prepare_tunnel_args {
    unsigned hyper flags;
    remote_string dname;
    unsigned hyper resource;
    remote_nonnull_string dom_xml;
};

1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984

struct remote_is_secure_ret {
    int secure;
};


struct remote_domain_is_active_args {
    remote_nonnull_domain dom;
};

struct remote_domain_is_active_ret {
    int active;
};


struct remote_domain_is_persistent_args {
    remote_nonnull_domain dom;
};

struct remote_domain_is_persistent_ret {
    int persistent;
};

O
Osier Yang 已提交
1985 1986 1987 1988 1989 1990 1991
struct remote_domain_is_updated_args {
    remote_nonnull_domain dom;
};

struct remote_domain_is_updated_ret {
    int updated;
};
1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035

struct remote_network_is_active_args {
    remote_nonnull_network net;
};

struct remote_network_is_active_ret {
    int active;
};

struct remote_network_is_persistent_args {
    remote_nonnull_network net;
};

struct remote_network_is_persistent_ret {
    int persistent;
};


struct remote_storage_pool_is_active_args {
    remote_nonnull_storage_pool pool;
};

struct remote_storage_pool_is_active_ret {
    int active;
};

struct remote_storage_pool_is_persistent_args {
    remote_nonnull_storage_pool pool;
};

struct remote_storage_pool_is_persistent_ret {
    int persistent;
};


struct remote_interface_is_active_args {
    remote_nonnull_interface iface;
};

struct remote_interface_is_active_ret {
    int active;
};


2036 2037
struct remote_cpu_compare_args {
    remote_nonnull_string xml;
2038
    unsigned int flags;
2039 2040 2041 2042 2043 2044 2045
};

struct remote_cpu_compare_ret {
    int result;
};


2046
struct remote_cpu_baseline_args {
2047
    remote_nonnull_string xmlCPUs<REMOTE_CPU_BASELINE_MAX>; /* (const char **) */
2048
    unsigned int flags;
2049 2050 2051 2052 2053 2054 2055
};

struct remote_cpu_baseline_ret {
    remote_nonnull_string cpu;
};


2056 2057 2058 2059
struct remote_domain_get_job_info_args {
    remote_nonnull_domain dom;
};

2060
struct remote_domain_get_job_info_ret { /* insert@1 */
2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079
    int type;

    unsigned hyper timeElapsed;
    unsigned hyper timeRemaining;

    unsigned hyper dataTotal;
    unsigned hyper dataProcessed;
    unsigned hyper dataRemaining;

    unsigned hyper memTotal;
    unsigned hyper memProcessed;
    unsigned hyper memRemaining;

    unsigned hyper fileTotal;
    unsigned hyper fileProcessed;
    unsigned hyper fileRemaining;
};


2080 2081 2082 2083 2084
struct remote_domain_abort_job_args {
    remote_nonnull_domain dom;
};


2085 2086 2087
struct remote_domain_migrate_set_max_downtime_args {
    remote_nonnull_domain dom;
    unsigned hyper downtime;
2088
    unsigned int flags;
2089 2090
};

2091 2092 2093
struct remote_domain_migrate_set_max_speed_args {
    remote_nonnull_domain dom;
    unsigned hyper bandwidth;
2094
    unsigned int flags;
2095 2096
};

2097 2098 2099 2100 2101 2102 2103 2104 2105 2106
struct remote_domain_migrate_get_max_speed_args {
    remote_nonnull_domain dom;
    unsigned int flags;
};

struct remote_domain_migrate_get_max_speed_ret {
     unsigned hyper bandwidth; /* insert@1 */
};


2107 2108 2109 2110 2111 2112 2113 2114
struct remote_domain_events_register_any_args {
    int eventID;
};

struct remote_domain_events_deregister_any_args {
    int eventID;
};

2115 2116 2117
struct remote_domain_event_reboot_msg {
    remote_nonnull_domain dom;
};
2118

2119 2120 2121 2122 2123
struct remote_domain_event_rtc_change_msg {
    remote_nonnull_domain dom;
    hyper offset;
};

2124 2125 2126 2127 2128
struct remote_domain_event_watchdog_msg {
    remote_nonnull_domain dom;
    int action;
};

2129 2130 2131 2132 2133 2134 2135
struct remote_domain_event_io_error_msg {
    remote_nonnull_domain dom;
    remote_nonnull_string srcPath;
    remote_nonnull_string devAlias;
    int action;
};

2136 2137 2138 2139 2140 2141 2142 2143
struct remote_domain_event_io_error_reason_msg {
    remote_nonnull_domain dom;
    remote_nonnull_string srcPath;
    remote_nonnull_string devAlias;
    int action;
    remote_nonnull_string reason;
};

2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165
struct remote_domain_event_graphics_address {
    int family;
    remote_nonnull_string node;
    remote_nonnull_string service;
};

const REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX = 20;

struct remote_domain_event_graphics_identity {
    remote_nonnull_string type;
    remote_nonnull_string name;
};

struct remote_domain_event_graphics_msg {
    remote_nonnull_domain dom;
    int phase;
    remote_domain_event_graphics_address local;
    remote_domain_event_graphics_address remote;
    remote_nonnull_string authScheme;
    remote_domain_event_graphics_identity subject<REMOTE_DOMAIN_EVENT_GRAPHICS_IDENTITY_MAX>;
};

2166 2167 2168 2169 2170 2171 2172
struct remote_domain_event_block_job_msg {
    remote_nonnull_domain dom;
    remote_nonnull_string path;
    int type;
    int status;
};

2173 2174 2175 2176 2177 2178 2179 2180
struct remote_domain_event_disk_change_msg {
    remote_nonnull_domain dom;
    remote_string oldSrcPath;
    remote_string newSrcPath;
    remote_nonnull_string devAlias;
    int reason;
};

2181 2182 2183 2184 2185 2186
struct remote_domain_event_tray_change_msg {
    remote_nonnull_domain dom;
    remote_nonnull_string devAlias;
    int reason;
};

O
Osier Yang 已提交
2187 2188 2189 2190
struct remote_domain_event_pmwakeup_msg {
    remote_nonnull_domain dom;
};

O
Osier Yang 已提交
2191 2192 2193 2194
struct remote_domain_event_pmsuspend_msg {
    remote_nonnull_domain dom;
};

2195 2196
struct remote_domain_managed_save_args {
    remote_nonnull_domain dom;
2197
    unsigned int flags;
2198 2199 2200 2201
};

struct remote_domain_has_managed_save_image_args {
    remote_nonnull_domain dom;
2202
    unsigned int flags;
2203 2204 2205
};

struct remote_domain_has_managed_save_image_ret {
2206
    int result;
2207 2208 2209 2210
};

struct remote_domain_managed_save_remove_args {
    remote_nonnull_domain dom;
2211
    unsigned int flags;
2212 2213
};

C
Chris Lalancette 已提交
2214
struct remote_domain_snapshot_create_xml_args {
2215
    remote_nonnull_domain dom;
C
Chris Lalancette 已提交
2216
    remote_nonnull_string xml_desc;
2217
    unsigned int flags;
C
Chris Lalancette 已提交
2218 2219 2220 2221 2222 2223
};

struct remote_domain_snapshot_create_xml_ret {
    remote_nonnull_domain_snapshot snap;
};

2224
struct remote_domain_snapshot_get_xml_desc_args {
C
Chris Lalancette 已提交
2225
    remote_nonnull_domain_snapshot snap;
2226
    unsigned int flags;
C
Chris Lalancette 已提交
2227 2228
};

2229
struct remote_domain_snapshot_get_xml_desc_ret {
C
Chris Lalancette 已提交
2230 2231 2232 2233
    remote_nonnull_string xml;
};

struct remote_domain_snapshot_num_args {
2234
    remote_nonnull_domain dom;
2235
    unsigned int flags;
C
Chris Lalancette 已提交
2236 2237 2238 2239 2240 2241 2242
};

struct remote_domain_snapshot_num_ret {
    int num;
};

struct remote_domain_snapshot_list_names_args {
2243
    remote_nonnull_domain dom;
2244
    int maxnames;
2245
    unsigned int flags;
C
Chris Lalancette 已提交
2246 2247 2248
};

struct remote_domain_snapshot_list_names_ret {
2249
    remote_nonnull_string names<REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX>; /* insert@1 */
C
Chris Lalancette 已提交
2250 2251
};

2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270
struct remote_domain_snapshot_num_children_args {
    remote_nonnull_domain_snapshot snap;
    unsigned int flags;
};

struct remote_domain_snapshot_num_children_ret {
    int num;
};

struct remote_domain_snapshot_list_children_names_args {
    remote_nonnull_domain_snapshot snap;
    int maxnames;
    unsigned int flags;
};

struct remote_domain_snapshot_list_children_names_ret {
    remote_nonnull_string names<REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX>; /* insert@1 */
};

C
Chris Lalancette 已提交
2271
struct remote_domain_snapshot_lookup_by_name_args {
2272
    remote_nonnull_domain dom;
C
Chris Lalancette 已提交
2273
    remote_nonnull_string name;
2274
    unsigned int flags;
C
Chris Lalancette 已提交
2275 2276 2277 2278 2279 2280 2281
};

struct remote_domain_snapshot_lookup_by_name_ret {
    remote_nonnull_domain_snapshot snap;
};

struct remote_domain_has_current_snapshot_args {
2282
    remote_nonnull_domain dom;
2283
    unsigned int flags;
C
Chris Lalancette 已提交
2284 2285 2286 2287 2288 2289
};

struct remote_domain_has_current_snapshot_ret {
    int result;
};

2290 2291 2292 2293 2294 2295 2296 2297 2298
struct remote_domain_snapshot_get_parent_args {
    remote_nonnull_domain_snapshot snap;
    unsigned int flags;
};

struct remote_domain_snapshot_get_parent_ret {
    remote_nonnull_domain_snapshot snap;
};

C
Chris Lalancette 已提交
2299
struct remote_domain_snapshot_current_args {
2300
    remote_nonnull_domain dom;
2301
    unsigned int flags;
C
Chris Lalancette 已提交
2302 2303 2304 2305 2306 2307
};

struct remote_domain_snapshot_current_ret {
    remote_nonnull_domain_snapshot snap;
};

E
Eric Blake 已提交
2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325
struct remote_domain_snapshot_is_current_args {
    remote_nonnull_domain_snapshot snap;
    unsigned int flags;
};

struct remote_domain_snapshot_is_current_ret {
    int current;
};

struct remote_domain_snapshot_has_metadata_args {
    remote_nonnull_domain_snapshot snap;
    unsigned int flags;
};

struct remote_domain_snapshot_has_metadata_ret {
    int metadata;
};

C
Chris Lalancette 已提交
2326 2327
struct remote_domain_revert_to_snapshot_args {
    remote_nonnull_domain_snapshot snap;
2328
    unsigned int flags;
C
Chris Lalancette 已提交
2329 2330 2331 2332
};

struct remote_domain_snapshot_delete_args {
    remote_nonnull_domain_snapshot snap;
2333
    unsigned int flags;
C
Chris Lalancette 已提交
2334 2335
};

2336
struct remote_domain_open_console_args {
2337
    remote_nonnull_domain dom;
2338
    remote_string dev_name;
2339 2340
    unsigned int flags;
};
C
Chris Lalancette 已提交
2341

2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355
struct remote_storage_vol_upload_args {
    remote_nonnull_storage_vol vol;
    unsigned hyper offset;
    unsigned hyper length;
    unsigned int flags;
};

struct remote_storage_vol_download_args {
    remote_nonnull_storage_vol vol;
    unsigned hyper offset;
    unsigned hyper length;
    unsigned int flags;
};

2356 2357 2358 2359 2360 2361 2362 2363 2364 2365
struct remote_domain_get_state_args {
    remote_nonnull_domain dom;
    unsigned int flags;
};

struct remote_domain_get_state_ret {
    int state;
    int reason;
};

2366 2367
struct remote_domain_migrate_begin3_args {
    remote_nonnull_domain dom;
2368
    remote_string xmlin;
2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401
    unsigned hyper flags;
    remote_string dname;
    unsigned hyper resource;
};

struct remote_domain_migrate_begin3_ret {
    opaque cookie_out<REMOTE_MIGRATE_COOKIE_MAX>;
    remote_nonnull_string xml;
};

struct remote_domain_migrate_prepare3_args {
    opaque cookie_in<REMOTE_MIGRATE_COOKIE_MAX>;
    remote_string uri_in;
    unsigned hyper flags;
    remote_string dname;
    unsigned hyper resource;
    remote_nonnull_string dom_xml;
};

struct remote_domain_migrate_prepare3_ret {
    opaque cookie_out<REMOTE_MIGRATE_COOKIE_MAX>;
    remote_string uri_out;
};

struct remote_domain_migrate_prepare_tunnel3_args {
    opaque cookie_in<REMOTE_MIGRATE_COOKIE_MAX>;
    unsigned hyper flags;
    remote_string dname;
    unsigned hyper resource;
    remote_nonnull_string dom_xml;
};

struct remote_domain_migrate_prepare_tunnel3_ret {
2402
    opaque cookie_out<REMOTE_MIGRATE_COOKIE_MAX>; /* insert@3 */
2403 2404 2405 2406
};

struct remote_domain_migrate_perform3_args {
    remote_nonnull_domain dom;
2407
    remote_string xmlin;
2408
    opaque cookie_in<REMOTE_MIGRATE_COOKIE_MAX>;
2409 2410
    remote_string dconnuri;
    remote_string uri;
2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422
    unsigned hyper flags;
    remote_string dname;
    unsigned hyper resource;
};

struct remote_domain_migrate_perform3_ret {
    opaque cookie_out<REMOTE_MIGRATE_COOKIE_MAX>;
};

struct remote_domain_migrate_finish3_args {
    remote_nonnull_string dname;
    opaque cookie_in<REMOTE_MIGRATE_COOKIE_MAX>;
2423 2424
    remote_string dconnuri;
    remote_string uri;
2425 2426 2427 2428 2429
    unsigned hyper flags;
    int cancelled;
};

struct remote_domain_migrate_finish3_ret {
2430
    remote_nonnull_domain dom;
2431 2432 2433 2434 2435 2436 2437 2438 2439
    opaque cookie_out<REMOTE_MIGRATE_COOKIE_MAX>;
};

struct remote_domain_migrate_confirm3_args {
    remote_nonnull_domain dom;
    opaque cookie_in<REMOTE_MIGRATE_COOKIE_MAX>;
    unsigned hyper flags;
    int cancelled;
};
2440

2441 2442 2443 2444
struct remote_domain_event_control_error_msg {
    remote_nonnull_domain dom;
};

2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455
struct remote_domain_get_control_info_args {
    remote_nonnull_domain dom;
    unsigned int flags;
};

struct remote_domain_get_control_info_ret { /* insert@1 */
    unsigned int state;
    unsigned int details;
    unsigned hyper stateTime;
};

2456 2457 2458 2459 2460 2461
struct remote_domain_open_graphics_args {
    remote_nonnull_domain dom;
    unsigned int idx;
    unsigned int flags;
};

2462 2463 2464 2465 2466 2467
struct remote_node_suspend_for_duration_args {
    unsigned int target;
    unsigned hyper duration;
    unsigned int flags;
};

2468 2469 2470 2471 2472
struct remote_domain_shutdown_flags_args {
    remote_nonnull_domain dom;
    unsigned int flags;
};

2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483
struct remote_domain_get_disk_errors_args {
    remote_nonnull_domain dom;
    unsigned int maxerrors;
    unsigned int flags;
};

struct remote_domain_get_disk_errors_ret {
    remote_domain_disk_error errors<REMOTE_DOMAIN_DISK_ERRORS_MAX>;
    int nerrors;
};

2484

2485 2486 2487 2488 2489 2490 2491
/*----- Protocol. -----*/

/* Define the program number, protocol version and procedure numbers here. */
const REMOTE_PROGRAM = 0x20008086;
const REMOTE_PROTOCOL_VERSION = 1;

enum remote_procedure {
2492
    /* Each function must have a three-word comment.  The first word is
2493
     * whether gendispatch.pl handles daemon, the second whether
2494 2495
     * it handles src/remote.  Additional flags can be specified after a
     * pipe.
2496 2497 2498 2499 2500 2501
     * The last argument describes priority of API. There are two accepted
     * values: low, high; Each API that might eventually access hypervisor's
     * monitor (and thus block) MUST fall into low priority. However, there
     * are some exceptions to this rule, e.g. domainDestroy. Other APIs MAY
     * be marked as high priority. If in doubt, it's safe to choose low.
     * Low is taken as default, and thus can be left out.
2502 2503 2504 2505 2506 2507
     *
     * The (readstream|writestream)@<offset> flag lets daemon and src/remote
     * create a stream.  The direction is defined from the src/remote point
     * of view.  A readstream transfers data from daemon to src/remote.  The
     * <offset> specifies at which offset the stream parameter is inserted
     * in the function parameter list. */
2508 2509 2510 2511 2512 2513
    REMOTE_PROC_OPEN = 1, /* skipgen skipgen priority:high */
    REMOTE_PROC_CLOSE = 2, /* skipgen skipgen priority:high */
    REMOTE_PROC_GET_TYPE = 3, /* autogen skipgen priority:high */
    REMOTE_PROC_GET_VERSION = 4, /* autogen autogen priority:high */
    REMOTE_PROC_GET_MAX_VCPUS = 5, /* autogen autogen priority:high */
    REMOTE_PROC_NODE_GET_INFO = 6, /* autogen autogen priority:high */
2514 2515 2516 2517 2518
    REMOTE_PROC_GET_CAPABILITIES = 7, /* autogen autogen */
    REMOTE_PROC_DOMAIN_ATTACH_DEVICE = 8, /* autogen autogen */
    REMOTE_PROC_DOMAIN_CREATE = 9, /* autogen skipgen */
    REMOTE_PROC_DOMAIN_CREATE_XML = 10, /* autogen autogen */

2519 2520
    REMOTE_PROC_DOMAIN_DEFINE_XML = 11, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_DESTROY = 12, /* autogen autogen priority:high */
2521 2522
    REMOTE_PROC_DOMAIN_DETACH_DEVICE = 13, /* autogen autogen */
    REMOTE_PROC_DOMAIN_GET_XML_DESC = 14, /* autogen autogen */
2523
    REMOTE_PROC_DOMAIN_GET_AUTOSTART = 15, /* autogen autogen priority:high */
2524
    REMOTE_PROC_DOMAIN_GET_INFO = 16, /* autogen autogen */
2525 2526 2527 2528 2529 2530 2531 2532 2533 2534
    REMOTE_PROC_DOMAIN_GET_MAX_MEMORY = 17, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_GET_MAX_VCPUS = 18, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_GET_OS_TYPE = 19, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_GET_VCPUS = 20, /* skipgen skipgen priority:high */

    REMOTE_PROC_LIST_DEFINED_DOMAINS = 21, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_LOOKUP_BY_ID = 22, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_LOOKUP_BY_NAME = 23, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_LOOKUP_BY_UUID = 24, /* autogen autogen priority:high */
    REMOTE_PROC_NUM_OF_DEFINED_DOMAINS = 25, /* autogen autogen priority:high */
2535
    REMOTE_PROC_DOMAIN_PIN_VCPU = 26, /* autogen autogen */
2536 2537
    REMOTE_PROC_DOMAIN_REBOOT = 27, /* autogen autogen */
    REMOTE_PROC_DOMAIN_RESUME = 28, /* autogen autogen */
2538 2539
    REMOTE_PROC_DOMAIN_SET_AUTOSTART = 29, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_SET_MAX_MEMORY = 30, /* autogen autogen priority:high */
2540 2541 2542 2543 2544

    REMOTE_PROC_DOMAIN_SET_MEMORY = 31, /* autogen autogen */
    REMOTE_PROC_DOMAIN_SET_VCPUS = 32, /* autogen autogen */
    REMOTE_PROC_DOMAIN_SHUTDOWN = 33, /* autogen autogen */
    REMOTE_PROC_DOMAIN_SUSPEND = 34, /* autogen autogen */
2545 2546 2547 2548
    REMOTE_PROC_DOMAIN_UNDEFINE = 35, /* autogen autogen priority:high */
    REMOTE_PROC_LIST_DEFINED_NETWORKS = 36, /* autogen autogen priority:high */
    REMOTE_PROC_LIST_DOMAINS = 37, /* autogen skipgen priority:high */
    REMOTE_PROC_LIST_NETWORKS = 38, /* autogen autogen priority:high */
2549 2550 2551
    REMOTE_PROC_NETWORK_CREATE = 39, /* autogen autogen */
    REMOTE_PROC_NETWORK_CREATE_XML = 40, /* autogen autogen */

2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564
    REMOTE_PROC_NETWORK_DEFINE_XML = 41, /* autogen autogen priority:high */
    REMOTE_PROC_NETWORK_DESTROY = 42, /* autogen autogen priority:high */
    REMOTE_PROC_NETWORK_GET_XML_DESC = 43, /* autogen autogen priority:high */
    REMOTE_PROC_NETWORK_GET_AUTOSTART = 44, /* autogen autogen priority:high */
    REMOTE_PROC_NETWORK_GET_BRIDGE_NAME = 45, /* autogen autogen priority:high */
    REMOTE_PROC_NETWORK_LOOKUP_BY_NAME = 46, /* autogen autogen priority:high */
    REMOTE_PROC_NETWORK_LOOKUP_BY_UUID = 47, /* autogen autogen priority:high */
    REMOTE_PROC_NETWORK_SET_AUTOSTART = 48, /* autogen autogen priority:high */
    REMOTE_PROC_NETWORK_UNDEFINE = 49, /* autogen autogen priority:high */
    REMOTE_PROC_NUM_OF_DEFINED_NETWORKS = 50, /* autogen autogen priority:high */

    REMOTE_PROC_NUM_OF_DOMAINS = 51, /* autogen autogen priority:high */
    REMOTE_PROC_NUM_OF_NETWORKS = 52, /* autogen autogen priority:high */
2565 2566 2567 2568
    REMOTE_PROC_DOMAIN_CORE_DUMP = 53, /* autogen autogen */
    REMOTE_PROC_DOMAIN_RESTORE = 54, /* autogen autogen */
    REMOTE_PROC_DOMAIN_SAVE = 55, /* autogen autogen */
    REMOTE_PROC_DOMAIN_GET_SCHEDULER_TYPE = 56, /* skipgen skipgen */
2569 2570
    REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS = 57, /* skipgen autogen */
    REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS = 58, /* autogen autogen */
2571
    REMOTE_PROC_GET_HOSTNAME = 59, /* autogen autogen priority:high */
2572
    REMOTE_PROC_SUPPORTS_FEATURE = 60, /* skipgen autogen priority:high */
2573 2574 2575 2576 2577

    REMOTE_PROC_DOMAIN_MIGRATE_PREPARE = 61, /* skipgen skipgen */
    REMOTE_PROC_DOMAIN_MIGRATE_PERFORM = 62, /* autogen autogen */
    REMOTE_PROC_DOMAIN_MIGRATE_FINISH = 63, /* autogen autogen */
    REMOTE_PROC_DOMAIN_BLOCK_STATS = 64, /* autogen autogen */
2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588
    REMOTE_PROC_DOMAIN_INTERFACE_STATS = 65, /* autogen autogen priority:high */
    REMOTE_PROC_AUTH_LIST = 66, /* skipgen skipgen priority:high */
    REMOTE_PROC_AUTH_SASL_INIT = 67, /* skipgen skipgen priority:high */
    REMOTE_PROC_AUTH_SASL_START = 68, /* skipgen skipgen priority:high */
    REMOTE_PROC_AUTH_SASL_STEP = 69, /* skipgen skipgen priority:high */
    REMOTE_PROC_AUTH_POLKIT = 70, /* skipgen skipgen priority:high */

    REMOTE_PROC_NUM_OF_STORAGE_POOLS = 71, /* autogen autogen priority:high */
    REMOTE_PROC_LIST_STORAGE_POOLS = 72, /* autogen autogen priority:high */
    REMOTE_PROC_NUM_OF_DEFINED_STORAGE_POOLS = 73, /* autogen autogen priority:high */
    REMOTE_PROC_LIST_DEFINED_STORAGE_POOLS = 74, /* autogen autogen priority:high */
2589 2590
    REMOTE_PROC_FIND_STORAGE_POOL_SOURCES = 75, /* autogen skipgen */
    REMOTE_PROC_STORAGE_POOL_CREATE_XML = 76, /* autogen autogen */
2591
    REMOTE_PROC_STORAGE_POOL_DEFINE_XML = 77, /* autogen autogen priority:high */
2592 2593
    REMOTE_PROC_STORAGE_POOL_CREATE = 78, /* autogen autogen */
    REMOTE_PROC_STORAGE_POOL_BUILD = 79, /* autogen autogen */
2594
    REMOTE_PROC_STORAGE_POOL_DESTROY = 80, /* autogen autogen priority:high */
2595 2596

    REMOTE_PROC_STORAGE_POOL_DELETE = 81, /* autogen autogen */
2597
    REMOTE_PROC_STORAGE_POOL_UNDEFINE = 82, /* autogen autogen priority:high */
2598
    REMOTE_PROC_STORAGE_POOL_REFRESH = 83, /* autogen autogen */
2599 2600 2601 2602 2603 2604 2605 2606 2607 2608
    REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_NAME = 84, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_UUID = 85, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_POOL_LOOKUP_BY_VOLUME = 86, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_POOL_GET_INFO = 87, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_POOL_GET_XML_DESC = 88, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_POOL_GET_AUTOSTART = 89, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_POOL_SET_AUTOSTART = 90, /* autogen autogen priority:high */

    REMOTE_PROC_STORAGE_POOL_NUM_OF_VOLUMES = 91, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_POOL_LIST_VOLUMES = 92, /* autogen autogen priority:high */
2609 2610
    REMOTE_PROC_STORAGE_VOL_CREATE_XML = 93, /* autogen autogen */
    REMOTE_PROC_STORAGE_VOL_DELETE = 94, /* autogen autogen */
2611 2612 2613 2614 2615 2616 2617 2618 2619
    REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_NAME = 95, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_KEY = 96, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_VOL_LOOKUP_BY_PATH = 97, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_VOL_GET_INFO = 98, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_VOL_GET_XML_DESC = 99, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_VOL_GET_PATH = 100, /* autogen autogen priority:high */

    REMOTE_PROC_NODE_GET_CELLS_FREE_MEMORY = 101, /* autogen skipgen priority:high */
    REMOTE_PROC_NODE_GET_FREE_MEMORY = 102, /* autogen autogen priority:high */
2620 2621
    REMOTE_PROC_DOMAIN_BLOCK_PEEK = 103, /* skipgen skipgen */
    REMOTE_PROC_DOMAIN_MEMORY_PEEK = 104, /* skipgen skipgen */
2622 2623
    REMOTE_PROC_DOMAIN_EVENTS_REGISTER = 105, /* skipgen skipgen priority:high */
    REMOTE_PROC_DOMAIN_EVENTS_DEREGISTER = 106, /* skipgen skipgen priority:high */
2624 2625 2626
    REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE = 107, /* autogen autogen */
    REMOTE_PROC_DOMAIN_MIGRATE_PREPARE2 = 108, /* skipgen skipgen */
    REMOTE_PROC_DOMAIN_MIGRATE_FINISH2 = 109, /* autogen autogen */
2627
    REMOTE_PROC_GET_URI = 110, /* autogen skipgen priority:high */
2628

2629 2630 2631
    REMOTE_PROC_NODE_NUM_OF_DEVICES = 111, /* autogen autogen priority:high */
    REMOTE_PROC_NODE_LIST_DEVICES = 112, /* autogen autogen priority:high */
    REMOTE_PROC_NODE_DEVICE_LOOKUP_BY_NAME = 113, /* autogen autogen priority:high */
2632
    REMOTE_PROC_NODE_DEVICE_GET_XML_DESC = 114, /* autogen autogen */
2633 2634 2635
    REMOTE_PROC_NODE_DEVICE_GET_PARENT = 115, /* skipgen autogen priority:high */
    REMOTE_PROC_NODE_DEVICE_NUM_OF_CAPS = 116, /* autogen autogen priority:high */
    REMOTE_PROC_NODE_DEVICE_LIST_CAPS = 117, /* autogen autogen priority:high */
2636 2637 2638 2639
    REMOTE_PROC_NODE_DEVICE_DETTACH = 118, /* autogen skipgen */
    REMOTE_PROC_NODE_DEVICE_RE_ATTACH = 119, /* autogen skipgen */
    REMOTE_PROC_NODE_DEVICE_RESET = 120, /* autogen skipgen */

2640 2641
    REMOTE_PROC_DOMAIN_GET_SECURITY_LABEL = 121, /* skipgen skipgen priority:high */
    REMOTE_PROC_NODE_GET_SECURITY_MODEL = 122, /* skipgen skipgen priority:high */
2642
    REMOTE_PROC_NODE_DEVICE_CREATE_XML = 123, /* autogen autogen */
2643
    REMOTE_PROC_NODE_DEVICE_DESTROY = 124, /* autogen autogen priority:high */
2644
    REMOTE_PROC_STORAGE_VOL_CREATE_XML_FROM = 125, /* autogen autogen */
2645 2646 2647 2648
    REMOTE_PROC_NUM_OF_INTERFACES = 126, /* autogen autogen priority:high */
    REMOTE_PROC_LIST_INTERFACES = 127, /* autogen autogen priority:high */
    REMOTE_PROC_INTERFACE_LOOKUP_BY_NAME = 128, /* autogen autogen priority:high */
    REMOTE_PROC_INTERFACE_LOOKUP_BY_MAC_STRING = 129, /* autogen autogen priority:high */
2649 2650
    REMOTE_PROC_INTERFACE_GET_XML_DESC = 130, /* autogen autogen */

2651 2652
    REMOTE_PROC_INTERFACE_DEFINE_XML = 131, /* autogen autogen priority:high */
    REMOTE_PROC_INTERFACE_UNDEFINE = 132, /* autogen autogen priority:high */
2653
    REMOTE_PROC_INTERFACE_CREATE = 133, /* autogen autogen */
2654
    REMOTE_PROC_INTERFACE_DESTROY = 134, /* autogen autogen priority:high */
2655 2656
    REMOTE_PROC_DOMAIN_XML_FROM_NATIVE = 135, /* autogen autogen */
    REMOTE_PROC_DOMAIN_XML_TO_NATIVE = 136, /* autogen autogen */
2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668
    REMOTE_PROC_NUM_OF_DEFINED_INTERFACES = 137, /* autogen autogen priority:high */
    REMOTE_PROC_LIST_DEFINED_INTERFACES = 138, /* autogen autogen priority:high */
    REMOTE_PROC_NUM_OF_SECRETS = 139, /* autogen autogen priority:high */
    REMOTE_PROC_LIST_SECRETS = 140, /* autogen autogen priority:high */

    REMOTE_PROC_SECRET_LOOKUP_BY_UUID = 141, /* autogen autogen priority:high */
    REMOTE_PROC_SECRET_DEFINE_XML = 142, /* autogen autogen priority:high */
    REMOTE_PROC_SECRET_GET_XML_DESC = 143, /* autogen autogen priority:high */
    REMOTE_PROC_SECRET_SET_VALUE = 144, /* autogen autogen priority:high */
    REMOTE_PROC_SECRET_GET_VALUE = 145, /* skipgen skipgen priority:high */
    REMOTE_PROC_SECRET_UNDEFINE = 146, /* autogen autogen priority:high */
    REMOTE_PROC_SECRET_LOOKUP_BY_USAGE = 147, /* autogen autogen priority:high */
2669
    REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL = 148, /* autogen autogen | writestream@1 */
2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680
    REMOTE_PROC_IS_SECURE = 149, /* autogen skipgen priority:high */
    REMOTE_PROC_DOMAIN_IS_ACTIVE = 150, /* autogen autogen priority:high */

    REMOTE_PROC_DOMAIN_IS_PERSISTENT = 151, /* autogen autogen priority:high */
    REMOTE_PROC_NETWORK_IS_ACTIVE = 152, /* autogen autogen priority:high */
    REMOTE_PROC_NETWORK_IS_PERSISTENT = 153, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_POOL_IS_ACTIVE = 154, /* autogen autogen priority:high */
    REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT = 155, /* autogen autogen priority:high */
    REMOTE_PROC_INTERFACE_IS_ACTIVE = 156, /* autogen autogen priority:high */
    REMOTE_PROC_GET_LIB_VERSION = 157, /* autogen autogen priority:high */
    REMOTE_PROC_CPU_COMPARE = 158, /* autogen autogen priority:high */
2681 2682 2683 2684 2685 2686 2687 2688 2689
    REMOTE_PROC_DOMAIN_MEMORY_STATS = 159, /* skipgen skipgen */
    REMOTE_PROC_DOMAIN_ATTACH_DEVICE_FLAGS = 160, /* autogen autogen */

    REMOTE_PROC_DOMAIN_DETACH_DEVICE_FLAGS = 161, /* autogen autogen */
    REMOTE_PROC_CPU_BASELINE = 162, /* autogen autogen */
    REMOTE_PROC_DOMAIN_GET_JOB_INFO = 163, /* autogen autogen */
    REMOTE_PROC_DOMAIN_ABORT_JOB = 164, /* autogen autogen */
    REMOTE_PROC_STORAGE_VOL_WIPE = 165, /* autogen autogen */
    REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_DOWNTIME = 166, /* autogen autogen */
2690 2691
    REMOTE_PROC_DOMAIN_EVENTS_REGISTER_ANY = 167, /* skipgen skipgen priority:high */
    REMOTE_PROC_DOMAIN_EVENTS_DEREGISTER_ANY = 168, /* skipgen skipgen priority:high */
2692 2693 2694 2695 2696 2697 2698
    REMOTE_PROC_DOMAIN_EVENT_REBOOT = 169, /* autogen autogen */
    REMOTE_PROC_DOMAIN_EVENT_RTC_CHANGE = 170, /* autogen autogen */

    REMOTE_PROC_DOMAIN_EVENT_WATCHDOG = 171, /* autogen autogen */
    REMOTE_PROC_DOMAIN_EVENT_IO_ERROR = 172, /* autogen autogen */
    REMOTE_PROC_DOMAIN_EVENT_GRAPHICS = 173, /* autogen autogen */
    REMOTE_PROC_DOMAIN_UPDATE_DEVICE_FLAGS = 174, /* autogen autogen */
2699 2700 2701 2702 2703 2704 2705 2706
    REMOTE_PROC_NWFILTER_LOOKUP_BY_NAME = 175, /* autogen autogen priority:high */
    REMOTE_PROC_NWFILTER_LOOKUP_BY_UUID = 176, /* autogen autogen priority:high */
    REMOTE_PROC_NWFILTER_GET_XML_DESC = 177, /* autogen autogen priority:high */
    REMOTE_PROC_NUM_OF_NWFILTERS = 178, /* autogen autogen priority:high */
    REMOTE_PROC_LIST_NWFILTERS = 179, /* autogen autogen priority:high */
    REMOTE_PROC_NWFILTER_DEFINE_XML = 180, /* autogen autogen priority:high */

    REMOTE_PROC_NWFILTER_UNDEFINE = 181, /* autogen autogen priority:high */
2707 2708 2709 2710
    REMOTE_PROC_DOMAIN_MANAGED_SAVE = 182, /* autogen autogen */
    REMOTE_PROC_DOMAIN_HAS_MANAGED_SAVE_IMAGE = 183, /* autogen autogen */
    REMOTE_PROC_DOMAIN_MANAGED_SAVE_REMOVE = 184, /* autogen autogen */
    REMOTE_PROC_DOMAIN_SNAPSHOT_CREATE_XML = 185, /* autogen autogen */
2711 2712 2713 2714
    REMOTE_PROC_DOMAIN_SNAPSHOT_GET_XML_DESC = 186, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_SNAPSHOT_NUM = 187, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_NAMES = 188, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_SNAPSHOT_LOOKUP_BY_NAME = 189, /* autogen autogen priority:high */
2715 2716 2717 2718 2719 2720 2721
    REMOTE_PROC_DOMAIN_HAS_CURRENT_SNAPSHOT = 190, /* autogen autogen */

    REMOTE_PROC_DOMAIN_SNAPSHOT_CURRENT = 191, /* autogen autogen */
    REMOTE_PROC_DOMAIN_REVERT_TO_SNAPSHOT = 192, /* autogen autogen */
    REMOTE_PROC_DOMAIN_SNAPSHOT_DELETE = 193, /* autogen autogen */
    REMOTE_PROC_DOMAIN_GET_BLOCK_INFO = 194, /* autogen autogen */
    REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON = 195, /* autogen autogen */
2722
    REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS = 196, /* autogen autogen */
2723
    REMOTE_PROC_DOMAIN_SET_MEMORY_PARAMETERS = 197, /* autogen autogen */
2724 2725 2726 2727
    REMOTE_PROC_DOMAIN_GET_MEMORY_PARAMETERS = 198, /* skipgen skipgen */
    REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS = 199, /* autogen autogen */
    REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS = 200, /* autogen autogen */

2728
    REMOTE_PROC_DOMAIN_OPEN_CONSOLE = 201, /* autogen autogen | readstream@2 */
2729 2730
    REMOTE_PROC_DOMAIN_IS_UPDATED = 202, /* autogen autogen priority:high */
    REMOTE_PROC_GET_SYSINFO = 203, /* autogen autogen priority:high */
2731
    REMOTE_PROC_DOMAIN_SET_MEMORY_FLAGS = 204, /* autogen autogen */
2732
    REMOTE_PROC_DOMAIN_SET_BLKIO_PARAMETERS = 205, /* autogen autogen */
2733 2734
    REMOTE_PROC_DOMAIN_GET_BLKIO_PARAMETERS = 206, /* skipgen skipgen */
    REMOTE_PROC_DOMAIN_MIGRATE_SET_MAX_SPEED = 207, /* autogen autogen */
2735 2736
    REMOTE_PROC_STORAGE_VOL_UPLOAD = 208, /* autogen autogen | writestream@1 */
    REMOTE_PROC_STORAGE_VOL_DOWNLOAD = 209, /* autogen autogen | readstream@1 */
2737
    REMOTE_PROC_DOMAIN_INJECT_NMI = 210, /* autogen autogen */
2738

2739
    REMOTE_PROC_DOMAIN_SCREENSHOT = 211, /* autogen autogen | readstream@1 */
2740
    REMOTE_PROC_DOMAIN_GET_STATE = 212, /* skipgen skipgen priority:high */
2741 2742
    REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3 = 213, /* skipgen skipgen */
    REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3 = 214, /* skipgen skipgen */
2743
    REMOTE_PROC_DOMAIN_MIGRATE_PREPARE_TUNNEL3 = 215, /* autogen skipgen | writestream@1 */
2744 2745
    REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3 = 216, /* skipgen skipgen */
    REMOTE_PROC_DOMAIN_MIGRATE_FINISH3 = 217, /* skipgen skipgen */
2746
    REMOTE_PROC_DOMAIN_MIGRATE_CONFIRM3 = 218, /* skipgen skipgen */
2747
    REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS_FLAGS = 219, /* autogen autogen */
2748
    REMOTE_PROC_INTERFACE_CHANGE_BEGIN = 220, /* autogen autogen */
2749

2750
    REMOTE_PROC_INTERFACE_CHANGE_COMMIT = 221, /* autogen autogen */
2751
    REMOTE_PROC_INTERFACE_CHANGE_ROLLBACK = 222, /* autogen autogen */
2752
    REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS_FLAGS = 223, /* skipgen autogen */
2753
    REMOTE_PROC_DOMAIN_EVENT_CONTROL_ERROR = 224, /* skipgen skipgen */
2754
    REMOTE_PROC_DOMAIN_PIN_VCPU_FLAGS = 225, /* autogen autogen */
2755
    REMOTE_PROC_DOMAIN_SEND_KEY = 226, /* autogen autogen */
2756 2757 2758
    REMOTE_PROC_NODE_GET_CPU_STATS = 227, /* skipgen skipgen priority:high */
    REMOTE_PROC_NODE_GET_MEMORY_STATS = 228, /* skipgen skipgen priority:high */
    REMOTE_PROC_DOMAIN_GET_CONTROL_INFO = 229, /* autogen autogen priority:high */
E
Eric Blake 已提交
2759 2760
    REMOTE_PROC_DOMAIN_GET_VCPU_PIN_INFO = 230, /* skipgen skipgen */

2761
    REMOTE_PROC_DOMAIN_UNDEFINE_FLAGS = 231, /* autogen autogen priority:high */
E
Eric Blake 已提交
2762 2763
    REMOTE_PROC_DOMAIN_SAVE_FLAGS = 232, /* autogen autogen */
    REMOTE_PROC_DOMAIN_RESTORE_FLAGS = 233, /* autogen autogen */
2764 2765 2766
    REMOTE_PROC_DOMAIN_DESTROY_FLAGS = 234, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_SAVE_IMAGE_GET_XML_DESC = 235, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_SAVE_IMAGE_DEFINE_XML = 236, /* autogen autogen priority:high */
2767 2768 2769
    REMOTE_PROC_DOMAIN_BLOCK_JOB_ABORT = 237, /* autogen autogen */
    REMOTE_PROC_DOMAIN_GET_BLOCK_JOB_INFO = 238, /* skipgen skipgen */
    REMOTE_PROC_DOMAIN_BLOCK_JOB_SET_SPEED = 239, /* autogen autogen */
2770 2771
    REMOTE_PROC_DOMAIN_BLOCK_PULL = 240, /* autogen autogen */

2772
    REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB = 241, /* skipgen skipgen */
2773
    REMOTE_PROC_DOMAIN_MIGRATE_GET_MAX_SPEED = 242, /* autogen autogen */
2774
    REMOTE_PROC_DOMAIN_BLOCK_STATS_FLAGS = 243, /* skipgen skipgen */
2775 2776 2777
    REMOTE_PROC_DOMAIN_SNAPSHOT_GET_PARENT = 244, /* autogen autogen priority:high */
    REMOTE_PROC_DOMAIN_RESET = 245, /* autogen autogen */
    REMOTE_PROC_DOMAIN_SNAPSHOT_NUM_CHILDREN = 246, /* autogen autogen priority:high */
2778
    REMOTE_PROC_DOMAIN_SNAPSHOT_LIST_CHILDREN_NAMES = 247, /* autogen autogen priority:high */
2779
    REMOTE_PROC_DOMAIN_EVENT_DISK_CHANGE = 248, /* skipgen skipgen */
2780
    REMOTE_PROC_DOMAIN_OPEN_GRAPHICS = 249, /* skipgen skipgen */
2781 2782
    REMOTE_PROC_NODE_SUSPEND_FOR_DURATION = 250, /* autogen autogen */

2783 2784
    REMOTE_PROC_DOMAIN_BLOCK_RESIZE = 251, /* autogen autogen */
    REMOTE_PROC_DOMAIN_SET_BLOCK_IO_TUNE = 252, /* autogen autogen */
2785 2786
    REMOTE_PROC_DOMAIN_GET_BLOCK_IO_TUNE = 253, /* skipgen skipgen */
    REMOTE_PROC_DOMAIN_SET_NUMA_PARAMETERS = 254, /* autogen autogen */
2787 2788
    REMOTE_PROC_DOMAIN_GET_NUMA_PARAMETERS = 255, /* skipgen skipgen */
    REMOTE_PROC_DOMAIN_SET_INTERFACE_PARAMETERS = 256, /* autogen autogen */
2789
    REMOTE_PROC_DOMAIN_GET_INTERFACE_PARAMETERS = 257, /* skipgen skipgen */
2790
    REMOTE_PROC_DOMAIN_SHUTDOWN_FLAGS = 258, /* autogen autogen */
2791
    REMOTE_PROC_STORAGE_VOL_WIPE_PATTERN = 259, /* autogen autogen */
2792 2793
    REMOTE_PROC_STORAGE_VOL_RESIZE = 260, /* autogen autogen */

2794
    REMOTE_PROC_DOMAIN_PM_SUSPEND_FOR_DURATION = 261, /* autogen autogen */
2795
    REMOTE_PROC_DOMAIN_GET_CPU_STATS = 262, /* skipgen skipgen */
2796 2797
    REMOTE_PROC_DOMAIN_GET_DISK_ERRORS = 263, /* skipgen skipgen */
    REMOTE_PROC_DOMAIN_SET_METADATA = 264, /* autogen autogen */
2798
    REMOTE_PROC_DOMAIN_GET_METADATA = 265, /* autogen autogen */
2799
    REMOTE_PROC_DOMAIN_BLOCK_REBASE = 266, /* autogen autogen */
2800
    REMOTE_PROC_DOMAIN_PM_WAKEUP = 267, /* autogen autogen */
O
Osier Yang 已提交
2801
    REMOTE_PROC_DOMAIN_EVENT_TRAY_CHANGE = 268, /* autogen autogen */
O
Osier Yang 已提交
2802
    REMOTE_PROC_DOMAIN_EVENT_PMWAKEUP = 269, /* autogen autogen */
E
Eric Blake 已提交
2803 2804 2805 2806
    REMOTE_PROC_DOMAIN_EVENT_PMSUSPEND = 270, /* autogen autogen */

    REMOTE_PROC_DOMAIN_SNAPSHOT_IS_CURRENT = 271, /* autogen autogen */
    REMOTE_PROC_DOMAIN_SNAPSHOT_HAS_METADATA = 272 /* autogen autogen */
2807

2808 2809
    /*
     * Notice how the entries are grouped in sets of 10 ?
2810
     * Nice isn't it. Please keep it this way when adding more.
2811
     *
2812
     * Each function must have a three-word comment.  The first word is
2813
     * whether gendispatch.pl handles daemon, the second whether
2814 2815
     * it handles src/remote.  Additional flags can be specified after a
     * pipe.
2816 2817 2818 2819 2820 2821
     * The last argument describes priority of API. There are two accepted
     * values: low, high; Each API that might eventually access hypervisor's
     * monitor (and thus block) MUST fall into low priority. However, there
     * are some exceptions to this rule, e.g. domainDestroy. Other APIs MAY
     * be marked as high priority. If in doubt, it's safe to choose low.
     * Low is taken as default, and thus can be left out.
2822 2823 2824 2825 2826 2827
     *
     * The (readstream|writestream)@<offset> flag lets daemon and src/remote
     * create a stream.  The direction is defined from the src/remote point
     * of view.  A readstream transfers data from daemon to src/remote.  The
     * <offset> specifies at which offset the stream parameter is inserted
     * in the function parameter list. */
2828
};