<?xml version='1.0' encoding='UTF-8'?>

<!--
	This file contains the DTD that defines the XML elements and
	attributes which represent  iSNS Objects and iSNS Attributes
	per IETF RFC 4171 specfication. The XML doc based on this DTD 
	is stored in /etc/isns/isnsdata.xml which is used to persistently
	keep iSNS configuration.

	There are six iSNS Objects: Network Entity, Portal, iSCSI
	Storage Node, Portal Group(pg), Discovery Domain Set(dds) and
	Discovery Domain(dd). Each object will be defined as a XML Node.

	All of UID attribute and Key attributes of each iSNS Object
	will be defined as attributes of a XML Node. Other iSNS
	Attributes of each iSNS Object will be defined as child
	elements of the XML Node.  Note that the interger number
	in each XML attribute comment represent a iSNS spec defined
	attribute tag number. 
-->

<!--
	Root Node Of The Persistent Data Store
-->

<!ELEMENT isns_data (entity*, dd*, dds*)>
<!ATTLIST isns_data vendor   CDATA #REQUIRED
		    version  CDATA #REQUIRED>

    <!--
	Network Entity Object
    -->

<!ELEMENT entity (protocol, period?,
		  (pg*, (iscsi | portal)+)+)>
<!-- 7: Entity Index -->
<!-- 1: Entity Identifier (EID) -->
<!ATTLIST entity entity_uid CDATA #REQUIRED
		 eid        CDATA #REQUIRED>
<!-- 2: Entity Protocol -->
<!ELEMENT protocol (#PCDATA)>
<!-- 6: Registration Period -->
<!ELEMENT period (#PCDATA)>

    <!--
	Portal Object.
	ESI stands for Entity Status Inquiry.
	SCN stands for State Change Notification.
    -->

<!ELEMENT portal (esi?, scn?)>
<!-- 22: Portal Index -->
<!-- 16: Portal IP Address -->
<!-- 17: Portal TCP/UDP Port -->
<!ATTLIST portal portal_uid CDATA #REQUIRED
		 ip         CDATA #REQUIRED
		 port       CDATA #REQUIRED>
<!-- 20: ESI Port -->
<!ELEMENT esi (#PCDATA)>
<!-- 23: SCN Port -->
<!ELEMENT scn (#PCDATA)>

    <!--
	iSCSI Storage Node Object
    -->

<!ELEMENT iscsi (type, alias?, auth?)>
<!-- 36: iSCSI Node Index -->
<!-- 32: iSCSI Name -->
<!ATTLIST iscsi  iscsi_uid  CDATA #REQUIRED
		 iscsi_name CDATA #REQUIRED>
<!-- 33: iSCSI Node Type -->
<!ELEMENT type (#PCDATA)>
<!-- 34: iSCSI Alias -->
<!ELEMENT alias (#PCDATA)>
<!-- 42: iSCSI AuthMethod -->
<!ELEMENT auth (#PCDATA)>

    <!--
	Portal Group Object
    -->

<!ELEMENT pg (pgt)>
<!-- 52: PG Index -->
<!-- 48: PG iSCSI Name -->
<!-- 49: PG Portal IP Addr -->
<!-- 50: PG Portal TCP/UDP Port -->
<!ATTLIST pg     pg_uid     CDATA #REQUIRED
		 pg_iscsi   CDATA #REQUIRED
		 pg_ip      CDATA #REQUIRED
		 pg_port    CDATA #REQUIRED>
<!-- 51: PG Tag (PGT) -->
<!ELEMENT pgt (#PCDATA)>

    <!--
	Discovery Domain Set Object
    -->

<!ELEMENT dds (status, assoc_dd*)>
<!-- 2049: DD_Set ID -->
<!-- 2050: DD_Set Sym Name -->
<!ATTLIST dds    dds_uid    CDATA #REQUIRED
		 dds_name   CDATA #REQUIRED>
<!-- 2051: DD_Set Status -->
<!ELEMENT status (#PCDATA)>
<!--       DD_Set_Member DD Name -->
<!ELEMENT assoc_dd (#PCDATA)>

    <!--
	Discovery Domain Object
    -->

<!ELEMENT dd (assoc_iscsi)*>
<!-- 2065: DD_ID -->
<!-- 2066: DD_Symbolic Name -->
<!ATTLIST dd     dd_uid     CDATA #REQUIRED
		 dd_name    CDATA #REQUIRED>
<!-- 2068: DD_Member iSCSI Name -->
<!ELEMENT assoc_iscsi (#PCDATA)>
