diff --git a/ChangeLog b/ChangeLog index 15cd5e9509..51153341be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Sep 10 11:35:06 CEST 2007 Daniel Veillard + + * include/libvirt/libvirt.h include/libvirt/libvirt.h.in + src/libvirt.c: fixes a few problems in the documentation + pointed out by Toth Istvan. + * docs/*: regenerated the docs + Wed Sep 5 16:31:00 CEST 2007 Daniel Veillard * docs/libvir.html docs/uri.html: remove references to libvirt_qemud diff --git a/docs/APIchunk1.html b/docs/APIchunk1.html index cc4b753464..8bd30237ec 100644 --- a/docs/APIchunk1.html +++ b/docs/APIchunk1.html @@ -13,7 +13,8 @@
What
_virError
When
virDomainGetConnect
virNetworkGetConnect
-

Letter X:

XML
virConnectGetMaxVcpus
+

Letter X:

XML
virConnectGetCapabilities
+virConnectGetMaxVcpus
virDomainAttachDevice
virDomainCreateLinux
virDomainDefineXML
@@ -22,7 +23,8 @@ virNetworkCreateXML
virNetworkDefineXML
virNetworkGetXMLDesc
-
Xen
virDomainCoreDump
+
Xen
_virDomainBlockStats
+virDomainCoreDump
virDomainGetVcpus
virDomainPinVcpu
virGetVersion
diff --git a/docs/APIchunk2.html b/docs/APIchunk2.html index 8a6da91b89..376a8b3a4d 100644 --- a/docs/APIchunk2.html +++ b/docs/APIchunk2.html @@ -27,6 +27,7 @@ virDomainUndefine
virNetworkCreate
virNetworkUndefine
+
defining
virConnectGetCapabilities
described
virDomainGetVcpus
description
virDomainAttachDevice
virDomainCreateLinux
diff --git a/docs/APIchunk3.html b/docs/APIchunk3.html index 3c4c897b72..d52fbc80b7 100644 --- a/docs/APIchunk3.html +++ b/docs/APIchunk3.html @@ -265,6 +265,7 @@ virDomainMigrate
virNetworkGetBridgeName
virNetworkGetXMLDesc
+
mysterious
_virDomainBlockStats

A-V W-c d-g diff --git a/docs/APIchunk4.html b/docs/APIchunk4.html index 07b641a1e8..fd9ee9e6bc 100644 --- a/docs/APIchunk4.html +++ b/docs/APIchunk4.html @@ -72,7 +72,7 @@ virNetworkCreateXML
only
virConnectGetVersion
virDomainGetInfo
-
opaque
virConnectGetCapabilities
+
oo_req
_virDomainBlockStats
operation
virDomainGetOSType
virDomainReboot
option
virDomainShutdown
@@ -261,6 +261,7 @@
returns
VIR_CPU_MAPLEN
VIR_CPU_USABLE
VIR_GET_CPUMAP
+_virDomainBlockStats
virConnectGetHostname
virConnectGetURI
virConnectGetVersion
diff --git a/docs/APIchunk5.html b/docs/APIchunk5.html index 48448169bb..b1be1d4db5 100644 --- a/docs/APIchunk5.html +++ b/docs/APIchunk5.html @@ -124,8 +124,7 @@ virNetworkGetName
virNetworkGetUUIDString
virNetworkLookupByUUIDString
-
structure
virConnectGetCapabilities
-virDomainBlockStats
+
structure
virDomainBlockStats
virDomainDestroy
virDomainFree
virDomainGetInfo
@@ -212,7 +211,8 @@ virDomainFree
virNetworkDestroy
virNetworkFree
-
this
_virError
+
this
_virDomainBlockStats
+_virError
virConnectGetHostname
virConnectGetURI
virDomainBlockStats
diff --git a/docs/APIchunk6.html b/docs/APIchunk6.html index c2b560847e..7bedf5c1ce 100644 --- a/docs/APIchunk6.html +++ b/docs/APIchunk6.html @@ -83,8 +83,6 @@
version
LIBVIR_VERSION_NUMBER
virConnectGetVersion
virGetVersion
-
virCapabilities
virConnectGetCapabilities
-
virCapabilitiesPtr
virConnectGetCapabilities
virConnCopyLastError
virConnGetLastError
virConnectGetCapabilities
virDomainMigrate
virConnectGetMaxVcpus
virDomainGetMaxVcpus
diff --git a/docs/APIfiles.html b/docs/APIfiles.html index 46e788da6a..ea7433e42a 100644 --- a/docs/APIfiles.html +++ b/docs/APIfiles.html @@ -62,6 +62,7 @@ virDomainAttachDevice
virDomainBlockStats
virDomainBlockStatsPtr
+virDomainBlockStatsStruct
virDomainCoreDump
virDomainCreate
virDomainCreateFlags
@@ -88,6 +89,7 @@ virDomainInfoPtr
virDomainInterfaceStats
virDomainInterfaceStatsPtr
+virDomainInterfaceStatsStruct
virDomainLookupByID
virDomainLookupByName
virDomainLookupByUUID
diff --git a/docs/APIsymbols.html b/docs/APIsymbols.html index 871e4c3f77..6a68f70c51 100644 --- a/docs/APIsymbols.html +++ b/docs/APIsymbols.html @@ -132,6 +132,7 @@ virDomainAttachDevice
virDomainBlockStats
virDomainBlockStatsPtr
+virDomainBlockStatsStruct
virDomainCoreDump
virDomainCreate
virDomainCreateFlags
@@ -158,6 +159,7 @@ virDomainInfoPtr
virDomainInterfaceStats
virDomainInterfaceStatsPtr
+virDomainInterfaceStatsStruct
virDomainLookupByID
virDomainLookupByName
virDomainLookupByUUID
diff --git a/docs/devhelp/libvirt-libvirt.html b/docs/devhelp/libvirt-libvirt.html index e7e0467ba2..cec3697304 100644 --- a/docs/devhelp/libvirt-libvirt.html +++ b/docs/devhelp/libvirt-libvirt.html @@ -49,26 +49,28 @@ #define VIR_UUID_STRING_BUFLEN; #define VIR_GET_CPUMAP(cpumaps, maplen, vcpu); #define VIR_UNUSE_CPU(cpumap, cpu); +typedef struct _virDomainBlockStats virDomainBlockStatsStruct; typedef enum virDomainMigrateFlags; typedef struct _virNodeInfo virNodeInfo; typedef struct _virNetwork virNetwork; -typedef struct _virDomainBlockStats * virDomainBlockStatsPtr; +typedef virDomainBlockStatsStruct * virDomainBlockStatsPtr; +typedef enum virSchedParameterType; typedef struct _virConnect virConnect; typedef struct _virVcpuInfo virVcpuInfo; typedef struct _virDomainInfo virDomainInfo; -typedef struct _virSchedParameter virSchedParameter; +typedef struct _virDomainInterfaceStats virDomainInterfaceStatsStruct; typedef enum virDomainState; typedef struct _virDomain virDomain; -typedef struct _virDomainInterfaceStats * virDomainInterfaceStatsPtr; -typedef enum virSchedParameterType; +typedef virDomainInterfaceStatsStruct * virDomainInterfaceStatsPtr; typedef enum virDomainRestart; +typedef virSchedParameter * virSchedParameterPtr; typedef virNodeInfo * virNodeInfoPtr; typedef virNetwork * virNetworkPtr; typedef virDomainInfo * virDomainInfoPtr; typedef virConnect * virConnectPtr; -typedef virVcpuInfo * virVcpuInfoPtr; -typedef virSchedParameter * virSchedParameterPtr; +typedef struct _virSchedParameter virSchedParameter; typedef enum virVcpuState; +typedef virVcpuInfo * virVcpuInfoPtr; typedef virDomain * virDomainPtr; typedef enum virDomainCreateFlags; int virDomainGetInfo (virDomainPtr domain,
virDomainInfoPtr info); @@ -86,7 +88,6 @@ int virInitialize (void); virDomainPtr virDomainLookupByName (virConnectPtr conn,
const char * name); virNetworkPtr virNetworkLookupByUUID (virConnectPtr conn,
const unsigned char * uuid); char * virNetworkGetBridgeName (virNetworkPtr network); -char * virNetworkGetXMLDesc (virNetworkPtr network,
int flags); int virDomainPinVcpu (virDomainPtr domain,
unsigned int vcpu,
unsigned char * cpumap,
int maplen); int virDomainRestore (virConnectPtr conn,
const char * from); const char * virConnectGetType (virConnectPtr conn); @@ -117,8 +118,9 @@ int virDomainFree (virDomainSetAutostart (virDomainPtr domain,
int autostart); int virDomainSuspend (virDomainPtr domain); int virConnectGetMaxVcpus (virConnectPtr conn,
const char * type); -int virConnectNumOfDefinedDomains (virConnectPtr conn); virConnectPtr virNetworkGetConnect (virNetworkPtr net); +int virConnectNumOfDefinedDomains (virConnectPtr conn); +virNetworkPtr virNetworkCreateXML (virConnectPtr conn,
const char * xmlDesc); virNetworkPtr virNetworkDefineXML (virConnectPtr conn,
const char * xml); int virNetworkCreate (virNetworkPtr network); int virDomainSetSchedulerParameters (virDomainPtr domain,
virSchedParameterPtr params,
int nparams); @@ -129,7 +131,7 @@ int virDomainSetVcpus (virDomainPtr virDomainLookupByID (virConnectPtr conn,
int id); int virNetworkGetUUIDString (virNetworkPtr network,
char * buf); virDomainPtr virDomainMigrate (virDomainPtr domain,
virConnectPtr dconn,
unsigned long flags,
const char * dname,
const char * uri,
unsigned long bandwidth); -virNetworkPtr virNetworkCreateXML (virConnectPtr conn,
const char * xmlDesc); +char * virNetworkGetXMLDesc (virNetworkPtr network,
int flags); unsigned int virDomainGetID (virDomainPtr domain); int virDomainResume (virDomainPtr domain); virDomainPtr virDomainCreateLinux (virConnectPtr conn,
const char * xmlDesc,
unsigned int flags); @@ -218,9 +220,17 @@ The content of this structure is not made public by the API.


-

Structure virDomainBlockStatsPtr

struct _virDomainBlockStats * {
-The content of this structure is not made public by the API.
-} virDomainBlockStatsPtr;
+        

Typedef virDomainBlockStatsPtr

virDomainBlockStatsStruct * virDomainBlockStatsPtr;
+

A pointer to a virDomainBlockStats structure

+
+
+

Structure virDomainBlockStatsStruct

struct _virDomainBlockStats {
+    long long	rd_req
+    long long	rd_bytes
+    long long	wr_req
+    long long	wr_bytes
+    long long	errs	: In Xen this returns the mysterious 'oo_req'.
+} virDomainBlockStatsStruct;
 


@@ -244,9 +254,20 @@ The content of this structure is not made public by the API.

a virDomainInfoPtr is a pointer to a virDomainInfo structure.


-

Structure virDomainInterfaceStatsPtr

struct _virDomainInterfaceStats * {
-The content of this structure is not made public by the API.
-} virDomainInterfaceStatsPtr;
+        

Typedef virDomainInterfaceStatsPtr

virDomainInterfaceStatsStruct * virDomainInterfaceStatsPtr;
+

A pointe to a virDomainInterfaceStats structure

+
+
+

Structure virDomainInterfaceStatsStruct

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
+} virDomainInterfaceStatsStruct;
 


@@ -357,7 +378,7 @@ The content of this structure is not made public by the API.

virConnectGetCapabilities ()

char *	virConnectGetCapabilities	(virConnectPtr conn)

Provides capabilities of the hypervisor / driver.

-
conn:pointer to the hypervisor connection
Returns:NULL in case of error, or a pointer to an opaque virCapabilities structure (virCapabilitiesPtr). The client must free the returned string after use.
+
conn:pointer to the hypervisor connection
Returns:NULL in case of error, or an XML string defining the capabilities. The client must free the returned string after use.

virConnectGetHostname ()

char *	virConnectGetHostname		(virConnectPtr conn)

This returns the system hostname on which the hypervisor is running (the result of the gethostname(2) system call). If we are connected to a remote system, then this returns the hostname of the remote system.

diff --git a/docs/html/libvirt-libvirt.html b/docs/html/libvirt-libvirt.html index 4268ae0afe..6e290ba8de 100644 --- a/docs/html/libvirt-libvirt.html +++ b/docs/html/libvirt-libvirt.html @@ -5,13 +5,13 @@ The content of this structure is not made public by the API.
Typedef virConnect * virConnectPtr
 
Structure virDomain
struct _virDomain The content of this structure is not made public by the API. -
Structure virDomainBlockStatsPtr
struct _virDomainBlockStats * -The content of this structure is not made public by the API. +
Typedef virDomainBlockStatsStruct * virDomainBlockStatsPtr
+
Structure virDomainBlockStatsStruct
struct _virDomainBlockStats
Enum virDomainCreateFlags
 
Structure virDomainInfo
struct _virDomainInfo
Typedef virDomainInfo * virDomainInfoPtr
-
Structure virDomainInterfaceStatsPtr
struct _virDomainInterfaceStats * -The content of this structure is not made public by the API. +
Typedef virDomainInterfaceStatsStruct * virDomainInterfaceStatsPtr
+
Structure virDomainInterfaceStatsStruct
struct _virDomainInterfaceStats
Enum virDomainMigrateFlags
 
Typedef virDomain * virDomainPtr
 
Enum virDomainRestart
@@ -124,8 +124,14 @@ The content of this structure is not made public by the API.
       a virConnectPtr is pointer to a virConnect private structure, this is the type used to reference a connection to the Xen Hypervisor in the API.
     

Structure virDomain

Structure virDomain
struct _virDomain { The content of this structure is not made public by the API. -}

Structure virDomainBlockStatsPtr

Structure virDomainBlockStatsPtr
struct _virDomainBlockStats * { -The content of this structure is not made public by the API. +}
+ A pointer to a virDomainBlockStats structure +

Structure virDomainBlockStatsStruct

Structure virDomainBlockStatsStruct
struct _virDomainBlockStats { + long long rd_req + long long rd_bytes + long long wr_req + long long wr_bytes + long long errs : In Xen this returns the mysterious 'oo_ }

Enum virDomainCreateFlags

Enum virDomainCreateFlags {
     VIR_DOMAIN_NONE = 0
 }
@@ -137,8 +143,17 @@ The content of this structure is not made public by the API.
     unsigned long long	cpuTime	: the CPU time used in nanoseconds
 }
a virDomainInfoPtr is a pointer to a virDomainInfo structure. -

Structure virDomainInterfaceStatsPtr

Structure virDomainInterfaceStatsPtr
struct _virDomainInterfaceStats * { -The content of this structure is not made public by the API. + + A pointe to a virDomainInterfaceStats structure +

Structure virDomainInterfaceStatsStruct

Structure virDomainInterfaceStatsStruct
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 }

Enum virDomainMigrateFlags

Enum virDomainMigrateFlags {
     VIR_MIGRATE_LIVE = 1 : live migration
 }
@@ -201,7 +216,7 @@ The content of this structure is not made public by the API.
 

This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.

conn:pointer to the hypervisor connection
Returns:0 in case of success or -1 in case of error.

Function: virConnectGetCapabilities

char *	virConnectGetCapabilities	(virConnectPtr conn)

Provides capabilities of the hypervisor / driver.

-
conn:pointer to the hypervisor connection
Returns:NULL in case of error, or a pointer to an opaque virCapabilities structure (virCapabilitiesPtr). The client must free the returned string after use.

Function: virConnectGetHostname

char *	virConnectGetHostname		(virConnectPtr conn)
+
conn:pointer to the hypervisor connection
Returns:NULL in case of error, or an XML string defining the capabilities. The client must free the returned string after use.

Function: virConnectGetHostname

char *	virConnectGetHostname		(virConnectPtr conn)

This returns the system hostname on which the hypervisor is running (the result of the gethostname(2) system call). If we are connected to a remote system, then this returns the hostname of the remote system.

conn:pointer to a hypervisor connection
Returns:the hostname which must be freed by the caller, or NULL if there was an error.

Function: virConnectGetMaxVcpus

int	virConnectGetMaxVcpus		(virConnectPtr conn, 
const char * type)

Provides the maximum number of virtual CPUs supported for a guest VM of a specific type. The 'type' parameter here corresponds to the 'type' attribute in the <domain> element of the XML.

diff --git a/docs/libvirt-api.xml b/docs/libvirt-api.xml index e8f0f4a293..04f082ee21 100644 --- a/docs/libvirt-api.xml +++ b/docs/libvirt-api.xml @@ -38,26 +38,28 @@ + + - + - + - - + + @@ -81,7 +83,6 @@ - @@ -112,8 +113,9 @@ - + + @@ -124,7 +126,7 @@ - + @@ -373,7 +375,16 @@ a virConnectPtr is pointer to a virConnect private structure, this is the type used to reference a connection to the Xen Hypervisor in the API. - + + A pointer to a virDomainBlockStats structure + + + + + + + + @@ -385,7 +396,19 @@ a virDomainInfoPtr is a pointer to a virDomainInfo structure. - + + A pointe to a virDomainInterfaceStats structure + + + + + + + + + + + a virDomainPtr is pointer to a virDomain private structure, this is the type used to reference a Xen domain in the API. @@ -473,7 +496,7 @@ Provides capabilities of the hypervisor / driver. - + diff --git a/docs/libvirt-refs.xml b/docs/libvirt-refs.xml index 8c625e77a2..7f77c047c6 100644 --- a/docs/libvirt-refs.xml +++ b/docs/libvirt-refs.xml @@ -133,6 +133,7 @@ + @@ -159,6 +160,7 @@ + @@ -362,6 +364,7 @@ + @@ -388,6 +391,7 @@ + @@ -714,6 +718,7 @@ + @@ -740,6 +745,7 @@ + @@ -1297,6 +1303,7 @@ + @@ -1308,6 +1315,7 @@ + @@ -1846,6 +1854,9 @@ + + + @@ -2629,6 +2640,9 @@ + + + @@ -2735,8 +2749,8 @@ - - + + @@ -3067,6 +3081,7 @@ + @@ -3297,7 +3312,6 @@ - @@ -3427,6 +3441,7 @@ + @@ -3604,12 +3619,6 @@ - - - - - - diff --git a/include/libvirt/libvirt.h b/include/libvirt/libvirt.h index 553613129c..cacb258eb6 100644 --- a/include/libvirt/libvirt.h +++ b/include/libvirt/libvirt.h @@ -199,29 +199,45 @@ int virDomainSetSchedulerParameters (virDomainPtr domain, virSchedParameterPtr params, int nparams); -/* Block device stats for virDomainBlockStats. +/** + * virDomainBlockStats: + * + * Block device stats for virDomainBlockStats. * * 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. */ +typedef struct _virDomainBlockStats virDomainBlockStatsStruct; + struct _virDomainBlockStats { long long rd_req; long long rd_bytes; long long wr_req; long long wr_bytes; - long long errs; // In Xen this returns the mysterious 'oo_req'. + long long errs; /* In Xen this returns the mysterious 'oo_req'. */ }; -typedef struct _virDomainBlockStats *virDomainBlockStatsPtr; -/* Network interface stats for virDomainInterfaceStats. +/** + * virDomainBlockStatsPtr: + * + * A pointer to a virDomainBlockStats structure + */ +typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; + +/** + * virDomainInterfaceStats: + * + * Network interface stats for virDomainInterfaceStats. * * 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. */ +typedef struct _virDomainInterfaceStats virDomainInterfaceStatsStruct; + struct _virDomainInterfaceStats { long long rx_bytes; long long rx_packets; @@ -232,7 +248,14 @@ struct _virDomainInterfaceStats { long long tx_errs; long long tx_drop; }; -typedef struct _virDomainInterfaceStats *virDomainInterfaceStatsPtr; + +/** + * virDomainInterfaceStatsPtr: + * + * A pointe to a virDomainInterfaceStats structure + */ +typedef virDomainInterfaceStatsStruct *virDomainInterfaceStatsPtr; + /* Domain migration flags. */ typedef enum { diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 7a0df52d11..0cbb5e7c2e 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -199,29 +199,45 @@ int virDomainSetSchedulerParameters (virDomainPtr domain, virSchedParameterPtr params, int nparams); -/* Block device stats for virDomainBlockStats. +/** + * virDomainBlockStats: + * + * Block device stats for virDomainBlockStats. * * 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. */ +typedef struct _virDomainBlockStats virDomainBlockStatsStruct; + struct _virDomainBlockStats { long long rd_req; long long rd_bytes; long long wr_req; long long wr_bytes; - long long errs; // In Xen this returns the mysterious 'oo_req'. + long long errs; /* In Xen this returns the mysterious 'oo_req'. */ }; -typedef struct _virDomainBlockStats *virDomainBlockStatsPtr; -/* Network interface stats for virDomainInterfaceStats. +/** + * virDomainBlockStatsPtr: + * + * A pointer to a virDomainBlockStats structure + */ +typedef virDomainBlockStatsStruct *virDomainBlockStatsPtr; + +/** + * virDomainInterfaceStats: + * + * Network interface stats for virDomainInterfaceStats. * * 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. */ +typedef struct _virDomainInterfaceStats virDomainInterfaceStatsStruct; + struct _virDomainInterfaceStats { long long rx_bytes; long long rx_packets; @@ -232,7 +248,14 @@ struct _virDomainInterfaceStats { long long tx_errs; long long tx_drop; }; -typedef struct _virDomainInterfaceStats *virDomainInterfaceStatsPtr; + +/** + * virDomainInterfaceStatsPtr: + * + * A pointe to a virDomainInterfaceStats structure + */ +typedef virDomainInterfaceStatsStruct *virDomainInterfaceStatsPtr; + /* Domain migration flags. */ typedef enum { diff --git a/src/libvirt.c b/src/libvirt.c index daaa9f8f4b..8ad8ac2616 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -1928,8 +1928,8 @@ virNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info) * * Provides capabilities of the hypervisor / driver. * - * Returns NULL in case of error, or a pointer to an opaque - * virCapabilities structure (virCapabilitiesPtr). + * Returns NULL in case of error, or an XML string + * defining the capabilities. * The client must free the returned string after use. */ char *