The X-Bone API
Yi-Hua Edward Yang, Joe Touch, Gregory G. Finn
USC/ISI
4676 Admiralty Way
Marina del Rey, CA 90292-6695
{yeyang, touch, finn } @isi.edu
Dec. 9, 2005
ABSTRACT[1]
This paper describes the Application Programming Interface (X-Bone API) version 2.0 of the current X-Bone Version 3.2 release. It covers both syntax and semantics of the API. X-Bone is a Virtual Internet system that dynamically deploys and manages Internet overlays. The X-Bone API, written in XML (Extensible Markup Language), is the method by which the X-Bone system receives commands and returns responses from/to users to determine these overlays and their properties.
Keywords
Virtual network, Virtual Internet, overlay network, application programming interface (API), extensible markup language (XML).
An X-Bone Virtual Internet system [5][6] is a collection of Resource Daemons (RD) managed by
one or more Overlay Managers (OM). The X-Bone API enables users to communicate
with an
An overlay network in the X-Bone VI system consists of a connected graph of virtual nodes interconnected by a number of point-to-point virtual links. A virtual node here is an abstraction; it may denote a simple node of a single RD, or a meta node of a lower-layer, recursed overlay network. A virtual link connects pairs of virtual nodes with unique endpoint addresses within the overlay network. Each virtual link incorporates two layers of tunneling to emulate both link and network layers for complete virtualization.
The role of the X-Bone API in the management of an X-Bone VI
system can be illustrated in Figure
1. The user initiates the command-execute-reply process
by issuing commands as API messages to the


Figure 1 Structure of an X-Bone Virtual Internet.
This section describes the fundamental properties of the X-Bone API XML-based syntax. Before proceeding to the complete language description in Section 3, this section lists the reserved tokens and conventions of other user tokens in the language.
The element and attribute names are the reserved tokens used by the API. Use of these tokens, except as indicated by the language, must be avoided.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table 1 Reserved Tokens
In Table 1, tokens with a star (*) have a corresponding token with ˇ§_replyˇ¨ appended, e.g., ˇ§create_overlay_replyˇ¨. These entries are omitted for clarity and brevity.
Further, some of reserved tokens are part of the conventional XML DTDs, and are not specific to the X-Bone, but are listed there as well; shown in bold.
User-supplied strings in the API follow the CDATA syntax restriction of XML. Strings are delimited by double quotes, ˇ§ˇKˇ¨. Some special characters (&, <, >, ', ") inside a CDATA string must be quoted in their escaped form, as shown in Table 2.
Where the semantic nature of a string is more restrictive, as in E-mail or DNS names, those particular restrictions are applied as well. All strings and tokens are verified for such restrictions.
|
Character |
Escaped Quotation |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table 2 Escape characters
For convenience and simplicity, in this document the property
elements are referred to by their tag attributes. For example, the property
element with tag
attribute ˇ§user_nameˇ¨ is referred to as the ˇ§user_name property.ˇ¨
Every message in the API is either a command message (sent
from user to OM) or a reply message (sent from
For this reason and for simplicity, in this document an API
message is named by the type of command-reply element it possesses. For
example, an API message containing the list_overlays_reply element is called
a ˇ§list_overlays_reply message.ˇ¨ Also, an API message containing a
command-carrying element is called a ˇ§command message,ˇ¨ while a message
containing a reply-carrying element is called a ˇ§reply message.ˇ¨
Many elements have an ident attribute that uniquely identifies
them without their containing parents. Specifically, the following XOL elements
have this kind of ident
attribute:
ˇP Node_def
ˇP Iface
ˇP Vnode
ˇP Link
For simplicity, these elements are named by their respective
ident
attribute values. For example, the vnode element with ˇ§router_0ˇ¨ as its ident attribute
value is called the ˇ§router_0ˇ¨ vnode element.
The X-Bone API syntax consists of grammar rules governing
message exchanges across a well-known, privileged TCP port (265) used by X-Bone
OMs, where the stream is protected by SSL [3]. All messages in the API adapt a unified XML
structure, starting with the sequence of XML Declaration, a Document Type
Declaration (DTD), and one xbone element, in that order. The current X-Bone (release
3.2) implements X-Bone API version 2.0 (api-2.0.dtd) [1].
The XML elements in X-Bone API can be divided conceptually into four element categories: common-purpose elements, command-reply elements, overlay-description elements, and XOL elements. This section steps through the syntax of the first 3 element categories. Syntax of the XOL elements is described in Section 5.1.
Below is the DTD of X-Bone API version 2.0 [1].
<?xml
version="2.0" ?>
<!ELEMENT xbone (credential?, command)><!ATTLIST xbone version CDATA #REQUIRED release CDATA #REQUIRED>
<!ELEMENT credential (property+)>
<!ELEMENT command (create_overlay_reply | create_overlay | list_overlays_reply | list_overlays | overlay_status_reply | overlay_status | discover_daemons_reply | discover_daemons | destroy_overlay_reply | destroy_overlay | destroyall_overlays_reply | destroyall_overlays | error_reply)>
<!ELEMENT create_overlay (property+, xol_program)><!ELEMENT create_overlay_reply (property+, node*)>
<!ELEMENT list_overlays EMPTY><!ELEMENT list_overlays_reply (property?, argstring*)>
<!ELEMENT overlay_status (property+)><!ELEMENT overlay_status_reply (property+, node*)>
<!ELEMENT discover_daemons_reply (property+, node*)><!ELEMENT discover_daemons (property+)>
<!ELEMENT destroy_overlay (property+)><!ELEMENT destroy_overlay_reply (property+)>
<!ELEMENT destroyall_overlays EMPTY><!ELEMENT destroyall_overlays_reply (property+)>
<!ELEMENT error_reply (property+)>
<!ELEMENT argstring EMPTY><!ATTLIST argstring value CDATA #REQUIRED>
<!ELEMENT node (property+, tunnel*)>
<!ELEMENT tunnel (property+)>
<!ELEMENT xol_program (define_prop*,node_def+,vnode)><!ATTLIST xol_program version CDATA #REQUIRED>
<!ELEMENT define_prop (property)><!ATTLIST define_prop synonym CDATA #REQUIRED>
<!ELEMENT node_def (iface+, vnode*, link*, property*, application*)><!ATTLIST node_def ident CDATA #REQUIRED>
<!ELEMENT iface (renames|property*)><!ATTLIST iface ident CDATA #REQUIRED>
<!ELEMENT renames (endpoint, property*)>
<!ELEMENT vnode (property*)> <!ATTLIST vnode ident CDATA #REQUIRED type CDATA #REQUIRED>
<!ELEMENT link (endpoint, endpoint, property*)><!ATTLIST link ident CDATA #REQUIRED>
<!ELEMENT property EMPTY><!ATTLIST property tag CDATA #REQUIRED value CDATA #IMPLIED>
<!ELEMENT endpoint EMPTY> <!ATTLIST endpoint node CDATA #REQUIRED iface CDATA #REQUIRED>
<!ELEMENT application EMPTY><!ATTLIST application program CDATA #REQUIRED script CDATA #REQUIRED checksum CDATA #IMPLIED suid CDATA #IMPLIED nodes CDATA #IMPLIED ifaces CDATA #IMPLIED>
The common-purpose elements (Table 3) are used to form the basic structure of any message in the API.
|
Element name |
Attributes |
Sub-elements |
|
|
version, release |
credential?, command |
|
credential |
(none) |
property+ |
|
command |
(none) |
(One of the elements in Table 4.) |
|
property |
tag, value |
EMPTY |
Table 3 Common-purpose elements
The root of the API is the xbone element, which is
described by the version
and release
attributes. The xbone
element contains an optional credential element and a single command
element. The credential
element contains at least one property. The command element contains one of the 13
command-reply elements (see the
sub-section below).
The property element is used pervasively in almost all other
elements in the API to associate a tag with a value, with both tag and value as
its attributes. The tag
and value
attribute pair can be either a command parameter or a return value; it usually
describes a semantic aspect of the propertyˇ¦s parent element.
There are 13 different command-reply elements, each of
which may be the sole child of the enclosing command element (see the sub-section above). There
are six command-carrying elements and six corresponding reply-carrying elements
plus one error_reply element, shown in Table
4.