mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
CPU flags wire protocol format and server side
* src/remote/remote_protocol.x: update with new entry point * daemon/remote.c: add the new server dispatcher * daemon/remote_dispatch_args.h daemon/remote_dispatch_prototypes.h daemon/remote_dispatch_ret.h daemon/remote_dispatch_table.h src/remote/remote_protocol.c src/remote/remote_protocol.h: regenerated
This commit is contained in:
parent
0b7d2ae653
commit
3a2881fa60
@ -5226,6 +5226,28 @@ static int remoteDispatchIsSecure(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
remoteDispatchCpuCompare(struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
struct qemud_client *client ATTRIBUTE_UNUSED,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr ATTRIBUTE_UNUSED,
|
||||
remote_error *err,
|
||||
remote_cpu_compare_args *args,
|
||||
remote_cpu_compare_ret *ret)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = virConnectCompareCPU(conn, args->xml, args->flags);
|
||||
if (result == VIR_CPU_COMPARE_ERROR) {
|
||||
remoteDispatchConnError(err, conn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret->result = result;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*----- Helpers. -----*/
|
||||
|
||||
/* get_nonnull_domain and get_nonnull_network turn an on-wire
|
||||
|
@ -133,3 +133,4 @@
|
||||
remote_storage_pool_is_active_args val_remote_storage_pool_is_active_args;
|
||||
remote_storage_pool_is_persistent_args val_remote_storage_pool_is_persistent_args;
|
||||
remote_interface_is_active_args val_remote_interface_is_active_args;
|
||||
remote_cpu_compare_args val_remote_cpu_compare_args;
|
||||
|
@ -50,6 +50,14 @@ static int remoteDispatchClose(
|
||||
remote_error *err,
|
||||
void *args,
|
||||
void *ret);
|
||||
static int remoteDispatchCpuCompare(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
virConnectPtr conn,
|
||||
remote_message_header *hdr,
|
||||
remote_error *err,
|
||||
remote_cpu_compare_args *args,
|
||||
remote_cpu_compare_ret *ret);
|
||||
static int remoteDispatchDomainAttachDevice(
|
||||
struct qemud_server *server,
|
||||
struct qemud_client *client,
|
||||
|
@ -115,3 +115,4 @@
|
||||
remote_storage_pool_is_persistent_ret val_remote_storage_pool_is_persistent_ret;
|
||||
remote_interface_is_active_ret val_remote_interface_is_active_ret;
|
||||
remote_get_lib_version_ret val_remote_get_lib_version_ret;
|
||||
remote_cpu_compare_ret val_remote_cpu_compare_ret;
|
||||
|
@ -792,3 +792,8 @@
|
||||
.args_filter = (xdrproc_t) xdr_void,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_get_lib_version_ret,
|
||||
},
|
||||
{ /* CpuCompare => 158 */
|
||||
.fn = (dispatch_fn) remoteDispatchCpuCompare,
|
||||
.args_filter = (xdrproc_t) xdr_remote_cpu_compare_args,
|
||||
.ret_filter = (xdrproc_t) xdr_remote_cpu_compare_ret,
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
* It was generated using rpcgen.
|
||||
*/
|
||||
|
||||
#include "remote_protocol.h"
|
||||
#include "./remote/remote_protocol.h"
|
||||
#include "internal.h"
|
||||
#include <arpa/inet.h>
|
||||
|
||||
@ -2856,6 +2856,26 @@ xdr_remote_interface_is_active_ret (XDR *xdrs, remote_interface_is_active_ret *o
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_remote_cpu_compare_args (XDR *xdrs, remote_cpu_compare_args *objp)
|
||||
{
|
||||
|
||||
if (!xdr_remote_nonnull_string (xdrs, &objp->xml))
|
||||
return FALSE;
|
||||
if (!xdr_u_int (xdrs, &objp->flags))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_remote_cpu_compare_ret (XDR *xdrs, remote_cpu_compare_ret *objp)
|
||||
{
|
||||
|
||||
if (!xdr_int (xdrs, &objp->result))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t
|
||||
xdr_remote_procedure (XDR *xdrs, remote_procedure *objp)
|
||||
{
|
||||
|
@ -1616,6 +1616,17 @@ struct remote_interface_is_active_ret {
|
||||
int active;
|
||||
};
|
||||
typedef struct remote_interface_is_active_ret remote_interface_is_active_ret;
|
||||
|
||||
struct remote_cpu_compare_args {
|
||||
remote_nonnull_string xml;
|
||||
u_int flags;
|
||||
};
|
||||
typedef struct remote_cpu_compare_args remote_cpu_compare_args;
|
||||
|
||||
struct remote_cpu_compare_ret {
|
||||
int result;
|
||||
};
|
||||
typedef struct remote_cpu_compare_ret remote_cpu_compare_ret;
|
||||
#define REMOTE_PROGRAM 0x20008086
|
||||
#define REMOTE_PROTOCOL_VERSION 1
|
||||
|
||||
@ -1777,6 +1788,7 @@ enum remote_procedure {
|
||||
REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT = 155,
|
||||
REMOTE_PROC_INTERFACE_IS_ACTIVE = 156,
|
||||
REMOTE_PROC_GET_LIB_VERSION = 157,
|
||||
REMOTE_PROC_CPU_COMPARE = 158,
|
||||
};
|
||||
typedef enum remote_procedure remote_procedure;
|
||||
|
||||
@ -2074,6 +2086,8 @@ extern bool_t xdr_remote_storage_pool_is_persistent_args (XDR *, remote_storage
|
||||
extern bool_t xdr_remote_storage_pool_is_persistent_ret (XDR *, remote_storage_pool_is_persistent_ret*);
|
||||
extern bool_t xdr_remote_interface_is_active_args (XDR *, remote_interface_is_active_args*);
|
||||
extern bool_t xdr_remote_interface_is_active_ret (XDR *, remote_interface_is_active_ret*);
|
||||
extern bool_t xdr_remote_cpu_compare_args (XDR *, remote_cpu_compare_args*);
|
||||
extern bool_t xdr_remote_cpu_compare_ret (XDR *, remote_cpu_compare_ret*);
|
||||
extern bool_t xdr_remote_procedure (XDR *, remote_procedure*);
|
||||
extern bool_t xdr_remote_message_type (XDR *, remote_message_type*);
|
||||
extern bool_t xdr_remote_message_status (XDR *, remote_message_status*);
|
||||
@ -2345,6 +2359,8 @@ extern bool_t xdr_remote_storage_pool_is_persistent_args ();
|
||||
extern bool_t xdr_remote_storage_pool_is_persistent_ret ();
|
||||
extern bool_t xdr_remote_interface_is_active_args ();
|
||||
extern bool_t xdr_remote_interface_is_active_ret ();
|
||||
extern bool_t xdr_remote_cpu_compare_args ();
|
||||
extern bool_t xdr_remote_cpu_compare_ret ();
|
||||
extern bool_t xdr_remote_procedure ();
|
||||
extern bool_t xdr_remote_message_type ();
|
||||
extern bool_t xdr_remote_message_status ();
|
||||
|
@ -1433,6 +1433,16 @@ struct remote_interface_is_active_ret {
|
||||
};
|
||||
|
||||
|
||||
struct remote_cpu_compare_args {
|
||||
remote_nonnull_string xml;
|
||||
unsigned flags;
|
||||
};
|
||||
|
||||
struct remote_cpu_compare_ret {
|
||||
int result;
|
||||
};
|
||||
|
||||
|
||||
/*----- Protocol. -----*/
|
||||
|
||||
/* Define the program number, protocol version and procedure numbers here. */
|
||||
@ -1611,7 +1621,8 @@ enum remote_procedure {
|
||||
REMOTE_PROC_STORAGE_POOL_IS_ACTIVE = 154,
|
||||
REMOTE_PROC_STORAGE_POOL_IS_PERSISTENT = 155,
|
||||
REMOTE_PROC_INTERFACE_IS_ACTIVE = 156,
|
||||
REMOTE_PROC_GET_LIB_VERSION = 157
|
||||
REMOTE_PROC_GET_LIB_VERSION = 157,
|
||||
REMOTE_PROC_CPU_COMPARE = 158
|
||||
|
||||
/*
|
||||
* Notice how the entries are grouped in sets of 10 ?
|
||||
|
Loading…
x
Reference in New Issue
Block a user