<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd"[
<!ENTITY RFC6256 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6256.xml">
<!ENTITY RFC4838 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4838.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC5050 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5050.xml">
<!ENTITY RFC6257 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6257.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdep"4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="no" ?>
<?rfc subcompact="no" ?>

<rfc category="exp" ipr="trust200902" docName="draft-birrane-dtn-adm-bp-01" obsoletes="" updates="" submissionType="IETF" xml:lang="en">

   <!-- ***** FRONT MATTER ***** -->
   <front> 
      <title abbrev="BP ADM">Bundle Protocol Agent Application Data Model</title>
      <author fullname="Edward J. Birrane" initials="E.B." surname="Birrane">
         <organization> Johns Hopkins Applied Physics Laboratory </organization>
         <address>
            <email>Edward.Birrane@jhuapl.edu</email>
         </address>
      </author>
      <author fullname="Evana DiPietro" initials="E.D." surname="DiPietro">
         <organization> Johns Hopkins Applied Physics Laboratory </organization>
         <address>
            <email>Evana.DiPietro@jhuapl.edu</email>
         </address>
      </author>
      <author fullname="David Linko" initials="D.L." surname="Linko">
         <organization> Johns Hopkins Applied Physics Laboratory </organization>
         <address>
            <email>David.Linko@jhuapl.edu</email>
         </address>
      </author>
      <date year="2018" />
      
       <!-- Meta-data Declarations -->
      <area>General</area>
      <workgroup>Delay-Tolerant Networking</workgroup>
      <keyword>DTN</keyword>
      <keyword>Network Management</keyword>

      <abstract>
         <t>
            This document describes the Application Data Model (ADM) for a
            Bundle Protocol Agent (BPA) in compliance with the template
            provided by <xref target="I-D.birrane-dtn-adm"/>.
         </t>
      </abstract>
   </front>
  
   <middle>
      <section title="Introduction" toc="default">
         <t>
            An Application Data Model (ADM) provides a guaranteed 
            interface for the management of an application or 
            protocol in accordance with the Asynchronous Management 
            Architecture (AMA) defined in <xref target="I-D.birrane-dtn-ama"/>. 
            The ADM described in this document complies with the 
            ADM Template provided in <xref target="I-D.birrane-dtn-adm"/> 
            as encoded using the JSON syntax.
         </t>
         <t>
            Bundle Protocol Agents (BPAs) are software instances that implement
            functionality required by the Bundle Protocol (<xref target="I-D.ietf-dtn-bpbis"/>). The BPA ADM provides the set of information necessary to remotely manage such agents.
         </t>
             
         <section title="Technical Notes" toc="default">
            <t>
               <list style="symbols">
                  <t>
                     This document describes Version 0.1 of the BP ADM.
                  </t>
                  <t>
                     The AMM Resource Identifier (ARI) for this ADM is 
                     NOT correctly set. A sample ARI is used in this version of the
                     specification and MAY change in future versions of this ADM
                     until an ARI registry is established. This notice will be removed
                     at that time.
                  </t>
                  <t>
                     Agent applications MAY choose to ignore the name, description,
                     or other annotative information associated with the component definitions within this ADM where such items are only used to provide human-readable information or are otherwise not necessary to manage a device.                     
                  </t>              
               </list>
            </t>
         </section>
      
         <section title="Scope" toc="default">
            <t>
               This ADM specifies those components of the Asynchronous 
               Management Model (AMM) common to the management of any instance 
               of a BPA. 
            </t>
            <t>
               Any Manager software implementing this ADM MUST perform the responsibilities of an AMA Manager as outlined in <xref target="I-D.birrane-dtn-adm"/> as they relate to the objects included 
               in this document.
            </t>
            <t>
               Any Agent software implementing this ADM MUST perform the responsibilities
               of an AMA Agent as outlined in <xref target="I-D.birrane-dtn-adm"/> as they relate to the objects included in this document.
            </t>
         </section>
         
         <section title="Requirements Language" toc="default">
            <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" pageno="false" format="default">RFC 2119</xref>.
            </t>
         </section>   
                 
      </section>
      <section title="Structure and Design of this ADM">
        <t>
          The BP Agent ADM's structure is in accordance to <xref target="I-D.birrane-dtn-adm"/>. This ADM contains metadata, edd, report templates, and controls. Externally Defined Data (EDD) are values that are calculated external to the ADM system. Report Templates are ordered sets of data descriptions that show how values will be represented in a corresponding report. Controls are predefined and sometimes parameterized opcodes that can be run on an Agent. Controls are preconfigured in Agents and Managers as part of ADM support. There are no variables, table templates, macros, constants, or operators in this ADM at this time. The contents of this ADM are derived from the main functions and data that are needed to configure and manage bundle protocol operations on an ION node.
        </t>
        <t>
          All ADMs have metadata that includes the name, namespace, and version of the ADM as well as the name of the organization that is issuing that particular ADM. This is important for identification purposes of the ADMs and to ensure version control. The main elements of BP that are discussed in this ADM are endpoints, the priority of bundles/bytes, and whether or not the bundles/bytes were transferred successfully.

        </t>
      </section>
      <section title="Naming and Identification">
         <t>
            This section outlines the namespaces used to uniquely identify
            ADM objects in this specification.
         </t>
          <section title="Namespace and Nicknames">
            <t>
               In accordance with <xref target="I-D.birrane-dtn-adm"/>, every ADM
               is assigned a moderated Namespace. In accordance with 
               <xref target="I-D.birrane-dtn-amp"/>, these namespaces may be
               enumerated for compactness. The namespace and ADM identification
               for these objects is defined as follows.
            </t>
            <texttable anchor="agent_ns" title="Namespace Information" align="center">
               <ttcol align="center">Identifier</ttcol>
               <ttcol align="center">Value</ttcol>
               
               <c>Namespace</c>
               <c>DTN/bp_agent</c>

               <c>ADM Enumeration</c>
               <c>2</c>
            </texttable>

            <t>
              Given the above ADM enumeration, in accordance with 
              <xref target="I-D.birrane-dtn-amp"/>, the following AMP
              nicknames are defined.
            </t>
            
            <texttable anchor="bp_nn" title="BP Agent ADM Nicknames" align="center" style="full">
               <ttcol width="10%" align="center">Nickname</ttcol>
               <ttcol width="45%" align="center">Collection</ttcol>
               
               <c>40</c>
               <c>DTN/bp_agent/Const</c>

               <c>41</c>
               <c>DTN/bp_agent/Ctrl</c>

               <c>42</c>
               <c>DTN/bp_agent/Edd</c>

               <c>43</c>
               <c>DTN/bp_agent/Mac</c>

               <c>44</c>
               <c>DTN/bp_agent/Oper</c>

               <c>45</c>
               <c>DTN/bp_agent/Rptt</c>

               <c>47</c>
               <c>DTN/bp_agent/Tblt</c>

               <c>49</c>
               <c>DTN/bp_agent/Var</c>

               <c>50</c>
               <c>DTN/bp_agent/Mdat</c>

               <c>51-69</c>
               <c>DTN/bp_agent/Reserved</c>
            </texttable>
         
         </section>
      </section>

      <section title="BP Agent ADM JSON Encoding">
        <t>
          The following is the JSON encoding for the Bundle Protocol Agent ADM:
          <figure>
            <artwork>
 {
  "Mdat":[
   {
     "name": "name",
     "type": "STR",
     "value": "bp",
     "description": "The human-readable name of the ADM."
   },
   {
     "name": "namespace",
     "type": "STR",
     "value": "DTN/bp_agent",
     "description": "The namespace of the ADM."
   },
   {
     "name": "version",
     "type": "STR",
     "value": "v0.1",
     "description": "The version of the ADM"
   },
   {
     "name": "organization",
     "type": "STR",
     "value": "JHUAPL",
     "description": "The name of the issuing organization of the ADM."
   }
  ],

  "Edd": [
   {
     "name": "bp_node_id",
     "type": "STR",
     "description": "The node administration endpoint"
   },
   {
     "name": "bp_node_version",
     "type": "STR",
     "description": "The latest version of the BP supported 
        by this node"
   },
   {
     "name": "available_storage",
     "type": "UVAST",
     "description": "Bytes available for bundle storage"
   },
   {
     "name": "last_reset_time",
     "type": "UVAST",
     "description": "The last time that BP counters were reset, either
        due to execution of a reset control or a restart of
        the node itself"
   },
   {
     "name": "num_registrations",
     "type": "UINT",
     "description": "number of registrations"
   },
   {
     "name": "num_pend_fwd",
     "type": "UINT",
     "description": "number of bundles pending forwarding"
   },
   {
     "name": "num_pend_dis",
     "type": "UINT",
     "description": "number of bundles awaiting dispatch"
   },
   {
     "name": "num_in_cust",
     "type": "UINT",
     "description": "number of bundles"
   },
   {
     "name": "num_pend_reassembly",
     "type": "UINT",
     "description": "number of bundles pending reassembly"
   },
   {
     "name": "bundles_by_priority",
     "type": "UINT",
     "parmspec": [{"type":"UINT","name":"mask"}],
     "description": "number of bundles for the given priority. Priority
        is given as a priority mask where Bulk=0x1, normal=0x2,
        express=0x4. Any bundles matching any of the masked priorities
        will be included in the returned count"
   },
   {
     "name": "bytes_by_priority",
     "type": "UINT",
     "parmspec": [{"type":"UINT","name":"mask"}],
     "description": "number of bytes of the given priority. Priority is 
        given as a priority mask where bulk=0x1, normal=0x2, 
        express=0x4. Any bundles matching any of the masked priorities
        will be included in the returned count."
   },
   {
     "name": "src_bundles_by_priority",
     "type": "UINT",
     "parmspec": [{"type":"UINT","name":"mask"}],
     "description":"number of bundles sourced by this node of the given
        priority. Priority is given as a priority mask where bulk=0x1,
        normal=0x2, express=0x4. Any bundles sourced by this node and
        matching any of the masked priorities will be included in the
        returned count."
   },
   {
     "name": "src_bytes_by_priority",
     "type": "UINT",
     "parmspec": [{"type":"UINT","name":"mask"}],
     "description": "number of bytes sourced by this node of the given 
        priority. Priority is given as a priority mask where bulk=0x1,
        normal=0x2, express=0x4. Any bundles sourced by this node and 
        matching any of the masked priorities will be included in the 
        returned count"
   },
   {
     "name": "num_fragmented_bundles",
     "type": "UINT",
     "description": "number of fragmented bundles"
   },
   {
     "name": "num_fragments_produced",
     "type": "UINT",
     "description": "number of bundles with fragmentary payloads 
        produced by this node"
   },
   {
     "name": "num_failed_by_reason",
     "type": "UINT",
     "parmspec": [{"type":"UINT","name":"mask"}],
     "description": "number of bundles failed for any of the given
        reasons. (noInfo=0x1, Expired=0x2, UniFwd=0x4, Cancelled=0x8,
        NoStorage=0x10, BadEID=0x20, NoRoute=0x40, NoContact=0x80,
        BadBlock=0x100)"
   },
   {
     "name": "num_bundles_deleted",
     "type": "UINT",
     "description": "number of bundles deleted by this node"
   },
   {
     "name": "failed_custody_bundles",
     "type": "UINT",
     "description": "number of bundle fails at this node"
   },
   {
     "name": "failed_custody_bytes",
     "type": "UINT",
     "description": "number bytes of fails at this node"
   },
   {
     "name": "failed_forward_bundles",
     "type": "UINT",
     "description": "number bundles not forwarded by this node"
   },
   {
     "name": "failed_forward_bytes",
     "type": "UINT",
     "description": "number of bytes not forwaded by this node"
   },
   {
     "name": "abandoned_bundles",
     "type": "UINT",
     "description": "number of bundles abandoned by this node"
   },
   {
     "name": "abandoned_bytes",
     "type": "UINT",
     "description": "number of bytes abandoned by this node"
   },
   {
     "name": "discarded_bundles",
     "type": "UINT",
     "description": "number of bundles discarded by this node"
   },
   {
     "name": "discarded_bytes",
     "type": "UINT",
     "description": "number of bytes discarded by this node"
   },
   {
     "name": "endpoint_names",
     "type": "STR",
     "description": "CSV list of endpoint names for this node"
   },
   {
     "name": "endpoint_active",
     "type": "UINT",
     "parmspec": [{"type":"STR","name":"endpoint_name"}],
     "description": "is the given endpoint active? (0=no)"
   },
   {
     "name": "endpoint_singleton",
     "type": "UINT",
     "parmspec": [{"type":"STR","name":"endpoint_name"}],
     "description": "is the given endpoint singleton? (0=no)"
   },
   {
     "name": "endpoint_policy",
     "type": "UINT",
     "parmspec": [{"type":"STR","name":"endpoint_name"}],
     "description": "Does the endpoint abandon on fail (0=no)"
   }
  ],

  "Rptt": [
   {
     "name": "full_report",
     "definition": [
        "DTN/bp_agent/Mdat.name",
        "DTN/bp_agent/Mdat.version",
        "DTN/bp_agent/Edd.bp_node_id",
        "DTN/bp_agent/Edd.bp_node_version",
        "DTN/bp_agent/Edd.available_storage",
        "DTN/bp_agent/Edd.last_reset_time",
        "DTN/bp_agent/Edd.num_registrations",
        "DTN/bp_agent/Edd.num_pend_fwd",
        "DTN/bp_agent/Edd.num_pend_dis",
        "DTN/bp_agent/Edd.num_in_cust",
        "DTN/bp_agent/Edd.num_pend_reassembly",
        "DTN/bp_agent/Edd.bundles_by_priority(0)",
        "DTN/bp_agent/Edd.bundles_by_priority(1)",
        "DTN/bp_agent/Edd.bundles_by_priority(2)",
        "DTN/bp_agent/Edd.bytes_by_priority(0)",
        "DTN/bp_agent/Edd.bytes_by_priority(1)",
        "DTN/bp_agent/Edd.bytes_by_priority(2)",
        "DTN/bp_agent/Edd.src_bundles_by_priority(0)",
        "DTN/bp_agent/Edd.src_bundles_by_priority(1)",
        "DTN/bp_agent/Edd.src_bundles_by_priority(2)",
        "DTN/bp_agent/Edd.src_bytes_by_priority(0)",
        "DTN/bp_agent/Edd.src_bytes_by_priority(1)",
        "DTN/bp_agent/Edd.src_bytes_by_priority(2)",
        "DTN/bp_agent/Edd.num_fragmented_bundles",
        "DTN/bp_agent/Edd.num_fragments_produced",
        "DTN/bp_agent/Edd.num_failed_by_reason(0)",
        "DTN/bp_agent/Edd.num_failed_by_reason(1)",
        "DTN/bp_agent/Edd.num_failed_by_reason(2)",
        "DTN/bp_agent/Edd.num_bundles_deleted",
        "DTN/bp_agent/Edd.failed_custody_bundles",
        "DTN/bp_agent/Edd.failed_custody_bytes",
        "DTN/bp_agent/Edd.failed_forward_bundles",
        "DTN/bp_agent/Edd.failed_forward_bytes",
        "DTN/bp_agent/Edd.abandoned_bundles",
        "DTN/bp_agent/Edd.discarded_bundles",
        "DTN/bp_agent/Edd.discarded_bytes",
        "DTN/bp_agent/Edd.endpoint_names"
     ],
     "description": "This is all known meta-data, EDD, and VAR values 
        known by the agent."
   },
   {
     "name": "endpoint_report",
     "parmspec": [{"type":"STR","name":"endpoint_id"}],
     "definition": [
          {
            "ns":"DTN/bp_agent",
            "nm":"edd.endpoint_active",
            "ap":[{"type":"PARMNAME","value":"endpoint_id"}]
          },
          {
            "ns":"DTN/bp_agent",
            "nm":"edd.endpoint_singleton",
            "ap":[{"type":"PARMNAME","value":"endpoint_id"}]
          },
          {
            "ns":"DTN/bp_agent",
            "nm":"edd.endpoint_policy",
            "ap":[{"type":"PARMNAME","value":"endpoint_id"}]
          }
     ],
     "description": "This is all known endpoint information"
   }
  ],

  "Ctrl": [
   {
     "name": "reset_all_counts",
     "description": "This control causes the Agent to reset all counts 
        associated with bundle or byte statistics and to set the last 
        reset time of the BP primitive data to the time when the 
        control was run"
   }
  ]
}
       </artwork>
     </figure>
   </t>

      </section>

				    
    <section anchor="IANA" title="IANA Considerations" toc="default">
      <t>
		At this time, this protocol has no fields registered by IANA.
	  </t>
    </section>
  </middle>

   <!--  *****BACK MATTER ***** -->
   <back>
      <references title="Informative References">
        <?rfc include="reference.I-D.draft-birrane-dtn-ama-07"?>
                    
      </references>
      
      <references title="Normative References">
 
         &RFC2119;     
         
        <?rfc include="reference.I-D.draft-birrane-dtn-adm-02"?>
        <?rfc include="reference.I-D.draft-birrane-dtn-amp-04"?>
        <?rfc include="reference.I-D.ietf-dtn-bpbis"?>
      </references>
    
  </back>
</rfc>