Document Type Definition (DTD)

Home/Documents/Development/High-Level Design/Document Type Definition (DTD)
 Project Closed
 Site Index
 User Docs
 Introduction to ANet
 High-Level Design
 Run-Time Wrapper
 Client Connection Modules
 Data Transformation Modules
 Client SDK
 Cluster Group Modules
 Cluster Filter Modules
 Core Modules
 Handshaking Protocol Modules
 Packet Protocol Modules
 Connection Protocol Modules
 Bandwidth Manager Module
 Document Type Definition (DTD)
 Low-Level Design
 Protocol Specifications
 Task List
 Development Roadmap
 Other Docs
 Mailing Lists
 Contacting Us


by Benad

This is the Document Type Definition for the ANet configuration files. It is for XML version 1.0.
Note that while this DTD file might change in future versions of ANet, the deamon should never check if the XML configuration file is correct.

A sample XML configuration file can be seen here.

The plain-text DTD file is here.

The XML specifications are here (external link).

<!-- ******** Generic Entities ******** -->
<!ENTITY ANet.XMLVersion % 1.0a1>

<!-- ******* Attribute Entities ******* -->

<!-- Unique name for the element type. -->
<!ENTITY name % "name ID #REQUIRED">

<!-- Module name corresponding to that element.
A Module Instance will be created for each element with a module name. -->
<!ENTITY moduleName % "module CDATA #REQUIRED">

<!-- Arguments given to the module. They are POSIX-style arguments.
One-letter arguments: "-c -v" or "-cv".
String arguments: "-_-file="a.txt" (mentally delete underscore;
XML doesn't allow me to write that directly in XML comments).
You can mix both style of arguments. -->
<!ENTITY args % "args CDATA #IMPLIED">

<!-- Element security. This limits access for the Client Connection
Modules. The security attribute of an element is the one it has, if it's
not "no_change", otherwise it is the one from its closest ancestor with a
value other than "no_change". -->
<!ENTITY security % "access (r | w | rw | no_access | no_change) no_change">

<!-- ************ Elements ************ -->

<!-- #FIXED attributes are values that can be changed only at run-time.
Their default are discarded when parsing and replaced with the generated
value. -->

<!-- Root element -->
<!ELEMENT ANet (ClientConnection)+, BandwidthManager, (ClusterGroup)+, CoreModules, (Cluster)+>
<!ATTLIST ANet %security;>

<!-- Cluster Group. Contains references to Clusters that compose
that Cluster Group. -->
<!ELEMENT ClusterGroup (ClusterRef)+>
<!ATTLIST ClusterGroup %name; %moduleName; %args; %security;>

<!-- Cluster. Contains a Handshake Protocol and if needed
a Cluster Filter. -->
<!ELEMENT Cluster HandshakingProtocol, (ClusterFilter)?>
<!ATTLIST Cluster %name; %security;
          id CDATA #FIXED>

<!-- Handshake Protocol. Contains a list of initial connections
(live connections once opened) -->
<!ELEMENT HandshakeProtocol (Connection)*>
<!ATTLIST HandshakeProtocol %moduleName; %args; %security;
          minConnections CDATA "0"
          maxConnections CDATA "-1">

<!-- Connection. Has a Connection Protocol and, if needed,
a Packet Protocol. -->
<!ELEMENT Connection (PacketProtocol)?, ConnectionProtocol (DataTransform)*>
<!ATTLIST Connection %security;
          status (open | on_hold | closed) #FIXED
          id CDATA #FIXED
          inBuffer CDATA #FIXED
          outBuffer CDATA #FIXED>

<!-- Core Modules. Simply contains a list of CoreModule elements. -->
<!ELEMENT CoreModules (CoreModule)+>
<!ATTLIST CoreModules %security;>

<!-- Those are empty elements. If you want those elements to contain an XML
structure, then define an attribute that contains a reference to an external
XML document. -->

<!-- Client Connection Module -->
<!ELEMENT ClientConnection EMPTY>
<!ATTLIST ClientConnection %moduleName; %args; %security;>

<!-- Bandwidth Manager Module -->
<!ELEMENT BandwidthManager EMPTY>
<!ATTLIST BandwidthManager %moduleName; %args; %security;>

<!-- Core Module -->
<!ATTLIST CoreModule %moduleName; %args; %security;>

<!-- Cluster Filter Module -->
<!ELEMENT ClusterFilter EMPTY>
<!ATTLIST ClusterFilter %moduleName; %args; %security;>

<!-- Reference to a Cluster element -->
<!ATTLIST ClusterRef
          name IDREF #REQUIRED>

<!-- Packet Protocol Module -->
<!ELEMENT PacketProtocol EMPTY>
<!ATTLIST PacketProtocol %moduleName; %args; %security;>

<!-- Connection Protocol Module -->
<!ELEMENT ConnectionProtocol EMPTY>
<!ATTLIST ConnectionProtocol %moduleName; %args; %security;
          id CDATA #FIXED
          peerID CDATA #REQUIRED
          subnet CDATA "Internet">

<!-- Data Transformation Module. Data Transformation Modules will be used
in ascending order of "order" for output (to the network), in descending
order for input (from the network). -->
<!ELEMENT DataTransform EMPTY>
<!ATTLIST DataTransform %moduleName; %args; %security; %security;
          order CDATA "-1">

Last update for this document: September 30, 2001, at 20:50:19 PST