<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->


<!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 RFC5050 SYSTEM "reference.RFC.5050.xml">
<!ENTITY RFC4838 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4838.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>



<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->

<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>


<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->



<rfc category="exp" ipr="trust200902" submissionType="independent" docName="draft-irtf-dtnrg-bpq-00">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="DTNRG BPQ">Bundle Protocol Query Extension Block</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Stephen Farrell" initials="S." 
            surname="Farrell">
      <organization>Trinity College Dublin</organization>
      <address>
        <postal>
          <street></street>
          <!-- Reorder these if your country does things differently -->
          <city>Dublin</city>
          <region></region>
          <code>2</code>
          <country>Ireland</country>
        </postal>
        <phone>+353-1-896-2354</phone>
        <email>stephen.farrell@cs.tcd.ie</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <author fullname="Aidan Lynch" initials="A." 
            surname="Lynch">
      <organization>Trinity College Dublin</organization>
      <address>
        <postal>
          <street></street>
          <!-- Reorder these if your country does things differently -->
          <city>Dublin</city>
          <region></region>
          <code>2</code>
          <country>Ireland</country>
        </postal>
        <phone></phone>
        <email>lyncha6@tcd.ie</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <author fullname="Dirk Kutscher" initials="D." 
            surname="Kutscher">
      <organization>NEC</organization>
      <address>
        <postal>
          <street>Kurfuersten-Anlage 36</street>
          <!-- Reorder these if your country does things differently -->
          <city>Heidelberg</city>
          <region></region>
          <code></code>
          <country>Germany</country>
        </postal>
        <phone></phone>
        <email>kutscher@neclab.eu</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <author fullname="Anders Lindgren" initials="A." 
            surname="Lindgren">
      <organization>Swedish Institute of Computer Science</organization>
      <address>
        <postal>
          <street></street>
          <!-- Reorder these if your country does things differently -->
          <city>Stockholm</city>
          <region></region>
          <code></code>
          <country>Sweden</country>
        </postal>
        <phone></phone>
        <email>andersl@sics.se</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <date/>

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
         in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>IRTF</area>

    <workgroup>Internet Research Task Force</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>DTNRG bundle protocol extension query</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>
	The Bundle Protocol (BP) provides store-and-forward networking
	for Delay- and Disruption-Tolerant Networks.  This document
	defines the BP query extension block (BPQ) which allows
	applications to query the stores of nodes on the path along
	which a bundle containing a bundle query extension block is
	routed.
      </t>
    </abstract>
  </front>
  
  <middle>
    <section title="Introduction">
      <t>
	The Bundle Protocol (BP) specified in <xref
	target="RFC5050">RFC 5050</xref> provides store-and-forward
	networking for Delay- and Disruption-Tolerant Networks (DTNs).
	<xref target="RFC4838">RFC 4838</xref> This document defines
	the BP query extension block (BPQ) which allows applications
	to query the stores of nodes on the path along which a bundle
	containing a bundle query extension block is routed.
      </t>

      <t>
	The DTN architecture and the Bundle Protocol can be used for
	different applications and provide a certain degree of
	flexibility for naming sources and destinations, as well for
	deciding how to process and forward bundles at nodes in a DTN
	network.
      </t>

      <t>
	In some applications contexts, the Bundle Protocol is used for
	literally transmitting some payload data from one endpoint to
	another -- potentially leveraging store-and-forward
	capabilities of intermediate nodes to overcome
	disruptions. How intermediate nodes perform their forwarding
	decisions is not specified by either the DTN architecture nor
	the Bundle Protocol specification, but often the destination
	endpoint identifier (EID) would be considered.
      </t>

      <t>
	But EIDs in a DTN network do not necessarily have to represent
	single nodes -- they can be used for representing receiver
	groups or for specifying some requested service in the
	network. This flexibility, together with the option of using
	different approaches for disseminating data to nodes in a
	network, has made DTN an attractive candidate technology in a
	range of content distribution scenarios, for instance for
	publish-subscribe-based content distribution <xref
	target="ref.dpsp"></xref> and for time-aware content
	dissemination through info stations <xref
	target="ref.taco-dtn"></xref>.
      </t>

      <t>
	In some scenarios, DTN bundles can have query semantics, i.e.,
	a bundle is sent in order to query for some information object
	-- or a copy of it that can be available on some DTN node as
	the result of a specific dissemination/routing strategy.
	Thus, sometimes when you send a query in a DTN, an
	intermediate BP node already has the data you want, and there
	should be a way to get that data, without having to go all the
	way to the "source" of the data which is, of course, the
	destination for a query bundle.
      </t>

      <t>
	The BPQ that is specified in this memo is intended to allow
	such queries that can be answered by intermediate BP nodes,
	where those nodes do not necessarily have to be addressed by
	the destination EID of a corresponding request message.
      </t>

      <t>
	A use case: Alice and Bob both want to get a video. Alice
	first asks for this using the BP. Now Bob, who's nearby Alice
	also wants to see the same video, and as it happens, due to
	the routing scheme in force, the video is still stored at
	Bob's "next hop" DTN router.  Wouldn't it be nice if Bob could
	just query the DTN as a whole and in this case, get the
	response he wants from a nearby node via probably far less
	delayed or disrupted links.  The BPQ extension block defined
	here provides a way to enable this kind of re-use of DTN
	router storage.
      </t>

      <t>
	The BPQ extension block is intended as an enabling mechanism
	for such applications without anticipating a specific behaviour
	with respect to EID semantics and routing strategies. Also, it
	is intended as an optional enhancement to DTN node
	implementations and does not require all nodes in a network to
	actually support the extension to be useful. In <xref
	target="sec.overview"></xref> we provide an overview of the
	general protocol operation, <xref target="sec.format"></xref>
	specifies the actual BPQ block format, and <xref
	target="sec.proc"></xref> provides the processing requirements
	for DTN nodes. <xref target="sec.considerations"></xref>
	describes a few non-normative application considerations for
	BPQ, and <xref target="sec.related"></xref> refers to related
	work.
      </t>

      <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">RFC 2119</xref>.
      </t>

    </section>
    
    <section anchor="sec.overview" title="Protocol Overview">
      <t>
	The basic idea of the query extension block is that a "query"
	bundle can contain whatever information is required for the 
    query to succeed when that bundle reaches its destination. 
    This information is typically contained within the BPQ
    extension block but may also be sent in the application 
    layer payload.
      </t>
      
      <t>
	One, though not the only, possibility is that the
	query-response payload has a name (e.g. a file name or a name
	derived from the query or response payload via hash
	functions). In such cases, the BPQ extension block can simply
	contain the data required (plus ancillary data as described
	below).
      </t>

      <t>
	BP nodes that do not support BPQ simply (store, and) forward
	query bundles and response bundles as normal and are
	unaffected.
      </t>
      
      <t>
	BP nodes supporting BPQ compare the value of the BPQ in an
	inbound bundle against their bundle cache (details below) and
	when a matching bundle is found they then respond to the
	source of the query bundle with a bundle containing the
	payload of the matching bundle, together with BPQ data that
	allows other DTN nodes to also successfully match the query
	and response.
      </t>
    
      <t>
    When a match is found in the cache, the response bundle that 
    is sent SHOULD be a copy of the bundle in the cache. If the 
    original bundle is sent more than once, subsequent BP nodes 
    may discard the bundles as a duplicates. As the BP uniquely
    identifies bundles from their creation time-stamp (seconds and
    sequence number) and their source EID, only changing the 
    destination is not sufficient to avoid duplicate detection.
      </t>

      <t>
    When a response is copied the source EID of the response 
    bundle MUST be set to the local EID and the creation time-stamp
    MUST be updated to the current time. This changes the bundle
    ID and prevents it from being discarded as a duplicate. To
    retain the original ID, an immutable copy of the original 
    creation time-stamp and source EID is stored in the BPQ.    
      </t>

      <t>
    When a bundle is copied and its time-stamp is updated, the
    bundle's lifetime MUST also be adjusted. The lifetime value
    is relative to the creation time-stamp. If left unchanged,
    copying a bundle would inadvertently extend the bundles lifetime.
      </t>

<!--
      <t>
	[question: what, if any, fields of the matching bundle to
	change, other than the destination? changing the source EID
	seems wrong, but so does not changing the source EID. 
    answer: destination is set to the query's source, the source
    is updated to the answering node, the time-stamp is reset and 
    the expiry time is decreased by the time-stamp delta.]
      </t>
-->

      <t>Various schemes could be used in order to allow matching the
	query bundle with a bundle stored on a node, but the simplest
	way to handle this is simply for there to be an identical
	unique BPQ value in the response bundle.  (The response bundle
	must also be marked as a response in order not to confuse
	Alice and Bob's separate queries for the same video.)
      </t>

      <t>
	If a node supporting BPQ finds a complete (i.e. not
	fragmentary) matching response bundle, then it can produce a
	copy-response bundle for the requester with the same payload
	and send that back to the source of the query bundle. In this
	case, the query bundle need not be forwarded further and can 
    be deleted. For this reason payloads contained in query bundles 
    are not guaranteed to be delivered to their destination.
      </t>

      <t>
	[question: what to do with status reports in this case if the query bundle
	asked for them? they're not a good idea in any case but I suppose we should say]
      </t>
     

      <t>
    BPQ aware nodes can store and match against response fragments as well
    as complete responses. Depending on the content, it does not always make
    sense for fragments to be cached.  For example, the use of intentional names
    can result in more than one response sharing the same name while having
    different payloads. In this case nodes SHOULD NOT try to cache fragments
    or partially answer queries, since fragments from different payloads SHOULD 
    NOT be recombined. For this reason there are two kinds response, normal
    responses for which fragments may be cached and reassembled, and responses 
    where this is restricted. This in no way influences caching of complete 
    bundles.
      </t>
 
      <t>
	In the event that the matching response bundle is only a fragment,
	then the node discovering that match responds with a copy-response
	bundle containing the fragment.  The node SHOULD forward a modified
	query bundle which reflects the matched fragment, so that other
	fragments may be retrieved from elsewhere on the query bundle's path.
      </t>

      <t>
	Fragments already marked in the	query as matched SHOULD NOT be re-sent. 
    A matched fragment that is a super-set of a previously matched fragment
    (including a complete match) MAY be returned. If the node finds a set of
	matching fragments that fully cover the payload, then the node SHOULD
	NOT forward the query bundle.
      </t>

      <t>
	[question: should a single copy-response be sent, thus re-assembling
	fragments, or should the just send each fragment as a bundle as it
	itself received? think about PIB in that case. - ans below.]
      </t>

      <t>
    Fragments MAY be re-assembled by a cache before being returned. This is 
    NOT required as fragments originating from different bundles may contain
    additional (different) extension blocks. Intermediate nodes MAY respond
    with multiple fragments for the destination to recombine.
      </t>

      <t>
	In order to allow matching, response bundles (and all fragments thereof)
	sent out by the "source" of the response, also include a BPQ. In this way,
	nodes that support BPQ can easily match queries and responses.
      </t>
      
      <t>
	In principle, there could be many ways to match a query bundle
	with a response bundle. For example, the query bundle could
	contain a SQL-like query and the response bundle BPQ extension
	could contain a database that returns a non-Null response when
	the query is "executed" by a node. This document however, only
	specifies an "exact match" matching rule, where the query and
	response bundles only match if both contain the same set of
	bits.  Other matching rules may be defined in future.
      </t>

      <t>
	Since response bundles containing the BPQ are intended to be
	re-used, it would appear to be sensible to store such bundles
	for as long as possible, regardless of routing
	decisions. (Routing schemes may also call for bundles to be
	stored, even after having been forwarded one or more
	times.)
      </t>

      <t>
    [question: the bundles currently live in the cache until they
    expire or are evicted due to size restrictions. Popular content
    could have its lifetime extended but this prevents the bundle
    expiry being used for cache coherency.]
      </t>
    </section>


<section anchor="sec.format" title="BPQ Block Format">

<t>The BPQ consists of:

<list style="symbols"> 

<t>Block type code (1 byte) defined as in all bundle protocol blocks except the
primary bundle block (as described in the Bundle Protocol).  The block type
code for the BPQ Block is 0xC8 (this is an experimental type)</t>

<t>Block processing control flags (SDNV) - defined as in all bundle protocol
blocks except the primary bundle block.  SDNV encoding is described in the
Bundle Protocol.  If a bundle node receives a bundle with a BPQ block and it is
capable of supporting the BPQ block but it is not able to parse and process the
BPQ value itself, either because it does not support the kind or type being
used or because the data is not well-formed, the bundle node MUST process the
bundle as if it cannot process the BPQ block.  That is, it must operate
according to the settings of the Block Processing Control Flags, including the
"Delete bundle if block can't be processed" flag and the "Discard block if it
can't be processed" flag. The "Block must be replicated in every fragment"
bit MUST be set in all BPQ extension blocks.</t>

<!--
<t>Block EID reference count and EID references (optional) - a composite field
defined in the bundle protocol that is present if and only if the BPQ block
references EID elements in the primary block's dictionary.  The presence of
this field is indicated by the setting of the "Block contains an EID-reference
field" bit of the block processing control flags.</t>
-->

<t>Block data length (SDNV) - defined as in all bundle protocol
blocks except the primary bundle block.  SDNV encoding is
described in the bundle protocol.</t>
</list>
</t>

<t>Block-type-specific data fields as follows:

<list style="symbols">

<t>A BPQ-kind field (1 byte), with 0x00 meaning a query, 0x01 meaning a
response, and 0x02 meaning a response for which fragments MUST NOT be cached.
Other values are reserved.</t>

<t>A matching rule type (1 byte) that tells routers how to match the BPQ from a
query with the BPQ of a response. Only matching rule type 0x00 is defined here,
which represents the "exact match" rule as further defined below. The matching
rule MUST be the same in both a query and response in order for there to be a
match.</t>

<t>An original creation time-stamp (seconds and sequence number). This is the
same pair of SDNVs that are initially set in the bundle's primary block. 
This time-stamp MUST NOT be modified once set. This MAY be left unset for 
query bundles.</t>

<t>An original source EID length field (SDNV) the contains the length of the
original source EID.</t>

<t>An original source EID. Since this may be changed in the primary block when 
the bundle is copied, this original copy is required to uniquely identify the bundle.
This EID MUST NOT be modified once set. This MAY be left unset for query bundles.</t>

<t>A BPQ-value-length field (SDNV) the contains the length of the
BPQ-value.</t>

<t>A BPQ-value field with the length indicated by the BPQ-value-length field,
that identifies the relevant response payload and is interpreted according to
the matching rule field.</t>

<t>The number of fragments already returned (SDNV)</t>

<t>Where the number of fragments already returned is non-zero, an ordered list
containing offset, length pairs (encoded as SDNVs) indicating previously
matched fragments. This MAY be recalculated as new fragments are found and
overlapping (or adjacent) fragment information MAY be merged.  </t>

</list>
</t>

</section>

<section anchor="sec.proc" title="BPQ Processing">

<t>If no match is found, then the node MUST forward the query bundle as if the
BPQ block were not present.</t>

<t>When creating the copy-response bundle, the source EID of the response bundle
MUST contain an EID for the node that found the match. The reply-to EID of
copy-response bundle SHOULD be set to the reply-to EID of original response bundle
and the destination EID of the copy-response bundle MUST be set to the source EID
of the query bundle.</t>

<t>The creation time-stamp of the bundle MUST be set to the current time. The 
difference (in seconds) between the previous time-stamp and the current time
MUST be subtracted from the bundle's lifetime value.</t>

<t>The payload and all other extension blocks present in the response bundle
MUST be copied into the copy-response bundle.</t>

<t>Basically, the only difference between a response bundle and a copy-response
bundle is the bundle identifier and the source and destination EIDs and the 
time-stamp and lifetime values.</t>

<t>[note: need to check other primary block fields and say what, if anything,
to do for each, e.g. for current custodian etc. - a bit of thought needed.</t>

<t>When a node is comparing a query bundle against a potential matching bundle
using the exact match matching rule, the bundles match iff the BPQ-value field
of both are identical.</t>

<t>If a matching response bundle is not a fragment, then the query bundle
SHOULD NOT be further forwarded by the node in question but SHOULD be deleted
after the response bundle has been queued for transmission, as the query has
been satisfied.</t>

      <t>
	If a matching response bundle is a fragment, then the node
	SHOULD continue searching in case it has other fragments that
	match the query. In that case, each fragment is sent as a
	separate copy-response bundle. That is, the node finding the
	match SHOULD re-assemble the fragments of the entire bundle,
	if the node knows how to combine the different sets of
	extensions blocks of the fragments. If the matching node does
	not know how to combine the extension blocks, it MUST NOT
	re-assemble the fragments. The reason is that each fragment
	could have different sets of extension blocks present and the
	node might not know how to combine those properly.
      </t>
      
<t>If a matching response bundle is a fragment, and the node does not have a
full set of fragments (that together contain the entire payload) then the node
MUST forward the query bundle as would have happened had no match been
found.</t>

<t>Custody and status report settings for the copy-response bundle bundle
SHOULD be set to the same values are were present in the matching response
bundle unless the node is specifically configured to do otherwise.</t>

<t>[question: is that right? do we really want all those reports and custody
acks? There may be a wrinkle there with custody.]</t>

<t>[Lots more tedious but obvious detail TBD.]</t>

	</section>


    <section anchor="sec.considerations" title="Application Considerations">
      <t>
	This section provides some non-normative considerations on how
	BPQ can be used.
      </t>
      <section title="Usage of Endpoint Identifiers in Bundles">
	<t>
	  DTN EIDs usage for BPQ queries and replies needs to be
	  considered for:
	  <list style="symbols">
	    <t>source EIDs in query bundles</t>
	    <t>destination EIDs in query bundles</t>
	    <t>source EIDs in (copy-) response bundles</t>
	    <t>destination EIDs in (copy-) response bundles</t>
	  </list>
	</t>
	<t>
	  Source EIDs in query bundles should normally be set to the
	  node EID of query originator.
	</t>
	<t>
	  For the destination EID in query bundles, there are three
	  different options:
	  <list style="numbers">
	    <t>
	      Some destination EID if the source of some content is
	      actually known). This could also be interpreted as a
	      default EID for a node to which the query should be
	      forwarded to.
	    </t>
	    <t>
	      Some namespace or application identifier such as "dtn:appX"
	    </t>
	    <t>
	      An actual information object ID (perhaps with a namespace prefix) such as "dtn:appX:45a87e5d"
	    </t>
	  </list>
	  Ideally, the destination EID for queries should allow
	  non-BPQ-aware DTN nodes to "do the right thing", i.e.,
	  forward the bundle to a node with (a copy of) the requested
	  resource. More concretely, specific DTN routing protocols
	  should still work as intended, and these protocols normally
	  perform decision based on the destination EID.
	</t>
	<t>
	  For the source EID in (copy-) response bundles, there are essentially two options:
	  <list style="numbers">
	    <t>
	      The EID of the origin DTN node for the requested resource
	    </t>
	    <t>
	      The EID of the node that generating the reply, which
	      could be an intermediate BP node that happens to have a
	      matching resource for the request. This option would
	      make the operation of intermediates visible to the
	      actual receivers (normally considered a desirable
	      property) but would end-to-end security (that is based
	      on the source EID).
	    </t>
	  </list>
	</t>
	<t>
	  The destination of (copy-) response bundles should normally
	  set to the node EID of the original sender of the request to
	  enable a DTN network to forward the response bundle to this
	  node. However, specific application scenarios may want to
	  leverage DTN multicast capabilities, e.g. when many nodes
	  are interested in a specific resource so that other EID
	  naming strategies become more attractive.
	</t>
      </section>

      <section title="Advanced Processing of Query and Copy-Response Bundles">
	<t>
	  In some named-content distribution scenarios, BPQ nodes can
	  perform additional operations compared to either returning
	  matched bundles or forwarding request bundles. An
	  intermediate BPQ node could also keep an interest table for
	  the requested resource and then later, when a matching
	  resource is available, satisfy the pending requests. This
	  mode of operation could be extended to fragments as well: an
	  intermediate BPQ that has received a request for resource A,
	  for which it has only fragments, could decide to send the
	  fragment(s) directly, or -- e.g. in case of a disruption --
	  maintain the pending request and complete the response
	  bundle with received fragments until a (more) complete
	  response bundle is eventually sent.
	</t>

	<t>
	  When an intermediate BPQ node follows the strategy of
	  maintaining a list of pending requests, there might be a
	  number of requests for the same resource, e.g., for popular
	  content. For such scenarios it would be beneficial to not
	  have to create individual response bundles for the same
	  resource to be sent to each interested node on the
	  network. Domain-specific routing protocols and adequate
	  usage of destination EIDs could be employed in these cases.
	</t>

      </section>

    </section>


    <section anchor="sec.related" title="Related Work">
      
      <t>
	Using the Bundle Protocol to query the network for near-by
	resources has been explored in different
	approaches. Greifenberg and Kutscher have described a DTN
	Publish-Subscribe Protocol (DPSP) in <xref
	target="ref.dpsp"></xref> that allows interested nodes to
	register interest in some names resource to the network. DPSP
	nodes would aggregate such subscriptions and forward it
	towards the direction of an origin node. Corresponding content
	bundles would be distributed along a tree that has been built
	implicitly by the subscription messages. In DPSP, destination
	EIDs in subscription bundles specify the named resource
	(e.g. content channel), and the subscription information is
	conveyed in an extension block to enable inter-working with
	unmodified DTN nodes and routing protocols.
      </t>
      <t>
	Sollazzo, Musolesi and Mascolo have described a Time-Aware
	COntent-based dissemination system for DTNs (TACO-DTN) in
	<xref target="ref.taco-dtn"></xref> that takes time-based
	information into account to optimize content dissemination in
	a subscription-based approach. Temporal profiles are
	associated to each subscription and allow the construction of
	temporal profiles of info-stations.
      </t>
      <t>
	More general, the idea of accessing named information objects
	in the network, regardless of the actual object location, is a
	key notion in different Information-Centric Networking
	approaches. Ahlgren, D'Ambrosio, Dannewitz et al have
	developed an elaborate information model for such information
	objects in <xref target="ref.netinf-design"></xref>. In the
	Network of Information approach, information objects can be
	accessed by unique names that provide additional properties
	such as self-certification, i.e., provide a cryptographic
	relation between the object and the name. In such an approach,
	interested nodes would query the network for specific named
	objects and the network would perform name-based routing
	and/or resolution to locators to satisfy such requests.
      </t>
      <t>
	A similar approach is the Content-Centric Networking (CCN)
	approach described by Jacobsen, Smetters, Thornton et al in
	<xref target="ref.ccn"></xref>. In CCN, network nodes receive
	so-called Interest Packets for names content from interested
	nodes. Such Interest Packets can be aggregated, and forwarded
	according to name-based routing information. Corresponding
	data packets are forwarded in the reverse direction, based on
	Interest Table state that is maintained at intermediate nodes
	-- quite similar to the DPSP approach described above.
      </t>
      <t>
	The Query Extension Block as described in this memo could be
	used to inter-connect DTNs to such Information-Centric
	Networks and/or to implement Information-Centric Networking
	with the Bundle Protocol.
      </t>

	</section>

    <section anchor="IANA" title="IANA Considerations">

<t>We'll want an extension block number and maybe a new registry
for query kinds and matching rule types if we stick with the above.</t>

	</section>

    <section anchor="Security" title="Security Considerations">

<t>The BPQ in principle allows a node to probe the storage of
another node. If BPQ-values are guessable, then this would work.
If this is a concern, the unguessable BPQ-values SHOULD be 
used.</t>

<t>The BPQ imposes a load on nodes that support it. If 
such a load is considered a potential DoS vector, then nodes
SHOULD implement some controls on the amount of searching
they are willing to carry out. This could be a simple limit,
or could depend on the source (or authentication status) of
the query bundle.</t>

<t>Since the copy-response comes from the matching node,
the response bundle's authentication information (e.g. PIB)
will not be usable with the copy-response.</t>

<t>[note: not sure what to do about this as yet.]</t>

<t>If confidentiality of the query-response payload is
required the PCB block can be used to provide that 
service. However, BPQ values could leak information 
about the payload, for example if the BPQ value were
a hash of the payload, then the BPQ value would allow
an attacker to check whether a guess of the payload
value was correct or not. If this is a concern, then 
BPQ values SHOULD be chosen so as not to leak information
about the response payload.</t>

    </section>

  </middle>
  
  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
      &RFC2119;
      &RFC5050;

    </references>
    <references title="Informative References">

      &RFC4838;

      <reference anchor="ref.dpsp">
	<front>
	  <title>Efficient Publish/Subscribe-based Multicast for
	  Opportunistic Networking with Self-Organized Resource
	  Utilization</title>
	  <author surname="Greifenberg" fullname="Janico Greifenberg"></author>
	  <author surname="Kutscher" fullname="Dirk Kutscher"></author>
	  <date month="March" year="2008"/>
	</front>
	<seriesInfo name="The First IEEE International Workshop on Opportunistic Networking" value="(WON-2008)"/>
      </reference>

      <reference anchor="ref.taco-dtn">
	<front>
	  <title>
	    TACO-DTN: A Time-Aware COntent-based dissemination system
	    for Delay Tolerant Networks
	  </title>
	  <author surname="Sollazzo" fullname="Giuseppe Sollazzo"></author>
	  <author surname="Musolesi" fullname="Mirco Musolesi"></author>
	  <author surname="Mascolo" fullname="Cecilia Mascolo"></author>
	  <date year="2007"/>
	</front>
	<seriesInfo name="MobiOpp 2007 Workshop" value=""/>
      </reference>

      <reference anchor="ref.netinf-design">
	<front>
	  <title>Design Considerations for a Network of Information</title>
	  <author surname="Ahlgren" fullname="Bengt Ahlgren"></author>
	  <author surname="D'Ambrosio" fullname="Matteo D'Ambrosio"></author>
	  <author surname="Dannewitz" fullname="Christian Dannewitz"></author>
	  <author surname="Marchisio" fullname="Marco Marchisio"></author>
	  <author surname="Marsh" fullname="Ian Marsh"></author>
	  <author surname="Ohlman" fullname="Boerje Ohlman"></author>
	  <author surname="Pentikousis" fullname="Kostas Pentikousis"></author>
	  <author surname="Rembarz" fullname="Rene Rembarz"></author>
	  <author surname="Strandberg" fullname="Ove Strandberg"></author>
	  <author surname="Vercellone" fullname="Vinicio Vercellone"></author>
	  <date month="December" year="2008"/>
	</front>
	<seriesInfo name="Re-Arch 2008 Workshop" value=""/>
      </reference>

      <reference anchor="ref.ccn">
	<front>
	  <title>Networking Named Content</title>
	  <author surname="Jacobsen" fullname="Van Jacobsen"></author>
	  <author surname="K" fullname="Diana K. Smetters"></author>
	  <author surname="D" fullname="James D. Thornton"></author>
	  <author surname="F" fullname="Michael F. Plass"></author>
	  <author surname="H" fullname="Nicholas H. Briggs"></author>
	  <author surname="L" fullname="Rebecca L. Braynard"></author>
	  <date month="December" year="2009"/>
	</front>
	<seriesInfo name="CoNEXT 2009" value=""/>
      </reference>

    </references>

    <section title="ChangeLog">

	<t>This section to be deleted later. The most recent changes should be 
added to the end of the list.</t>

      <t>
	<list>
	  <t>Stephen: initial version</t>
	  <t>Dirk: added some text to the introduction</t>
	  <t>Dirk: moved some text from introduction to separate section "protocol overview"</t>
	  <t>Dirk: changes processing requirements for fragmented response bundles as discussed</t>
	  <t>Dirk: added section on Application Considerations</t>
	  <t>Dirk: added text to related work section</t>
	  <t>Aidan: Added text about adding already-returned fragments to the query</t>
	  <t>Stephen: Added payload confidentiality  sec. cons. note</t>
	  <t>Aidan: Added text intentional naming and combining fragments using original src eid</t>
	</list>
      </t>
    </section>

  </back>
</rfc>


<!-- Keep this comment at the end of the file
Local variables:
mode: xml
sgml-omittag:nil
sgml-shorttag:nil
sgml-namecase-general:nil
sgml-general-insert-case:lower
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-exposed-tags:nil
sgml-local-catalogs:("xml2rfc.cat")
sgml-local-ecat-files:nil
End:
-->
