<info>This macro is to be used in conjonction with virDomainGetVcpus() and 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.</info>
<argname='cpumaps'info='pointer to an array of cpumap (in 8-bit bytes) (IN)'/>
<argname='maplen'info='the length (in bytes) of one cpumap'/>
<argname='vcpu'info='the virtual CPU number'/>
<argname='cpumap'info='pointer to a cpumap (in 8-bit bytes) (OUT) This cpumap must be previously allocated by the caller (ie: malloc(maplen))'/>
</macro>
<macroname='VIR_CPU_MAPLEN'file='libvirt'>
</macro>
<macroname='VIR_CPU_USABLE'file='libvirt'>
<info>This macro is to be used in conjonction with virDomainGetVcpus() API. VIR_CPU_USABLE macro returns a non zero value (true) if the cpu is usable by the vcpu, and 0 otherwise.</info>
<argname='cpumaps'info='pointer to an array of cpumap (in 8-bit bytes) (IN)'/>
<argname='maplen'info='the length (in bytes) of one cpumap'/>
<argname='vcpu'info='the virtual CPU number'/>
<argname='cpu'info='the physical CPU number'/>
</macro>
<macroname='VIR_GET_CPUMAP'file='libvirt'>
<info>This macro is to be used in conjonction with virDomainGetVcpus() and virDomainPinVcpu() APIs. VIR_GET_CPUMAP macro returns a pointer to the cpumap of the specified vcpu from cpumaps array.</info>
<argname='cpumaps'info='pointer to an array of cpumap (in 8-bit bytes) (IN)'/>
<argname='maplen'info='the length (in bytes) of one cpumap'/>
<argname='vcpu'info='the virtual CPU number'/>
</macro>
<macroname='VIR_NODEINFO_MAXCPUS'file='libvirt'>
<info>This macro is to calculate the total number of CPUs supported but not neccessarily active in the host.</info>
<argname='nodeinfo'info='virNodeInfo instance'/>
</macro>
<macroname='VIR_UNUSE_CPU'file='libvirt'>
<info>This macro is to be used in conjonction with virDomainPinVcpu() API. USE_CPU macro reset the bit (CPU not usable) of the related cpu in cpumap.</info>
<argname='cpumap'info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)'/>
<argname='cpu'info='the physical CPU number'/>
</macro>
<macroname='VIR_USE_CPU'file='libvirt'>
<info>This macro is to be used in conjonction with virDomainPinVcpu() API. USE_CPU macro set the bit (CPU usable) of the related cpu in cpumap.</info>
<argname='cpumap'info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)'/>
<info>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.</info>
<info>Provide a pointer to the last error caught on that connection Simpler but may not be suitable for multithreaded accesses, in which case use virConnCopyLastError()</info>
<returntype='virErrorPtr'info='a pointer to the last error or NULL if none occured.'/>
<argname='conn'type='virConnectPtr'info='pointer to the hypervisor connection'/>
<info>Set a connection error handling function, if @handler is NULL it will reset to default which is to pass error back to the global library handler.</info>
<returntype='void'/>
<argname='conn'type='virConnectPtr'info='pointer to the hypervisor connection'/>
<argname='userData'type='void *'info='pointer to the user data provided in the handler callback'/>
<argname='handler'type='virErrorFunc'info='the function to get called in case of error or NULL'/>
<info>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.</info>
<returntype='int'info='0 in case of success or -1 in case of error.'/>
<argname='conn'type='virConnectPtr'info='pointer to the hypervisor connection'/>
<info>Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection.</info>
<returntype='int'info='-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release'/>
<argname='conn'type='virConnectPtr'info='pointer to the hypervisor connection'/>
<argname='hvVer'type='unsigned long *'info='return value for the version of the running hypervisor (OUT)'/>
<info>This function should be called first to get a restricted connection to the libbrary functionalities. The set of APIs usable are then restricted on the available methods to control the domains.</info>
<returntype='virConnectPtr'info='a pointer to the hypervisor connection or NULL in case of error'/>
<argname='name'type='const char *'info='optional argument currently unused, pass NULL'/>
<info>Launch a new Linux guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires priviledged access to the hypervisor.</info>
<returntype='virDomainPtr'info='a new domain object or NULL in case of failure'/>
<argname='conn'type='virConnectPtr'info='pointer to the hypervisor connection'/>
<argname='xmlDesc'type='const char *'info='an XML description of the domain'/>
<argname='flags'type='unsigned int'info='an optional set of virDomainFlags'/>
<info>Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires priviledged access</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.</info>
<info>Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.</info>
<returntype='unsigned long'info='the memory size in kilobytes or 0 in case of error.'/>
<argname='domain'type='virDomainPtr'info='a domain object or NULL'/>
<returntype='const char *'info='a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.'/>
<info>Extract information about virtual CPUs of domain, store it in info array and also in cpumaps if this pointer is'nt NULL.</info>
<returntype='int'info='the number of info filled in case of success, -1 in case of failure.'/>
<argname='domain'type='virDomainPtr'info='pointer to domain object, or NULL for Domain0'/>
<argname='info'type='virVcpuInfoPtr'info='pointer to an array of virVcpuInfo structures (OUT)'/>
<argname='maxinfo'type='int'info='number of structures in info array'/>
<argname='cpumaps'type='unsigned char *'info='pointer to an bit map of real CPUs for all vcpus of this domain (in 8-bit bytes) (OUT) If cpumaps is NULL, then no cupmap information is returned by the API. It's assumed there is <maxinfo> cpumap in cpumaps array. The memory allocated to cpumaps must be (maxinfo * maplen) bytes (ie: calloc(maxinfo, maplen)). One cpumap inside cpumaps has the format described in virDomainPinVcpu() API.'/>
<argname='maplen'type='int'info='number of bytes in one cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...).'/>
<info>Dynamically change the real CPUs which can be allocated to a virtual CPU. This function requires priviledged access to the hypervisor.</info>
<returntype='int'info='0 in case of success, -1 in case of failure.'/>
<argname='domain'type='virDomainPtr'info='pointer to domain object, or NULL for Domain0'/>
<argname='vcpu'type='unsigned int'info='virtual CPU number'/>
<argname='cpumap'type='unsigned char *'info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.'/>
<argname='maplen'type='int'info='number of bytes in cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...). If maplen < size, missing bytes are set to zero. If maplen > size, failure code is returned.'/>
<info>Reboot a domain, the domain object is still usable there after but the domain OS is being stopped for a restart. Note that the guest OS may ignore the request.</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires priviledged access</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>This method will suspend a domain and save its memory contents to a file on disk. After the call, if successful, the domain is not listed as running anymore (this may be a problem). Use virDomainRestore() to restore a domain after saving.</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function requires priviledged access to the hypervisor.</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<argname='domain'type='virDomainPtr'info='a domain object or NULL'/>
<argname='memory'type='unsigned long'info='the memory size in kilobytes'/>
<info>Dynamically change the target amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function may requires priviledged access to the hypervisor.</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<argname='domain'type='virDomainPtr'info='a domain object or NULL'/>
<argname='memory'type='unsigned long'info='the memory size in kilobytes'/>
<info>Dynamically change the number of virtual CPUs used by the domain. Note that this call may fail if the underlying virtualization hypervisor does not support it or if growing the number is arbitrary limited. This function requires priviledged access to the hypervisor.</info>
<returntype='int'info='0 in case of success, -1 in case of failure.'/>
<argname='domain'type='virDomainPtr'info='pointer to domain object, or NULL for Domain0'/>
<argname='nvcpus'type='unsigned int'info='the new number of virtual CPUs for this domain'/>
<info>Shutdown a domain, the domain object is still usable there after but the domain OS is being stopped. Note that the guest OS may ignore the request. TODO: should we add an option for reboot, knowing it may not be doable in the general case ?</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>Suspends an active domain, the process is frozen without further access to CPU resources and I/O but the memory used by the domain at the hypervisor level will stay allocated. Use virDomainResume() to reactivate the domain. This function may requires priviledged access.</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>Provide a pointer to the last error caught at the library level Simpler but may not be suitable for multithreaded accesses, in which case use virCopyLastError()</info>
<returntype='virErrorPtr'info='a pointer to the last error or NULL if none occured.'/>
<info>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.</info>
<returntype='int'info='-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.'/>
<argname='libVer'type='unsigned long *'info='return value for the library version (OUT)'/>
<argname='type'type='const char *'info='the type of connection/driver looked at'/>
<argname='typeVer'type='unsigned long *'info='return value for the version of the hypervisor (OUT)'/>
<info>Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.</info>
<returntype='int'info='0 in case of success, -1 in case of error'/>
<info>Set a library global error handling function, if @handler is NULL, it will reset to default printing on stderr. The error raised there are those for which no handler at the connection level could caught.</info>
<returntype='void'/>
<argname='userData'type='void *'info='pointer to the user data provided in the handler callback'/>
<argname='handler'type='virErrorFunc'info='the function to get called in case of error or NULL'/>