2007-03-06 21:55:44 +00:00
|
|
|
/* -*- c -*-
|
2006-02-09 17:45:11 +00:00
|
|
|
* libvirt.h:
|
|
|
|
* Summary: core interfaces for the libvirt library
|
|
|
|
* Description: Provides the interfaces of the libvirt library to handle
|
2008-07-25 08:52:19 +00:00
|
|
|
* virtualized domains
|
2005-12-08 15:08:46 +00:00
|
|
|
*
|
2006-02-09 17:45:11 +00:00
|
|
|
* Copy: Copyright (C) 2005,2006 Red Hat, Inc.
|
2005-12-08 15:08:46 +00:00
|
|
|
*
|
|
|
|
* See COPYING.LIB for the License of this software
|
|
|
|
*
|
|
|
|
* Author: Daniel Veillard <veillard@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VIR_VIRLIB_H__
|
|
|
|
#define __VIR_VIRLIB_H__
|
|
|
|
|
2007-08-21 10:08:12 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
2005-12-08 15:08:46 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2008-05-23 08:32:08 +00:00
|
|
|
#ifndef VIR_DEPRECATED
|
|
|
|
/* The feature is present in gcc-3.1 and newer. */
|
|
|
|
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
|
|
|
|
# define VIR_DEPRECATED __attribute__((__deprecated__))
|
|
|
|
# else
|
|
|
|
# define VIR_DEPRECATED /* nothing */
|
|
|
|
# endif
|
|
|
|
#endif /* VIR_DEPRECATED */
|
|
|
|
|
2005-12-08 15:08:46 +00:00
|
|
|
/**
|
|
|
|
* virConnect:
|
|
|
|
*
|
|
|
|
* a virConnect is a private structure representing a connection to
|
2008-07-25 08:52:19 +00:00
|
|
|
* the Hypervisor.
|
2005-12-08 15:08:46 +00:00
|
|
|
*/
|
|
|
|
typedef struct _virConnect virConnect;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virConnectPtr:
|
|
|
|
*
|
|
|
|
* a virConnectPtr is pointer to a virConnect private structure, this is the
|
2008-07-25 08:52:19 +00:00
|
|
|
* type used to reference a connection to the Hypervisor in the API.
|
2005-12-08 15:08:46 +00:00
|
|
|
*/
|
|
|
|
typedef virConnect *virConnectPtr;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomain:
|
|
|
|
*
|
2008-07-25 08:52:19 +00:00
|
|
|
* a virDomain is a private structure representing a domain.
|
2005-12-08 15:08:46 +00:00
|
|
|
*/
|
|
|
|
typedef struct _virDomain virDomain;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomainPtr:
|
|
|
|
*
|
|
|
|
* a virDomainPtr is pointer to a virDomain private structure, this is the
|
2008-07-25 08:52:19 +00:00
|
|
|
* type used to reference a domain in the API.
|
2005-12-08 15:08:46 +00:00
|
|
|
*/
|
|
|
|
typedef virDomain *virDomainPtr;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomainState:
|
|
|
|
*
|
|
|
|
* A domain may be in different states at a given point in time
|
|
|
|
*/
|
|
|
|
typedef enum {
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
VIR_DOMAIN_NOSTATE = 0, /* no state */
|
|
|
|
VIR_DOMAIN_RUNNING = 1, /* the domain is running */
|
|
|
|
VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */
|
|
|
|
VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */
|
2005-12-08 15:08:46 +00:00
|
|
|
VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
|
2006-01-18 10:37:08 +00:00
|
|
|
VIR_DOMAIN_CRASHED = 6 /* the domain is crashed */
|
2005-12-08 15:08:46 +00:00
|
|
|
} virDomainState;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomainInfoPtr:
|
|
|
|
*
|
2006-03-29 12:46:03 +00:00
|
|
|
* a virDomainInfo is a structure filled by virDomainGetInfo() and extracting
|
2008-03-14 11:08:03 +00:00
|
|
|
* runtime information for a given active Domain
|
2005-12-08 15:08:46 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct _virDomainInfo virDomainInfo;
|
|
|
|
|
|
|
|
struct _virDomainInfo {
|
2008-09-17 14:15:20 +00:00
|
|
|
unsigned char state; /* the running state, one of virDomainState */
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
unsigned long maxMem; /* the maximum memory in KBytes allowed */
|
|
|
|
unsigned long memory; /* the memory in KBytes used by the domain */
|
|
|
|
unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */
|
|
|
|
unsigned long long cpuTime; /* the CPU time used in nanoseconds */
|
2005-12-08 15:08:46 +00:00
|
|
|
};
|
|
|
|
|
2006-01-17 16:56:17 +00:00
|
|
|
/**
|
|
|
|
* virDomainInfoPtr:
|
|
|
|
*
|
|
|
|
* a virDomainInfoPtr is a pointer to a virDomainInfo structure.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef virDomainInfo *virDomainInfoPtr;
|
|
|
|
|
2005-12-08 15:08:46 +00:00
|
|
|
/**
|
2005-12-16 12:16:41 +00:00
|
|
|
* virDomainCreateFlags:
|
2005-12-08 15:08:46 +00:00
|
|
|
*
|
|
|
|
* Flags OR'ed together to provide specific behaviour when creating a
|
|
|
|
* Domain.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIR_DOMAIN_NONE = 0
|
2005-12-16 12:16:41 +00:00
|
|
|
} virDomainCreateFlags;
|
2005-12-08 15:08:46 +00:00
|
|
|
|
2009-07-10 11:18:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virStream:
|
|
|
|
*
|
|
|
|
* a virStream is a private structure representing a data stream.
|
|
|
|
*/
|
|
|
|
typedef struct _virStream virStream;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virStreamPtr:
|
|
|
|
*
|
|
|
|
* a virStreamPtr is pointer to a virStream private structure, this is the
|
|
|
|
* type used to reference a data stream in the API.
|
|
|
|
*/
|
|
|
|
typedef virStream *virStreamPtr;
|
|
|
|
|
|
|
|
|
2009-03-03 09:09:00 +00:00
|
|
|
/**
|
|
|
|
* VIR_SECURITY_LABEL_BUFLEN:
|
|
|
|
*
|
|
|
|
* Macro providing the maximum length of the virSecurityLabel label string.
|
|
|
|
* Note that this value is based on that used by Labeled NFS.
|
|
|
|
*/
|
|
|
|
#define VIR_SECURITY_LABEL_BUFLEN (4096 + 1)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virSecurityLabel:
|
|
|
|
*
|
|
|
|
* a virSecurityLabel is a structure filled by virDomainGetSecurityLabel(),
|
|
|
|
* providing the security label and associated attributes for the specified
|
|
|
|
* domain.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
typedef struct _virSecurityLabel {
|
|
|
|
char label[VIR_SECURITY_LABEL_BUFLEN]; /* security label string */
|
|
|
|
int enforcing; /* 1 if security policy is being enforced for domain */
|
|
|
|
} virSecurityLabel;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virSecurityLabelPtr:
|
|
|
|
*
|
|
|
|
* a virSecurityLabelPtr is a pointer to a virSecurityLabel.
|
|
|
|
*/
|
|
|
|
typedef virSecurityLabel *virSecurityLabelPtr;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* VIR_SECURITY_MODEL_BUFLEN:
|
|
|
|
*
|
|
|
|
* Macro providing the maximum length of the virSecurityModel model string.
|
|
|
|
*/
|
|
|
|
#define VIR_SECURITY_MODEL_BUFLEN (256 + 1)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* VIR_SECURITY_DOI_BUFLEN:
|
|
|
|
*
|
|
|
|
* Macro providing the maximum length of the virSecurityModel doi string.
|
|
|
|
*/
|
|
|
|
#define VIR_SECURITY_DOI_BUFLEN (256 + 1)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virSecurityModel:
|
|
|
|
*
|
|
|
|
* a virSecurityModel is a structure filled by virNodeGetSecurityModel(),
|
|
|
|
* providing the per-hypervisor security model and DOI attributes for the
|
|
|
|
* specified domain.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
typedef struct _virSecurityModel {
|
|
|
|
char model[VIR_SECURITY_MODEL_BUFLEN]; /* security model string */
|
|
|
|
char doi[VIR_SECURITY_DOI_BUFLEN]; /* domain of interpetation */
|
|
|
|
} virSecurityModel;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virSecurityModelPtr:
|
|
|
|
*
|
|
|
|
* a virSecurityModelPtr is a pointer to a virSecurityModel.
|
|
|
|
*/
|
|
|
|
typedef virSecurityModel *virSecurityModelPtr;
|
|
|
|
|
2006-03-29 12:46:03 +00:00
|
|
|
/**
|
|
|
|
* virNodeInfoPtr:
|
|
|
|
*
|
|
|
|
* a virNodeInfo is a structure filled by virNodeGetInfo() and providing
|
2008-03-14 11:08:03 +00:00
|
|
|
* the information for the Node.
|
2006-03-29 12:46:03 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct _virNodeInfo virNodeInfo;
|
|
|
|
|
|
|
|
struct _virNodeInfo {
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
char model[32]; /* string indicating the CPU model */
|
2006-04-04 14:37:32 +00:00
|
|
|
unsigned long memory;/* memory size in kilobytes */
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
unsigned int cpus; /* the number of active CPUs */
|
|
|
|
unsigned int mhz; /* expected CPU frequency */
|
|
|
|
unsigned int nodes; /* the number of NUMA cell, 1 for uniform mem access */
|
2006-03-29 12:46:03 +00:00
|
|
|
unsigned int sockets;/* number of CPU socket per node */
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
unsigned int cores; /* number of core per socket */
|
2006-03-29 12:46:03 +00:00
|
|
|
unsigned int threads;/* number of threads per core */
|
|
|
|
};
|
|
|
|
|
2006-08-07 17:37:42 +00:00
|
|
|
|
2007-06-05 12:06:08 +00:00
|
|
|
/**
|
|
|
|
* virDomainSchedParameterType:
|
|
|
|
*
|
|
|
|
* A scheduler parameter field type
|
|
|
|
*/
|
|
|
|
typedef enum {
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
VIR_DOMAIN_SCHED_FIELD_INT = 1, /* integer case */
|
|
|
|
VIR_DOMAIN_SCHED_FIELD_UINT = 2, /* unsigned integer case */
|
|
|
|
VIR_DOMAIN_SCHED_FIELD_LLONG = 3, /* long long case */
|
|
|
|
VIR_DOMAIN_SCHED_FIELD_ULLONG = 4, /* unsigned long long case */
|
|
|
|
VIR_DOMAIN_SCHED_FIELD_DOUBLE = 5, /* double case */
|
|
|
|
VIR_DOMAIN_SCHED_FIELD_BOOLEAN = 6 /* boolean(character) case */
|
2007-06-05 12:06:08 +00:00
|
|
|
} virSchedParameterType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* VIR_DOMAIN_SCHED_FIELD_LENGTH:
|
|
|
|
*
|
|
|
|
* Macro providing the field length of virSchedParameter
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define VIR_DOMAIN_SCHED_FIELD_LENGTH 80
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomainSchedParameter:
|
|
|
|
*
|
|
|
|
* a virDomainSchedParameter is the set of scheduler parameters
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct _virSchedParameter virSchedParameter;
|
|
|
|
|
|
|
|
struct _virSchedParameter {
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
char field[VIR_DOMAIN_SCHED_FIELD_LENGTH]; /* parameter name */
|
|
|
|
int type; /* parameter type */
|
2007-06-05 12:06:08 +00:00
|
|
|
union {
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int i; /* data for integer case */
|
|
|
|
unsigned int ui; /* data for unsigned integer case */
|
|
|
|
long long int l; /* data for long long integer case */
|
|
|
|
unsigned long long int ul; /* data for unsigned long long integer case */
|
|
|
|
double d; /* data for double case */
|
|
|
|
char b; /* data for char case */
|
2007-06-05 12:06:08 +00:00
|
|
|
} value; /* parameter value */
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virSchedParameterPtr:
|
|
|
|
*
|
|
|
|
* a virSchedParameterPtr is a pointer to a virSchedParameter structure.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef virSchedParameter *virSchedParameterPtr;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fetch scheduler parameters, caller allocates 'params' field of size 'nparams'
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainGetSchedulerParameters (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
virSchedParameterPtr params,
|
|
|
|
int *nparams);
|
2007-06-05 12:06:08 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Change scheduler parameters
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainSetSchedulerParameters (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
virSchedParameterPtr params,
|
|
|
|
int nparams);
|
2007-06-05 12:06:08 +00:00
|
|
|
|
2007-09-10 09:37:10 +00:00
|
|
|
/**
|
|
|
|
* virDomainBlockStats:
|
|
|
|
*
|
|
|
|
* Block device stats for virDomainBlockStats.
|
2007-08-21 10:08:12 +00:00
|
|
|
*
|
|
|
|
* Hypervisors may return a field set to ((long long)-1) which indicates
|
|
|
|
* that the hypervisor does not support that statistic.
|
|
|
|
*
|
|
|
|
* NB. Here 'long long' means 64 bit integer.
|
|
|
|
*/
|
2007-09-10 09:37:10 +00:00
|
|
|
typedef struct _virDomainBlockStats virDomainBlockStatsStruct;
|
|
|
|
|
2007-08-21 10:08:12 +00:00
|
|
|
struct _virDomainBlockStats {
|
2008-03-03 06:18:06 +00:00
|
|
|
long long rd_req; /* number of read requests */
|
|
|
|
long long rd_bytes; /* number of read bytes */
|
|
|
|
long long wr_req; /* number of write requests */
|
2008-03-17 10:27:31 +00:00
|
|
|
long long wr_bytes; /* number of written bytes */
|
2007-09-10 09:37:10 +00:00
|
|
|
long long errs; /* In Xen this returns the mysterious 'oo_req'. */
|
2007-08-21 10:08:12 +00:00
|
|
|
};
|
|
|
|
|
2007-09-10 09:37:10 +00:00
|
|
|
/**
|
|
|
|
* virDomainBlockStatsPtr:
|
|
|
|
*
|
|
|
|
* A pointer to a virDomainBlockStats structure
|
|
|
|
*/
|
|
|
|
typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomainInterfaceStats:
|
|
|
|
*
|
|
|
|
* Network interface stats for virDomainInterfaceStats.
|
2007-08-21 10:08:12 +00:00
|
|
|
*
|
|
|
|
* Hypervisors may return a field set to ((long long)-1) which indicates
|
|
|
|
* that the hypervisor does not support that statistic.
|
|
|
|
*
|
|
|
|
* NB. Here 'long long' means 64 bit integer.
|
|
|
|
*/
|
2007-09-10 09:37:10 +00:00
|
|
|
typedef struct _virDomainInterfaceStats virDomainInterfaceStatsStruct;
|
|
|
|
|
2007-08-21 10:08:12 +00:00
|
|
|
struct _virDomainInterfaceStats {
|
|
|
|
long long rx_bytes;
|
|
|
|
long long rx_packets;
|
|
|
|
long long rx_errs;
|
|
|
|
long long rx_drop;
|
|
|
|
long long tx_bytes;
|
|
|
|
long long tx_packets;
|
|
|
|
long long tx_errs;
|
|
|
|
long long tx_drop;
|
|
|
|
};
|
2007-09-10 09:37:10 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomainInterfaceStatsPtr:
|
|
|
|
*
|
2008-02-29 12:53:10 +00:00
|
|
|
* A pointer to a virDomainInterfaceStats structure
|
2007-09-10 09:37:10 +00:00
|
|
|
*/
|
|
|
|
typedef virDomainInterfaceStatsStruct *virDomainInterfaceStatsPtr;
|
|
|
|
|
2009-12-20 12:28:42 +00:00
|
|
|
/**
|
|
|
|
* Memory Statistics Tags:
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
/* The total amount of data read from swap space (in kB). */
|
|
|
|
VIR_DOMAIN_MEMORY_STAT_SWAP_IN = 0,
|
|
|
|
/* The total amount of memory written out to swap space (in kB). */
|
|
|
|
VIR_DOMAIN_MEMORY_STAT_SWAP_OUT = 1,
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Page faults occur when a process makes a valid access to virtual memory
|
|
|
|
* that is not available. When servicing the page fault, if disk IO is
|
|
|
|
* required, it is considered a major fault. If not, it is a minor fault.
|
|
|
|
* These are expressed as the number of faults that have occurred.
|
|
|
|
*/
|
|
|
|
VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT = 2,
|
|
|
|
VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT = 3,
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The amount of memory left completely unused by the system. Memory that
|
|
|
|
* is available but used for reclaimable caches should NOT be reported as
|
|
|
|
* free. This value is expressed in kB.
|
|
|
|
*/
|
|
|
|
VIR_DOMAIN_MEMORY_STAT_UNUSED = 4,
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The total amount of usable memory as seen by the domain. This value
|
|
|
|
* may be less than the amount of memory assigned to the domain if a
|
|
|
|
* balloon driver is in use or if the guest OS does not initialize all
|
|
|
|
* assigned pages. This value is expressed in kB.
|
|
|
|
*/
|
|
|
|
VIR_DOMAIN_MEMORY_STAT_AVAILABLE = 5,
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The number of statistics supported by this version of the interface.
|
|
|
|
* To add new statistics, add them to the enum and increase this value.
|
|
|
|
*/
|
|
|
|
VIR_DOMAIN_MEMORY_STAT_NR = 6,
|
|
|
|
} virDomainMemoryStatTags;
|
|
|
|
|
|
|
|
typedef struct _virDomainMemoryStat virDomainMemoryStatStruct;
|
|
|
|
|
|
|
|
struct _virDomainMemoryStat {
|
|
|
|
int tag;
|
|
|
|
unsigned long long val;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef virDomainMemoryStatStruct *virDomainMemoryStatPtr;
|
|
|
|
|
2007-08-21 10:08:12 +00:00
|
|
|
|
2009-12-14 10:59:27 +00:00
|
|
|
/* Domain core dump flags. */
|
|
|
|
typedef enum {
|
|
|
|
VIR_DUMP_CRASH = (1 << 0), /* crash after dump */
|
2009-12-14 11:10:38 +00:00
|
|
|
VIR_DUMP_LIVE = (1 << 1), /* live dump */
|
2009-12-14 10:59:27 +00:00
|
|
|
} virDomainCoreDumpFlags;
|
|
|
|
|
2007-08-21 09:31:12 +00:00
|
|
|
/* Domain migration flags. */
|
|
|
|
typedef enum {
|
2009-09-17 17:10:04 +00:00
|
|
|
VIR_MIGRATE_LIVE = (1 << 0), /* live migration */
|
|
|
|
VIR_MIGRATE_PEER2PEER = (1 << 1), /* direct source -> dest host control channel */
|
|
|
|
VIR_MIGRATE_TUNNELLED = (1 << 2), /* tunnel migration data over libvirtd connection */
|
2009-07-31 10:10:22 +00:00
|
|
|
VIR_MIGRATE_PERSIST_DEST = (1 << 3), /* persist the VM on the destination */
|
|
|
|
VIR_MIGRATE_UNDEFINE_SOURCE = (1 << 4), /* undefine the VM on the source */
|
2009-12-11 09:00:44 +00:00
|
|
|
VIR_MIGRATE_PAUSED = (1 << 5), /* pause on remote side */
|
2007-08-21 09:31:12 +00:00
|
|
|
} virDomainMigrateFlags;
|
|
|
|
|
|
|
|
/* Domain migration. */
|
|
|
|
virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned long flags, const char *dname,
|
|
|
|
const char *uri, unsigned long bandwidth);
|
2007-08-21 09:31:12 +00:00
|
|
|
|
2009-09-17 17:10:04 +00:00
|
|
|
int virDomainMigrateToURI (virDomainPtr domain, const char *duri,
|
|
|
|
unsigned long flags, const char *dname,
|
|
|
|
unsigned long bandwidth);
|
|
|
|
|
2006-08-07 17:37:42 +00:00
|
|
|
/**
|
|
|
|
* VIR_NODEINFO_MAXCPUS:
|
|
|
|
* @nodeinfo: virNodeInfo instance
|
|
|
|
*
|
|
|
|
* This macro is to calculate the total number of CPUs supported
|
2008-02-29 12:53:10 +00:00
|
|
|
* but not necessary active in the host.
|
2006-08-07 17:37:42 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#define VIR_NODEINFO_MAXCPUS(nodeinfo) ((nodeinfo).nodes*(nodeinfo).sockets*(nodeinfo).cores*(nodeinfo).threads)
|
|
|
|
|
2006-03-29 12:46:03 +00:00
|
|
|
/**
|
|
|
|
* virNodeInfoPtr:
|
|
|
|
*
|
|
|
|
* a virNodeInfoPtr is a pointer to a virNodeInfo structure.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef virNodeInfo *virNodeInfoPtr;
|
|
|
|
|
2007-12-05 18:28:05 +00:00
|
|
|
/**
|
|
|
|
* virConnectFlags
|
|
|
|
*
|
2008-02-29 12:53:10 +00:00
|
|
|
* Flags when opening a connection to a hypervisor
|
2007-12-05 18:28:05 +00:00
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIR_CONNECT_RO = 1, /* A readonly connection */
|
|
|
|
} virConnectFlags;
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
VIR_CRED_USERNAME = 1, /* Identity to act as */
|
|
|
|
VIR_CRED_AUTHNAME = 2, /* Identify to authorize as */
|
|
|
|
VIR_CRED_LANGUAGE = 3, /* RFC 1766 languages, comma separated */
|
|
|
|
VIR_CRED_CNONCE = 4, /* client supplies a nonce */
|
|
|
|
VIR_CRED_PASSPHRASE = 5, /* Passphrase secret */
|
|
|
|
VIR_CRED_ECHOPROMPT = 6, /* Challenge response */
|
|
|
|
VIR_CRED_NOECHOPROMPT = 7, /* Challenge response */
|
|
|
|
VIR_CRED_REALM = 8, /* Authentication realm */
|
|
|
|
VIR_CRED_EXTERNAL = 9, /* Externally managed credential */
|
|
|
|
|
|
|
|
/* More may be added - expect the unexpected */
|
|
|
|
} virConnectCredentialType;
|
|
|
|
|
|
|
|
struct _virConnectCredential {
|
|
|
|
int type; /* One of virConnectCredentialType constants */
|
|
|
|
const char *prompt; /* Prompt to show to user */
|
|
|
|
const char *challenge; /* Additional challenge to show */
|
|
|
|
const char *defresult; /* Optional default result */
|
|
|
|
char *result; /* Result to be filled with user response (or defresult) */
|
|
|
|
unsigned int resultlen; /* Length of the result */
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _virConnectCredential virConnectCredential;
|
|
|
|
typedef virConnectCredential *virConnectCredentialPtr;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virConnectCredCallbackPtr
|
|
|
|
*
|
|
|
|
* @param authtype type of authentication being performed
|
|
|
|
* @param cred list of virConnectCredential object to fetch from user
|
|
|
|
* @param ncred size of cred list
|
|
|
|
* @param cbdata opaque data passed to virConnectOpenAuth
|
2008-02-05 19:27:37 +00:00
|
|
|
*
|
2007-12-05 18:28:05 +00:00
|
|
|
* When authentication requires one or more interactions, this callback
|
|
|
|
* is invoked. For each interaction supplied, data must be gathered
|
|
|
|
* from the user and filled in to the 'result' and 'resultlen' fields.
|
|
|
|
* If an interaction can not be filled, fill in NULL and 0.
|
|
|
|
*
|
|
|
|
* Return 0 if all interactions were filled, or -1 upon error
|
|
|
|
*/
|
|
|
|
typedef int (*virConnectAuthCallbackPtr)(virConnectCredentialPtr cred,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int ncred,
|
|
|
|
void *cbdata);
|
2007-12-05 18:28:05 +00:00
|
|
|
|
|
|
|
struct _virConnectAuth {
|
|
|
|
int *credtype; /* List of supported virConnectCredentialType values */
|
|
|
|
unsigned int ncredtype;
|
|
|
|
|
|
|
|
virConnectAuthCallbackPtr cb; /* Callback used to collect credentials */
|
|
|
|
void *cbdata;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _virConnectAuth virConnectAuth;
|
|
|
|
typedef virConnectAuth *virConnectAuthPtr;
|
|
|
|
|
2007-12-05 18:55:04 +00:00
|
|
|
extern virConnectAuthPtr virConnectAuthPtrDefault;
|
|
|
|
|
Mon Jan 23 14:36:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* include/libvirt/libvirt.h.in: add VIR_UUID_BUFLEN and
VIR_UUID_STRING_BUFLEN
* libvirt/proxy/libvirt_proxy.c, libvirt/src/hash.c,
libvirt/src/internal.h, libvirt/src/libvirt.c,
libvirt/src/proxy_internal.c, libvirt/src/test.c,
libvirt/src/virsh.c, libvirt/src/xend_internal.c,
libvirt/src/xm_internal.c, libvirt/src/xml.c,
libvirt/python/libvir.c: use them
2007-01-23 14:39:45 +00:00
|
|
|
/**
|
2007-03-15 17:24:56 +00:00
|
|
|
* VIR_UUID_BUFLEN:
|
Mon Jan 23 14:36:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* include/libvirt/libvirt.h.in: add VIR_UUID_BUFLEN and
VIR_UUID_STRING_BUFLEN
* libvirt/proxy/libvirt_proxy.c, libvirt/src/hash.c,
libvirt/src/internal.h, libvirt/src/libvirt.c,
libvirt/src/proxy_internal.c, libvirt/src/test.c,
libvirt/src/virsh.c, libvirt/src/xend_internal.c,
libvirt/src/xm_internal.c, libvirt/src/xml.c,
libvirt/python/libvir.c: use them
2007-01-23 14:39:45 +00:00
|
|
|
*
|
|
|
|
* This macro provides the length of the buffer required
|
|
|
|
* for virDomainGetUUID()
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define VIR_UUID_BUFLEN (16)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* VIR_UUID_STRING_BUFLEN:
|
|
|
|
*
|
|
|
|
* This macro provides the length of the buffer required
|
|
|
|
* for virDomainGetUUIDString()
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define VIR_UUID_STRING_BUFLEN (36+1)
|
|
|
|
|
2008-05-15 06:12:32 +00:00
|
|
|
/* library versioning */
|
2005-12-08 15:08:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* LIBVIR_VERSION_NUMBER:
|
|
|
|
*
|
2008-02-05 19:27:37 +00:00
|
|
|
* Macro providing the version of the library as
|
2005-12-08 15:08:46 +00:00
|
|
|
* version * 1,000,000 + minor * 1000 + micro
|
|
|
|
*/
|
|
|
|
|
2006-02-15 13:21:17 +00:00
|
|
|
#define LIBVIR_VERSION_NUMBER @LIBVIRT_VERSION_NUMBER@
|
2005-12-08 15:08:46 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virGetVersion (unsigned long *libVer,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *type,
|
|
|
|
unsigned long *typeVer);
|
2005-12-08 15:08:46 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Connection and disconnections to the Hypervisor
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virInitialize (void);
|
2006-03-27 15:24:36 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virConnectPtr virConnectOpen (const char *name);
|
|
|
|
virConnectPtr virConnectOpenReadOnly (const char *name);
|
2007-12-05 18:28:05 +00:00
|
|
|
virConnectPtr virConnectOpenAuth (const char *name,
|
2008-04-10 16:54:54 +00:00
|
|
|
virConnectAuthPtr auth,
|
|
|
|
int flags);
|
2009-01-20 12:14:03 +00:00
|
|
|
int virConnectRef (virConnectPtr conn);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virConnectClose (virConnectPtr conn);
|
|
|
|
const char * virConnectGetType (virConnectPtr conn);
|
|
|
|
int virConnectGetVersion (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned long *hvVer);
|
2009-11-12 15:53:26 +00:00
|
|
|
int virConnectGetLibVersion (virConnectPtr conn,
|
|
|
|
unsigned long *libVer);
|
2007-06-26 11:42:46 +00:00
|
|
|
char * virConnectGetHostname (virConnectPtr conn);
|
|
|
|
char * virConnectGetURI (virConnectPtr conn);
|
|
|
|
|
|
|
|
|
2007-03-15 17:24:56 +00:00
|
|
|
/*
|
|
|
|
* Capabilities of the connection / driver.
|
|
|
|
*/
|
|
|
|
|
|
|
|
int virConnectGetMaxVcpus (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *type);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virNodeGetInfo (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
virNodeInfoPtr info);
|
2007-03-15 17:24:56 +00:00
|
|
|
char * virConnectGetCapabilities (virConnectPtr conn);
|
2005-12-08 15:08:46 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
unsigned long long virNodeGetFreeMemory (virConnectPtr conn);
|
2007-09-30 13:09:07 +00:00
|
|
|
|
2009-03-03 09:09:00 +00:00
|
|
|
int virNodeGetSecurityModel (virConnectPtr conn,
|
|
|
|
virSecurityModelPtr secmodel);
|
|
|
|
|
2005-12-08 15:08:46 +00:00
|
|
|
/*
|
|
|
|
* Gather list of running domains
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virConnectListDomains (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int *ids,
|
|
|
|
int maxids);
|
2005-12-08 15:08:46 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Number of domains
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virConnectNumOfDomains (virConnectPtr conn);
|
2005-12-08 15:08:46 +00:00
|
|
|
|
|
|
|
|
2007-06-25 15:56:18 +00:00
|
|
|
/*
|
|
|
|
* Get connection from domain.
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virConnectPtr virDomainGetConnect (virDomainPtr domain);
|
2007-06-25 15:56:18 +00:00
|
|
|
|
2005-12-08 15:08:46 +00:00
|
|
|
/*
|
|
|
|
* Domain creation and destruction
|
|
|
|
*/
|
2008-10-10 09:32:27 +00:00
|
|
|
virDomainPtr virDomainCreateXML (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *xmlDesc,
|
|
|
|
unsigned int flags);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virDomainPtr virDomainLookupByName (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *name);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virDomainPtr virDomainLookupByID (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
int id);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virDomainPtr virDomainLookupByUUID (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const unsigned char *uuid);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virDomainPtr virDomainLookupByUUIDString (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *uuid);
|
2006-05-22 14:38:33 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainShutdown (virDomainPtr domain);
|
|
|
|
int virDomainReboot (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int flags);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainDestroy (virDomainPtr domain);
|
2009-01-20 12:14:03 +00:00
|
|
|
int virDomainRef (virDomainPtr domain);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainFree (virDomainPtr domain);
|
2005-12-08 15:08:46 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Domain suspend/resume
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainSuspend (virDomainPtr domain);
|
|
|
|
int virDomainResume (virDomainPtr domain);
|
2005-12-08 15:08:46 +00:00
|
|
|
|
2006-01-18 10:37:08 +00:00
|
|
|
/*
|
|
|
|
* Domain save/restore
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainSave (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *to);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainRestore (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *from);
|
2006-01-18 10:37:08 +00:00
|
|
|
|
2006-11-22 17:48:29 +00:00
|
|
|
/*
|
|
|
|
* Domain core dump
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainCoreDump (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *to,
|
|
|
|
int flags);
|
2006-11-22 17:48:29 +00:00
|
|
|
|
2005-12-08 15:08:46 +00:00
|
|
|
/*
|
2008-03-14 11:08:03 +00:00
|
|
|
* Domain runtime information
|
2005-12-08 15:08:46 +00:00
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainGetInfo (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
virDomainInfoPtr info);
|
2008-02-05 19:27:37 +00:00
|
|
|
|
2007-06-05 12:06:08 +00:00
|
|
|
/*
|
|
|
|
* Return scheduler type in effect 'sedf', 'credit', 'linux'
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
char * virDomainGetSchedulerType(virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
int *nparams);
|
2007-06-05 12:06:08 +00:00
|
|
|
|
2005-12-08 15:08:46 +00:00
|
|
|
/*
|
|
|
|
* Dynamic control of domains
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
const char * virDomainGetName (virDomainPtr domain);
|
|
|
|
unsigned int virDomainGetID (virDomainPtr domain);
|
|
|
|
int virDomainGetUUID (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned char *uuid);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainGetUUIDString (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
char *buf);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
char * virDomainGetOSType (virDomainPtr domain);
|
|
|
|
unsigned long virDomainGetMaxMemory (virDomainPtr domain);
|
|
|
|
int virDomainSetMaxMemory (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned long memory);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainSetMemory (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned long memory);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainGetMaxVcpus (virDomainPtr domain);
|
2009-03-03 09:09:00 +00:00
|
|
|
int virDomainGetSecurityLabel (virDomainPtr domain,
|
|
|
|
virSecurityLabelPtr seclabel);
|
2007-03-08 08:31:07 +00:00
|
|
|
|
2005-12-16 00:51:27 +00:00
|
|
|
/*
|
|
|
|
* XML domain description
|
|
|
|
*/
|
2007-09-30 13:09:07 +00:00
|
|
|
/**
|
|
|
|
* virDomainXMLFlags:
|
|
|
|
*
|
|
|
|
* Flags available for virDomainGetXMLDesc
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef enum {
|
2008-03-14 11:08:03 +00:00
|
|
|
VIR_DOMAIN_XML_SECURE = 1, /* dump security sensitive information too */
|
|
|
|
VIR_DOMAIN_XML_INACTIVE = 2/* dump inactive domain information */
|
2007-09-30 13:09:07 +00:00
|
|
|
} virDomainXMLFlags;
|
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
char * virDomainGetXMLDesc (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
int flags);
|
2005-12-08 15:08:46 +00:00
|
|
|
|
2009-05-21 13:46:35 +00:00
|
|
|
|
|
|
|
char * virConnectDomainXMLFromNative(virConnectPtr conn,
|
|
|
|
const char *nativeFormat,
|
|
|
|
const char *nativeConfig,
|
|
|
|
unsigned int flags);
|
|
|
|
char * virConnectDomainXMLToNative(virConnectPtr conn,
|
|
|
|
const char *nativeFormat,
|
|
|
|
const char *domainXml,
|
|
|
|
unsigned int flags);
|
|
|
|
|
2007-08-21 10:08:12 +00:00
|
|
|
int virDomainBlockStats (virDomainPtr dom,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *path,
|
|
|
|
virDomainBlockStatsPtr stats,
|
|
|
|
size_t size);
|
2007-08-21 10:08:12 +00:00
|
|
|
int virDomainInterfaceStats (virDomainPtr dom,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *path,
|
|
|
|
virDomainInterfaceStatsPtr stats,
|
|
|
|
size_t size);
|
2009-12-20 12:28:42 +00:00
|
|
|
int virDomainMemoryStats (virDomainPtr dom,
|
|
|
|
virDomainMemoryStatPtr stats,
|
|
|
|
unsigned int nr_stats,
|
|
|
|
unsigned int flags);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainBlockPeek (virDomainPtr dom,
|
|
|
|
const char *path,
|
|
|
|
unsigned long long offset,
|
|
|
|
size_t size,
|
|
|
|
void *buffer,
|
|
|
|
unsigned int flags);
|
2007-08-21 10:08:12 +00:00
|
|
|
|
2008-06-10 10:43:28 +00:00
|
|
|
/* Memory peeking flags. */
|
|
|
|
typedef enum {
|
|
|
|
VIR_MEMORY_VIRTUAL = 1, /* addresses are virtual addresses */
|
2009-07-22 14:27:09 +00:00
|
|
|
VIR_MEMORY_PHYSICAL = 2, /* addresses are physical addresses */
|
2008-06-10 10:43:28 +00:00
|
|
|
} virDomainMemoryFlags;
|
|
|
|
|
|
|
|
int virDomainMemoryPeek (virDomainPtr dom,
|
|
|
|
unsigned long long start,
|
|
|
|
size_t size,
|
|
|
|
void *buffer,
|
|
|
|
unsigned int flags);
|
|
|
|
|
2006-04-28 18:29:26 +00:00
|
|
|
/*
|
|
|
|
* defined but not running domains
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virDomainPtr virDomainDefineXML (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *xml);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainUndefine (virDomainPtr domain);
|
2006-08-30 14:21:03 +00:00
|
|
|
int virConnectNumOfDefinedDomains (virConnectPtr conn);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virConnectListDefinedDomains (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
char **const names,
|
|
|
|
int maxnames);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainCreate (virDomainPtr domain);
|
2006-04-28 18:29:26 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainGetAutostart (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
int *autostart);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainSetAutostart (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
int autostart);
|
2007-02-23 08:51:30 +00:00
|
|
|
|
2006-08-04 10:41:05 +00:00
|
|
|
/**
|
|
|
|
* virVcpuInfo: structure for information about a virtual CPU in a domain.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef enum {
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
VIR_VCPU_OFFLINE = 0, /* the virtual CPU is offline */
|
|
|
|
VIR_VCPU_RUNNING = 1, /* the virtual CPU is running */
|
|
|
|
VIR_VCPU_BLOCKED = 2, /* the virtual CPU is blocked on resource */
|
2006-08-04 10:41:05 +00:00
|
|
|
} virVcpuState;
|
|
|
|
|
|
|
|
typedef struct _virVcpuInfo virVcpuInfo;
|
|
|
|
struct _virVcpuInfo {
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
unsigned int number; /* virtual CPU number */
|
|
|
|
int state; /* value from virVcpuState */
|
2006-08-04 10:41:05 +00:00
|
|
|
unsigned long long cpuTime; /* CPU time used, in nanoseconds */
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int cpu; /* real CPU number, or -1 if offline */
|
2006-08-04 10:41:05 +00:00
|
|
|
};
|
|
|
|
typedef virVcpuInfo *virVcpuInfoPtr;
|
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainSetVcpus (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int nvcpus);
|
2006-08-04 10:41:05 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainPinVcpu (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int vcpu,
|
|
|
|
unsigned char *cpumap,
|
|
|
|
int maplen);
|
2006-08-04 10:41:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* VIR_USE_CPU:
|
|
|
|
* @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)
|
|
|
|
* @cpu: the physical CPU number
|
|
|
|
*
|
2008-02-29 12:53:10 +00:00
|
|
|
* This macro is to be used in conjunction with virDomainPinVcpu() API.
|
2006-08-04 10:41:05 +00:00
|
|
|
* USE_CPU macro set the bit (CPU usable) of the related cpu in cpumap.
|
|
|
|
*/
|
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
#define VIR_USE_CPU(cpumap,cpu) (cpumap[(cpu)/8] |= (1<<((cpu)%8)))
|
2006-08-04 10:41:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* VIR_UNUSE_CPU:
|
|
|
|
* @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)
|
|
|
|
* @cpu: the physical CPU number
|
|
|
|
*
|
2008-02-29 12:53:10 +00:00
|
|
|
* This macro is to be used in conjunction with virDomainPinVcpu() API.
|
2006-08-04 10:41:05 +00:00
|
|
|
* USE_CPU macro reset the bit (CPU not usable) of the related cpu in cpumap.
|
|
|
|
*/
|
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
#define VIR_UNUSE_CPU(cpumap,cpu) (cpumap[(cpu)/8] &= ~(1<<((cpu)%8)))
|
2006-08-04 10:41:05 +00:00
|
|
|
|
2006-08-07 17:37:42 +00:00
|
|
|
/**
|
2006-08-16 17:58:23 +00:00
|
|
|
* VIR_CPU_MAPLEN:
|
2006-08-07 17:37:42 +00:00
|
|
|
* @cpu: number of physical CPUs
|
|
|
|
*
|
2008-02-29 12:53:10 +00:00
|
|
|
* This macro is to be used in conjunction with virDomainPinVcpu() API.
|
2006-08-07 17:37:42 +00:00
|
|
|
* It returns the length (in bytes) required to store the complete
|
|
|
|
* CPU map between a single virtual & all physical CPUs of a domain.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define VIR_CPU_MAPLEN(cpu) (((cpu)+7)/8)
|
|
|
|
|
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virDomainGetVcpus (virDomainPtr domain,
|
2008-04-10 16:54:54 +00:00
|
|
|
virVcpuInfoPtr info,
|
|
|
|
int maxinfo,
|
|
|
|
unsigned char *cpumaps,
|
|
|
|
int maplen);
|
2006-08-04 10:41:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* VIR_CPU_USABLE:
|
|
|
|
* @cpumaps: pointer to an array of cpumap (in 8-bit bytes) (IN)
|
|
|
|
* @maplen: the length (in bytes) of one cpumap
|
|
|
|
* @vcpu: the virtual CPU number
|
|
|
|
* @cpu: the physical CPU number
|
|
|
|
*
|
2008-02-29 12:53:10 +00:00
|
|
|
* This macro is to be used in conjunction with virDomainGetVcpus() API.
|
2006-08-04 10:41:05 +00:00
|
|
|
* VIR_CPU_USABLE macro returns a non zero value (true) if the cpu
|
|
|
|
* is usable by the vcpu, and 0 otherwise.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define VIR_CPU_USABLE(cpumaps,maplen,vcpu,cpu) \
|
2008-04-10 16:54:54 +00:00
|
|
|
(cpumaps[((vcpu)*(maplen))+((cpu)/8)] & (1<<((cpu)%8)))
|
2006-08-04 10:41:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* VIR_COPY_CPUMAP:
|
|
|
|
* @cpumaps: pointer to an array of cpumap (in 8-bit bytes) (IN)
|
|
|
|
* @maplen: the length (in bytes) of one cpumap
|
|
|
|
* @vcpu: the virtual CPU number
|
|
|
|
* @cpumap: pointer to a cpumap (in 8-bit bytes) (OUT)
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
* This cpumap must be previously allocated by the caller
|
2006-08-04 10:41:05 +00:00
|
|
|
* (ie: malloc(maplen))
|
|
|
|
*
|
2008-02-29 12:53:10 +00:00
|
|
|
* This macro is to be used in conjunction with virDomainGetVcpus() and
|
2006-08-04 10:41:05 +00:00
|
|
|
* virDomainPinVcpu() APIs. VIR_COPY_CPUMAP macro extract the cpumap of
|
|
|
|
* the specified vcpu from cpumaps array and copy it into cpumap to be used
|
|
|
|
* later by virDomainPinVcpu() API.
|
|
|
|
*/
|
|
|
|
#define VIR_COPY_CPUMAP(cpumaps,maplen,vcpu,cpumap) \
|
2008-04-10 16:54:54 +00:00
|
|
|
memcpy(cpumap, &(cpumaps[(vcpu)*(maplen)]), (maplen))
|
2006-08-04 10:41:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* VIR_GET_CPUMAP:
|
|
|
|
* @cpumaps: pointer to an array of cpumap (in 8-bit bytes) (IN)
|
|
|
|
* @maplen: the length (in bytes) of one cpumap
|
|
|
|
* @vcpu: the virtual CPU number
|
|
|
|
*
|
2008-02-29 12:53:10 +00:00
|
|
|
* This macro is to be used in conjunction with virDomainGetVcpus() and
|
2006-08-04 10:41:05 +00:00
|
|
|
* virDomainPinVcpu() APIs. VIR_GET_CPUMAP macro returns a pointer to the
|
|
|
|
* cpumap of the specified vcpu from cpumaps array.
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
#define VIR_GET_CPUMAP(cpumaps,maplen,vcpu) &(cpumaps[(vcpu)*(maplen)])
|
2006-08-04 10:41:05 +00:00
|
|
|
|
2010-01-14 01:29:16 +00:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
|
|
|
|
VIR_DOMAIN_DEVICE_MODIFY_CURRENT = 0, /* Modify device allocation based on current domain state */
|
|
|
|
VIR_DOMAIN_DEVICE_MODIFY_LIVE = (1 << 0), /* Modify live device allocation */
|
|
|
|
VIR_DOMAIN_DEVICE_MODIFY_CONFIG = (1 << 1), /* Modify persisted device allocation */
|
|
|
|
} virDomainDeviceModifyFlags;
|
|
|
|
|
2007-10-15 21:38:56 +00:00
|
|
|
int virDomainAttachDevice(virDomainPtr domain, const char *xml);
|
|
|
|
int virDomainDetachDevice(virDomainPtr domain, const char *xml);
|
2006-08-04 10:41:05 +00:00
|
|
|
|
2010-01-14 01:29:16 +00:00
|
|
|
int virDomainAttachDeviceFlags(virDomainPtr domain,
|
|
|
|
const char *xml, unsigned int flags);
|
|
|
|
int virDomainDetachDeviceFlags(virDomainPtr domain,
|
|
|
|
const char *xml, unsigned int flags);
|
|
|
|
|
2007-09-28 14:28:12 +00:00
|
|
|
/*
|
|
|
|
* NUMA support
|
|
|
|
*/
|
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virNodeGetCellsFreeMemory(virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned long long *freeMems,
|
|
|
|
int startCell,
|
|
|
|
int maxCells);
|
2007-09-28 14:28:12 +00:00
|
|
|
|
2007-02-14 15:37:18 +00:00
|
|
|
/*
|
|
|
|
* Virtual Networks API
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virNetwork:
|
|
|
|
*
|
|
|
|
* a virNetwork is a private structure representing a virtual network.
|
|
|
|
*/
|
|
|
|
typedef struct _virNetwork virNetwork;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virNetworkPtr:
|
|
|
|
*
|
|
|
|
* a virNetworkPtr is pointer to a virNetwork private structure, this is the
|
|
|
|
* type used to reference a virtual network in the API.
|
|
|
|
*/
|
|
|
|
typedef virNetwork *virNetworkPtr;
|
|
|
|
|
2007-06-25 15:56:18 +00:00
|
|
|
/*
|
|
|
|
* Get connection from network.
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virConnectPtr virNetworkGetConnect (virNetworkPtr network);
|
2007-06-25 15:56:18 +00:00
|
|
|
|
2007-02-14 15:37:18 +00:00
|
|
|
/*
|
|
|
|
* List active networks
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virConnectNumOfNetworks (virConnectPtr conn);
|
|
|
|
int virConnectListNetworks (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
char **const names,
|
|
|
|
int maxnames);
|
2007-02-14 15:37:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* List inactive networks
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virConnectNumOfDefinedNetworks (virConnectPtr conn);
|
|
|
|
int virConnectListDefinedNetworks (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
char **const names,
|
|
|
|
int maxnames);
|
2007-02-14 15:37:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Lookup network by name or uuid
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virNetworkPtr virNetworkLookupByName (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *name);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virNetworkPtr virNetworkLookupByUUID (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const unsigned char *uuid);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virNetworkPtr virNetworkLookupByUUIDString (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *uuid);
|
2007-02-14 15:37:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Create active transient network
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virNetworkPtr virNetworkCreateXML (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *xmlDesc);
|
2007-02-14 15:37:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Define inactive persistent network
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virNetworkPtr virNetworkDefineXML (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *xmlDesc);
|
2007-02-14 15:37:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Delete persistent network
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virNetworkUndefine (virNetworkPtr network);
|
2007-02-14 15:37:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Activate persistent network
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virNetworkCreate (virNetworkPtr network);
|
2007-02-14 15:37:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Network destroy/free
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virNetworkDestroy (virNetworkPtr network);
|
2009-01-20 12:14:03 +00:00
|
|
|
int virNetworkRef (virNetworkPtr network);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virNetworkFree (virNetworkPtr network);
|
2007-02-14 15:37:18 +00:00
|
|
|
|
|
|
|
/*
|
2008-03-14 11:08:03 +00:00
|
|
|
* Network information
|
2007-02-14 15:37:18 +00:00
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
const char* virNetworkGetName (virNetworkPtr network);
|
|
|
|
int virNetworkGetUUID (virNetworkPtr network,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned char *uuid);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virNetworkGetUUIDString (virNetworkPtr network,
|
2008-04-10 16:54:54 +00:00
|
|
|
char *buf);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
char * virNetworkGetXMLDesc (virNetworkPtr network,
|
2008-04-10 16:54:54 +00:00
|
|
|
int flags);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
char * virNetworkGetBridgeName (virNetworkPtr network);
|
2007-02-14 15:37:18 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virNetworkGetAutostart (virNetworkPtr network,
|
2008-04-10 16:54:54 +00:00
|
|
|
int *autostart);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virNetworkSetAutostart (virNetworkPtr network,
|
2008-04-10 16:54:54 +00:00
|
|
|
int autostart);
|
2007-02-23 08:51:30 +00:00
|
|
|
|
2009-05-20 14:26:49 +00:00
|
|
|
/*
|
|
|
|
* Physical host interface configuration API
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virInterface:
|
|
|
|
*
|
|
|
|
* a virInterface is a private structure representing a virtual interface.
|
|
|
|
*/
|
|
|
|
typedef struct _virInterface virInterface;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virInterfacePtr:
|
|
|
|
*
|
|
|
|
* a virInterfacePtr is pointer to a virInterface private structure, this is the
|
|
|
|
* type used to reference a virtual interface in the API.
|
|
|
|
*/
|
|
|
|
typedef virInterface *virInterfacePtr;
|
|
|
|
|
2009-05-29 14:29:22 +00:00
|
|
|
virConnectPtr virInterfaceGetConnect (virInterfacePtr iface);
|
2009-05-20 14:26:49 +00:00
|
|
|
|
|
|
|
int virConnectNumOfInterfaces (virConnectPtr conn);
|
|
|
|
int virConnectListInterfaces (virConnectPtr conn,
|
|
|
|
char **const names,
|
|
|
|
int maxnames);
|
|
|
|
|
2009-07-16 15:49:50 +00:00
|
|
|
int virConnectNumOfDefinedInterfaces (virConnectPtr conn);
|
|
|
|
int virConnectListDefinedInterfaces (virConnectPtr conn,
|
|
|
|
char **const names,
|
|
|
|
int maxnames);
|
|
|
|
|
2009-05-20 14:26:49 +00:00
|
|
|
virInterfacePtr virInterfaceLookupByName (virConnectPtr conn,
|
|
|
|
const char *name);
|
|
|
|
virInterfacePtr virInterfaceLookupByMACString (virConnectPtr conn,
|
|
|
|
const char *mac);
|
|
|
|
|
2009-05-29 14:29:22 +00:00
|
|
|
const char* virInterfaceGetName (virInterfacePtr iface);
|
|
|
|
const char* virInterfaceGetMACString (virInterfacePtr iface);
|
2009-05-20 14:26:49 +00:00
|
|
|
|
2009-10-28 09:40:54 +00:00
|
|
|
typedef enum {
|
|
|
|
VIR_INTERFACE_XML_INACTIVE = 1 /* dump inactive interface information */
|
|
|
|
} virInterfaceXMLFlags;
|
|
|
|
|
2009-05-29 14:29:22 +00:00
|
|
|
char * virInterfaceGetXMLDesc (virInterfacePtr iface,
|
2009-05-20 14:26:49 +00:00
|
|
|
unsigned int flags);
|
|
|
|
virInterfacePtr virInterfaceDefineXML (virConnectPtr conn,
|
|
|
|
const char *xmlDesc,
|
|
|
|
unsigned int flags);
|
|
|
|
|
2009-05-29 14:29:22 +00:00
|
|
|
int virInterfaceUndefine (virInterfacePtr iface);
|
2009-05-20 14:26:49 +00:00
|
|
|
|
2009-05-29 14:29:22 +00:00
|
|
|
int virInterfaceCreate (virInterfacePtr iface,
|
2009-05-20 14:26:49 +00:00
|
|
|
unsigned int flags);
|
|
|
|
|
2009-05-29 14:29:22 +00:00
|
|
|
int virInterfaceDestroy (virInterfacePtr iface,
|
2009-05-20 14:26:49 +00:00
|
|
|
unsigned int flags);
|
|
|
|
|
2009-05-29 14:29:22 +00:00
|
|
|
int virInterfaceRef (virInterfacePtr iface);
|
|
|
|
int virInterfaceFree (virInterfacePtr iface);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* virStoragePool:
|
|
|
|
*
|
|
|
|
* a virStoragePool is a private structure representing a storage pool
|
|
|
|
*/
|
|
|
|
typedef struct _virStoragePool virStoragePool;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virStoragePoolPtr:
|
|
|
|
*
|
|
|
|
* a virStoragePoolPtr is pointer to a virStoragePool private structure, this is the
|
|
|
|
* type used to reference a storage pool in the API.
|
|
|
|
*/
|
|
|
|
typedef virStoragePool *virStoragePoolPtr;
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
VIR_STORAGE_POOL_INACTIVE = 0, /* Not running */
|
|
|
|
VIR_STORAGE_POOL_BUILDING = 1, /* Initializing pool, not available */
|
|
|
|
VIR_STORAGE_POOL_RUNNING = 2, /* Running normally */
|
|
|
|
VIR_STORAGE_POOL_DEGRADED = 3, /* Running degraded */
|
|
|
|
} virStoragePoolState;
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
VIR_STORAGE_POOL_BUILD_NEW = 0, /* Regular build from scratch */
|
|
|
|
VIR_STORAGE_POOL_BUILD_REPAIR = 1, /* Repair / reinitialize */
|
|
|
|
VIR_STORAGE_POOL_BUILD_RESIZE = 2 /* Extend existing pool */
|
|
|
|
} virStoragePoolBuildFlags;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
VIR_STORAGE_POOL_DELETE_NORMAL = 0, /* Delete metadata only (fast) */
|
|
|
|
VIR_STORAGE_POOL_DELETE_ZEROED = 1, /* Clear all data to zeros (slow) */
|
|
|
|
} virStoragePoolDeleteFlags;
|
|
|
|
|
|
|
|
typedef struct _virStoragePoolInfo virStoragePoolInfo;
|
|
|
|
|
|
|
|
struct _virStoragePoolInfo {
|
|
|
|
int state; /* virStoragePoolState flags */
|
|
|
|
unsigned long long capacity; /* Logical size bytes */
|
|
|
|
unsigned long long allocation; /* Current allocation bytes */
|
|
|
|
unsigned long long available; /* Remaining free space bytes */
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef virStoragePoolInfo *virStoragePoolInfoPtr;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virStorageVol:
|
|
|
|
*
|
|
|
|
* a virStorageVol is a private structure representing a storage volume
|
|
|
|
*/
|
|
|
|
typedef struct _virStorageVol virStorageVol;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virStorageVolPtr:
|
|
|
|
*
|
|
|
|
* a virStorageVolPtr is pointer to a virStorageVol private structure, this is the
|
|
|
|
* type used to reference a storage volume in the API.
|
|
|
|
*/
|
|
|
|
typedef virStorageVol *virStorageVolPtr;
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
VIR_STORAGE_VOL_FILE = 0, /* Regular file based volumes */
|
|
|
|
VIR_STORAGE_VOL_BLOCK = 1, /* Block based volumes */
|
|
|
|
} virStorageVolType;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
VIR_STORAGE_VOL_DELETE_NORMAL = 0, /* Delete metadata only (fast) */
|
|
|
|
VIR_STORAGE_VOL_DELETE_ZEROED = 1, /* Clear all data to zeros (slow) */
|
|
|
|
} virStorageVolDeleteFlags;
|
|
|
|
|
|
|
|
typedef struct _virStorageVolInfo virStorageVolInfo;
|
|
|
|
|
|
|
|
struct _virStorageVolInfo {
|
|
|
|
int type; /* virStorageVolType flags */
|
|
|
|
unsigned long long capacity; /* Logical size bytes */
|
|
|
|
unsigned long long allocation; /* Current allocation bytes */
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef virStorageVolInfo *virStorageVolInfoPtr;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Get connection from pool.
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virConnectPtr virStoragePoolGetConnect (virStoragePoolPtr pool);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* List active storage pools
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virConnectNumOfStoragePools (virConnectPtr conn);
|
|
|
|
int virConnectListStoragePools (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
char **const names,
|
|
|
|
int maxnames);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* List inactive storage pools
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virConnectNumOfDefinedStoragePools(virConnectPtr conn);
|
|
|
|
int virConnectListDefinedStoragePools(virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
char **const names,
|
|
|
|
int maxnames);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
2008-08-27 20:05:58 +00:00
|
|
|
/*
|
|
|
|
* Query a host for storage pools of a particular type
|
|
|
|
*/
|
|
|
|
char * virConnectFindStoragePoolSources(virConnectPtr conn,
|
|
|
|
const char *type,
|
|
|
|
const char *srcSpec,
|
|
|
|
unsigned int flags);
|
|
|
|
|
2008-02-20 14:57:39 +00:00
|
|
|
/*
|
|
|
|
* Lookup pool by name or uuid
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virStoragePoolPtr virStoragePoolLookupByName (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *name);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virStoragePoolPtr virStoragePoolLookupByUUID (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const unsigned char *uuid);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virStoragePoolPtr virStoragePoolLookupByUUIDString(virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *uuid);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virStoragePoolPtr virStoragePoolLookupByVolume (virStorageVolPtr vol);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Creating/destroying pools
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virStoragePoolPtr virStoragePoolCreateXML (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *xmlDesc,
|
|
|
|
unsigned int flags);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virStoragePoolPtr virStoragePoolDefineXML (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *xmlDesc,
|
|
|
|
unsigned int flags);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virStoragePoolBuild (virStoragePoolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int flags);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virStoragePoolUndefine (virStoragePoolPtr pool);
|
|
|
|
int virStoragePoolCreate (virStoragePoolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int flags);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virStoragePoolDestroy (virStoragePoolPtr pool);
|
|
|
|
int virStoragePoolDelete (virStoragePoolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int flags);
|
2009-01-20 12:14:03 +00:00
|
|
|
int virStoragePoolRef (virStoragePoolPtr pool);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virStoragePoolFree (virStoragePoolPtr pool);
|
|
|
|
int virStoragePoolRefresh (virStoragePoolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int flags);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* StoragePool information
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
const char* virStoragePoolGetName (virStoragePoolPtr pool);
|
|
|
|
int virStoragePoolGetUUID (virStoragePoolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned char *uuid);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virStoragePoolGetUUIDString (virStoragePoolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
char *buf);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virStoragePoolGetInfo (virStoragePoolPtr vol,
|
2008-04-10 16:54:54 +00:00
|
|
|
virStoragePoolInfoPtr info);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
char * virStoragePoolGetXMLDesc (virStoragePoolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int flags);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virStoragePoolGetAutostart (virStoragePoolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
int *autostart);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virStoragePoolSetAutostart (virStoragePoolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
int autostart);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* List/lookup storage volumes within a pool
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virStoragePoolNumOfVolumes (virStoragePoolPtr pool);
|
|
|
|
int virStoragePoolListVolumes (virStoragePoolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
char **const names,
|
|
|
|
int maxnames);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virConnectPtr virStorageVolGetConnect (virStorageVolPtr vol);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Lookup volumes based on various attributes
|
|
|
|
*/
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virStorageVolPtr virStorageVolLookupByName (virStoragePoolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *name);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virStorageVolPtr virStorageVolLookupByKey (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *key);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virStorageVolPtr virStorageVolLookupByPath (virConnectPtr conn,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *path);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
const char* virStorageVolGetName (virStorageVolPtr vol);
|
|
|
|
const char* virStorageVolGetKey (virStorageVolPtr vol);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
virStorageVolPtr virStorageVolCreateXML (virStoragePoolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
const char *xmldesc,
|
|
|
|
unsigned int flags);
|
2009-05-12 20:10:50 +00:00
|
|
|
virStorageVolPtr virStorageVolCreateXMLFrom (virStoragePoolPtr pool,
|
|
|
|
const char *xmldesc,
|
|
|
|
virStorageVolPtr clonevol,
|
|
|
|
unsigned int flags);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virStorageVolDelete (virStorageVolPtr vol,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int flags);
|
2009-01-20 12:14:03 +00:00
|
|
|
int virStorageVolRef (virStorageVolPtr vol);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virStorageVolFree (virStorageVolPtr vol);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
int virStorageVolGetInfo (virStorageVolPtr vol,
|
2008-04-10 16:54:54 +00:00
|
|
|
virStorageVolInfoPtr info);
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
char * virStorageVolGetXMLDesc (virStorageVolPtr pool,
|
2008-04-10 16:54:54 +00:00
|
|
|
unsigned int flags);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
virDomainBlockPeek call
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
|
|
|
char * virStorageVolGetPath (virStorageVolPtr vol);
|
2008-02-20 14:57:39 +00:00
|
|
|
|
2008-10-10 09:32:27 +00:00
|
|
|
/*
|
|
|
|
* Deprecated calls
|
|
|
|
*/
|
|
|
|
virDomainPtr virDomainCreateLinux (virConnectPtr conn,
|
|
|
|
const char *xmlDesc,
|
|
|
|
unsigned int flags);
|
2008-10-23 13:18:18 +00:00
|
|
|
|
2008-11-21 12:19:22 +00:00
|
|
|
/*
|
|
|
|
* Host device enumeration
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virNodeDevice:
|
|
|
|
*
|
|
|
|
* A virNodeDevice contains a node (host) device details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct _virNodeDevice virNodeDevice;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virNodeDevicePtr:
|
|
|
|
*
|
|
|
|
* A virNodeDevicePtr is a pointer to a virNodeDevice structure. Get
|
|
|
|
* one via virNodeDeviceLookupByKey, virNodeDeviceLookupByName, or
|
|
|
|
* virNodeDeviceCreate. Be sure to Call virNodeDeviceFree when done
|
|
|
|
* using a virNodeDevicePtr obtained from any of the above functions to
|
|
|
|
* avoid leaking memory.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef virNodeDevice *virNodeDevicePtr;
|
|
|
|
|
|
|
|
|
|
|
|
int virNodeNumOfDevices (virConnectPtr conn,
|
|
|
|
const char *cap,
|
|
|
|
unsigned int flags);
|
|
|
|
|
|
|
|
int virNodeListDevices (virConnectPtr conn,
|
|
|
|
const char *cap,
|
|
|
|
char **const names,
|
|
|
|
int maxnames,
|
|
|
|
unsigned int flags);
|
|
|
|
|
|
|
|
virNodeDevicePtr virNodeDeviceLookupByName (virConnectPtr conn,
|
|
|
|
const char *name);
|
|
|
|
|
|
|
|
const char * virNodeDeviceGetName (virNodeDevicePtr dev);
|
|
|
|
|
|
|
|
const char * virNodeDeviceGetParent (virNodeDevicePtr dev);
|
|
|
|
|
|
|
|
int virNodeDeviceNumOfCaps (virNodeDevicePtr dev);
|
|
|
|
|
|
|
|
int virNodeDeviceListCaps (virNodeDevicePtr dev,
|
|
|
|
char **const names,
|
|
|
|
int maxnames);
|
|
|
|
|
|
|
|
char * virNodeDeviceGetXMLDesc (virNodeDevicePtr dev,
|
|
|
|
unsigned int flags);
|
|
|
|
|
2009-01-20 12:14:03 +00:00
|
|
|
int virNodeDeviceRef (virNodeDevicePtr dev);
|
2008-11-21 12:19:22 +00:00
|
|
|
int virNodeDeviceFree (virNodeDevicePtr dev);
|
|
|
|
|
2009-03-02 16:25:13 +00:00
|
|
|
int virNodeDeviceDettach (virNodeDevicePtr dev);
|
|
|
|
int virNodeDeviceReAttach (virNodeDevicePtr dev);
|
|
|
|
int virNodeDeviceReset (virNodeDevicePtr dev);
|
|
|
|
|
2009-04-24 13:11:23 +00:00
|
|
|
virNodeDevicePtr virNodeDeviceCreateXML (virConnectPtr conn,
|
|
|
|
const char *xmlDesc,
|
|
|
|
unsigned int flags);
|
|
|
|
|
|
|
|
int virNodeDeviceDestroy (virNodeDevicePtr dev);
|
|
|
|
|
2008-10-23 13:18:18 +00:00
|
|
|
/*
|
|
|
|
* Domain Event Notification
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomainEventType:
|
|
|
|
*
|
|
|
|
* a virDomainEventType is emitted during domain lifecycle events
|
|
|
|
*/
|
|
|
|
typedef enum {
|
2008-11-17 16:43:00 +00:00
|
|
|
VIR_DOMAIN_EVENT_DEFINED = 0,
|
|
|
|
VIR_DOMAIN_EVENT_UNDEFINED = 1,
|
2008-11-17 10:26:09 +00:00
|
|
|
VIR_DOMAIN_EVENT_STARTED = 2,
|
|
|
|
VIR_DOMAIN_EVENT_SUSPENDED = 3,
|
|
|
|
VIR_DOMAIN_EVENT_RESUMED = 4,
|
|
|
|
VIR_DOMAIN_EVENT_STOPPED = 5,
|
2008-10-23 13:18:18 +00:00
|
|
|
} virDomainEventType;
|
|
|
|
|
2008-11-17 16:43:00 +00:00
|
|
|
/**
|
|
|
|
* virDomainEventDefinedDetailType:
|
|
|
|
*
|
|
|
|
* Details on the caused of the 'defined' lifecycle event
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIR_DOMAIN_EVENT_DEFINED_ADDED = 0, /* Newly created config file */
|
|
|
|
VIR_DOMAIN_EVENT_DEFINED_UPDATED = 1, /* Changed config file */
|
|
|
|
} virDomainEventDefinedDetailType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomainEventUndefinedDetailType:
|
|
|
|
*
|
|
|
|
* Details on the caused of the 'undefined' lifecycle event
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIR_DOMAIN_EVENT_UNDEFINED_REMOVED = 0, /* Deleted the config file */
|
|
|
|
} virDomainEventUndefinedDetailType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomainEventStartedDetailType:
|
|
|
|
*
|
|
|
|
* Details on the caused of the 'started' lifecycle event
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIR_DOMAIN_EVENT_STARTED_BOOTED = 0, /* Normal startup from boot */
|
|
|
|
VIR_DOMAIN_EVENT_STARTED_MIGRATED = 1, /* Incoming migration from another host */
|
|
|
|
VIR_DOMAIN_EVENT_STARTED_RESTORED = 2, /* Restored from a state file */
|
|
|
|
} virDomainEventStartedDetailType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomainEventSuspendedDetailType:
|
|
|
|
*
|
|
|
|
* Details on the caused of the 'suspended' lifecycle event
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIR_DOMAIN_EVENT_SUSPENDED_PAUSED = 0, /* Normal suspend due to admin pause */
|
|
|
|
VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED = 1, /* Suspended for offline migration */
|
|
|
|
} virDomainEventSuspendedDetailType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomainEventResumedDetailType:
|
|
|
|
*
|
|
|
|
* Details on the caused of the 'resumed' lifecycle event
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIR_DOMAIN_EVENT_RESUMED_UNPAUSED = 0, /* Normal resume due to admin unpause */
|
|
|
|
VIR_DOMAIN_EVENT_RESUMED_MIGRATED = 1, /* Resumed for completion of migration */
|
|
|
|
} virDomainEventResumedDetailType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virDomainEventStoppedDetailType:
|
|
|
|
*
|
|
|
|
* Details on the caused of the 'stopped' lifecycle event
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN = 0, /* Normal shutdown */
|
|
|
|
VIR_DOMAIN_EVENT_STOPPED_DESTROYED = 1, /* Forced poweroff from host */
|
|
|
|
VIR_DOMAIN_EVENT_STOPPED_CRASHED = 2, /* Guest crashed */
|
|
|
|
VIR_DOMAIN_EVENT_STOPPED_MIGRATED = 3, /* Migrated off to another host */
|
|
|
|
VIR_DOMAIN_EVENT_STOPPED_SAVED = 4, /* Saved to a state file */
|
|
|
|
VIR_DOMAIN_EVENT_STOPPED_FAILED = 5, /* Host emulator/mgmt failed */
|
|
|
|
} virDomainEventStoppedDetailType;
|
|
|
|
|
|
|
|
|
2008-10-23 13:18:18 +00:00
|
|
|
/**
|
|
|
|
* virConnectDomainEventCallback:
|
|
|
|
* @conn: virConnect connection
|
|
|
|
* @dom: The domain on which the event occured
|
|
|
|
* @event: The specfic virDomainEventType which occured
|
2008-11-17 16:43:00 +00:00
|
|
|
* @detail: event specific detail information
|
2008-10-23 13:18:18 +00:00
|
|
|
* @opaque: opaque user data
|
|
|
|
*
|
2008-10-24 12:05:39 +00:00
|
|
|
* A callback function to be registered, and called when a domain event occurs
|
2008-10-23 13:18:18 +00:00
|
|
|
*/
|
|
|
|
typedef int (*virConnectDomainEventCallback)(virConnectPtr conn,
|
|
|
|
virDomainPtr dom,
|
|
|
|
int event,
|
2008-11-17 16:43:00 +00:00
|
|
|
int detail,
|
2008-10-23 13:18:18 +00:00
|
|
|
void *opaque);
|
|
|
|
|
2008-11-19 15:25:24 +00:00
|
|
|
typedef void (*virFreeCallback)(void *opaque);
|
|
|
|
|
2008-10-23 13:18:18 +00:00
|
|
|
int virConnectDomainEventRegister(virConnectPtr conn,
|
|
|
|
virConnectDomainEventCallback cb,
|
2008-11-19 15:25:24 +00:00
|
|
|
void *opaque,
|
|
|
|
virFreeCallback freecb);
|
2008-10-23 13:18:18 +00:00
|
|
|
|
|
|
|
int virConnectDomainEventDeregister(virConnectPtr conn,
|
|
|
|
virConnectDomainEventCallback cb);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Events Implementation
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virEventHandleType:
|
|
|
|
*
|
|
|
|
* a virEventHandleType is used similar to POLLxxx FD events, but is specific
|
|
|
|
* to libvirt. A client app must translate to, and from POLL events when using
|
|
|
|
* this construct.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIR_EVENT_HANDLE_READABLE = (1 << 0),
|
|
|
|
VIR_EVENT_HANDLE_WRITABLE = (1 << 1),
|
|
|
|
VIR_EVENT_HANDLE_ERROR = (1 << 2),
|
|
|
|
VIR_EVENT_HANDLE_HANGUP = (1 << 3),
|
|
|
|
} virEventHandleType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virEventHandleCallback:
|
|
|
|
*
|
2008-11-19 16:19:36 +00:00
|
|
|
* @watch: watch on which the event occurred
|
2008-10-23 13:18:18 +00:00
|
|
|
* @fd: file handle on which the event occurred
|
|
|
|
* @events: bitset of events from virEventHandleType constants
|
|
|
|
* @opaque: user data registered with handle
|
|
|
|
*
|
2008-11-19 16:19:36 +00:00
|
|
|
* Callback for receiving file handle events. The callback will
|
|
|
|
* be invoked once for each event which is pending.
|
2008-10-23 13:18:18 +00:00
|
|
|
*/
|
2008-11-19 16:19:36 +00:00
|
|
|
typedef void (*virEventHandleCallback)(int watch, int fd, int events, void *opaque);
|
2008-10-23 13:18:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* virEventAddHandleFunc:
|
|
|
|
* @fd: file descriptor to listen on
|
|
|
|
* @event: bitset of events on which to fire the callback
|
2008-11-19 16:24:01 +00:00
|
|
|
* @cb: the callback to be called when an event occurrs
|
2008-10-23 13:18:18 +00:00
|
|
|
* @opaque: user data to pass to the callback
|
2008-11-19 16:24:01 +00:00
|
|
|
* @ff: the callback invoked to free opaque data blob
|
2008-10-23 13:18:18 +00:00
|
|
|
*
|
|
|
|
* Part of the EventImpl, this callback Adds a file handle callback to
|
2008-11-19 16:19:36 +00:00
|
|
|
* listen for specific events. The same file handle can be registered
|
|
|
|
* multiple times provided the requested event sets are non-overlapping
|
|
|
|
*
|
2008-11-19 16:24:01 +00:00
|
|
|
* If the opaque user data requires free'ing when the handle
|
|
|
|
* is unregistered, then a 2nd callback can be supplied for
|
|
|
|
* this purpose.
|
|
|
|
*
|
2008-11-19 16:19:36 +00:00
|
|
|
* Returns a handle watch number to be used for updating
|
|
|
|
* and unregistering for events
|
2008-10-23 13:18:18 +00:00
|
|
|
*/
|
|
|
|
typedef int (*virEventAddHandleFunc)(int fd, int event,
|
2008-11-19 16:24:01 +00:00
|
|
|
virEventHandleCallback cb,
|
|
|
|
void *opaque,
|
|
|
|
virFreeCallback ff);
|
2008-10-23 13:18:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* virEventUpdateHandleFunc:
|
2008-11-19 16:19:36 +00:00
|
|
|
* @watch: file descriptor watch to modify
|
2008-10-23 13:18:18 +00:00
|
|
|
* @event: new events to listen on
|
|
|
|
*
|
|
|
|
* Part of the EventImpl, this user-provided callback is notified when
|
|
|
|
* events to listen on change
|
|
|
|
*/
|
2008-11-19 16:19:36 +00:00
|
|
|
typedef void (*virEventUpdateHandleFunc)(int watch, int event);
|
2008-10-23 13:18:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* virEventRemoveHandleFunc:
|
2008-11-19 16:19:36 +00:00
|
|
|
* @watch: file descriptor watch to stop listening on
|
2008-10-23 13:18:18 +00:00
|
|
|
*
|
|
|
|
* Part of the EventImpl, this user-provided callback is notified when
|
2008-11-19 16:24:01 +00:00
|
|
|
* an fd is no longer being listened on.
|
|
|
|
*
|
|
|
|
* If a virEventHandleFreeFunc was supplied when the handle was
|
|
|
|
* registered, it will be invoked some time during, or after this
|
|
|
|
* function call, when it is safe to release the user data.
|
2008-10-23 13:18:18 +00:00
|
|
|
*/
|
2008-11-19 16:19:36 +00:00
|
|
|
typedef int (*virEventRemoveHandleFunc)(int watch);
|
2008-10-23 13:18:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* virEventTimeoutCallback:
|
|
|
|
*
|
|
|
|
* @timer: timer id emitting the event
|
|
|
|
* @opaque: user data registered with handle
|
|
|
|
*
|
|
|
|
* callback for receiving timer events
|
|
|
|
*/
|
|
|
|
typedef void (*virEventTimeoutCallback)(int timer, void *opaque);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virEventAddTimeoutFunc:
|
|
|
|
* @timeout: The timeout to monitor
|
|
|
|
* @cb: the callback to call when timeout has expired
|
|
|
|
* @opaque: user data to pass to the callback
|
2008-11-19 16:24:01 +00:00
|
|
|
* @ff: the callback invoked to free opaque data blob
|
2008-10-23 13:18:18 +00:00
|
|
|
*
|
|
|
|
* Part of the EventImpl, this user-defined callback handles adding an
|
|
|
|
* event timeout.
|
|
|
|
*
|
2008-11-19 16:24:01 +00:00
|
|
|
* If the opaque user data requires free'ing when the handle
|
|
|
|
* is unregistered, then a 2nd callback can be supplied for
|
|
|
|
* this purpose.
|
|
|
|
*
|
2008-10-23 13:18:18 +00:00
|
|
|
* Returns a timer value
|
|
|
|
*/
|
2008-11-19 16:24:01 +00:00
|
|
|
typedef int (*virEventAddTimeoutFunc)(int timeout,
|
|
|
|
virEventTimeoutCallback cb,
|
|
|
|
void *opaque,
|
|
|
|
virFreeCallback ff);
|
2008-10-23 13:18:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* virEventUpdateTimeoutFunc:
|
|
|
|
* @timer: the timer to modify
|
|
|
|
* @timeout: the new timeout value
|
|
|
|
*
|
|
|
|
* Part of the EventImpl, this user-defined callback updates an
|
|
|
|
* event timeout.
|
|
|
|
*/
|
|
|
|
typedef void (*virEventUpdateTimeoutFunc)(int timer, int timeout);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virEventRemoveTimeoutFunc:
|
|
|
|
* @timer: the timer to remove
|
|
|
|
*
|
|
|
|
* Part of the EventImpl, this user-defined callback removes a timer
|
|
|
|
*
|
2008-11-19 16:24:01 +00:00
|
|
|
* If a virEventTimeoutFreeFunc was supplied when the handle was
|
|
|
|
* registered, it will be invoked some time during, or after this
|
|
|
|
* function call, when it is safe to release the user data.
|
|
|
|
*
|
2008-10-23 13:18:18 +00:00
|
|
|
* Returns 0 on success, -1 on failure
|
|
|
|
*/
|
|
|
|
typedef int (*virEventRemoveTimeoutFunc)(int timer);
|
|
|
|
|
|
|
|
void virEventRegisterImpl(virEventAddHandleFunc addHandle,
|
|
|
|
virEventUpdateHandleFunc updateHandle,
|
|
|
|
virEventRemoveHandleFunc removeHandle,
|
|
|
|
virEventAddTimeoutFunc addTimeout,
|
|
|
|
virEventUpdateTimeoutFunc updateTimeout,
|
|
|
|
virEventRemoveTimeoutFunc removeTimeout);
|
2009-07-28 00:39:48 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Secret manipulation API
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virSecret:
|
|
|
|
*
|
|
|
|
* A virSecret stores a secret value (e.g. a passphrase or encryption key)
|
|
|
|
* and associated metadata.
|
|
|
|
*/
|
|
|
|
typedef struct _virSecret virSecret;
|
|
|
|
typedef virSecret *virSecretPtr;
|
|
|
|
|
Add usage type/id as a public API property of virSecret
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in: Add
virSecretGetUsageType, virSecretGetUsageID and virLookupSecretByUsage
* python/generator.py: Mark virSecretGetUsageType, virSecretGetUsageID
as not throwing exceptions
* qemud/remote.c: Implement dispatch for virLookupSecretByUsage
* qemud/remote_protocol.x: Add usage type & ID as attributes of
remote_nonnull_secret. Add RPC calls for new public APIs
* qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
* src/datatypes.c, src/datatypes.h: Add usageType and usageID as
properties of virSecretPtr
* src/driver.h: Add virLookupSecretByUsage driver entry point
* src/libvirt.c: Implement virSecretGetUsageType, virSecretGetUsageID
and virLookupSecretByUsage
* src/libvirt_public.syms: Export virSecretGetUsageType, virSecretGetUsageID
and virLookupSecretByUsage
* src/remote_internal.c: Implement virLookupSecretByUsage entry
* src/secret_conf.c, src/secret_conf.h: Remove the
virSecretUsageType enum, now in public API. Make volume
path mandatory when parsing XML
* src/secret_driver.c: Enforce usage uniqueness when defining secrets.
Implement virSecretLookupByUsage api method
* src/virsh.c: Include usage for secret-list command
2009-09-11 13:06:15 +00:00
|
|
|
typedef enum {
|
|
|
|
VIR_SECRET_USAGE_TYPE_NONE = 0,
|
|
|
|
VIR_SECRET_USAGE_TYPE_VOLUME = 1,
|
|
|
|
/* Expect more owner types later... */
|
|
|
|
} virSecretUsageType;
|
|
|
|
|
2009-07-28 00:39:48 +00:00
|
|
|
virConnectPtr virSecretGetConnect (virSecretPtr secret);
|
|
|
|
int virConnectNumOfSecrets (virConnectPtr conn);
|
|
|
|
int virConnectListSecrets (virConnectPtr conn,
|
|
|
|
char **uuids,
|
|
|
|
int maxuuids);
|
Fix UUID handling in secrets/storage encryption APIs
Convert all the secret/storage encryption APIs / wire format to
handle UUIDs in raw format instead of non-canonical printable
format. Guarentees data format correctness.
* docs/schemas/storageencryption.rng: Make UUID mandatory for a secret
and validate fully
* docs/schemas/secret.rng: Fully validate UUID
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, Add
virSecretLookupByUUID and virSecretGetUUID. Make
virSecretGetUUIDString follow normal API design pattern
* python/generator.py: Skip generation of virSecretGetUUID,
virSecretGetUUIDString and virSecretLookupByUUID
* python/libvir.c, python/libvirt-python-api.xml: Manual impl
of virSecretGetUUID,virSecretGetUUIDString and virSecretLookupByUUID
* qemud/remote.c: s/virSecretLookupByUUIDString/virSecretLookupByUUID/
Fix get_nonnull_secret/make_nonnull_secret to use unsigned char
* qemud/remote_protocol.x: Fix remote_nonnull_secret to use a
remote_uuid instead of remote_nonnull_string for UUID field.
Rename REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING to
REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING and make it take an
remote_uuid value
* qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
* src/datatypes.h, src/datatypes.c: Store UUID in raw format instead
of printable. Change virGetSecret to use raw format UUID
* src/driver.h: Rename virDrvSecretLookupByUUIDString to
virDrvSecretLookupByUUID and use raw format UUID
* src/libvirt.c: Add virSecretLookupByUUID and virSecretGetUUID
and re-implement virSecretLookupByUUIDString and
virSecretGetUUIDString in terms of those
* src/libvirt_public.syms: Add virSecretLookupByUUID and
virSecretGetUUID
* src/remote_internal.c: Rename remoteSecretLookupByUUIDString
to remoteSecretLookupByUUID. Fix typo in args for
remoteSecretDefineXML impl. Use raw UUID format for
get_nonnull_secret and make_nonnull_secret
* src/storage_encryption_conf.c, src/storage_encryption_conf.h:
Storage UUID in raw format, and require it to be present in
XML. Use UUID parser to validate.
* secret_conf.h, secret_conf.c: Generate a UUID if none is provided.
Storage UUID in raw format.
* src/secret_driver.c: Adjust to deal with raw UUIDs. Save secrets
in a filed with printable UUID, instead of base64 UUID.
* src/virsh.c: Adjust for changed public API contract of
virSecretGetUUIDString.
* src/storage_Backend.c: DOn't undefine secret we just generated
upon successful volume creation. Fix to handle raw UUIDs. Generate
a non-clashing UUID
* src/qemu_driver.c: Change to use lookupByUUID instead of
lookupByUUIDString
2009-09-10 16:44:12 +00:00
|
|
|
virSecretPtr virSecretLookupByUUID(virConnectPtr conn,
|
|
|
|
const unsigned char *uuid);
|
2009-07-28 00:39:48 +00:00
|
|
|
virSecretPtr virSecretLookupByUUIDString(virConnectPtr conn,
|
|
|
|
const char *uuid);
|
Add usage type/id as a public API property of virSecret
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in: Add
virSecretGetUsageType, virSecretGetUsageID and virLookupSecretByUsage
* python/generator.py: Mark virSecretGetUsageType, virSecretGetUsageID
as not throwing exceptions
* qemud/remote.c: Implement dispatch for virLookupSecretByUsage
* qemud/remote_protocol.x: Add usage type & ID as attributes of
remote_nonnull_secret. Add RPC calls for new public APIs
* qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
* src/datatypes.c, src/datatypes.h: Add usageType and usageID as
properties of virSecretPtr
* src/driver.h: Add virLookupSecretByUsage driver entry point
* src/libvirt.c: Implement virSecretGetUsageType, virSecretGetUsageID
and virLookupSecretByUsage
* src/libvirt_public.syms: Export virSecretGetUsageType, virSecretGetUsageID
and virLookupSecretByUsage
* src/remote_internal.c: Implement virLookupSecretByUsage entry
* src/secret_conf.c, src/secret_conf.h: Remove the
virSecretUsageType enum, now in public API. Make volume
path mandatory when parsing XML
* src/secret_driver.c: Enforce usage uniqueness when defining secrets.
Implement virSecretLookupByUsage api method
* src/virsh.c: Include usage for secret-list command
2009-09-11 13:06:15 +00:00
|
|
|
virSecretPtr virSecretLookupByUsage(virConnectPtr conn,
|
|
|
|
int usageType,
|
|
|
|
const char *usageID);
|
2009-07-28 00:39:48 +00:00
|
|
|
virSecretPtr virSecretDefineXML (virConnectPtr conn,
|
|
|
|
const char *xml,
|
|
|
|
unsigned int flags);
|
Fix UUID handling in secrets/storage encryption APIs
Convert all the secret/storage encryption APIs / wire format to
handle UUIDs in raw format instead of non-canonical printable
format. Guarentees data format correctness.
* docs/schemas/storageencryption.rng: Make UUID mandatory for a secret
and validate fully
* docs/schemas/secret.rng: Fully validate UUID
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in, Add
virSecretLookupByUUID and virSecretGetUUID. Make
virSecretGetUUIDString follow normal API design pattern
* python/generator.py: Skip generation of virSecretGetUUID,
virSecretGetUUIDString and virSecretLookupByUUID
* python/libvir.c, python/libvirt-python-api.xml: Manual impl
of virSecretGetUUID,virSecretGetUUIDString and virSecretLookupByUUID
* qemud/remote.c: s/virSecretLookupByUUIDString/virSecretLookupByUUID/
Fix get_nonnull_secret/make_nonnull_secret to use unsigned char
* qemud/remote_protocol.x: Fix remote_nonnull_secret to use a
remote_uuid instead of remote_nonnull_string for UUID field.
Rename REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING to
REMOTE_PROC_SECRET_LOOKUP_BY_UUID_STRING and make it take an
remote_uuid value
* qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
* src/datatypes.h, src/datatypes.c: Store UUID in raw format instead
of printable. Change virGetSecret to use raw format UUID
* src/driver.h: Rename virDrvSecretLookupByUUIDString to
virDrvSecretLookupByUUID and use raw format UUID
* src/libvirt.c: Add virSecretLookupByUUID and virSecretGetUUID
and re-implement virSecretLookupByUUIDString and
virSecretGetUUIDString in terms of those
* src/libvirt_public.syms: Add virSecretLookupByUUID and
virSecretGetUUID
* src/remote_internal.c: Rename remoteSecretLookupByUUIDString
to remoteSecretLookupByUUID. Fix typo in args for
remoteSecretDefineXML impl. Use raw UUID format for
get_nonnull_secret and make_nonnull_secret
* src/storage_encryption_conf.c, src/storage_encryption_conf.h:
Storage UUID in raw format, and require it to be present in
XML. Use UUID parser to validate.
* secret_conf.h, secret_conf.c: Generate a UUID if none is provided.
Storage UUID in raw format.
* src/secret_driver.c: Adjust to deal with raw UUIDs. Save secrets
in a filed with printable UUID, instead of base64 UUID.
* src/virsh.c: Adjust for changed public API contract of
virSecretGetUUIDString.
* src/storage_Backend.c: DOn't undefine secret we just generated
upon successful volume creation. Fix to handle raw UUIDs. Generate
a non-clashing UUID
* src/qemu_driver.c: Change to use lookupByUUID instead of
lookupByUUIDString
2009-09-10 16:44:12 +00:00
|
|
|
int virSecretGetUUID (virSecretPtr secret,
|
|
|
|
unsigned char *buf);
|
|
|
|
int virSecretGetUUIDString (virSecretPtr secret,
|
|
|
|
char *buf);
|
Add usage type/id as a public API property of virSecret
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in: Add
virSecretGetUsageType, virSecretGetUsageID and virLookupSecretByUsage
* python/generator.py: Mark virSecretGetUsageType, virSecretGetUsageID
as not throwing exceptions
* qemud/remote.c: Implement dispatch for virLookupSecretByUsage
* qemud/remote_protocol.x: Add usage type & ID as attributes of
remote_nonnull_secret. Add RPC calls for new public APIs
* qemud/remote_dispatch_args.h, qemud/remote_dispatch_prototypes.h,
qemud/remote_dispatch_ret.h, qemud/remote_dispatch_table.h,
qemud/remote_protocol.c, qemud/remote_protocol.h: Re-generate
* src/datatypes.c, src/datatypes.h: Add usageType and usageID as
properties of virSecretPtr
* src/driver.h: Add virLookupSecretByUsage driver entry point
* src/libvirt.c: Implement virSecretGetUsageType, virSecretGetUsageID
and virLookupSecretByUsage
* src/libvirt_public.syms: Export virSecretGetUsageType, virSecretGetUsageID
and virLookupSecretByUsage
* src/remote_internal.c: Implement virLookupSecretByUsage entry
* src/secret_conf.c, src/secret_conf.h: Remove the
virSecretUsageType enum, now in public API. Make volume
path mandatory when parsing XML
* src/secret_driver.c: Enforce usage uniqueness when defining secrets.
Implement virSecretLookupByUsage api method
* src/virsh.c: Include usage for secret-list command
2009-09-11 13:06:15 +00:00
|
|
|
int virSecretGetUsageType (virSecretPtr secret);
|
|
|
|
const char * virSecretGetUsageID (virSecretPtr secret);
|
2009-07-28 00:39:48 +00:00
|
|
|
char * virSecretGetXMLDesc (virSecretPtr secret,
|
|
|
|
unsigned int flags);
|
|
|
|
int virSecretSetValue (virSecretPtr secret,
|
|
|
|
const unsigned char *value,
|
|
|
|
size_t value_size,
|
|
|
|
unsigned int flags);
|
|
|
|
unsigned char * virSecretGetValue (virSecretPtr secret,
|
|
|
|
size_t *value_size,
|
|
|
|
unsigned int flags);
|
|
|
|
int virSecretUndefine (virSecretPtr secret);
|
|
|
|
int virSecretRef (virSecretPtr secret);
|
|
|
|
int virSecretFree (virSecretPtr secret);
|
|
|
|
|
2009-07-10 11:18:12 +00:00
|
|
|
typedef enum {
|
|
|
|
VIR_STREAM_NONBLOCK = (1 << 0),
|
|
|
|
} virStreamFlags;
|
|
|
|
|
|
|
|
virStreamPtr virStreamNew(virConnectPtr conn,
|
|
|
|
unsigned int flags);
|
|
|
|
int virStreamRef(virStreamPtr st);
|
|
|
|
|
|
|
|
int virStreamSend(virStreamPtr st,
|
|
|
|
const char *data,
|
|
|
|
size_t nbytes);
|
|
|
|
|
|
|
|
int virStreamRecv(virStreamPtr st,
|
|
|
|
char *data,
|
|
|
|
size_t nbytes);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virStreamSourceFunc:
|
|
|
|
*
|
|
|
|
* @st: the stream object
|
|
|
|
* @data: preallocated array to be filled with data
|
|
|
|
* @nbytes: size of the data array
|
|
|
|
* @opaque: optional application provided data
|
|
|
|
*
|
|
|
|
* The virStreamSourceFunc callback is used together
|
|
|
|
* with the virStreamSendAll function for libvirt to
|
|
|
|
* obtain the data that is to be sent.
|
|
|
|
*
|
|
|
|
* The callback will be invoked multiple times,
|
|
|
|
* fetching data in small chunks. The application
|
|
|
|
* should fill the 'data' array with upto 'nbytes'
|
|
|
|
* of data and then return the number actual number
|
|
|
|
* of bytes. The callback will continue to be
|
|
|
|
* invoked until it indicates the end of the source
|
|
|
|
* has been reached by returning 0. A return value
|
|
|
|
* of -1 at any time will abort the send operation
|
|
|
|
*
|
|
|
|
* Returns the number of bytes filled, 0 upon end
|
|
|
|
* of file, or -1 upon error
|
|
|
|
*/
|
|
|
|
typedef int (*virStreamSourceFunc)(virStreamPtr st,
|
|
|
|
char *data,
|
|
|
|
size_t nbytes,
|
|
|
|
void *opaque);
|
|
|
|
|
|
|
|
int virStreamSendAll(virStreamPtr st,
|
|
|
|
virStreamSourceFunc handler,
|
|
|
|
void *opaque);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virStreamSinkFunc:
|
|
|
|
*
|
|
|
|
* @st: the stream object
|
|
|
|
* @data: preallocated array to be filled with data
|
|
|
|
* @nbytes: size of the data array
|
|
|
|
* @opaque: optional application provided data
|
|
|
|
*
|
|
|
|
* The virStreamSinkFunc callback is used together
|
|
|
|
* with the virStreamRecvAll function for libvirt to
|
|
|
|
* provide the data that has been received.
|
|
|
|
*
|
|
|
|
* The callback will be invoked multiple times,
|
|
|
|
* providing data in small chunks. The application
|
|
|
|
* should consume up 'nbytes' from the 'data' array
|
|
|
|
* of data and then return the number actual number
|
|
|
|
* of bytes consumed. The callback will continue to be
|
|
|
|
* invoked until it indicates the end of the stream
|
|
|
|
* has been reached. A return value of -1 at any time
|
|
|
|
* will abort the receive operation
|
|
|
|
*
|
|
|
|
* Returns the number of bytes consumed or -1 upon
|
|
|
|
* error
|
|
|
|
*/
|
|
|
|
typedef int (*virStreamSinkFunc)(virStreamPtr st,
|
|
|
|
const char *data,
|
|
|
|
size_t nbytes,
|
|
|
|
void *opaque);
|
|
|
|
|
|
|
|
int virStreamRecvAll(virStreamPtr st,
|
|
|
|
virStreamSinkFunc handler,
|
|
|
|
void *opaque);
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
VIR_STREAM_EVENT_READABLE = (1 << 0),
|
|
|
|
VIR_STREAM_EVENT_WRITABLE = (1 << 1),
|
|
|
|
VIR_STREAM_EVENT_ERROR = (1 << 2),
|
|
|
|
VIR_STREAM_EVENT_HANGUP = (1 << 3),
|
|
|
|
} virStreamEventType;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virStreamEventCallback:
|
|
|
|
*
|
|
|
|
* @stream: stream on which the event occurred
|
|
|
|
* @events: bitset of events from virEventHandleType constants
|
|
|
|
* @opaque: user data registered with handle
|
|
|
|
*
|
|
|
|
* Callback for receiving stream events. The callback will
|
|
|
|
* be invoked once for each event which is pending.
|
|
|
|
*/
|
|
|
|
typedef void (*virStreamEventCallback)(virStreamPtr stream, int events, void *opaque);
|
|
|
|
|
|
|
|
int virStreamEventAddCallback(virStreamPtr stream,
|
|
|
|
int events,
|
|
|
|
virStreamEventCallback cb,
|
|
|
|
void *opaque,
|
|
|
|
virFreeCallback ff);
|
|
|
|
|
|
|
|
int virStreamEventUpdateCallback(virStreamPtr stream,
|
|
|
|
int events);
|
|
|
|
|
|
|
|
int virStreamEventRemoveCallback(virStreamPtr stream);
|
|
|
|
|
|
|
|
|
|
|
|
int virStreamFinish(virStreamPtr st);
|
|
|
|
int virStreamAbort(virStreamPtr st);
|
|
|
|
|
|
|
|
int virStreamFree(virStreamPtr st);
|
|
|
|
|
|
|
|
|
New APIs for checking some object properties
Introduce a number of new APIs to expose some boolean properties
of objects, which cannot otherwise reliably determined, nor are
aspects of the XML configuration.
* virDomainIsActive: Checking virDomainGetID is not reliable
since it is not possible to distinguish between error condition
and inactive domain for ID of -1.
* virDomainIsPersistent: Check whether a persistent config exists
for the domain
* virNetworkIsActive: Check whether the network is active
* virNetworkIsPersistent: Check whether a persistent config exists
for the network
* virStoragePoolIsActive: Check whether the storage pool is active
* virStoragePoolIsPersistent: Check whether a persistent config exists
for the storage pool
* virInterfaceIsActive: Check whether the host interface is active
* virConnectIsSecure: whether the communication channel to the
hypervisor is secure
* virConnectIsEncrypted: whether any network based commnunication
channels are encrypted
NB, a channel can be secure, even if not encrypted, eg if it does
not involve the network, like a UNIX socket, or pipe.
* include/libvirt/libvirt.h.in: Define public API
* src/driver.h: Define internal driver API
* src/libvirt.c: Implement public API entry point
* src/libvirt_public.syms: Export API symbols
* src/esx/esx_driver.c, src/lxc/lxc_driver.c,
src/interface/netcf_driver.c, src/network/bridge_driver.c,
src/opennebula/one_driver.c, src/openvz/openvz_driver.c,
src/phyp/phyp_driver.c, src/qemu/qemu_driver.c,
src/remote/remote_driver.c, src/test/test_driver.c,
src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
src/xen/xen_driver.c: Stub out driver tables
2009-10-21 10:49:05 +00:00
|
|
|
int virDomainIsActive(virDomainPtr dom);
|
|
|
|
int virDomainIsPersistent(virDomainPtr dom);
|
|
|
|
|
|
|
|
int virNetworkIsActive(virNetworkPtr net);
|
|
|
|
int virNetworkIsPersistent(virNetworkPtr net);
|
|
|
|
|
|
|
|
int virStoragePoolIsActive(virStoragePoolPtr pool);
|
|
|
|
int virStoragePoolIsPersistent(virStoragePoolPtr pool);
|
|
|
|
|
|
|
|
int virInterfaceIsActive(virInterfacePtr iface);
|
|
|
|
|
|
|
|
int virConnectIsEncrypted(virConnectPtr conn);
|
|
|
|
int virConnectIsSecure(virConnectPtr conn);
|
|
|
|
|
2009-12-18 13:51:39 +00:00
|
|
|
/*
|
|
|
|
* CPU specification API
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
VIR_CPU_COMPARE_ERROR = -1,
|
|
|
|
VIR_CPU_COMPARE_INCOMPATIBLE = 0,
|
|
|
|
VIR_CPU_COMPARE_IDENTICAL = 1,
|
|
|
|
VIR_CPU_COMPARE_SUPERSET = 2
|
|
|
|
} virCPUCompareResult;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* virConnectCompareCPU:
|
|
|
|
*
|
|
|
|
* @conn: virConnect connection
|
|
|
|
* @xmlDesc: XML description of either guest or host cpu with <cpu> root tag
|
|
|
|
* @flags: comparison flags
|
|
|
|
*
|
|
|
|
* Compares given CPU with host cpu.
|
|
|
|
*
|
|
|
|
* Returns virCPUCompareResult.
|
|
|
|
*/
|
|
|
|
int virConnectCompareCPU(virConnectPtr conn,
|
|
|
|
const char *xmlDesc,
|
|
|
|
unsigned int flags);
|
New APIs for checking some object properties
Introduce a number of new APIs to expose some boolean properties
of objects, which cannot otherwise reliably determined, nor are
aspects of the XML configuration.
* virDomainIsActive: Checking virDomainGetID is not reliable
since it is not possible to distinguish between error condition
and inactive domain for ID of -1.
* virDomainIsPersistent: Check whether a persistent config exists
for the domain
* virNetworkIsActive: Check whether the network is active
* virNetworkIsPersistent: Check whether a persistent config exists
for the network
* virStoragePoolIsActive: Check whether the storage pool is active
* virStoragePoolIsPersistent: Check whether a persistent config exists
for the storage pool
* virInterfaceIsActive: Check whether the host interface is active
* virConnectIsSecure: whether the communication channel to the
hypervisor is secure
* virConnectIsEncrypted: whether any network based commnunication
channels are encrypted
NB, a channel can be secure, even if not encrypted, eg if it does
not involve the network, like a UNIX socket, or pipe.
* include/libvirt/libvirt.h.in: Define public API
* src/driver.h: Define internal driver API
* src/libvirt.c: Implement public API entry point
* src/libvirt_public.syms: Export API symbols
* src/esx/esx_driver.c, src/lxc/lxc_driver.c,
src/interface/netcf_driver.c, src/network/bridge_driver.c,
src/opennebula/one_driver.c, src/openvz/openvz_driver.c,
src/phyp/phyp_driver.c, src/qemu/qemu_driver.c,
src/remote/remote_driver.c, src/test/test_driver.c,
src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
src/xen/xen_driver.c: Stub out driver tables
2009-10-21 10:49:05 +00:00
|
|
|
|
|
|
|
|
2010-01-22 13:52:41 +00:00
|
|
|
/**
|
|
|
|
* virConnectBaselineCPU:
|
|
|
|
*
|
|
|
|
* @conn: virConnect connection
|
|
|
|
* @ncpus: number of CPUs in xmlCPUs
|
|
|
|
* @xmlCPUs: array of XML descriptions of host CPUs
|
|
|
|
* @flags: fine-tuning flags
|
|
|
|
*
|
|
|
|
* Computes the most feature-rich CPU which is compatible with all given
|
|
|
|
* host CPUs.
|
|
|
|
*
|
|
|
|
* Returns XML description of the computed CPU or NULL on error.
|
|
|
|
*/
|
|
|
|
char *virConnectBaselineCPU(virConnectPtr conn,
|
|
|
|
const char **xmlCPUs,
|
|
|
|
unsigned int ncpus,
|
|
|
|
unsigned int flags);
|
|
|
|
|
2005-12-08 15:08:46 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __VIR_VIRLIB_H__ */
|