mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
Mon Jun 11 12:49:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/Makefile.am, qemud/dispatch.c, qemud/dispatch.h, qemud/internal.h, qemud/protocol.c, qemud/protocol.h, qemud/protocol.x, qemud/qemud.c: libvirt_qemud server-side modifications to use XDR-based protocol instead of homebrew (Dan Berrange). QEMUD server modified to dispatch calls from remote clients (Richard Jones). Added TLS support (Richard Jones). Added TCP & IPv6 support (Richard Jones). Additional configuration file, command-line handling, and usage (Richard Jones). * qemud/conf.c: Remove unnecessary header file.
This commit is contained in:
parent
b4f7816bf4
commit
9172d0ec27
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
Mon Jun 11 12:49:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
|
||||
|
||||
* qemud/Makefile.am, qemud/dispatch.c, qemud/dispatch.h,
|
||||
qemud/internal.h, qemud/protocol.c,
|
||||
qemud/protocol.h, qemud/protocol.x, qemud/qemud.c:
|
||||
libvirt_qemud server-side modifications to use
|
||||
XDR-based protocol instead of homebrew (Dan Berrange).
|
||||
QEMUD server modified to dispatch calls from remote
|
||||
clients (Richard Jones). Added TLS support (Richard Jones).
|
||||
Added TCP & IPv6 support (Richard Jones).
|
||||
Additional configuration file, command-line handling, and
|
||||
usage (Richard Jones).
|
||||
* qemud/conf.c: Remove unnecessary header file.
|
||||
|
||||
Mon Jun 11 12:48:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
|
||||
|
||||
* src/qemu_internal.c: QEMU client-side modifications to
|
||||
|
@ -5,23 +5,28 @@ UUID=$(shell uuidgen)
|
||||
|
||||
sbin_PROGRAMS = libvirt_qemud
|
||||
|
||||
libvirt_qemud_SOURCES = qemud.c internal.h protocol.h \
|
||||
libvirt_qemud_SOURCES = \
|
||||
qemud.c internal.h \
|
||||
driver.c driver.h \
|
||||
dispatch.c dispatch.h \
|
||||
conf.c conf.h \
|
||||
bridge.c bridge.h \
|
||||
iptables.c iptables.h \
|
||||
uuid.c uuid.h \
|
||||
buf.c buf.h
|
||||
buf.c buf.h \
|
||||
protocol.h protocol.c \
|
||||
remote_protocol.h remote_protocol.c \
|
||||
remote.c
|
||||
#-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
|
||||
libvirt_qemud_CFLAGS = \
|
||||
-I$(top_srcdir)/include -I$(top_builddir)/include $(LIBXML_CFLAGS) \
|
||||
$(WARN_CFLAGS) -DLOCAL_STATE_DIR="\"$(localstatedir)\"" \
|
||||
-DSYSCONF_DIR="\"$(sysconfdir)\"" \
|
||||
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\""
|
||||
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" \
|
||||
-DREMOTE_PID_FILE="\"$(REMOTE_PID_FILE)\""
|
||||
libvirt_qemud_LDFLAGS = $(WARN_CFLAGS) $(LIBXML_LIBS) $(SYSFS_LIBS)
|
||||
libvirt_qemud_DEPENDENCIES =
|
||||
libvirt_qemud_LDADD =
|
||||
libvirt_qemud_DEPENDENCIES = ../src/libvirt.la
|
||||
libvirt_qemud_LDADD = ../src/libvirt.la
|
||||
|
||||
install-data-local:
|
||||
mkdir -p $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart
|
||||
@ -41,7 +46,41 @@ uninstall-local:
|
||||
rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
|
||||
rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || :
|
||||
|
||||
EXTRA_DIST = libvirtd.in default-network.xml
|
||||
# Distribute the generated files so that rpcgen isn't required on the
|
||||
# target machine (although almost any Unix machine will have it).
|
||||
EXTRA_DIST = libvirtd.in default-network.xml \
|
||||
protocol.x remote_protocol.x \
|
||||
protocol.c protocol.h \
|
||||
remote_protocol.c remote_protocol.h \
|
||||
remote_dispatch_prototypes.h \
|
||||
remote_dispatch_localvars.h \
|
||||
remote_dispatch_proc_switch.h
|
||||
|
||||
.x.c:
|
||||
rm -f $@
|
||||
rpcgen -c -o $@ $<
|
||||
mv $@ $@.bak
|
||||
perl -w rpcgen_fix.pl < $@.bak > $@
|
||||
|
||||
.x.h:
|
||||
rm -f $@
|
||||
rpcgen -h -o $@ $<
|
||||
|
||||
protocol.c: protocol.h
|
||||
remote_protocol.c: remote_protocol.h
|
||||
|
||||
remote.c: remote_dispatch_prototypes.h \
|
||||
remote_dispatch_localvars.h \
|
||||
remote_dispatch_proc_switch.h
|
||||
|
||||
remote_dispatch_prototypes.h: remote_generate_stubs.pl remote_protocol.x
|
||||
perl -w remote_generate_stubs.pl -i remote_protocol.x > $@
|
||||
|
||||
remote_dispatch_localvars.h: remote_generate_stubs.pl remote_protocol.x
|
||||
perl -w remote_generate_stubs.pl -v remote_protocol.x > $@
|
||||
|
||||
remote_dispatch_proc_switch.h: remote_generate_stubs.pl remote_protocol.x
|
||||
perl -w remote_generate_stubs.pl -w remote_protocol.x > $@
|
||||
|
||||
if LIBVIRT_INIT_SCRIPTS_RED_HAT
|
||||
initdir = $(sysconfdir)/rc.d/init.d
|
||||
|
@ -42,7 +42,6 @@
|
||||
|
||||
#include <libvirt/virterror.h>
|
||||
|
||||
#include "protocol.h"
|
||||
#include "internal.h"
|
||||
#include "conf.h"
|
||||
#include "driver.h"
|
||||
|
536
qemud/dispatch.c
536
qemud/dispatch.c
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,7 @@
|
||||
|
||||
|
||||
int qemudDispatch(struct qemud_server *server, struct qemud_client *client,
|
||||
struct qemud_packet *in, struct qemud_packet *out);
|
||||
struct qemud_packet_client_data *in, struct qemud_packet_server_data *out);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -27,8 +27,11 @@
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <gnutls/gnutls.h>
|
||||
#include <gnutls/x509.h>
|
||||
|
||||
#include "protocol.h"
|
||||
#include "remote_protocol.h"
|
||||
#include "bridge.h"
|
||||
#include "iptables.h"
|
||||
|
||||
@ -58,15 +61,6 @@ typedef enum {
|
||||
#endif
|
||||
} qemudLogPriority;
|
||||
|
||||
typedef enum {
|
||||
QEMUD_DIR_CONFIG = 0,
|
||||
QEMUD_DIR_AUTOSTART,
|
||||
QEMUD_DIR_NETWORK_CONFIG,
|
||||
QEMUD_DIR_NETWORK_AUTOSTART,
|
||||
|
||||
QEMUD_N_CONFIG_DIRS
|
||||
} qemudConfigDirType;
|
||||
|
||||
/* Different types of QEMU acceleration possible */
|
||||
enum qemud_vm_virt_type {
|
||||
QEMUD_VIRT_QEMU,
|
||||
@ -277,22 +271,61 @@ struct qemud_network {
|
||||
struct qemud_network *next;
|
||||
};
|
||||
|
||||
|
||||
enum qemud_mode {
|
||||
QEMUD_MODE_RX_HEADER,
|
||||
QEMUD_MODE_RX_PAYLOAD,
|
||||
QEMUD_MODE_TX_PACKET,
|
||||
QEMUD_MODE_TLS_HANDSHAKE,
|
||||
};
|
||||
|
||||
/* These have to remain compatible with gnutls_record_get_direction. */
|
||||
enum qemud_tls_direction {
|
||||
QEMUD_TLS_DIRECTION_READ = 0,
|
||||
QEMUD_TLS_DIRECTION_WRITE = 1,
|
||||
};
|
||||
|
||||
/* Stores the per-client connection state */
|
||||
struct qemud_client {
|
||||
int magic;
|
||||
|
||||
int fd;
|
||||
int readonly;
|
||||
struct qemud_packet incoming;
|
||||
unsigned int incomingReceived;
|
||||
struct qemud_packet outgoing;
|
||||
unsigned int outgoingSent;
|
||||
int tx;
|
||||
enum qemud_mode mode;
|
||||
|
||||
struct sockaddr_storage addr;
|
||||
socklen_t addrlen;
|
||||
|
||||
/* If set, TLS is required on this socket. */
|
||||
int tls;
|
||||
gnutls_session_t session;
|
||||
enum qemud_tls_direction direction;
|
||||
|
||||
unsigned int incomingSerial;
|
||||
unsigned int outgoingSerial;
|
||||
|
||||
char buffer [REMOTE_MESSAGE_MAX];
|
||||
unsigned int bufferLength;
|
||||
unsigned int bufferOffset;
|
||||
|
||||
/* This is only valid if a remote open call has been made on this
|
||||
* connection, otherwise it will be NULL. Also if remote close is
|
||||
* called, it will be set back to NULL if that succeeds.
|
||||
*/
|
||||
virConnectPtr conn;
|
||||
|
||||
struct qemud_client *next;
|
||||
};
|
||||
|
||||
#define QEMUD_CLIENT_MAGIC 0x7788aaee
|
||||
|
||||
|
||||
struct qemud_socket {
|
||||
int fd;
|
||||
int readonly;
|
||||
/* If set, TLS is required on this socket. */
|
||||
int tls;
|
||||
|
||||
struct qemud_socket *next;
|
||||
};
|
||||
|
||||
@ -315,7 +348,6 @@ struct qemud_server {
|
||||
struct qemud_network *networks;
|
||||
brControl *brctl;
|
||||
iptablesContext *iptables;
|
||||
char configDirs[QEMUD_N_CONFIG_DIRS][PATH_MAX];
|
||||
char *configDir;
|
||||
char *autostartDir;
|
||||
char *networkConfigDir;
|
||||
@ -347,6 +379,9 @@ void qemudLog(int priority, const char *fmt, ...)
|
||||
#define qemudDebug(fmt, ...) do {} while(0)
|
||||
#endif
|
||||
|
||||
void remoteDispatchClientRequest (struct qemud_server *server,
|
||||
struct qemud_client *client);
|
||||
|
||||
static inline int
|
||||
qemudIsActiveVM(struct qemud_vm *vm)
|
||||
{
|
||||
|
969
qemud/protocol.c
Normal file
969
qemud/protocol.c
Normal file
@ -0,0 +1,969 @@
|
||||
/*
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#include "protocol.h"
|
||||
|
||||
bool_t
|
||||
xdr_qemud_domain_runstate (XDR *xdrs, qemud_domain_runstate *objp)
|
||||
{
|
||||
|
||||
if (!xdr_enum (xdrs, (enum_t *) objp))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_client_data_type (XDR *xdrs, qemud_packet_client_data_type *objp)
|
||||
{
|
||||
|
||||
if (!xdr_enum (xdrs, (enum_t *) objp))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_server_data_type (XDR *xdrs, qemud_packet_server_data_type *objp)
|
||||
{
|
||||
|
||||
if (!xdr_enum (xdrs, (enum_t *) objp))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_failure_reply (XDR *xdrs, qemud_packet_failure_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->code))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->message, QEMUD_MAX_ERROR_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_get_version_reply (XDR *xdrs, qemud_packet_get_version_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->versionNum))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_get_node_info_reply (XDR *xdrs, qemud_packet_get_node_info_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->model, 32,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->memory))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->cpus))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->mhz))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->nodes))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->sockets))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->cores))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->threads))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_get_capabilities_reply (XDR *xdrs, qemud_packet_get_capabilities_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->xml, QEMUD_MAX_XML_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_list_domains_reply (XDR *xdrs, qemud_packet_list_domains_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->numDomains))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->domains, QEMUD_MAX_NUM_DOMAINS,
|
||||
sizeof (int32_t), (xdrproc_t) xdr_int32_t))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_num_domains_reply (XDR *xdrs, qemud_packet_num_domains_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->numDomains))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_create_request (XDR *xdrs, qemud_packet_domain_create_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->xml, QEMUD_MAX_XML_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_create_reply (XDR *xdrs, qemud_packet_domain_create_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->id))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->name, QEMUD_MAX_NAME_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_lookup_by_id_request (XDR *xdrs, qemud_packet_domain_lookup_by_id_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->id))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_lookup_by_id_reply (XDR *xdrs, qemud_packet_domain_lookup_by_id_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->name, QEMUD_MAX_NAME_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_lookup_by_name_request (XDR *xdrs, qemud_packet_domain_lookup_by_name_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->name, QEMUD_MAX_NAME_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_lookup_by_name_reply (XDR *xdrs, qemud_packet_domain_lookup_by_name_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->id))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_lookup_by_uuid_request (XDR *xdrs, qemud_packet_domain_lookup_by_uuid_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_lookup_by_uuid_reply (XDR *xdrs, qemud_packet_domain_lookup_by_uuid_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->id))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->name, QEMUD_MAX_NAME_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_suspend_request (XDR *xdrs, qemud_packet_domain_suspend_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->id))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_resume_request (XDR *xdrs, qemud_packet_domain_resume_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->id))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_destroy_request (XDR *xdrs, qemud_packet_domain_destroy_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->id))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_get_info_request (XDR *xdrs, qemud_packet_domain_get_info_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_get_info_reply (XDR *xdrs, qemud_packet_domain_get_info_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint64_t (xdrs, &objp->cpuTime))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->runstate))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->memory))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->maxmem))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->nrVirtCpu))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_save_request (XDR *xdrs, qemud_packet_domain_save_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->id))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->file, PATH_MAX,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_restore_request (XDR *xdrs, qemud_packet_domain_restore_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->file, PATH_MAX,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_restore_reply (XDR *xdrs, qemud_packet_domain_restore_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->id))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_dump_xml_request (XDR *xdrs, qemud_packet_domain_dump_xml_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_dump_xml_reply (XDR *xdrs, qemud_packet_domain_dump_xml_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->xml, QEMUD_MAX_XML_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_list_defined_domains_reply (XDR *xdrs, qemud_packet_list_defined_domains_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->numDomains))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->domains, QEMUD_MAX_DOMAINS_NAME_BUF,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_num_defined_domains_reply (XDR *xdrs, qemud_packet_num_defined_domains_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->numDomains))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_start_request (XDR *xdrs, qemud_packet_domain_start_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_start_reply (XDR *xdrs, qemud_packet_domain_start_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->id))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_define_request (XDR *xdrs, qemud_packet_domain_define_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->xml, QEMUD_MAX_XML_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_define_reply (XDR *xdrs, qemud_packet_domain_define_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->name, QEMUD_MAX_NAME_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_undefine_request (XDR *xdrs, qemud_packet_domain_undefine_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_num_networks_reply (XDR *xdrs, qemud_packet_num_networks_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->numNetworks))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_list_networks_reply (XDR *xdrs, qemud_packet_list_networks_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->numNetworks))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->networks, QEMUD_MAX_NETWORKS_NAME_BUF,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_num_defined_networks_reply (XDR *xdrs, qemud_packet_num_defined_networks_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->numNetworks))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_list_defined_networks_reply (XDR *xdrs, qemud_packet_list_defined_networks_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->numNetworks))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->networks, QEMUD_MAX_NETWORKS_NAME_BUF,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_lookup_by_name_request (XDR *xdrs, qemud_packet_network_lookup_by_name_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->name, QEMUD_MAX_NAME_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_lookup_by_name_reply (XDR *xdrs, qemud_packet_network_lookup_by_name_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->id))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_lookup_by_uuid_request (XDR *xdrs, qemud_packet_network_lookup_by_uuid_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_lookup_by_uuid_reply (XDR *xdrs, qemud_packet_network_lookup_by_uuid_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int32_t (xdrs, &objp->id))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->name, QEMUD_MAX_NAME_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_create_request (XDR *xdrs, qemud_packet_network_create_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->xml, QEMUD_MAX_XML_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_create_reply (XDR *xdrs, qemud_packet_network_create_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->name, QEMUD_MAX_NAME_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_define_request (XDR *xdrs, qemud_packet_network_define_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->xml, QEMUD_MAX_XML_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_define_reply (XDR *xdrs, qemud_packet_network_define_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
if (!xdr_vector (xdrs, (char *)objp->name, QEMUD_MAX_NAME_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_undefine_request (XDR *xdrs, qemud_packet_network_undefine_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_start_request (XDR *xdrs, qemud_packet_network_start_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_destroy_request (XDR *xdrs, qemud_packet_network_destroy_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_dump_xml_request (XDR *xdrs, qemud_packet_network_dump_xml_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_dump_xml_reply (XDR *xdrs, qemud_packet_network_dump_xml_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->xml, QEMUD_MAX_XML_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_get_bridge_name_request (XDR *xdrs, qemud_packet_network_get_bridge_name_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_get_bridge_name_reply (XDR *xdrs, qemud_packet_network_get_bridge_name_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->ifname, QEMUD_MAX_IFNAME_LEN,
|
||||
sizeof (char), (xdrproc_t) xdr_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_get_autostart_request (XDR *xdrs, qemud_packet_domain_get_autostart_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_get_autostart_reply (XDR *xdrs, qemud_packet_domain_get_autostart_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->autostart))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_domain_set_autostart_request (XDR *xdrs, qemud_packet_domain_set_autostart_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->autostart))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_get_autostart_request (XDR *xdrs, qemud_packet_network_get_autostart_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_get_autostart_reply (XDR *xdrs, qemud_packet_network_get_autostart_reply *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->autostart))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_network_set_autostart_request (XDR *xdrs, qemud_packet_network_set_autostart_request *objp)
|
||||
{
|
||||
|
||||
if (!xdr_vector (xdrs, (char *)objp->uuid, QEMUD_UUID_RAW_LEN,
|
||||
sizeof (u_char), (xdrproc_t) xdr_u_char))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->autostart))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_client_data (XDR *xdrs, qemud_packet_client_data *objp)
|
||||
{
|
||||
|
||||
if (!xdr_qemud_packet_client_data_type (xdrs, &objp->type))
|
||||
return FALSE;
|
||||
switch (objp->type) {
|
||||
case QEMUD_CLIENT_PKT_GET_VERSION:
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_GET_NODEINFO:
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_LIST_DOMAINS:
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NUM_DOMAINS:
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_CREATE:
|
||||
if (!xdr_qemud_packet_domain_create_request (xdrs, &objp->qemud_packet_client_data_u.domainCreateRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_LOOKUP_BY_ID:
|
||||
if (!xdr_qemud_packet_domain_lookup_by_id_request (xdrs, &objp->qemud_packet_client_data_u.domainLookupByIDRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_LOOKUP_BY_UUID:
|
||||
if (!xdr_qemud_packet_domain_lookup_by_uuid_request (xdrs, &objp->qemud_packet_client_data_u.domainLookupByUUIDRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_LOOKUP_BY_NAME:
|
||||
if (!xdr_qemud_packet_domain_lookup_by_name_request (xdrs, &objp->qemud_packet_client_data_u.domainLookupByNameRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_SUSPEND:
|
||||
if (!xdr_qemud_packet_domain_suspend_request (xdrs, &objp->qemud_packet_client_data_u.domainSuspendRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_RESUME:
|
||||
if (!xdr_qemud_packet_domain_resume_request (xdrs, &objp->qemud_packet_client_data_u.domainResumeRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_DESTROY:
|
||||
if (!xdr_qemud_packet_domain_destroy_request (xdrs, &objp->qemud_packet_client_data_u.domainDestroyRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_GET_INFO:
|
||||
if (!xdr_qemud_packet_domain_get_info_request (xdrs, &objp->qemud_packet_client_data_u.domainGetInfoRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_SAVE:
|
||||
if (!xdr_qemud_packet_domain_save_request (xdrs, &objp->qemud_packet_client_data_u.domainSaveRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_RESTORE:
|
||||
if (!xdr_qemud_packet_domain_restore_request (xdrs, &objp->qemud_packet_client_data_u.domainRestoreRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DUMP_XML:
|
||||
if (!xdr_qemud_packet_domain_dump_xml_request (xdrs, &objp->qemud_packet_client_data_u.domainDumpXMLRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_LIST_DEFINED_DOMAINS:
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NUM_DEFINED_DOMAINS:
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_START:
|
||||
if (!xdr_qemud_packet_domain_start_request (xdrs, &objp->qemud_packet_client_data_u.domainStartRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_DEFINE:
|
||||
if (!xdr_qemud_packet_domain_define_request (xdrs, &objp->qemud_packet_client_data_u.domainDefineRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_UNDEFINE:
|
||||
if (!xdr_qemud_packet_domain_undefine_request (xdrs, &objp->qemud_packet_client_data_u.domainUndefineRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NUM_NETWORKS:
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_LIST_NETWORKS:
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NUM_DEFINED_NETWORKS:
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_LIST_DEFINED_NETWORKS:
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NETWORK_LOOKUP_BY_UUID:
|
||||
if (!xdr_qemud_packet_network_lookup_by_uuid_request (xdrs, &objp->qemud_packet_client_data_u.networkLookupByUUIDRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NETWORK_LOOKUP_BY_NAME:
|
||||
if (!xdr_qemud_packet_network_lookup_by_name_request (xdrs, &objp->qemud_packet_client_data_u.networkLookupByNameRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NETWORK_CREATE:
|
||||
if (!xdr_qemud_packet_network_create_request (xdrs, &objp->qemud_packet_client_data_u.networkCreateRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NETWORK_DEFINE:
|
||||
if (!xdr_qemud_packet_network_define_request (xdrs, &objp->qemud_packet_client_data_u.networkDefineRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NETWORK_UNDEFINE:
|
||||
if (!xdr_qemud_packet_network_undefine_request (xdrs, &objp->qemud_packet_client_data_u.networkUndefineRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NETWORK_START:
|
||||
if (!xdr_qemud_packet_network_start_request (xdrs, &objp->qemud_packet_client_data_u.networkStartRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NETWORK_DESTROY:
|
||||
if (!xdr_qemud_packet_network_destroy_request (xdrs, &objp->qemud_packet_client_data_u.networkDestroyRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NETWORK_DUMP_XML:
|
||||
if (!xdr_qemud_packet_network_dump_xml_request (xdrs, &objp->qemud_packet_client_data_u.networkDumpXMLRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NETWORK_GET_BRIDGE_NAME:
|
||||
if (!xdr_qemud_packet_network_get_bridge_name_request (xdrs, &objp->qemud_packet_client_data_u.networkGetBridgeNameRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_GET_AUTOSTART:
|
||||
if (!xdr_qemud_packet_domain_get_autostart_request (xdrs, &objp->qemud_packet_client_data_u.domainGetAutostartRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_SET_AUTOSTART:
|
||||
if (!xdr_qemud_packet_domain_set_autostart_request (xdrs, &objp->qemud_packet_client_data_u.domainSetAutostartRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NETWORK_GET_AUTOSTART:
|
||||
if (!xdr_qemud_packet_network_get_autostart_request (xdrs, &objp->qemud_packet_client_data_u.networkGetAutostartRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_NETWORK_SET_AUTOSTART:
|
||||
if (!xdr_qemud_packet_network_set_autostart_request (xdrs, &objp->qemud_packet_client_data_u.networkSetAutostartRequest))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_CLIENT_PKT_GET_CAPABILITIES:
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_server_data (XDR *xdrs, qemud_packet_server_data *objp)
|
||||
{
|
||||
|
||||
if (!xdr_qemud_packet_server_data_type (xdrs, &objp->type))
|
||||
return FALSE;
|
||||
switch (objp->type) {
|
||||
case QEMUD_SERVER_PKT_FAILURE:
|
||||
if (!xdr_qemud_packet_failure_reply (xdrs, &objp->qemud_packet_server_data_u.failureReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_GET_VERSION:
|
||||
if (!xdr_qemud_packet_get_version_reply (xdrs, &objp->qemud_packet_server_data_u.getVersionReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_GET_NODEINFO:
|
||||
if (!xdr_qemud_packet_get_node_info_reply (xdrs, &objp->qemud_packet_server_data_u.getNodeInfoReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_LIST_DOMAINS:
|
||||
if (!xdr_qemud_packet_list_domains_reply (xdrs, &objp->qemud_packet_server_data_u.listDomainsReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NUM_DOMAINS:
|
||||
if (!xdr_qemud_packet_num_domains_reply (xdrs, &objp->qemud_packet_server_data_u.numDomainsReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_CREATE:
|
||||
if (!xdr_qemud_packet_domain_create_reply (xdrs, &objp->qemud_packet_server_data_u.domainCreateReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_LOOKUP_BY_ID:
|
||||
if (!xdr_qemud_packet_domain_lookup_by_id_reply (xdrs, &objp->qemud_packet_server_data_u.domainLookupByIDReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_LOOKUP_BY_UUID:
|
||||
if (!xdr_qemud_packet_domain_lookup_by_uuid_reply (xdrs, &objp->qemud_packet_server_data_u.domainLookupByUUIDReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_LOOKUP_BY_NAME:
|
||||
if (!xdr_qemud_packet_domain_lookup_by_name_reply (xdrs, &objp->qemud_packet_server_data_u.domainLookupByNameReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_SUSPEND:
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_RESUME:
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_DESTROY:
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_GET_INFO:
|
||||
if (!xdr_qemud_packet_domain_get_info_reply (xdrs, &objp->qemud_packet_server_data_u.domainGetInfoReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_SAVE:
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_RESTORE:
|
||||
if (!xdr_qemud_packet_domain_restore_reply (xdrs, &objp->qemud_packet_server_data_u.domainRestoreReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DUMP_XML:
|
||||
if (!xdr_qemud_packet_domain_dump_xml_reply (xdrs, &objp->qemud_packet_server_data_u.domainDumpXMLReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_LIST_DEFINED_DOMAINS:
|
||||
if (!xdr_qemud_packet_list_defined_domains_reply (xdrs, &objp->qemud_packet_server_data_u.listDefinedDomainsReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NUM_DEFINED_DOMAINS:
|
||||
if (!xdr_qemud_packet_num_defined_domains_reply (xdrs, &objp->qemud_packet_server_data_u.numDefinedDomainsReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_START:
|
||||
if (!xdr_qemud_packet_domain_start_reply (xdrs, &objp->qemud_packet_server_data_u.domainStartReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_DEFINE:
|
||||
if (!xdr_qemud_packet_domain_define_reply (xdrs, &objp->qemud_packet_server_data_u.domainDefineReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_UNDEFINE:
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NUM_NETWORKS:
|
||||
if (!xdr_qemud_packet_num_networks_reply (xdrs, &objp->qemud_packet_server_data_u.numNetworksReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_LIST_NETWORKS:
|
||||
if (!xdr_qemud_packet_list_networks_reply (xdrs, &objp->qemud_packet_server_data_u.listNetworksReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NUM_DEFINED_NETWORKS:
|
||||
if (!xdr_qemud_packet_num_defined_networks_reply (xdrs, &objp->qemud_packet_server_data_u.numDefinedNetworksReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_LIST_DEFINED_NETWORKS:
|
||||
if (!xdr_qemud_packet_list_defined_networks_reply (xdrs, &objp->qemud_packet_server_data_u.listDefinedNetworksReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NETWORK_LOOKUP_BY_UUID:
|
||||
if (!xdr_qemud_packet_network_lookup_by_uuid_reply (xdrs, &objp->qemud_packet_server_data_u.networkLookupByUUIDReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NETWORK_LOOKUP_BY_NAME:
|
||||
if (!xdr_qemud_packet_network_lookup_by_name_reply (xdrs, &objp->qemud_packet_server_data_u.networkLookupByNameReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NETWORK_CREATE:
|
||||
if (!xdr_qemud_packet_network_create_reply (xdrs, &objp->qemud_packet_server_data_u.networkCreateReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NETWORK_DEFINE:
|
||||
if (!xdr_qemud_packet_network_define_reply (xdrs, &objp->qemud_packet_server_data_u.networkDefineReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NETWORK_UNDEFINE:
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NETWORK_START:
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NETWORK_DESTROY:
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NETWORK_DUMP_XML:
|
||||
if (!xdr_qemud_packet_network_dump_xml_reply (xdrs, &objp->qemud_packet_server_data_u.networkDumpXMLReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NETWORK_GET_BRIDGE_NAME:
|
||||
if (!xdr_qemud_packet_network_get_bridge_name_reply (xdrs, &objp->qemud_packet_server_data_u.networkGetBridgeNameReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_GET_AUTOSTART:
|
||||
if (!xdr_qemud_packet_domain_get_autostart_reply (xdrs, &objp->qemud_packet_server_data_u.domainGetAutostartReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_DOMAIN_SET_AUTOSTART:
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NETWORK_GET_AUTOSTART:
|
||||
if (!xdr_qemud_packet_network_get_autostart_reply (xdrs, &objp->qemud_packet_server_data_u.networkGetAutostartReply))
|
||||
return FALSE;
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_NETWORK_SET_AUTOSTART:
|
||||
break;
|
||||
case QEMUD_SERVER_PKT_GET_CAPABILITIES:
|
||||
if (!xdr_qemud_packet_get_capabilities_reply (xdrs, &objp->qemud_packet_server_data_u.getCapabilitiesReply))
|
||||
return FALSE;
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_client (XDR *xdrs, qemud_packet_client *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->serial))
|
||||
return FALSE;
|
||||
if (!xdr_qemud_packet_client_data (xdrs, &objp->data))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_server (XDR *xdrs, qemud_packet_server *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->serial))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->inReplyTo))
|
||||
return FALSE;
|
||||
if (!xdr_qemud_packet_server_data (xdrs, &objp->data))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_qemud_packet_header (XDR *xdrs, qemud_packet_header *objp)
|
||||
{
|
||||
|
||||
if (!xdr_uint32_t (xdrs, &objp->length))
|
||||
return FALSE;
|
||||
if (!xdr_uint32_t (xdrs, &objp->prog))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
939
qemud/protocol.h
939
qemud/protocol.h
@ -1,329 +1,660 @@
|
||||
/*
|
||||
* protocol.h: wire protocol message format & data structures
|
||||
*
|
||||
* Copyright (C) 2006, 2007 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* 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: Daniel P. Berrange <berrange@redhat.com>
|
||||
* Please do not edit this file.
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#ifndef _PROTOCOL_H_RPCGEN
|
||||
#define _PROTOCOL_H_RPCGEN
|
||||
|
||||
#ifndef QEMUD_PROTOCOL_H__
|
||||
#define QEMUD_PROTOCOL_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <net/if.h> /* for IF_NAMESIZE */
|
||||
|
||||
/* List of different packet types which can be sent */
|
||||
enum qemud_packet_type {
|
||||
QEMUD_PKT_FAILURE = 0,
|
||||
QEMUD_PKT_GET_VERSION,
|
||||
QEMUD_PKT_GET_NODEINFO,
|
||||
QEMUD_PKT_LIST_DOMAINS,
|
||||
QEMUD_PKT_NUM_DOMAINS,
|
||||
QEMUD_PKT_DOMAIN_CREATE,
|
||||
QEMUD_PKT_DOMAIN_LOOKUP_BY_ID,
|
||||
QEMUD_PKT_DOMAIN_LOOKUP_BY_UUID,
|
||||
QEMUD_PKT_DOMAIN_LOOKUP_BY_NAME,
|
||||
QEMUD_PKT_DOMAIN_SUSPEND,
|
||||
QEMUD_PKT_DOMAIN_RESUME,
|
||||
QEMUD_PKT_DOMAIN_DESTROY,
|
||||
QEMUD_PKT_DOMAIN_GET_INFO,
|
||||
QEMUD_PKT_DOMAIN_SAVE,
|
||||
QEMUD_PKT_DOMAIN_RESTORE,
|
||||
QEMUD_PKT_DUMP_XML,
|
||||
QEMUD_PKT_LIST_DEFINED_DOMAINS,
|
||||
QEMUD_PKT_NUM_DEFINED_DOMAINS,
|
||||
QEMUD_PKT_DOMAIN_START,
|
||||
QEMUD_PKT_DOMAIN_DEFINE,
|
||||
QEMUD_PKT_DOMAIN_UNDEFINE,
|
||||
QEMUD_PKT_NUM_NETWORKS,
|
||||
QEMUD_PKT_LIST_NETWORKS,
|
||||
QEMUD_PKT_NUM_DEFINED_NETWORKS,
|
||||
QEMUD_PKT_LIST_DEFINED_NETWORKS,
|
||||
QEMUD_PKT_NETWORK_LOOKUP_BY_UUID,
|
||||
QEMUD_PKT_NETWORK_LOOKUP_BY_NAME,
|
||||
QEMUD_PKT_NETWORK_CREATE,
|
||||
QEMUD_PKT_NETWORK_DEFINE,
|
||||
QEMUD_PKT_NETWORK_UNDEFINE,
|
||||
QEMUD_PKT_NETWORK_START,
|
||||
QEMUD_PKT_NETWORK_DESTROY,
|
||||
QEMUD_PKT_NETWORK_DUMP_XML,
|
||||
QEMUD_PKT_NETWORK_GET_BRIDGE_NAME,
|
||||
QEMUD_PKT_DOMAIN_GET_AUTOSTART,
|
||||
QEMUD_PKT_DOMAIN_SET_AUTOSTART,
|
||||
QEMUD_PKT_NETWORK_GET_AUTOSTART,
|
||||
QEMUD_PKT_NETWORK_SET_AUTOSTART,
|
||||
QEMUD_PKT_GET_CAPABILITIES,
|
||||
|
||||
QEMUD_PKT_MAX,
|
||||
};
|
||||
#include <rpc/rpc.h>
|
||||
|
||||
|
||||
#define QEMUD_PROTOCOL_VERSION_MAJOR 1
|
||||
#define QEMUD_PROTOCOL_VERSION_MINOR 0
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define QEMUD_UUID_RAW_LEN 16
|
||||
#define QEMUD_MAX_NAME_LEN 50
|
||||
#define QEMUD_MAX_XML_LEN 4096
|
||||
#define QEMUD_MAX_IFNAME_LEN IF_NAMESIZE
|
||||
#define QEMUD_MAX_IFNAME_LEN 50
|
||||
#define QEMUD_MAX_NUM_DOMAINS 100
|
||||
#define QEMUD_MAX_NUM_NETWORKS 100
|
||||
#define QEMUD_MAX_DOMAINS_NAME_BUF 5000
|
||||
#define QEMUD_MAX_NETWORKS_NAME_BUF 5000
|
||||
#define QEMUD_MAX_ERROR_LEN 1024
|
||||
|
||||
/* Possible guest VM states */
|
||||
enum qemud_domain_runstate {
|
||||
QEMUD_STATE_RUNNING = 1,
|
||||
QEMUD_STATE_PAUSED,
|
||||
QEMUD_STATE_STOPPED,
|
||||
QEMUD_STATE_RUNNING = 1,
|
||||
QEMUD_STATE_PAUSED = 1 + 1,
|
||||
QEMUD_STATE_STOPPED = 1 + 2,
|
||||
};
|
||||
typedef enum qemud_domain_runstate qemud_domain_runstate;
|
||||
|
||||
enum qemud_packet_client_data_type {
|
||||
QEMUD_CLIENT_PKT_GET_VERSION = 0,
|
||||
QEMUD_CLIENT_PKT_GET_NODEINFO = 1,
|
||||
QEMUD_CLIENT_PKT_LIST_DOMAINS = 2,
|
||||
QEMUD_CLIENT_PKT_NUM_DOMAINS = 3,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_CREATE = 4,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_LOOKUP_BY_ID = 5,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_LOOKUP_BY_UUID = 6,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_LOOKUP_BY_NAME = 7,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_SUSPEND = 8,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_RESUME = 9,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_DESTROY = 10,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_GET_INFO = 11,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_SAVE = 12,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_RESTORE = 13,
|
||||
QEMUD_CLIENT_PKT_DUMP_XML = 14,
|
||||
QEMUD_CLIENT_PKT_LIST_DEFINED_DOMAINS = 15,
|
||||
QEMUD_CLIENT_PKT_NUM_DEFINED_DOMAINS = 16,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_START = 17,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_DEFINE = 18,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_UNDEFINE = 19,
|
||||
QEMUD_CLIENT_PKT_NUM_NETWORKS = 20,
|
||||
QEMUD_CLIENT_PKT_LIST_NETWORKS = 21,
|
||||
QEMUD_CLIENT_PKT_NUM_DEFINED_NETWORKS = 22,
|
||||
QEMUD_CLIENT_PKT_LIST_DEFINED_NETWORKS = 23,
|
||||
QEMUD_CLIENT_PKT_NETWORK_LOOKUP_BY_UUID = 24,
|
||||
QEMUD_CLIENT_PKT_NETWORK_LOOKUP_BY_NAME = 25,
|
||||
QEMUD_CLIENT_PKT_NETWORK_CREATE = 26,
|
||||
QEMUD_CLIENT_PKT_NETWORK_DEFINE = 27,
|
||||
QEMUD_CLIENT_PKT_NETWORK_UNDEFINE = 28,
|
||||
QEMUD_CLIENT_PKT_NETWORK_START = 29,
|
||||
QEMUD_CLIENT_PKT_NETWORK_DESTROY = 30,
|
||||
QEMUD_CLIENT_PKT_NETWORK_DUMP_XML = 31,
|
||||
QEMUD_CLIENT_PKT_NETWORK_GET_BRIDGE_NAME = 32,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_GET_AUTOSTART = 33,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_SET_AUTOSTART = 34,
|
||||
QEMUD_CLIENT_PKT_NETWORK_GET_AUTOSTART = 35,
|
||||
QEMUD_CLIENT_PKT_NETWORK_SET_AUTOSTART = 36,
|
||||
QEMUD_CLIENT_PKT_GET_CAPABILITIES = 37,
|
||||
QEMUD_CLIENT_PKT_MAX = 38,
|
||||
};
|
||||
typedef enum qemud_packet_client_data_type qemud_packet_client_data_type;
|
||||
|
||||
enum qemud_packet_server_data_type {
|
||||
QEMUD_SERVER_PKT_FAILURE = 0,
|
||||
QEMUD_SERVER_PKT_GET_VERSION = 0 + 1,
|
||||
QEMUD_SERVER_PKT_GET_NODEINFO = 0 + 2,
|
||||
QEMUD_SERVER_PKT_LIST_DOMAINS = 0 + 3,
|
||||
QEMUD_SERVER_PKT_NUM_DOMAINS = 0 + 4,
|
||||
QEMUD_SERVER_PKT_DOMAIN_CREATE = 0 + 5,
|
||||
QEMUD_SERVER_PKT_DOMAIN_LOOKUP_BY_ID = 0 + 6,
|
||||
QEMUD_SERVER_PKT_DOMAIN_LOOKUP_BY_UUID = 0 + 7,
|
||||
QEMUD_SERVER_PKT_DOMAIN_LOOKUP_BY_NAME = 0 + 8,
|
||||
QEMUD_SERVER_PKT_DOMAIN_SUSPEND = 0 + 9,
|
||||
QEMUD_SERVER_PKT_DOMAIN_RESUME = 0 + 10,
|
||||
QEMUD_SERVER_PKT_DOMAIN_DESTROY = 0 + 11,
|
||||
QEMUD_SERVER_PKT_DOMAIN_GET_INFO = 0 + 12,
|
||||
QEMUD_SERVER_PKT_DOMAIN_SAVE = 0 + 13,
|
||||
QEMUD_SERVER_PKT_DOMAIN_RESTORE = 0 + 14,
|
||||
QEMUD_SERVER_PKT_DUMP_XML = 0 + 15,
|
||||
QEMUD_SERVER_PKT_LIST_DEFINED_DOMAINS = 0 + 16,
|
||||
QEMUD_SERVER_PKT_NUM_DEFINED_DOMAINS = 0 + 17,
|
||||
QEMUD_SERVER_PKT_DOMAIN_START = 0 + 18,
|
||||
QEMUD_SERVER_PKT_DOMAIN_DEFINE = 0 + 19,
|
||||
QEMUD_SERVER_PKT_DOMAIN_UNDEFINE = 0 + 20,
|
||||
QEMUD_SERVER_PKT_NUM_NETWORKS = 0 + 21,
|
||||
QEMUD_SERVER_PKT_LIST_NETWORKS = 0 + 22,
|
||||
QEMUD_SERVER_PKT_NUM_DEFINED_NETWORKS = 0 + 23,
|
||||
QEMUD_SERVER_PKT_LIST_DEFINED_NETWORKS = 0 + 24,
|
||||
QEMUD_SERVER_PKT_NETWORK_LOOKUP_BY_UUID = 0 + 25,
|
||||
QEMUD_SERVER_PKT_NETWORK_LOOKUP_BY_NAME = 0 + 26,
|
||||
QEMUD_SERVER_PKT_NETWORK_CREATE = 0 + 27,
|
||||
QEMUD_SERVER_PKT_NETWORK_DEFINE = 0 + 28,
|
||||
QEMUD_SERVER_PKT_NETWORK_UNDEFINE = 0 + 29,
|
||||
QEMUD_SERVER_PKT_NETWORK_START = 0 + 30,
|
||||
QEMUD_SERVER_PKT_NETWORK_DESTROY = 0 + 31,
|
||||
QEMUD_SERVER_PKT_NETWORK_DUMP_XML = 0 + 32,
|
||||
QEMUD_SERVER_PKT_NETWORK_GET_BRIDGE_NAME = 0 + 33,
|
||||
QEMUD_SERVER_PKT_DOMAIN_GET_AUTOSTART = 0 + 34,
|
||||
QEMUD_SERVER_PKT_DOMAIN_SET_AUTOSTART = 0 + 35,
|
||||
QEMUD_SERVER_PKT_NETWORK_GET_AUTOSTART = 0 + 36,
|
||||
QEMUD_SERVER_PKT_NETWORK_SET_AUTOSTART = 0 + 37,
|
||||
QEMUD_SERVER_PKT_GET_CAPABILITIES = 0 + 38,
|
||||
QEMUD_SERVER_PKT_MAX = 0 + 39,
|
||||
};
|
||||
typedef enum qemud_packet_server_data_type qemud_packet_server_data_type;
|
||||
|
||||
struct qemud_packet_failure_reply {
|
||||
uint32_t code;
|
||||
char message[QEMUD_MAX_ERROR_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_failure_reply qemud_packet_failure_reply;
|
||||
|
||||
struct qemud_packet_get_version_reply {
|
||||
uint32_t versionNum;
|
||||
};
|
||||
typedef struct qemud_packet_get_version_reply qemud_packet_get_version_reply;
|
||||
|
||||
struct qemud_packet_get_node_info_reply {
|
||||
char model[32];
|
||||
uint32_t memory;
|
||||
uint32_t cpus;
|
||||
uint32_t mhz;
|
||||
uint32_t nodes;
|
||||
uint32_t sockets;
|
||||
uint32_t cores;
|
||||
uint32_t threads;
|
||||
};
|
||||
typedef struct qemud_packet_get_node_info_reply qemud_packet_get_node_info_reply;
|
||||
|
||||
struct qemud_packet_get_capabilities_reply {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_get_capabilities_reply qemud_packet_get_capabilities_reply;
|
||||
|
||||
struct qemud_packet_list_domains_reply {
|
||||
int32_t numDomains;
|
||||
int32_t domains[QEMUD_MAX_NUM_DOMAINS];
|
||||
};
|
||||
typedef struct qemud_packet_list_domains_reply qemud_packet_list_domains_reply;
|
||||
|
||||
struct qemud_packet_num_domains_reply {
|
||||
int32_t numDomains;
|
||||
};
|
||||
typedef struct qemud_packet_num_domains_reply qemud_packet_num_domains_reply;
|
||||
|
||||
struct qemud_packet_domain_create_request {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_create_request qemud_packet_domain_create_request;
|
||||
|
||||
struct qemud_packet_domain_create_reply {
|
||||
int32_t id;
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_create_reply qemud_packet_domain_create_reply;
|
||||
|
||||
struct qemud_packet_domain_lookup_by_id_request {
|
||||
int32_t id;
|
||||
};
|
||||
typedef struct qemud_packet_domain_lookup_by_id_request qemud_packet_domain_lookup_by_id_request;
|
||||
|
||||
struct qemud_packet_domain_lookup_by_id_reply {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_lookup_by_id_reply qemud_packet_domain_lookup_by_id_reply;
|
||||
|
||||
struct qemud_packet_domain_lookup_by_name_request {
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_lookup_by_name_request qemud_packet_domain_lookup_by_name_request;
|
||||
|
||||
struct qemud_packet_domain_lookup_by_name_reply {
|
||||
int32_t id;
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_lookup_by_name_reply qemud_packet_domain_lookup_by_name_reply;
|
||||
|
||||
struct qemud_packet_domain_lookup_by_uuid_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_lookup_by_uuid_request qemud_packet_domain_lookup_by_uuid_request;
|
||||
|
||||
struct qemud_packet_domain_lookup_by_uuid_reply {
|
||||
int32_t id;
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_lookup_by_uuid_reply qemud_packet_domain_lookup_by_uuid_reply;
|
||||
|
||||
struct qemud_packet_domain_suspend_request {
|
||||
int32_t id;
|
||||
};
|
||||
typedef struct qemud_packet_domain_suspend_request qemud_packet_domain_suspend_request;
|
||||
|
||||
struct qemud_packet_domain_resume_request {
|
||||
int32_t id;
|
||||
};
|
||||
typedef struct qemud_packet_domain_resume_request qemud_packet_domain_resume_request;
|
||||
|
||||
struct qemud_packet_domain_destroy_request {
|
||||
int32_t id;
|
||||
};
|
||||
typedef struct qemud_packet_domain_destroy_request qemud_packet_domain_destroy_request;
|
||||
|
||||
struct qemud_packet_domain_get_info_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_get_info_request qemud_packet_domain_get_info_request;
|
||||
|
||||
struct qemud_packet_domain_get_info_reply {
|
||||
uint64_t cpuTime;
|
||||
uint32_t runstate;
|
||||
uint32_t memory;
|
||||
uint32_t maxmem;
|
||||
uint32_t nrVirtCpu;
|
||||
};
|
||||
typedef struct qemud_packet_domain_get_info_reply qemud_packet_domain_get_info_reply;
|
||||
|
||||
struct qemud_packet_domain_save_request {
|
||||
int32_t id;
|
||||
char file[PATH_MAX];
|
||||
};
|
||||
typedef struct qemud_packet_domain_save_request qemud_packet_domain_save_request;
|
||||
|
||||
struct qemud_packet_domain_restore_request {
|
||||
char file[PATH_MAX];
|
||||
};
|
||||
typedef struct qemud_packet_domain_restore_request qemud_packet_domain_restore_request;
|
||||
|
||||
struct qemud_packet_domain_restore_reply {
|
||||
int32_t id;
|
||||
};
|
||||
typedef struct qemud_packet_domain_restore_reply qemud_packet_domain_restore_reply;
|
||||
|
||||
struct qemud_packet_domain_dump_xml_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_dump_xml_request qemud_packet_domain_dump_xml_request;
|
||||
|
||||
struct qemud_packet_domain_dump_xml_reply {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_dump_xml_reply qemud_packet_domain_dump_xml_reply;
|
||||
|
||||
struct qemud_packet_list_defined_domains_reply {
|
||||
uint32_t numDomains;
|
||||
char domains[QEMUD_MAX_DOMAINS_NAME_BUF];
|
||||
};
|
||||
typedef struct qemud_packet_list_defined_domains_reply qemud_packet_list_defined_domains_reply;
|
||||
|
||||
struct qemud_packet_num_defined_domains_reply {
|
||||
uint32_t numDomains;
|
||||
};
|
||||
typedef struct qemud_packet_num_defined_domains_reply qemud_packet_num_defined_domains_reply;
|
||||
|
||||
struct qemud_packet_domain_start_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_start_request qemud_packet_domain_start_request;
|
||||
|
||||
struct qemud_packet_domain_start_reply {
|
||||
int32_t id;
|
||||
};
|
||||
typedef struct qemud_packet_domain_start_reply qemud_packet_domain_start_reply;
|
||||
|
||||
struct qemud_packet_domain_define_request {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_define_request qemud_packet_domain_define_request;
|
||||
|
||||
struct qemud_packet_domain_define_reply {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_define_reply qemud_packet_domain_define_reply;
|
||||
|
||||
struct qemud_packet_domain_undefine_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_undefine_request qemud_packet_domain_undefine_request;
|
||||
|
||||
struct qemud_packet_num_networks_reply {
|
||||
uint32_t numNetworks;
|
||||
};
|
||||
typedef struct qemud_packet_num_networks_reply qemud_packet_num_networks_reply;
|
||||
|
||||
struct qemud_packet_list_networks_reply {
|
||||
uint32_t numNetworks;
|
||||
char networks[QEMUD_MAX_NETWORKS_NAME_BUF];
|
||||
};
|
||||
typedef struct qemud_packet_list_networks_reply qemud_packet_list_networks_reply;
|
||||
|
||||
struct qemud_packet_num_defined_networks_reply {
|
||||
uint32_t numNetworks;
|
||||
};
|
||||
typedef struct qemud_packet_num_defined_networks_reply qemud_packet_num_defined_networks_reply;
|
||||
|
||||
struct qemud_packet_list_defined_networks_reply {
|
||||
uint32_t numNetworks;
|
||||
char networks[QEMUD_MAX_NETWORKS_NAME_BUF];
|
||||
};
|
||||
typedef struct qemud_packet_list_defined_networks_reply qemud_packet_list_defined_networks_reply;
|
||||
|
||||
struct qemud_packet_network_lookup_by_name_request {
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_lookup_by_name_request qemud_packet_network_lookup_by_name_request;
|
||||
|
||||
struct qemud_packet_network_lookup_by_name_reply {
|
||||
int32_t id;
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_lookup_by_name_reply qemud_packet_network_lookup_by_name_reply;
|
||||
|
||||
struct qemud_packet_network_lookup_by_uuid_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_lookup_by_uuid_request qemud_packet_network_lookup_by_uuid_request;
|
||||
|
||||
struct qemud_packet_network_lookup_by_uuid_reply {
|
||||
int32_t id;
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_lookup_by_uuid_reply qemud_packet_network_lookup_by_uuid_reply;
|
||||
|
||||
struct qemud_packet_network_create_request {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_create_request qemud_packet_network_create_request;
|
||||
|
||||
struct qemud_packet_network_create_reply {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_create_reply qemud_packet_network_create_reply;
|
||||
|
||||
struct qemud_packet_network_define_request {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_define_request qemud_packet_network_define_request;
|
||||
|
||||
struct qemud_packet_network_define_reply {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_define_reply qemud_packet_network_define_reply;
|
||||
|
||||
struct qemud_packet_network_undefine_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_undefine_request qemud_packet_network_undefine_request;
|
||||
|
||||
struct qemud_packet_network_start_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_start_request qemud_packet_network_start_request;
|
||||
|
||||
struct qemud_packet_network_destroy_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_destroy_request qemud_packet_network_destroy_request;
|
||||
|
||||
struct qemud_packet_network_dump_xml_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_dump_xml_request qemud_packet_network_dump_xml_request;
|
||||
|
||||
struct qemud_packet_network_dump_xml_reply {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_dump_xml_reply qemud_packet_network_dump_xml_reply;
|
||||
|
||||
struct qemud_packet_network_get_bridge_name_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_get_bridge_name_request qemud_packet_network_get_bridge_name_request;
|
||||
|
||||
struct qemud_packet_network_get_bridge_name_reply {
|
||||
char ifname[QEMUD_MAX_IFNAME_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_get_bridge_name_reply qemud_packet_network_get_bridge_name_reply;
|
||||
|
||||
struct qemud_packet_domain_get_autostart_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_domain_get_autostart_request qemud_packet_domain_get_autostart_request;
|
||||
|
||||
struct qemud_packet_domain_get_autostart_reply {
|
||||
uint32_t autostart;
|
||||
};
|
||||
typedef struct qemud_packet_domain_get_autostart_reply qemud_packet_domain_get_autostart_reply;
|
||||
|
||||
struct qemud_packet_domain_set_autostart_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
uint32_t autostart;
|
||||
};
|
||||
typedef struct qemud_packet_domain_set_autostart_request qemud_packet_domain_set_autostart_request;
|
||||
|
||||
struct qemud_packet_network_get_autostart_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
typedef struct qemud_packet_network_get_autostart_request qemud_packet_network_get_autostart_request;
|
||||
|
||||
struct qemud_packet_network_get_autostart_reply {
|
||||
uint32_t autostart;
|
||||
};
|
||||
typedef struct qemud_packet_network_get_autostart_reply qemud_packet_network_get_autostart_reply;
|
||||
|
||||
struct qemud_packet_network_set_autostart_request {
|
||||
u_char uuid[QEMUD_UUID_RAW_LEN];
|
||||
uint32_t autostart;
|
||||
};
|
||||
typedef struct qemud_packet_network_set_autostart_request qemud_packet_network_set_autostart_request;
|
||||
|
||||
struct qemud_packet_client_data {
|
||||
qemud_packet_client_data_type type;
|
||||
union {
|
||||
qemud_packet_domain_create_request domainCreateRequest;
|
||||
qemud_packet_domain_lookup_by_id_request domainLookupByIDRequest;
|
||||
qemud_packet_domain_lookup_by_uuid_request domainLookupByUUIDRequest;
|
||||
qemud_packet_domain_lookup_by_name_request domainLookupByNameRequest;
|
||||
qemud_packet_domain_suspend_request domainSuspendRequest;
|
||||
qemud_packet_domain_resume_request domainResumeRequest;
|
||||
qemud_packet_domain_destroy_request domainDestroyRequest;
|
||||
qemud_packet_domain_get_info_request domainGetInfoRequest;
|
||||
qemud_packet_domain_save_request domainSaveRequest;
|
||||
qemud_packet_domain_restore_request domainRestoreRequest;
|
||||
qemud_packet_domain_dump_xml_request domainDumpXMLRequest;
|
||||
qemud_packet_domain_start_request domainStartRequest;
|
||||
qemud_packet_domain_define_request domainDefineRequest;
|
||||
qemud_packet_domain_undefine_request domainUndefineRequest;
|
||||
qemud_packet_network_lookup_by_uuid_request networkLookupByUUIDRequest;
|
||||
qemud_packet_network_lookup_by_name_request networkLookupByNameRequest;
|
||||
qemud_packet_network_create_request networkCreateRequest;
|
||||
qemud_packet_network_define_request networkDefineRequest;
|
||||
qemud_packet_network_undefine_request networkUndefineRequest;
|
||||
qemud_packet_network_start_request networkStartRequest;
|
||||
qemud_packet_network_destroy_request networkDestroyRequest;
|
||||
qemud_packet_network_dump_xml_request networkDumpXMLRequest;
|
||||
qemud_packet_network_get_bridge_name_request networkGetBridgeNameRequest;
|
||||
qemud_packet_domain_get_autostart_request domainGetAutostartRequest;
|
||||
qemud_packet_domain_set_autostart_request domainSetAutostartRequest;
|
||||
qemud_packet_network_get_autostart_request networkGetAutostartRequest;
|
||||
qemud_packet_network_set_autostart_request networkSetAutostartRequest;
|
||||
} qemud_packet_client_data_u;
|
||||
};
|
||||
typedef struct qemud_packet_client_data qemud_packet_client_data;
|
||||
|
||||
struct qemud_packet_server_data {
|
||||
qemud_packet_server_data_type type;
|
||||
union {
|
||||
qemud_packet_failure_reply failureReply;
|
||||
qemud_packet_get_version_reply getVersionReply;
|
||||
qemud_packet_get_node_info_reply getNodeInfoReply;
|
||||
qemud_packet_list_domains_reply listDomainsReply;
|
||||
qemud_packet_num_domains_reply numDomainsReply;
|
||||
qemud_packet_domain_create_reply domainCreateReply;
|
||||
qemud_packet_domain_lookup_by_id_reply domainLookupByIDReply;
|
||||
qemud_packet_domain_lookup_by_uuid_reply domainLookupByUUIDReply;
|
||||
qemud_packet_domain_lookup_by_name_reply domainLookupByNameReply;
|
||||
qemud_packet_domain_get_info_reply domainGetInfoReply;
|
||||
qemud_packet_domain_restore_reply domainRestoreReply;
|
||||
qemud_packet_domain_dump_xml_reply domainDumpXMLReply;
|
||||
qemud_packet_list_defined_domains_reply listDefinedDomainsReply;
|
||||
qemud_packet_num_defined_domains_reply numDefinedDomainsReply;
|
||||
qemud_packet_domain_start_reply domainStartReply;
|
||||
qemud_packet_domain_define_reply domainDefineReply;
|
||||
qemud_packet_num_networks_reply numNetworksReply;
|
||||
qemud_packet_list_networks_reply listNetworksReply;
|
||||
qemud_packet_num_defined_networks_reply numDefinedNetworksReply;
|
||||
qemud_packet_list_defined_networks_reply listDefinedNetworksReply;
|
||||
qemud_packet_network_lookup_by_uuid_reply networkLookupByUUIDReply;
|
||||
qemud_packet_network_lookup_by_name_reply networkLookupByNameReply;
|
||||
qemud_packet_network_create_reply networkCreateReply;
|
||||
qemud_packet_network_define_reply networkDefineReply;
|
||||
qemud_packet_network_dump_xml_reply networkDumpXMLReply;
|
||||
qemud_packet_network_get_bridge_name_reply networkGetBridgeNameReply;
|
||||
qemud_packet_domain_get_autostart_reply domainGetAutostartReply;
|
||||
qemud_packet_network_get_autostart_reply networkGetAutostartReply;
|
||||
qemud_packet_get_capabilities_reply getCapabilitiesReply;
|
||||
} qemud_packet_server_data_u;
|
||||
};
|
||||
typedef struct qemud_packet_server_data qemud_packet_server_data;
|
||||
|
||||
struct qemud_packet_client {
|
||||
uint32_t serial;
|
||||
struct qemud_packet_client_data data;
|
||||
};
|
||||
typedef struct qemud_packet_client qemud_packet_client;
|
||||
|
||||
struct qemud_packet_server {
|
||||
uint32_t serial;
|
||||
uint32_t inReplyTo;
|
||||
struct qemud_packet_server_data data;
|
||||
};
|
||||
typedef struct qemud_packet_server qemud_packet_server;
|
||||
#define QEMUD_PROGRAM 0x20001A64
|
||||
#define QEMUD_PKT_HEADER_XDR_LEN 8
|
||||
|
||||
/* Each packets has at least a fixed size header.
|
||||
*
|
||||
* All data required to be network byte order
|
||||
* to 32-bit boundaries */
|
||||
struct qemud_packet_header {
|
||||
uint32_t type;
|
||||
/* Stores the size of the data struct matching
|
||||
the type arg.
|
||||
Must be <= sizeof(union qemudPacketData) */
|
||||
uint32_t dataSize;
|
||||
uint32_t length;
|
||||
uint32_t prog;
|
||||
};
|
||||
typedef struct qemud_packet_header qemud_packet_header;
|
||||
|
||||
/* Most packets also have some message specific data
|
||||
* All data required to be network byte order, padded
|
||||
* to 32-bit boundaries */
|
||||
union qemud_packet_data {
|
||||
struct {
|
||||
int32_t code;
|
||||
char message[QEMUD_MAX_ERROR_LEN];
|
||||
} failureReply;
|
||||
struct {
|
||||
int32_t version;
|
||||
} getVersionReply;
|
||||
struct {
|
||||
char model[32];
|
||||
uint32_t memory;
|
||||
uint32_t cpus;
|
||||
uint32_t mhz;
|
||||
uint32_t nodes;
|
||||
uint32_t sockets;
|
||||
uint32_t cores;
|
||||
uint32_t threads;
|
||||
} getNodeInfoReply;
|
||||
struct {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
} getCapabilitiesReply;
|
||||
struct {
|
||||
int32_t numDomains;
|
||||
int32_t domains[QEMUD_MAX_NUM_DOMAINS];
|
||||
} listDomainsReply;
|
||||
struct {
|
||||
int32_t numDomains;
|
||||
} numDomainsReply;
|
||||
struct {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
} domainCreateRequest;
|
||||
struct {
|
||||
int32_t id;
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
} domainCreateReply;
|
||||
struct {
|
||||
int32_t id;
|
||||
} domainLookupByIDRequest;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
} domainLookupByIDReply;
|
||||
struct {
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
} domainLookupByNameRequest;
|
||||
struct {
|
||||
int32_t id;
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} domainLookupByNameReply;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} domainLookupByUUIDRequest;
|
||||
struct {
|
||||
int32_t id;
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
} domainLookupByUUIDReply;
|
||||
struct {
|
||||
int32_t id;
|
||||
} domainSuspendRequest;
|
||||
struct {
|
||||
int32_t id;
|
||||
} domainResumeRequest;
|
||||
struct {
|
||||
} domainResumeReply;
|
||||
struct {
|
||||
int32_t id;
|
||||
} domainDestroyRequest;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} domainGetInfoRequest;
|
||||
struct {
|
||||
uint64_t cpuTime;
|
||||
int32_t runstate;
|
||||
uint32_t memory;
|
||||
uint32_t maxmem;
|
||||
uint32_t nrVirtCpu;
|
||||
} domainGetInfoReply;
|
||||
struct {
|
||||
int32_t id;
|
||||
char file[PATH_MAX];
|
||||
} domainSaveRequest;
|
||||
struct {
|
||||
char file[PATH_MAX];
|
||||
} domainRestoreRequest;
|
||||
struct {
|
||||
int32_t id;
|
||||
} domainRestoreReply;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} domainDumpXMLRequest;
|
||||
struct {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
} domainDumpXMLReply;
|
||||
struct {
|
||||
int32_t numDomains;
|
||||
char domains[QEMUD_MAX_NUM_DOMAINS][QEMUD_MAX_NAME_LEN];
|
||||
} listDefinedDomainsReply;
|
||||
struct {
|
||||
int32_t numDomains;
|
||||
} numDefinedDomainsReply;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} domainStartRequest;
|
||||
struct {
|
||||
int32_t id;
|
||||
} domainStartReply;
|
||||
struct {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
} domainDefineRequest;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
} domainDefineReply;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} domainUndefineRequest;
|
||||
struct {
|
||||
int32_t numNetworks;
|
||||
} numNetworksReply;
|
||||
struct {
|
||||
int32_t numNetworks;
|
||||
char networks[QEMUD_MAX_NUM_NETWORKS][QEMUD_MAX_NAME_LEN];
|
||||
} listNetworksReply;
|
||||
struct {
|
||||
int32_t numNetworks;
|
||||
} numDefinedNetworksReply;
|
||||
struct {
|
||||
int32_t numNetworks;
|
||||
char networks[QEMUD_MAX_NUM_NETWORKS][QEMUD_MAX_NAME_LEN];
|
||||
} listDefinedNetworksReply;
|
||||
struct {
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
} networkLookupByNameRequest;
|
||||
struct {
|
||||
int32_t id;
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} networkLookupByNameReply;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} networkLookupByUUIDRequest;
|
||||
struct {
|
||||
int32_t id;
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
} networkLookupByUUIDReply;
|
||||
struct {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
} networkCreateRequest;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
} networkCreateReply;
|
||||
struct {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
} networkDefineRequest;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
} networkDefineReply;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} networkUndefineRequest;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} networkStartRequest;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} networkDestroyRequest;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} networkDumpXMLRequest;
|
||||
struct {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
} networkDumpXMLReply;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} networkGetBridgeNameRequest;
|
||||
struct {
|
||||
char ifname[QEMUD_MAX_IFNAME_LEN];
|
||||
} networkGetBridgeNameReply;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} domainGetAutostartRequest;
|
||||
struct {
|
||||
int autostart;
|
||||
} domainGetAutostartReply;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
unsigned int autostart : 1;
|
||||
} domainSetAutostartRequest;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
} networkGetAutostartRequest;
|
||||
struct {
|
||||
unsigned int autostart : 1;
|
||||
} networkGetAutostartReply;
|
||||
struct {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
unsigned int autostart : 1;
|
||||
} networkSetAutostartRequest;
|
||||
};
|
||||
/* the xdr functions */
|
||||
|
||||
/* Each packet has header & data */
|
||||
struct qemud_packet {
|
||||
struct qemud_packet_header header;
|
||||
union qemud_packet_data data;
|
||||
};
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
extern bool_t xdr_qemud_domain_runstate (XDR *, qemud_domain_runstate*);
|
||||
extern bool_t xdr_qemud_packet_client_data_type (XDR *, qemud_packet_client_data_type*);
|
||||
extern bool_t xdr_qemud_packet_server_data_type (XDR *, qemud_packet_server_data_type*);
|
||||
extern bool_t xdr_qemud_packet_failure_reply (XDR *, qemud_packet_failure_reply*);
|
||||
extern bool_t xdr_qemud_packet_get_version_reply (XDR *, qemud_packet_get_version_reply*);
|
||||
extern bool_t xdr_qemud_packet_get_node_info_reply (XDR *, qemud_packet_get_node_info_reply*);
|
||||
extern bool_t xdr_qemud_packet_get_capabilities_reply (XDR *, qemud_packet_get_capabilities_reply*);
|
||||
extern bool_t xdr_qemud_packet_list_domains_reply (XDR *, qemud_packet_list_domains_reply*);
|
||||
extern bool_t xdr_qemud_packet_num_domains_reply (XDR *, qemud_packet_num_domains_reply*);
|
||||
extern bool_t xdr_qemud_packet_domain_create_request (XDR *, qemud_packet_domain_create_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_create_reply (XDR *, qemud_packet_domain_create_reply*);
|
||||
extern bool_t xdr_qemud_packet_domain_lookup_by_id_request (XDR *, qemud_packet_domain_lookup_by_id_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_lookup_by_id_reply (XDR *, qemud_packet_domain_lookup_by_id_reply*);
|
||||
extern bool_t xdr_qemud_packet_domain_lookup_by_name_request (XDR *, qemud_packet_domain_lookup_by_name_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_lookup_by_name_reply (XDR *, qemud_packet_domain_lookup_by_name_reply*);
|
||||
extern bool_t xdr_qemud_packet_domain_lookup_by_uuid_request (XDR *, qemud_packet_domain_lookup_by_uuid_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_lookup_by_uuid_reply (XDR *, qemud_packet_domain_lookup_by_uuid_reply*);
|
||||
extern bool_t xdr_qemud_packet_domain_suspend_request (XDR *, qemud_packet_domain_suspend_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_resume_request (XDR *, qemud_packet_domain_resume_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_destroy_request (XDR *, qemud_packet_domain_destroy_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_get_info_request (XDR *, qemud_packet_domain_get_info_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_get_info_reply (XDR *, qemud_packet_domain_get_info_reply*);
|
||||
extern bool_t xdr_qemud_packet_domain_save_request (XDR *, qemud_packet_domain_save_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_restore_request (XDR *, qemud_packet_domain_restore_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_restore_reply (XDR *, qemud_packet_domain_restore_reply*);
|
||||
extern bool_t xdr_qemud_packet_domain_dump_xml_request (XDR *, qemud_packet_domain_dump_xml_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_dump_xml_reply (XDR *, qemud_packet_domain_dump_xml_reply*);
|
||||
extern bool_t xdr_qemud_packet_list_defined_domains_reply (XDR *, qemud_packet_list_defined_domains_reply*);
|
||||
extern bool_t xdr_qemud_packet_num_defined_domains_reply (XDR *, qemud_packet_num_defined_domains_reply*);
|
||||
extern bool_t xdr_qemud_packet_domain_start_request (XDR *, qemud_packet_domain_start_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_start_reply (XDR *, qemud_packet_domain_start_reply*);
|
||||
extern bool_t xdr_qemud_packet_domain_define_request (XDR *, qemud_packet_domain_define_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_define_reply (XDR *, qemud_packet_domain_define_reply*);
|
||||
extern bool_t xdr_qemud_packet_domain_undefine_request (XDR *, qemud_packet_domain_undefine_request*);
|
||||
extern bool_t xdr_qemud_packet_num_networks_reply (XDR *, qemud_packet_num_networks_reply*);
|
||||
extern bool_t xdr_qemud_packet_list_networks_reply (XDR *, qemud_packet_list_networks_reply*);
|
||||
extern bool_t xdr_qemud_packet_num_defined_networks_reply (XDR *, qemud_packet_num_defined_networks_reply*);
|
||||
extern bool_t xdr_qemud_packet_list_defined_networks_reply (XDR *, qemud_packet_list_defined_networks_reply*);
|
||||
extern bool_t xdr_qemud_packet_network_lookup_by_name_request (XDR *, qemud_packet_network_lookup_by_name_request*);
|
||||
extern bool_t xdr_qemud_packet_network_lookup_by_name_reply (XDR *, qemud_packet_network_lookup_by_name_reply*);
|
||||
extern bool_t xdr_qemud_packet_network_lookup_by_uuid_request (XDR *, qemud_packet_network_lookup_by_uuid_request*);
|
||||
extern bool_t xdr_qemud_packet_network_lookup_by_uuid_reply (XDR *, qemud_packet_network_lookup_by_uuid_reply*);
|
||||
extern bool_t xdr_qemud_packet_network_create_request (XDR *, qemud_packet_network_create_request*);
|
||||
extern bool_t xdr_qemud_packet_network_create_reply (XDR *, qemud_packet_network_create_reply*);
|
||||
extern bool_t xdr_qemud_packet_network_define_request (XDR *, qemud_packet_network_define_request*);
|
||||
extern bool_t xdr_qemud_packet_network_define_reply (XDR *, qemud_packet_network_define_reply*);
|
||||
extern bool_t xdr_qemud_packet_network_undefine_request (XDR *, qemud_packet_network_undefine_request*);
|
||||
extern bool_t xdr_qemud_packet_network_start_request (XDR *, qemud_packet_network_start_request*);
|
||||
extern bool_t xdr_qemud_packet_network_destroy_request (XDR *, qemud_packet_network_destroy_request*);
|
||||
extern bool_t xdr_qemud_packet_network_dump_xml_request (XDR *, qemud_packet_network_dump_xml_request*);
|
||||
extern bool_t xdr_qemud_packet_network_dump_xml_reply (XDR *, qemud_packet_network_dump_xml_reply*);
|
||||
extern bool_t xdr_qemud_packet_network_get_bridge_name_request (XDR *, qemud_packet_network_get_bridge_name_request*);
|
||||
extern bool_t xdr_qemud_packet_network_get_bridge_name_reply (XDR *, qemud_packet_network_get_bridge_name_reply*);
|
||||
extern bool_t xdr_qemud_packet_domain_get_autostart_request (XDR *, qemud_packet_domain_get_autostart_request*);
|
||||
extern bool_t xdr_qemud_packet_domain_get_autostart_reply (XDR *, qemud_packet_domain_get_autostart_reply*);
|
||||
extern bool_t xdr_qemud_packet_domain_set_autostart_request (XDR *, qemud_packet_domain_set_autostart_request*);
|
||||
extern bool_t xdr_qemud_packet_network_get_autostart_request (XDR *, qemud_packet_network_get_autostart_request*);
|
||||
extern bool_t xdr_qemud_packet_network_get_autostart_reply (XDR *, qemud_packet_network_get_autostart_reply*);
|
||||
extern bool_t xdr_qemud_packet_network_set_autostart_request (XDR *, qemud_packet_network_set_autostart_request*);
|
||||
extern bool_t xdr_qemud_packet_client_data (XDR *, qemud_packet_client_data*);
|
||||
extern bool_t xdr_qemud_packet_server_data (XDR *, qemud_packet_server_data*);
|
||||
extern bool_t xdr_qemud_packet_client (XDR *, qemud_packet_client*);
|
||||
extern bool_t xdr_qemud_packet_server (XDR *, qemud_packet_server*);
|
||||
extern bool_t xdr_qemud_packet_header (XDR *, qemud_packet_header*);
|
||||
|
||||
#else /* K&R C */
|
||||
extern bool_t xdr_qemud_domain_runstate ();
|
||||
extern bool_t xdr_qemud_packet_client_data_type ();
|
||||
extern bool_t xdr_qemud_packet_server_data_type ();
|
||||
extern bool_t xdr_qemud_packet_failure_reply ();
|
||||
extern bool_t xdr_qemud_packet_get_version_reply ();
|
||||
extern bool_t xdr_qemud_packet_get_node_info_reply ();
|
||||
extern bool_t xdr_qemud_packet_get_capabilities_reply ();
|
||||
extern bool_t xdr_qemud_packet_list_domains_reply ();
|
||||
extern bool_t xdr_qemud_packet_num_domains_reply ();
|
||||
extern bool_t xdr_qemud_packet_domain_create_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_create_reply ();
|
||||
extern bool_t xdr_qemud_packet_domain_lookup_by_id_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_lookup_by_id_reply ();
|
||||
extern bool_t xdr_qemud_packet_domain_lookup_by_name_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_lookup_by_name_reply ();
|
||||
extern bool_t xdr_qemud_packet_domain_lookup_by_uuid_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_lookup_by_uuid_reply ();
|
||||
extern bool_t xdr_qemud_packet_domain_suspend_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_resume_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_destroy_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_get_info_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_get_info_reply ();
|
||||
extern bool_t xdr_qemud_packet_domain_save_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_restore_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_restore_reply ();
|
||||
extern bool_t xdr_qemud_packet_domain_dump_xml_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_dump_xml_reply ();
|
||||
extern bool_t xdr_qemud_packet_list_defined_domains_reply ();
|
||||
extern bool_t xdr_qemud_packet_num_defined_domains_reply ();
|
||||
extern bool_t xdr_qemud_packet_domain_start_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_start_reply ();
|
||||
extern bool_t xdr_qemud_packet_domain_define_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_define_reply ();
|
||||
extern bool_t xdr_qemud_packet_domain_undefine_request ();
|
||||
extern bool_t xdr_qemud_packet_num_networks_reply ();
|
||||
extern bool_t xdr_qemud_packet_list_networks_reply ();
|
||||
extern bool_t xdr_qemud_packet_num_defined_networks_reply ();
|
||||
extern bool_t xdr_qemud_packet_list_defined_networks_reply ();
|
||||
extern bool_t xdr_qemud_packet_network_lookup_by_name_request ();
|
||||
extern bool_t xdr_qemud_packet_network_lookup_by_name_reply ();
|
||||
extern bool_t xdr_qemud_packet_network_lookup_by_uuid_request ();
|
||||
extern bool_t xdr_qemud_packet_network_lookup_by_uuid_reply ();
|
||||
extern bool_t xdr_qemud_packet_network_create_request ();
|
||||
extern bool_t xdr_qemud_packet_network_create_reply ();
|
||||
extern bool_t xdr_qemud_packet_network_define_request ();
|
||||
extern bool_t xdr_qemud_packet_network_define_reply ();
|
||||
extern bool_t xdr_qemud_packet_network_undefine_request ();
|
||||
extern bool_t xdr_qemud_packet_network_start_request ();
|
||||
extern bool_t xdr_qemud_packet_network_destroy_request ();
|
||||
extern bool_t xdr_qemud_packet_network_dump_xml_request ();
|
||||
extern bool_t xdr_qemud_packet_network_dump_xml_reply ();
|
||||
extern bool_t xdr_qemud_packet_network_get_bridge_name_request ();
|
||||
extern bool_t xdr_qemud_packet_network_get_bridge_name_reply ();
|
||||
extern bool_t xdr_qemud_packet_domain_get_autostart_request ();
|
||||
extern bool_t xdr_qemud_packet_domain_get_autostart_reply ();
|
||||
extern bool_t xdr_qemud_packet_domain_set_autostart_request ();
|
||||
extern bool_t xdr_qemud_packet_network_get_autostart_request ();
|
||||
extern bool_t xdr_qemud_packet_network_get_autostart_reply ();
|
||||
extern bool_t xdr_qemud_packet_network_set_autostart_request ();
|
||||
extern bool_t xdr_qemud_packet_client_data ();
|
||||
extern bool_t xdr_qemud_packet_server_data ();
|
||||
extern bool_t xdr_qemud_packet_client ();
|
||||
extern bool_t xdr_qemud_packet_server ();
|
||||
extern bool_t xdr_qemud_packet_header ();
|
||||
|
||||
#endif /* K&R C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* indent-tabs-mode: nil
|
||||
* c-indent-level: 4
|
||||
* c-basic-offset: 4
|
||||
* tab-width: 4
|
||||
* End:
|
||||
*/
|
||||
#endif /* !_PROTOCOL_H_RPCGEN */
|
||||
|
614
qemud/protocol.x
Normal file
614
qemud/protocol.x
Normal file
@ -0,0 +1,614 @@
|
||||
/* -*- c -*-
|
||||
* protocol_xdr.x: wire protocol message format & data structures
|
||||
*
|
||||
* Copyright (C) 2006, 2007 Red Hat, Inc.
|
||||
* Copyright (C) 2006 Daniel P. Berrange
|
||||
*
|
||||
* 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: Daniel P. Berrange <berrange@redhat.com>
|
||||
*/
|
||||
|
||||
const QEMUD_UUID_RAW_LEN = 16;
|
||||
const QEMUD_MAX_NAME_LEN = 50;
|
||||
const QEMUD_MAX_XML_LEN = 4096;
|
||||
/*#define QEMUD_MAX_IFNAME_LEN IF_NAMESIZE */
|
||||
const QEMUD_MAX_IFNAME_LEN = 50;
|
||||
|
||||
const QEMUD_MAX_NUM_DOMAINS = 100;
|
||||
const QEMUD_MAX_NUM_NETWORKS = 100;
|
||||
|
||||
/*
|
||||
* Damn, we can't do multiplcation when declaring
|
||||
* constants with XDR !
|
||||
* These two should be QEMUD_MAX_NUM_DOMAIN * QEMUD_MAX_NAME_LEN
|
||||
*/
|
||||
const QEMUD_MAX_DOMAINS_NAME_BUF = 5000;
|
||||
const QEMUD_MAX_NETWORKS_NAME_BUF = 5000;
|
||||
|
||||
const QEMUD_MAX_ERROR_LEN = 1024;
|
||||
|
||||
/* Possible guest VM states */
|
||||
enum qemud_domain_runstate {
|
||||
QEMUD_STATE_RUNNING = 1,
|
||||
QEMUD_STATE_PAUSED,
|
||||
QEMUD_STATE_STOPPED
|
||||
};
|
||||
|
||||
/* Message sent by a client */
|
||||
enum qemud_packet_client_data_type {
|
||||
QEMUD_CLIENT_PKT_GET_VERSION,
|
||||
QEMUD_CLIENT_PKT_GET_NODEINFO,
|
||||
QEMUD_CLIENT_PKT_LIST_DOMAINS,
|
||||
QEMUD_CLIENT_PKT_NUM_DOMAINS,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_CREATE,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_LOOKUP_BY_ID,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_LOOKUP_BY_UUID,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_LOOKUP_BY_NAME,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_SUSPEND,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_RESUME,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_DESTROY,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_GET_INFO,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_SAVE,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_RESTORE,
|
||||
QEMUD_CLIENT_PKT_DUMP_XML,
|
||||
QEMUD_CLIENT_PKT_LIST_DEFINED_DOMAINS,
|
||||
QEMUD_CLIENT_PKT_NUM_DEFINED_DOMAINS,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_START,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_DEFINE,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_UNDEFINE,
|
||||
QEMUD_CLIENT_PKT_NUM_NETWORKS,
|
||||
QEMUD_CLIENT_PKT_LIST_NETWORKS,
|
||||
QEMUD_CLIENT_PKT_NUM_DEFINED_NETWORKS,
|
||||
QEMUD_CLIENT_PKT_LIST_DEFINED_NETWORKS,
|
||||
QEMUD_CLIENT_PKT_NETWORK_LOOKUP_BY_UUID,
|
||||
QEMUD_CLIENT_PKT_NETWORK_LOOKUP_BY_NAME,
|
||||
QEMUD_CLIENT_PKT_NETWORK_CREATE,
|
||||
QEMUD_CLIENT_PKT_NETWORK_DEFINE,
|
||||
QEMUD_CLIENT_PKT_NETWORK_UNDEFINE,
|
||||
QEMUD_CLIENT_PKT_NETWORK_START,
|
||||
QEMUD_CLIENT_PKT_NETWORK_DESTROY,
|
||||
QEMUD_CLIENT_PKT_NETWORK_DUMP_XML,
|
||||
QEMUD_CLIENT_PKT_NETWORK_GET_BRIDGE_NAME,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_GET_AUTOSTART,
|
||||
QEMUD_CLIENT_PKT_DOMAIN_SET_AUTOSTART,
|
||||
QEMUD_CLIENT_PKT_NETWORK_GET_AUTOSTART,
|
||||
QEMUD_CLIENT_PKT_NETWORK_SET_AUTOSTART,
|
||||
QEMUD_CLIENT_PKT_GET_CAPABILITIES,
|
||||
|
||||
QEMUD_CLIENT_PKT_MAX
|
||||
};
|
||||
|
||||
/* Messages sent by a server */
|
||||
enum qemud_packet_server_data_type {
|
||||
QEMUD_SERVER_PKT_FAILURE = 0,
|
||||
QEMUD_SERVER_PKT_GET_VERSION,
|
||||
QEMUD_SERVER_PKT_GET_NODEINFO,
|
||||
QEMUD_SERVER_PKT_LIST_DOMAINS,
|
||||
QEMUD_SERVER_PKT_NUM_DOMAINS,
|
||||
QEMUD_SERVER_PKT_DOMAIN_CREATE,
|
||||
QEMUD_SERVER_PKT_DOMAIN_LOOKUP_BY_ID,
|
||||
QEMUD_SERVER_PKT_DOMAIN_LOOKUP_BY_UUID,
|
||||
QEMUD_SERVER_PKT_DOMAIN_LOOKUP_BY_NAME,
|
||||
QEMUD_SERVER_PKT_DOMAIN_SUSPEND,
|
||||
QEMUD_SERVER_PKT_DOMAIN_RESUME,
|
||||
QEMUD_SERVER_PKT_DOMAIN_DESTROY,
|
||||
QEMUD_SERVER_PKT_DOMAIN_GET_INFO,
|
||||
QEMUD_SERVER_PKT_DOMAIN_SAVE,
|
||||
QEMUD_SERVER_PKT_DOMAIN_RESTORE,
|
||||
QEMUD_SERVER_PKT_DUMP_XML,
|
||||
QEMUD_SERVER_PKT_LIST_DEFINED_DOMAINS,
|
||||
QEMUD_SERVER_PKT_NUM_DEFINED_DOMAINS,
|
||||
QEMUD_SERVER_PKT_DOMAIN_START,
|
||||
QEMUD_SERVER_PKT_DOMAIN_DEFINE,
|
||||
QEMUD_SERVER_PKT_DOMAIN_UNDEFINE,
|
||||
QEMUD_SERVER_PKT_NUM_NETWORKS,
|
||||
QEMUD_SERVER_PKT_LIST_NETWORKS,
|
||||
QEMUD_SERVER_PKT_NUM_DEFINED_NETWORKS,
|
||||
QEMUD_SERVER_PKT_LIST_DEFINED_NETWORKS,
|
||||
QEMUD_SERVER_PKT_NETWORK_LOOKUP_BY_UUID,
|
||||
QEMUD_SERVER_PKT_NETWORK_LOOKUP_BY_NAME,
|
||||
QEMUD_SERVER_PKT_NETWORK_CREATE,
|
||||
QEMUD_SERVER_PKT_NETWORK_DEFINE,
|
||||
QEMUD_SERVER_PKT_NETWORK_UNDEFINE,
|
||||
QEMUD_SERVER_PKT_NETWORK_START,
|
||||
QEMUD_SERVER_PKT_NETWORK_DESTROY,
|
||||
QEMUD_SERVER_PKT_NETWORK_DUMP_XML,
|
||||
QEMUD_SERVER_PKT_NETWORK_GET_BRIDGE_NAME,
|
||||
QEMUD_SERVER_PKT_DOMAIN_GET_AUTOSTART,
|
||||
QEMUD_SERVER_PKT_DOMAIN_SET_AUTOSTART,
|
||||
QEMUD_SERVER_PKT_NETWORK_GET_AUTOSTART,
|
||||
QEMUD_SERVER_PKT_NETWORK_SET_AUTOSTART,
|
||||
QEMUD_SERVER_PKT_GET_CAPABILITIES,
|
||||
|
||||
QEMUD_SERVER_PKT_MAX
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct qemud_packet_failure_reply {
|
||||
uint32_t code;
|
||||
char message[QEMUD_MAX_ERROR_LEN];
|
||||
};
|
||||
|
||||
struct qemud_packet_get_version_reply {
|
||||
uint32_t versionNum;
|
||||
};
|
||||
|
||||
struct qemud_packet_get_node_info_reply {
|
||||
char model[32];
|
||||
uint32_t memory;
|
||||
uint32_t cpus;
|
||||
uint32_t mhz;
|
||||
uint32_t nodes;
|
||||
uint32_t sockets;
|
||||
uint32_t cores;
|
||||
uint32_t threads;
|
||||
};
|
||||
|
||||
struct qemud_packet_get_capabilities_reply {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
|
||||
struct qemud_packet_list_domains_reply {
|
||||
int32_t numDomains;
|
||||
int32_t domains[QEMUD_MAX_NUM_DOMAINS];
|
||||
};
|
||||
|
||||
struct qemud_packet_num_domains_reply{
|
||||
int32_t numDomains;
|
||||
};
|
||||
|
||||
struct qemud_packet_domain_create_request {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
struct qemud_packet_domain_create_reply {
|
||||
int32_t id;
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
struct qemud_packet_domain_lookup_by_id_request {
|
||||
int32_t id;
|
||||
};
|
||||
|
||||
struct qemud_packet_domain_lookup_by_id_reply {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
|
||||
struct qemud_packet_domain_lookup_by_name_request {
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
struct qemud_packet_domain_lookup_by_name_reply {
|
||||
int32_t id;
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_domain_lookup_by_uuid_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
|
||||
struct qemud_packet_domain_lookup_by_uuid_reply {
|
||||
int32_t id;
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
struct qemud_packet_domain_suspend_request {
|
||||
int32_t id;
|
||||
};
|
||||
struct qemud_packet_domain_resume_request {
|
||||
int32_t id;
|
||||
};
|
||||
struct qemud_packet_domain_destroy_request {
|
||||
int32_t id;
|
||||
};
|
||||
struct qemud_packet_domain_get_info_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_domain_get_info_reply {
|
||||
uint64_t cpuTime;
|
||||
uint32_t runstate;
|
||||
uint32_t memory;
|
||||
uint32_t maxmem;
|
||||
uint32_t nrVirtCpu;
|
||||
};
|
||||
struct qemud_packet_domain_save_request {
|
||||
int32_t id;
|
||||
char file[PATH_MAX];
|
||||
};
|
||||
struct qemud_packet_domain_restore_request {
|
||||
char file[PATH_MAX];
|
||||
};
|
||||
struct qemud_packet_domain_restore_reply {
|
||||
int32_t id;
|
||||
};
|
||||
struct qemud_packet_domain_dump_xml_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_domain_dump_xml_reply {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
struct qemud_packet_list_defined_domains_reply{
|
||||
uint32_t numDomains;
|
||||
char domains[QEMUD_MAX_DOMAINS_NAME_BUF];
|
||||
};
|
||||
struct qemud_packet_num_defined_domains_reply{
|
||||
uint32_t numDomains;
|
||||
};
|
||||
struct qemud_packet_domain_start_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_domain_start_reply {
|
||||
int32_t id;
|
||||
};
|
||||
struct qemud_packet_domain_define_request {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
struct qemud_packet_domain_define_reply {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
struct qemud_packet_domain_undefine_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_num_networks_reply {
|
||||
uint32_t numNetworks;
|
||||
};
|
||||
|
||||
struct qemud_packet_list_networks_reply {
|
||||
uint32_t numNetworks;
|
||||
char networks[QEMUD_MAX_NETWORKS_NAME_BUF];
|
||||
};
|
||||
|
||||
struct qemud_packet_num_defined_networks_reply {
|
||||
uint32_t numNetworks;
|
||||
};
|
||||
|
||||
struct qemud_packet_list_defined_networks_reply {
|
||||
uint32_t numNetworks;
|
||||
char networks[QEMUD_MAX_NETWORKS_NAME_BUF];
|
||||
};
|
||||
struct qemud_packet_network_lookup_by_name_request {
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
struct qemud_packet_network_lookup_by_name_reply {
|
||||
int32_t id;
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_network_lookup_by_uuid_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_network_lookup_by_uuid_reply {
|
||||
int32_t id;
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
struct qemud_packet_network_create_request {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
struct qemud_packet_network_create_reply {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
struct qemud_packet_network_define_request {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
struct qemud_packet_network_define_reply {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
char name[QEMUD_MAX_NAME_LEN];
|
||||
};
|
||||
struct qemud_packet_network_undefine_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_network_start_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_network_destroy_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_network_dump_xml_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_network_dump_xml_reply {
|
||||
char xml[QEMUD_MAX_XML_LEN];
|
||||
};
|
||||
struct qemud_packet_network_get_bridge_name_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_network_get_bridge_name_reply {
|
||||
char ifname[QEMUD_MAX_IFNAME_LEN];
|
||||
};
|
||||
struct qemud_packet_domain_get_autostart_request{
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_domain_get_autostart_reply {
|
||||
uint32_t autostart;
|
||||
};
|
||||
struct qemud_packet_domain_set_autostart_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
uint32_t autostart;
|
||||
};
|
||||
|
||||
struct qemud_packet_network_get_autostart_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
};
|
||||
struct qemud_packet_network_get_autostart_reply {
|
||||
uint32_t autostart;
|
||||
};
|
||||
struct qemud_packet_network_set_autostart_request {
|
||||
unsigned char uuid[QEMUD_UUID_RAW_LEN];
|
||||
uint32_t autostart;
|
||||
};
|
||||
|
||||
union qemud_packet_client_data switch (qemud_packet_client_data_type type) {
|
||||
case QEMUD_CLIENT_PKT_GET_VERSION:
|
||||
void;
|
||||
|
||||
case QEMUD_CLIENT_PKT_GET_NODEINFO:
|
||||
void;
|
||||
|
||||
case QEMUD_CLIENT_PKT_LIST_DOMAINS:
|
||||
void;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NUM_DOMAINS:
|
||||
void;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_CREATE:
|
||||
qemud_packet_domain_create_request domainCreateRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_LOOKUP_BY_ID:
|
||||
qemud_packet_domain_lookup_by_id_request domainLookupByIDRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_LOOKUP_BY_UUID:
|
||||
qemud_packet_domain_lookup_by_uuid_request domainLookupByUUIDRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_LOOKUP_BY_NAME:
|
||||
qemud_packet_domain_lookup_by_name_request domainLookupByNameRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_SUSPEND:
|
||||
qemud_packet_domain_suspend_request domainSuspendRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_RESUME:
|
||||
qemud_packet_domain_resume_request domainResumeRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_DESTROY:
|
||||
qemud_packet_domain_destroy_request domainDestroyRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_GET_INFO:
|
||||
qemud_packet_domain_get_info_request domainGetInfoRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_SAVE:
|
||||
qemud_packet_domain_save_request domainSaveRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_RESTORE:
|
||||
qemud_packet_domain_restore_request domainRestoreRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DUMP_XML:
|
||||
qemud_packet_domain_dump_xml_request domainDumpXMLRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_LIST_DEFINED_DOMAINS:
|
||||
void;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NUM_DEFINED_DOMAINS:
|
||||
void;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_START:
|
||||
qemud_packet_domain_start_request domainStartRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_DEFINE:
|
||||
qemud_packet_domain_define_request domainDefineRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_UNDEFINE:
|
||||
qemud_packet_domain_undefine_request domainUndefineRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NUM_NETWORKS:
|
||||
void;
|
||||
|
||||
case QEMUD_CLIENT_PKT_LIST_NETWORKS:
|
||||
void;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NUM_DEFINED_NETWORKS:
|
||||
void;
|
||||
|
||||
case QEMUD_CLIENT_PKT_LIST_DEFINED_NETWORKS:
|
||||
void;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NETWORK_LOOKUP_BY_UUID:
|
||||
qemud_packet_network_lookup_by_uuid_request networkLookupByUUIDRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NETWORK_LOOKUP_BY_NAME:
|
||||
qemud_packet_network_lookup_by_name_request networkLookupByNameRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NETWORK_CREATE:
|
||||
qemud_packet_network_create_request networkCreateRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NETWORK_DEFINE:
|
||||
qemud_packet_network_define_request networkDefineRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NETWORK_UNDEFINE:
|
||||
qemud_packet_network_undefine_request networkUndefineRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NETWORK_START:
|
||||
qemud_packet_network_start_request networkStartRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NETWORK_DESTROY:
|
||||
qemud_packet_network_destroy_request networkDestroyRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NETWORK_DUMP_XML:
|
||||
qemud_packet_network_dump_xml_request networkDumpXMLRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NETWORK_GET_BRIDGE_NAME:
|
||||
qemud_packet_network_get_bridge_name_request networkGetBridgeNameRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_GET_AUTOSTART:
|
||||
qemud_packet_domain_get_autostart_request domainGetAutostartRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_DOMAIN_SET_AUTOSTART:
|
||||
qemud_packet_domain_set_autostart_request domainSetAutostartRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NETWORK_GET_AUTOSTART:
|
||||
qemud_packet_network_get_autostart_request networkGetAutostartRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_NETWORK_SET_AUTOSTART:
|
||||
qemud_packet_network_set_autostart_request networkSetAutostartRequest;
|
||||
|
||||
case QEMUD_CLIENT_PKT_GET_CAPABILITIES:
|
||||
void;
|
||||
|
||||
};
|
||||
|
||||
union qemud_packet_server_data switch (qemud_packet_server_data_type type) {
|
||||
case QEMUD_SERVER_PKT_FAILURE:
|
||||
qemud_packet_failure_reply failureReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_GET_VERSION:
|
||||
qemud_packet_get_version_reply getVersionReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_GET_NODEINFO:
|
||||
qemud_packet_get_node_info_reply getNodeInfoReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_LIST_DOMAINS:
|
||||
qemud_packet_list_domains_reply listDomainsReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_NUM_DOMAINS:
|
||||
qemud_packet_num_domains_reply numDomainsReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_CREATE:
|
||||
qemud_packet_domain_create_reply domainCreateReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_LOOKUP_BY_ID:
|
||||
qemud_packet_domain_lookup_by_id_reply domainLookupByIDReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_LOOKUP_BY_UUID:
|
||||
qemud_packet_domain_lookup_by_uuid_reply domainLookupByUUIDReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_LOOKUP_BY_NAME:
|
||||
qemud_packet_domain_lookup_by_name_reply domainLookupByNameReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_SUSPEND:
|
||||
void;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_RESUME:
|
||||
void;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_DESTROY:
|
||||
void;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_GET_INFO:
|
||||
qemud_packet_domain_get_info_reply domainGetInfoReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_SAVE:
|
||||
void;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_RESTORE:
|
||||
qemud_packet_domain_restore_reply domainRestoreReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_DUMP_XML:
|
||||
qemud_packet_domain_dump_xml_reply domainDumpXMLReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_LIST_DEFINED_DOMAINS:
|
||||
qemud_packet_list_defined_domains_reply listDefinedDomainsReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_NUM_DEFINED_DOMAINS:
|
||||
qemud_packet_num_defined_domains_reply numDefinedDomainsReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_START:
|
||||
qemud_packet_domain_start_reply domainStartReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_DEFINE:
|
||||
qemud_packet_domain_define_reply domainDefineReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_UNDEFINE:
|
||||
void;
|
||||
|
||||
case QEMUD_SERVER_PKT_NUM_NETWORKS:
|
||||
qemud_packet_num_networks_reply numNetworksReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_LIST_NETWORKS:
|
||||
qemud_packet_list_networks_reply listNetworksReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_NUM_DEFINED_NETWORKS:
|
||||
qemud_packet_num_defined_networks_reply numDefinedNetworksReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_LIST_DEFINED_NETWORKS:
|
||||
qemud_packet_list_defined_networks_reply listDefinedNetworksReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_NETWORK_LOOKUP_BY_UUID:
|
||||
qemud_packet_network_lookup_by_uuid_reply networkLookupByUUIDReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_NETWORK_LOOKUP_BY_NAME:
|
||||
qemud_packet_network_lookup_by_name_reply networkLookupByNameReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_NETWORK_CREATE:
|
||||
qemud_packet_network_create_reply networkCreateReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_NETWORK_DEFINE:
|
||||
qemud_packet_network_define_reply networkDefineReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_NETWORK_UNDEFINE:
|
||||
void;
|
||||
|
||||
case QEMUD_SERVER_PKT_NETWORK_START:
|
||||
void;
|
||||
|
||||
case QEMUD_SERVER_PKT_NETWORK_DESTROY:
|
||||
void;
|
||||
|
||||
case QEMUD_SERVER_PKT_NETWORK_DUMP_XML:
|
||||
qemud_packet_network_dump_xml_reply networkDumpXMLReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_NETWORK_GET_BRIDGE_NAME:
|
||||
qemud_packet_network_get_bridge_name_reply networkGetBridgeNameReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_GET_AUTOSTART:
|
||||
qemud_packet_domain_get_autostart_reply domainGetAutostartReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_DOMAIN_SET_AUTOSTART:
|
||||
void;
|
||||
|
||||
case QEMUD_SERVER_PKT_NETWORK_GET_AUTOSTART:
|
||||
qemud_packet_network_get_autostart_reply networkGetAutostartReply;
|
||||
|
||||
case QEMUD_SERVER_PKT_NETWORK_SET_AUTOSTART:
|
||||
void;
|
||||
|
||||
case QEMUD_SERVER_PKT_GET_CAPABILITIES:
|
||||
qemud_packet_get_capabilities_reply getCapabilitiesReply;
|
||||
};
|
||||
|
||||
struct qemud_packet_client {
|
||||
uint32_t serial;
|
||||
struct qemud_packet_client_data data;
|
||||
};
|
||||
|
||||
struct qemud_packet_server {
|
||||
uint32_t serial;
|
||||
uint32_t inReplyTo;
|
||||
struct qemud_packet_server_data data;
|
||||
};
|
||||
|
||||
/* The first two words in the messages are length and program number
|
||||
* (previously called "magic"). This makes the protocol compatible
|
||||
* with the remote protocol, although beyond the first two words
|
||||
* the protocols are completely different.
|
||||
*
|
||||
* Note the length is the total number of bytes in the message
|
||||
* _including_ the length and program number.
|
||||
*/
|
||||
|
||||
const QEMUD_PROGRAM = 0x20001A64;
|
||||
const QEMUD_PKT_HEADER_XDR_LEN = 8;
|
||||
|
||||
struct qemud_packet_header {
|
||||
uint32_t length;
|
||||
uint32_t prog;
|
||||
};
|
1356
qemud/qemud.c
1356
qemud/qemud.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user