%
% Copyright (c) 2006-2007 XenSource, Inc.
% Copyright (c) 2009 flonatel GmbH & Co. KG
%
% Permission is granted to copy, distribute and/or modify this document under
% the terms of the GNU Free Documentation License, Version 1.2 or any later
% version published by the Free Software Foundation; with no Invariant
% Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the
% license is included in the section entitled
% "GNU Free Documentation License" or the file fdl.tex.
%
% Authors: Ewan Mellor, Richard Sharp, Dave Scott, Jon Harrop.
% Contributor: Andreas Florath
%
\section{Wire Protocol for Remote API Calls}
API calls are sent over a network to a Xen-enabled host using
the XML-RPC protocol. In this Section we describe how the
higher-level types used in our API Reference are mapped to
primitive XML-RPC types.
In our API Reference we specify the signatures of API functions in the following
style:
\begin{verbatim}
(ref_vm Set) VM.get_all()
\end{verbatim}
This specifies that the function with name {\tt VM.get\_all} takes
no parameters and returns a Set of {\tt ref\_vm}s.
These types are mapped onto XML-RPC types in a straight-forward manner:
\begin{itemize}
\item Floats, Bools, DateTimes and Strings map directly to the XML-RPC {\tt
double}, {\tt boolean}, {\tt dateTime.iso8601}, and {\tt string} elements.
\item all ``{\tt ref\_}'' types are opaque references, encoded as the
XML-RPC's {\tt String} type. Users of the API should not make assumptions
about the concrete form of these strings and should not expect them to
remain valid after the client's session with the server has terminated.
\item fields named ``{\tt uuid}'' of type ``{\tt String}'' are mapped to
the XML-RPC {\tt String} type. The string itself is the OSF
DCE UUID presentation format (as output by {\tt uuidgen}, etc).
\item ints are all assumed to be 64-bit in our API and are encoded as a
string of decimal digits (rather than using XML-RPC's built-in 32-bit {\tt
i4} type).
\item values of enum types are encoded as strings. For example, a value of
{\tt destroy} of type {\tt on\_normal\_exit}, would be conveyed as:
\begin{verbatim}