<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'[
<!ENTITY RFC2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2578 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2578.xml">
<!ENTITY RFC3410 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3410.xml">
<!ENTITY RFC3414 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3414.xml">
<!ENTITY RFC3416 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3416.xml">
<!ENTITY RFC3418 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3418.xml">
<!ENTITY RFC4944 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4944.xml">
<!ENTITY RFC6020 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6020.xml">
<!ENTITY RFC6241 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml">
<!ENTITY RFC6347 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6347.xml">
<!ENTITY RFC6643 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6643.xml">
<!ENTITY RFC6650 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6650.xml">
<!ENTITY RFC6775 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6775.xml">
<!ENTITY RFC6690 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6690.xml">
<!ENTITY I-D.ietf-core-coap SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-core-coap.xml">
<!ENTITY I-D.ietf-core-groupcomm SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-core-groupcomm.xml">
<!ENTITY I-D.ietf-core-interfaces SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-core-interfaces.xml">
<!ENTITY I-D.ersue-constrained-mgmt SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ersue-constrained-mgmt.xml">


]>


<?rfc toc="yes"?>
<?rfc symrefs="yes" ?>

<rfc category="info" ipr="trust200902" docName="draft-vanderstok-core-comi-00">
  <front>
    <title abbrev="CoMI">CoAp Management Interfaces</title>
    <author initials="P." surname="van der Stok" fullname="Peter van der Stok">
      <organization abbrev="consultant">consultant</organization>
      <address>
        <phone>+31-492474673 (Netherlands), +33-966015248 (France)</phone>
        <email>consultancy@vanderstok.org</email>
        <uri>www.vanderstok.org</uri>
      </address>
    </author>
    <date day="25" month="June" year="2013"/>
    <area>Applications</area>
    <workgroup>coman</workgroup>
    <abstract>
      <t>
         The draft describes an interface based on CoAP to manage constrained devices. 
	    Access to existing MIBs is included.
	   The proposed integration of CoAP with SNMP reduces the code size by removing an important part of the SNMP code.
	   The draft lists a set of CoMI objects that describe the operational settings of the applications on the device.
	   A majority of them is taken over from other drafts to provide one uniform CoMI based access.
      </t>
    </abstract>
    <note title="Note">
      <t>
        Discussion and suggestions for improvement are requested, 
        and should be sent to core@ietf.org.
      </t>
    </note>
  </front>
  <middle>
    <section title="Requirements notation">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
        "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
        and "OPTIONAL" in this document are to be interpreted as
        described in <xref target="RFC2119"/>.
      </t>
    </section>
    <section anchor="introduction" title="Introduction">
       <t>
          The Constrained RESTful Environments (CoRE) working group aims at Machine to Machine (M2M) applications such as smart energy and building control.
	</t>
	<t>
Small M2M devices need to be managed in an automatic fashion to handle the large quantities of devices that are expected to be installed in future installations.
 The management protocol of choice for Internet is SNMP <xref target="RFC3410"/> as is testified by the large number of Management Information Base (MIB) <xref target="RFC3418"/>  specifications
 currently published <xref target="STD0001"/>. More recently, he NETCONF protocol <xref target="RFC6241"/> was developed with an 
extended set of messages using XML <xref target="XML"/> as data format.
 The data syntax is specified with YANG <xref target="RFC6020"/> and a mapping from Yang to XML is specified.  In <xref target="RFC6643"/>  SMIv2 syntax is expressed in Yang. 
Contrary to SNMP and also CoAP, NETCONF assumes persistent connections for example provided by SSH. 
The NETCONF protocol provides operations to retrieve, configure, copy, and delete configuration data-stores. 
Configuring data-stores distinguishes NETCONF from SNMP which operates on standardized MIBs.
</t>
<t>
The CoRE Management Interface (CoMI) is intended to work on standardized data-sets in a stateless client-server fashion and is thus closer to SNMP than to NETCONF. Standardized data sets are necessary when small devices from different manufacturers are managed
 by applications originating from another set of manufacturers. 
Stateless communication is encouraged to keep communications simple and the amount of state information small in line with the design objectives
 of 6lowpan <xref target="RFC4944"/> <xref target="RFC6775"/>  , RPL <xref target="RFC6650"/> , and CoAP <xref target="I-D.ietf-core-coap"/>. 
</t>
<t>
Currently, managed devices need to support two protocols: CoAP and SNMP each with its own security solution. 
When the MIB can be accessed with the CoAP protocol, the SNMP protocol with its security provisioning can be replaced with the CoAP protocol <xref target="I-D.ietf-core-coap"/> and DTLS <xref target="RFC6347"/>.
 This arrangement significantly reduces memory requirements, simplifies the stack in the constrained device, and harmonizes applications development.
 A CoAP device that needs management can include a set of existing MIBs and use CoMI to manipulate them.
</t>
<t>
The objective of CoMI is to provide a CoAP based Function Set that reads and sets parameter values in devices, and acquires operational values that change with time.
 It extends SNMP by providing an XML interface <xref target="XML"/> that allows more complex structures than the flat tables of SNMP.
</t><t>
 CoMI is intended for small devices. The XML overhead can be prohibitive. 
It is therefore recommended to transport EXI <xref target="EXI"/> in the payload.
In <xref target="EXI-measurement"/> it is shown that EXI can be an order of magnitude smaller than the equivalent XML representation.
Actually, the EXI structure adds the overhead per data unit of an EXI event (indicates the type of the following XML element)
 with a size that depends on the number of EXI event types present in the schema and its frequency of occurrence.
In <xref target="JSON-XML"/> it is shown that memory and CPU usage for sending JSON encoded or XML encoded objects led on average to a 50% lower resource usage for JSON.
Consequently, from a resource utilization point of view EXI seems the right choice.
</t>
<t>
The end goal of CoMI is to provide information exchange over the CoAP transport protocol in a uniform manner to
 approach the full management functionality as specified in <xref target="I-D.ersue-constrained-mgmt"/>.
This memo collects existing management functions from several sources to uniformize their access. 
       </t>
    </section>

<section anchor="terminology" title="Terminology">
<t>
Core Management Interface (CoMI) specifies the profile of Function Sets which access CoMI objects with the pupose of managing the operation
 of constrained devices in a network.

</t>
</section>


    <section anchor="coap-interface" title="CoAP Interface">
        <t>
          In CoRE a group of links can constitute a Function Set. The format of the links is specified in <xref target="RFC6690"/>.
  This note specifies a Management Function Set. CoMI end-points that implement the CoMI management protocol support
 at least one discoverable management resource of resource type (rt) core.mg with path /mg, where mg is short-hand for management. 
The mg resource has two sub-resources each accessible with a different path:
<list style="symbols">
<t>MIB with path /mg/mib and a binary content format </t>
<t>CoMI with path /mg/comi and an XML, EXI content format. </t>
</list>
The MIB resource is provided to enable a smooth transition from SNMP to CoMI. The binary content is composed of BER encoded SNMP PDUs. 
The CoMI resource provides access to the CoMI objects. CoMI objects include MIBs and the objects described in <xref target="comi-objects"/>. 
XML schemas describe the structure of the CoMI objects. It is expected that given the verbosity of XML, CoMI messages will mostly use EXI. 
The service provided by the CoMI server is to transfer from/to the constrained devices: (1) BER encoded SNMP PDUs from/to MIBs, and (2) EXI encoded data
 from/to CoMI objects including MIB objects.
The profile of the management function set, with IF=core.comi, is shown in the table below</t>

	<texttable>
	<ttcol align="left">name</ttcol>   
	<ttcol align="left">path</ttcol>
 	<ttcol align="left">RT</ttcol>    
	<ttcol align="left">Data Type</ttcol>

	<c> Management     </c>   <c> /mg </c> <c> core.mg </c> <c> n/a </c>
	<c> MIB binary    </c>   <c> /mg/mib </c> <c> core.mg.mib </c> <c> application/octet </c>
	<c> CoMI objects     </c>   <c> /mg/comi </c> <c> core.mg.comi </c> <c> application/exi </c>
	<c> CoMI MIB     </c>   <c> /mg/comi/mib </c> <c> core.mg.comi.mib </c> <c> application/exi </c>
	</texttable>

<t>It is intended that CoMI schemas will be developed independently for different management subjects or contexts.
That means that the value of the EXI event has a different meaning dependent on the accompanying schema file.
The set of schemas that will be used is annouced to the device, such that it can prepare the parsing tables in advance.
</t>

      </section>

      <section anchor="mibFS" title="MIB binary Function Set">
	<t>
The MIB binary Function Set provides a CoAP interface to transport BER encoded SNMP PDUs. <xref target="snmp-architecture"/> and <xref target="comi-binding"/> explain
the structure of SNMP PDUs and their transport with CoMI.

	</t>
	<section anchor="snmp-architecture" title="SNMP architecture">
	<t>
The architecture of the Internet Standard management framework consists of: 
<list style="symbols">
<t>A data definition language that is referred to as Structure of Management Information (SMI)<xref target="RFC2578"/>. </t>
<t>The Management Information Base (MIB) which contains the information to be managed and is defined for each specific function to be managed <xref target="RFC3418"/>. </t>
<t>A protocol definition referred to as Simple Network Management Protocol (SNMP) <xref target="RFC3416"/>. </t>
<t>Security and administration that provides SNMP message based security on the basis of the user-based security model <xref target="RFC3414"/>. </t>
</list>

Separation in modules was motivated by the wish to respond to the evolution of Internet. The protocol part (SNMP) and data definition part (MIB) are independent of each other.
 The separation has enabled the progressive passage from SNMPv1 via SNMPv2 to SNMPv3. This draft leverages this separation to replace the SNMP protocol with a CoAP based protocol.
</t>
<t>
The SNMP protocol supports seven types of access supported by as many Protocol Data Unit (PDU) types:
<list style="symbols">

<t>Get Request, transmits a list of OBJECT-IDENTIFIERs to be paired with values. </t>
<t>GetNext Request, transmits a list of OBJECT-IDENTIFIERs to which lexicographic successors are returned for table traversal. </t>
<t>GetBulk Request, transmits a list of OBJECT-IDENTFIERs and the maximum number of expected paired values. </t>
<t>Response, returns an error or the (OBJECT-IDENTIFIER, value) pairs for the OBJECT-IDENTIFIERs specified in Get, GetNext, GetBulk, Set, or Inform Requests. </t>
<t>Set Request, transmits a list of (OBJECT-IDENTIFIERs, value) pairs to be set in the specified MIB object. </t>
<t>Trap, sends an unconfirmed message with a list of (OBJECT-IDENTIFIERs, value) pairs to a notification requesting end-point. </t>
<t>Inform Request, sends a confirmed message with a list of (OBJECT-IDENTIFIERs, value) pairs to a notification requesting end-point. </t>
</list>

The binding of the notification to a destination (left open in SNMP protocol) is discussed in <xref target="comi-objects"/>.

	</t>
	</section>

	<section anchor="comi-binding" title="CoMI binding">
	<t>
The payload is structured as specified by the ASN-1 notation presented in <xref target="RFC3416"/>. 
The request PDUs: Get, GetNext, GetBulk, Set, and Inform are sent with a Confirmable CoAP message.
 The Response is piggy backed in the returned Acknowledgement message.  
The Trap is sent as a NON-confirmable CoAP message. The URI of the destination CoMI end-point contains the destination identifier and the path /mg/bin. 
The request PDUs: Get, GetNext, GetBulk are sent with CoAP message type GET, all other request PDUs are sent with CoAP message type PUT. 
Strictly speaking the request-id in the SNMP PDU has the same function as the CoAP token. Preferably, the value of request-id should be identical to the CoAP token.
An example request looks like:
</t>

  <figure>
    <artwork align="left"><![CDATA[

REQ: GET example.com/mg/mib/ (Content-Format: application/octet-stream)
<BER encoded SNMP PDU>

RES: 2.05 Content (Content-Format: application/octet-stream)
<BER encoded SNMP PDU>
]]></artwork>
    </figure>  

<t>
The BER encoding implies that OBJECT-IDENTIFIER is encoded as a sequence of numbers which defines the place 
of the object in the ISO object tree <xref target="RFC2578"/>.
</t>

	</section>

	</section>

	<section anchor="comiFS" title="CoMI Objects Function Set">
	<t>
Two XML, EXI based interfaces are supported by CoMI: (1) Reading/Writing CoMI objects with path /mg/comi/object, 
(2) Reading/Writing MIB variables with path /mg/comi/mib/variable.
	</t>

	<section anchor="comi-object-bind" title="CoMI object binding">
	<t>
The information, represented by the CoMI objects, is composed of the values of configuration parameters in a device. 
A CoMI object has a name that identifies it uniquely within the device. The type of a CoMI object MUST be described with an XML schema. 
CoMI object names and schemas are standardized by the IETF or by other relevant Standards Developing Organizations (SDO). 
The CoMI object name is expressed in the path. The attributes of the CoMI object that need to be set or read are either expressed in the 
EXI payload of the message or in the path of the destination URI. By expressing the attribute in the path the data transfer is limited to one resource. 
An EXI message can express a selection of attributes that need to be set or read. For example, consider the object with name "Alarms" of type "alarmCount":
</t>

 <figure>
    <artwork align="left"><![CDATA[

<xs:complexType name="alarmCount">
  <xs:sequence>
    <xs:element name="Priority1" type="xs:integer" 
					minOccurs="0" maxOccurs="1"/>
   <xs:element name="Priority2" type="xs:integer" 
					minOccurs="0" maxOccurs="1"/>
  </xs:sequence>
<xs:complexType>
]]></artwork>
    </figure>  

<t>
In the coming examples the format of the EXI contents follows the syntax proposed in <xref target="EXI-primer"/>.
Retrieving the contents of attribute Priority1 by expressing the attribute in the path is possible with:
</t>

  <figure>
    <artwork align="left"><![CDATA[

REQ: GET example.com/mg/comi/Alarms/Priority1 
		(Content-Format: application/exi)

RES: 2.05 Content (Content-Format: application/exi) 
SE(alarmCount)SE(Priority1) value EE EE
]]></artwork>
    </figure>  

<t>
Retrieving the contents of Priority1 and Priority2 attributes by referring to the object as a whole in the URI is shown in the following example:
</t>

  <figure>
    <artwork align="left"><![CDATA[

REQ: GET example.com/mg/comi/Alarms

RES: 2.05 Content (Content-Format: application/exi) 
SE(alarmCount) SE(priority1) value EE SE(priority2) value EE EE
]]></artwork>
    </figure>  

<t> It is possible that the size of the specified object is too large to fit in a single message.
CoMI gives the possibility to send the contents of the objects in several fragments with a maximum size.
The "sz" link-format attribute <xref target="RFC6690"/> specifies the maximum size in bytes.
The returned data MUST terminate with an EE EXI event. The sequel can be asked by sending the same request but with an offset that
is equal to the already received number of EE EXI events. The offset is specified with the (new to define) "of" link-format attribute.
</t>
	</section>

	<section anchor="comi-mibFS" title="CoMI MIB Function Set">
	<t>
The Function Set allows the access to one MIB variable per CoAP message. The schema is shown in <xref target="comi-mib-schema"/>. 
The identifier is based on the human readable name
and not on the sequence of numbers that identifies the object in the ISO object hierachy.
</t><t>
TODO: Distinguish CoMI objects of same type and thus with identical names.
</t><t>
A request to read the value of a MIB variable is sent with a confirmable CoAP GET message. 
A request to set a value is sent with a confirmable CoAP PUT message.
The Response is piggybacked to the CoAP ACK message corresponding with the Request. 

An example request looks like:
</t>

 <figure>
    <artwork align="left"><![CDATA[

REQ: GET example.com/mg/comi/mib/variable

RES: 2.05 Content (Content-Format: application/exi)
SE(MIB)SE(name) variable EE SE(value) value EE EE
]]></artwork>
    </figure>  

<t>
A MIB variable may be composed of rows with each row composed of typed values.
Limits to the bulk transport are expressed with the "sz" link-format attribute <xref target="RFC6690"/> and the "of"
link-format attribute. 
</t><t>
When a variable with the specified name cannot be processed by the SNMP server, CoAP Error code 5.01 is returned with the SNMP error code transported in the payload. 
Two types of error code can be returned: exception or error-status as specified in <xref target="comi-mib-schema"/>, according to the rules of <xref target="RFC3416"/>. 
For example when MIB "variable" does not exist:
</t>

 <figure>
    <artwork align="left"><![CDATA[

REQ: GET example.com/mg/comi/mib/variable

RES: 5.01 Not Implemented (Content-Format: application/exi)
SE(exception)noSuchObject EE
]]></artwork>
    </figure> 
<t> 
The TRAP is sent with a non confirmable CoAP PUT message to a destination specified in <xref target="comi-objects"/>.
</t>
	</section>

	</section>

	<section anchor="comi-objects" title="CoMI objects">
	<t>
Setting up parameter values and establishing relations between devices during commissioning of a managed network is an important aspect of the deployment of CoMI objects. 
Draft <xref target="I-D.ietf-core-interfaces"/> describes the binding of end-points to end-points on remote devices, 
and draft <xref target="I-D.ietf-core-groupcomm"/> describes the enabling of multicast messages. 
A homogeneous approach to the associated resources is the subject of this section. A list of objects describing different aspects of commissioning comprise:
<list style="symbols">
<t> Binding table as described in <xref target="I-D.ietf-core-interfaces"/>, schema presented in <xref target="binding"/>. </t>
<t> Multicast address enabling as described in <xref target="I-D.ietf-core-groupcomm"/>, schema presented in <xref target="MCentry"/>. </t>
<t> SNMP notification destinations as referred to in <xref target="RFC3416"/>, schema presented in <xref target="binding"/>. </t>
<t> Names of files containing the schemas to be expected, schema presented in <xref target="dtd"/>. </t>
</list>
 
The object with type "binding table" contains a sequence of bindings. The contents of bindings contains the methods, location, the interval specifications, and 
the step value as suggested in <xref target="I-D.ietf-core-interfaces"/>. 
The method "notify" has been added to the binding methods "poll", "obs" and "push", to cater for the binding of 
SNMP notifications to a target.
</t><t>
The object of type "MCgroups" contains a sequence of MC addresses to be enabled on the interface, specified by MCentry.
In these schemas both the host name (group name) and the corresponding IP address are stored. 
The IP address has been added for those networks where no access to DNS is possible and only the IP address is available. 
Once the DNS is available and the IP address is brittle, it is recommended to use the host name and not rely on the value of the IP address.
</t><t>
The object of type "Schema-files" contains a sequence of schema files describing the data structure tranportable in CoMI messages.
	</t>
	</section>

<section title="security Considerations">
<t>
TODO: follows CoAP security provisioning.
</t>
</section>

<section	title="IANA Considerations">
<t>
TODO
</t>
</section>

<section title="Acknowledgements">
<t>
Mehmet Ersue and Bert Wijnen explained the encoding aspects of PDUs transported under SNMP.
The draft has benefited from comments by Dee Denteneer, Esko Dijk, and Michael van Hartskamp.
</t>
</section>
        	
        
  </middle>
  <back>
    <references title="Normative References">
        &RFC2119;     
    </references>
    <references title="Informative References">
       &RFC2578;
       &RFC3410;
       &RFC3414;
       &RFC3416;
       &RFC3418;
       &RFC4944;
       &RFC6020;
       &RFC6241;
	 &RFC6347;
       &RFC6643;
	 &RFC6650;
       &RFC6690;
	 &RFC6775;
       &I-D.ietf-core-coap;
       &I-D.ietf-core-groupcomm;
       &I-D.ietf-core-interfaces;
	 &I-D.ersue-constrained-mgmt;
       <reference anchor="STD0001">
        <front>
          <title>Official Internet Protocols Standard</title>
		<author />
	      <date />
          </front>
          <seriesInfo name="Web" value="http://www.rfc-editor.org/rfcxx00.html"/>
        </reference>
	<reference anchor="EXI">
        <front>
          <title>Efficient XML Interchange</title>
		<author fullname="w3c exi working group"/>
	      <date />
          </front>
          <seriesInfo name="Web" value="http://www.w3.org/xml/exi"/>
        </reference>
	<reference anchor="XML">
        <front>
          <title>Extensible Markup Language (XML)</title>
	      <author />
	      <date />
          </front>
          <seriesInfo name="Web" value="http://www.w3.org/xml"/>
        </reference>
	<reference anchor="EXI-primer">
        <front>
          <title>EXI primer</title>        
	    <author initials="D." surname="Peintner" fullname="Daniel Peitner" />
	     <author initials="S." surname="Pericas-Geertsen" fullname="Santiago Pericas-Geertsen"/>
	     <date year="2009" month="december"/>
          </front>
          <seriesInfo name="Web" value="http://www.w3.org/TR/exi-primer"/>
        </reference>
	<reference anchor="EXI-measurement">
        <front>
          <title>Efficient XML Interchange Measurements Note</title>   
	     <author initials="G." surname="White" fullname="Greg White" />
	     <author initials="J." surname="KangaSharju" fullname="Jaakko Kangasharju"/>
           <author initials="S." surname="Williams" fullname="Stephen Williams" />
           <author initials="D." surname="Brutzman" fullname="Don Brutzman" />
	     <date year="2007" month="July"/>
          </front>
          <seriesInfo name="Web" value="http://www.w3.org/TR/2007/WD-exi-measurements-20070725"/>
        </reference>
	 <reference anchor="JSON-XML">
        <front>
          <title>Comparison of JSON and XML Data Interchange Formats: A Case Study</title>   
	     <author initials="N." surname="Nurseitov" fullname="Nurzhan Nurseitov"/>
	     <author initials="M." surname="Paulson" fullname="Michael Paulson"/>
	     <author initials="R." surname="Reynolds" fullname="Randall Reynolds"/>
	     <author initials="C." surname="Inzurieta" fullname="Clemente Izurieta"/>
	     <date year="2009"/>
          </front>
          <seriesInfo name="Web" value="http://www.cs.montana.edu/izurieta/pubs/caine2009.pdf"/>
        </reference>


    </references>


<section anchor="comi-mib-schema" title="XML Schema for CoMI MIB">
<t>
This appendix describes the XML schema that defines the payload contents for MIB requests via the CoMI Function Set.
It is assumed that MIB variables are referred by name and not by the oid.
</t><t>
TODO: The schema needs to be updated to define basic types and notifications. Access may be more sophisticated than described here.
Creation and deletion of columns and rows is not catered for.
The access modes are not visible.
</t>

 <figure>
    <artwork align="left"><![CDATA[

<xs:simpleType name="exception">
   <xs:restriction base="xs:string">
     <xs:enumeration value="noSuchObject"/>
     <xs:enumeration value="noSuchInstance"/>
     <xs:enumeration value="endOfMibView"/>
   </xs:restriction>
</xs:simpleType>

<xs:simpleType name="error-status">
   <xs:restriction base="xs:string">
     <xs:enumeration value="noError"/>
     <xs:enumeration  value="tooBig"/>
     <xs:enumeration  value="noSuchName"/>
     <xs:enumeration  value="badValue"/>
     <xs:enumeration  value="readOnly"/>
     <xs:enumeration  value="genErr"/>
     <xs:enumeration  value="noAccess"/>
     <xs:enumeration  value="wrongType"/>
     <xs:enumeration  value="wrongLength"/>
     <xs:enumeration  value="wrongEncoding"/>
     <xs:enumeration  value="wrongValue"/>
     <xs:enumeration  value="noCreation"/>
     <xs:enumeration  value="inconsistentValue"/>
     <xs:enumeration  value="resourceUnavailable"/>
     <xs:enumeration  value="commitFailed"/>
     <xs:enumeration  value="undoFailed"/>
     <xs:enumeration  value="authorizationError"/>
     <xs:enumeration  value="notWritable"/>
     <xs:enumeration  value="inconsistentName"/>
   </xs:restriction>
</xs:simpleType>


<xs:complexType name ="MIBscalar">
<xs:sequence>
   <xs:element name="identifier" type="xs:string"/>
  <choice>
        <xs:element name="value" type="xs:integer"/>
        <xs:element name="value" type="xs:string"/>
  </choice>
</xs:sequence>
</xs:complexType>

<xs:complexType name="entryType">
<xs:sequence>
     <xs:element name="Type" type="MIBscalar" 
				minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>


<xs:complexType name="MIBTable">
<xs:sequence>
     <xs:element name="Entry" type="entryType" 
				minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>



]]></artwork>
    </figure>  

</section>

<section anchor="comi-schema" title="XML Schema for CoMI objects">
<t>
This appendix describes the XML schema that defines the payload contents for requests via the CoMI Function Set to the CoMI objects
 for multicast group, binding table, and SNMP notifications. 
For the SNMP notifications the Binding Method table specification of <xref target="I-D.ietf-core-interfaces"/>  has been extended with "notify".
</t>

<section anchor="MCentry" title="Schema for MC groups">
<t> 
MCentries are stored in MCGroups
</t>

 <figure>
    <artwork align="left"><![CDATA[

<xs:complexType name="MCentry">
    <xs:element name="groupName" type="xs:string"/>
    <xs:element name="IPaddress" type="xs:string"/>
</xs:complexType>

<xs:complexType name="MCgroups">
<xs:sequence>
      <xs:element name="MCentry" type="MCentry" 
				minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

]]></artwork>
    </figure>  


</section>

<section anchor="binding" title="Schema for CoAP binding">
<t>
Binding table contains several simple Bindings, composed of timing parameters and Function signature.
</t>

 <figure>
    <artwork align="left"><![CDATA[

<xs:complexType name="CoAPmethod">
    <xs:restriction base="xs:string">
       <xs:enumeration value="GET"/>
       <xs:enumeration value="PUT"/>
       <xs:enumeration value="POST"/>
    </xs:restriction>
</xs:complexType>

<xs:complexType name="bindingMethod">
    <xs:restriction base="xs:string">
	<xs:enumeration value="poll"/>
	<xs:enumeration value="obs"/>
	<xs:enumeration value="push"/>
	<xs:enumeration value="notify"/>
    </xs:restriction>
</xs:complexType>


<xs:complexType name="invocation">
	<xs:element name="hostname" type="xs:string"/>
	<xs:element name="pathname" type="xs:string"/>
	<xs:element name="IPaddress" type="xs:string"/>
	<xs:element name="bindingMethod" type="bindingMethod"/>
	<xs:element name="CoAPmethod" type="CoAPmethod"/>
</xs:complexType>

<xs:complexType name="simpleBinding">
     <xs:element name="method" type="invocation"/>
     <xs:element name="minPeriod" type="xs:integer"/>
     <xs:element name="maxPeriod" type="xs:integer"/>
     <xs:element name="changeStep" type="xs:integer"/>
</xs:complexType>

<xs:complexType name="binding Table">
	<xs:sequence>
	    <xs:element name="simpleBinding" type="simpleBinding" 
					minOccurs="0" maxOccurs="unbounded"/>
	</xs:sequence>
</xs:complexType>

]]></artwork>
    </figure>  

</section>

<section anchor="dtd" title="Valid Schemas">
<t> 
File names are stored in Schema
</t>

 <figure>
    <artwork align="left"><![CDATA[

<xs:complexType name="Schema-files">
<xs:sequence>
      <xs:element name="Schema" type="xs:string" 
				minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

]]></artwork>
    </figure>  


</section>


</section>


  </back>

</rfc>
