Getting Started with C
Note:
C support in the XenServer SDK is deprecated and will be removed in a future release.
The
XenServer-SDK directory contains the following folders that are relevant to C programmers:
-
libxenserver: The XenServer SDK for C.-
bin: The libxenserver compiled library. -
src: The libxenserver source code and a Makefile to build it. Every API object is associated with a header file, which contains declarations for all the object's API functions. For example, the type definitions and functions required to invoke VM operations are all contained inxen_vm.h.
-
RPC protocol
The C SDK supports the XML-RPC protocol.
Platform supported
-
Linux
-
Windows (under cygwin)
Library
The library is generated as
libxenserver.so that is linked by C programs.
Note:
This library is not backwards compatible. To interact with hosts running older versions of XenServer or Citrix Hypervisor™, it is advisable to use the library of the same version as the host.
Dependencies
The library is dependent upon the XML toolkit from the GNOME project, by Daniel Veillard, et al. It is packaged as
libxml2-devel on CentOS and libxml2-dev on Debian.
Building the source code
To compile the source code type
make in the libxenserver/src directory.
Examples
Examples on the usage of the C SDK can be found at libxenserver usage examples on GitHub.