From c12adb4aa4d3e384a34eeb2f3a6c9a7f074083ae Mon Sep 17 00:00:00 2001 From: Peter Saint-Andre Date: Fri, 12 Feb 2010 00:04:40 +0000 Subject: [PATCH] 0.10 git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@3923 4b5297f7-1745-476d-ba37-a9c6900126ab --- xep-0234.xml | 124 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 90 insertions(+), 34 deletions(-) diff --git a/xep-0234.xml b/xep-0234.xml index cbc2b9d1..d5f23b14 100644 --- a/xep-0234.xml +++ b/xep-0234.xml @@ -24,6 +24,12 @@ NOT_YET_ASSIGNED &stpeter; + + 0.10 + 2010-02-11 + psa +

Described the file retrieval case; updated referenced namespaces.

+
0.9 2009-02-19 @@ -31,7 +37,7 @@
  • Moved Jingle definitions of S5B and IBB transports to standalone documents.
  • -
  • Because the jingle-s5b and jingle-ibb transport methods are backwards-incompatible, incremented protocol version number from 0 to 1 and changed namespace from urn:xmpp:jingle:apps:file-transfer:0 to urn:xmpp:jingle:apps:file-transfer:1.
  • +
  • Because the jingle-s5b and jingle-ibb transport methods are backward-incompatible, incremented protocol version number from 0 to 1 and changed namespace from urn:xmpp:jingle:apps:file-transfer:0 to urn:xmpp:jingle:apps:file-transfer:1.
  • Moved transport fallback scenario to XEP-0260.
@@ -111,10 +117,10 @@ -

&xep0096; defines the current XMPP protocol extension for file transfer. However, that protocol has several drawbacks, most related to the &xep0095; protocol on which it depends:

+

&xep0096; was the original XMPP protocol extension for file transfer negotiation. However, that protocol has several drawbacks, most related to the &xep0095; protocol on which it depends:

  1. It does not enable a true, bidirectional negotiation; instead, the initiator sets the terms for the file transfer and the responder either accepts the terms or cancels the negotiation.
  2. -
  3. It is the only technology in the Jabber/XMPP protocol "stack" that uses XEP-095: Stream Initiation. More modern technologies such as voice and video session negotiation use &xep0166;, and it would be helpful if implementors could use the same code for all negotiation use cases.
  4. +
  5. It is the only technology in the Jabber/XMPP protocol "stack" that uses XEP-095: Stream Initiation. More modern technologies such as voice and video session negotiation use &xep0166;, and it would be helpful if implementors could re-use the same code for all negotiation use cases.

To overcome these drawbacks, this specification defines a file transfer negotiation method that meets the following requirements:

    @@ -122,24 +128,25 @@
  • Reuse the file description format from XEP-0096.
  • Define a clear upgrade path from XEP-0096 to this specification.
-

Jingle file transfer is only as reliable as the transports on which it depends. In particular, SOCKS5 Bytestreams ("S5B") does not always result in NAT or firewall traversal. To work around that problem, this specification requires all implementations to support In-Band Bytestreams ("IBB"), which tends to result in a successful (if slow) file transfer. It is likely that a future version of this specification will also recommend implementation of a Jingle transport method that emulates the IETF's ICE-TCP technology, which is currently a work in progress (see &ice-tcp;); however, a Jingle ICE-TCP transport method is dependent on the outcome of IETF work in this area.

+

Jingle file transfer is only as reliable as the transports on which it depends. In particular, SOCKS5 Bytestreams ("S5B") does not always result in NAT or firewall traversal. To work around that problem, this specification requires all implementations to support as a fallback mechanism In-Band Bytestreams ("IBB"), which usually results in a successful (if slow) file transfer.

+

Note: It is likely that a future version of this specification will also recommend implementation of a Jingle transport method that emulates the IETF's ICE-TCP technology, which is currently a work in progress (see &ice-tcp;); however, a future Jingle ICE-TCP transport method is dependent on the outcome of IETF work in this area.

This section provides a friendly introduction to Jingle file transfer.

-

First, the party that wishes to initiate the file transfer determines the responder's capabilities (via &xep0030; or &xep0115;). Here we assume that the responder supports the following service discovery features (note: these features may not reflect final namespace assignments):

+

First, the party that wishes to initiate the file transfer determines the responder's capabilities (via &xep0030; or &xep0115;). Here we assume that the responder supports the following service discovery features:

    -
  • urn:xmpp:jingle:0 as described in XEP-0166
  • -
  • urn:xmpp:jingle:apps:file-transfer:1 as defined in this document
  • -
  • urn:xmpp:jingle:transports:s5b:0 as defined in &xep0260;
  • +
  • urn:xmpp:jingle:1 as described in XEP-0166
  • +
  • urn:xmpp:jingle:apps:file-transfer:1 as defined in this document &NSVER;
  • +
  • urn:xmpp:jingle:transports:s5b:1 as defined in &xep0260;
  • urn:xmpp:jingle:transports:ibb:0 as defined in &xep0261;

The initiator then sends a Jingle session-initiation request to a potential responder. The content-type of the request specifies two things:

    -
  1. An application type of "urn:xmpp:jingle:apps:file-transfer:1" &VNOTE;. In particular, the <description/> element contains an <offer/> or <request/> element that in turn contains a <file/> element qualified by the existing 'http://jabber.org/protocol/si/profile/file-transfer' namespace from XEP-0096.
  2. -
  3. An appropriate transport method. So far the suggested methods are jingle-s5b and, as a fallback, jingle-ibb.
  4. +
  5. An application type of "urn:xmpp:jingle:apps:file-transfer:1". In particular, the <description/> element contains an <offer/> or <request/> element that in turn contains a <file/> element qualified by the existing 'http://jabber.org/protocol/si/profile/file-transfer' namespace from XEP-0096.
  6. +
  7. An appropriate transport method. So far the suggested methods are jingle-s5b (XEP-0260) and, as a fallback, jingle-ibb (XEP-0261).
-

In this example, the initiator is <romeo@montague.lit>, the responder is <juliet@capulet.lit>, and the initiation request specifies a file offer and a transport method of jingle-s5b (i.e., XEP-0065).

+

In this example, the initiator is <romeo@montague.lit>, the responder is <juliet@capulet.lit>, the application type is a file offer, and the transport method is jingle-s5b.

The flow is as follows.

- @@ -175,24 +182,25 @@ Initiator Responder + name='test.txt' + size='1022'> This is a test. If this were a real file... - + @@ -206,14 +214,14 @@ Initiator Responder to='romeo@montague.lit/orchard' type='result'/> ]]> -

The initiator then attempts to initiate a SOCKS5 Bytestream with the responder as described in xep-jingle-s5b and XEP-0065.

+

The initiator then attempts to initiate a SOCKS5 Bytestream with the responder as described in XEP-0260 and XEP-0065.

If the responder is able to connect to one of the streamhosts, it returns a Jingle session-accept (including only the JID of the streamhost to which it connected).

- @@ -229,8 +237,8 @@ Initiator Responder - - + + @@ -238,30 +246,78 @@ Initiator Responder ]]>

The initiator acknowledges the Jingle session-accept.

]]>

Now the parties exchange the file using SOCKS5 Bytestreams.

-

Once the transfer is completed, either party can terminate the Jingle session.

+

Once the transfer is completed, either party can terminate the Jingle session; preferably this is done by the entity that receives the file to ensure that the complete file (up to the advertised size) has been received.

+ + + + + + + + ]]>

For a description of the transport fallback scenario (from SOCK5 Bytestreams to In-Band Bytestreams), refer to XEP-0260.

+ +

If the entity that hosts a file has advertised its existence (or if a previous file transfer attempt has failed and the receiver would like to initiate another attempt), the entity that wishes to receive the file can "pull" the file from the hosting entity. This is done by sending a Jingle session-initiate to the hosting entity, including a &DESCRIPTION; element qualified by the 'urn:xmpp:jingle:apps:file-transfer:1' namespace and containing a <request/> element that defines the requested file.

+ + + + + + + + + + + + + + + ]]> +

The parties would then complete a session negotiation flow similar to that outlined above for offering a file.

+

Note: If the requesting entity knows the hash of the file, then it can include only that metadata in its request. If not, the requesting entity needs include enough metadata to uniquely identify the file, such as the date, name, and size. For similar considerations, see &rfc5547;.

+
+ -

All implementations MUST support the In-Band Bytestreams transport method as a reliable method of last resort. An implementation SHOULD support other transport methods as well.

+

All implementations MUST support the In-Band Bytestreams transport method as a reliable method of last resort. An implementation SHOULD support other transport methods as well, especially SOCKS5 Bytestreams.

An application MAY present transport methods in any order, except that the In-Band Bytestreams method MUST be the lowest preference.

-

Support for Jingle file transfer can be determined through discovery of the 'urn:xmpp:jingle:apps:file-transfer:1' namespace &VNOTE;, via either service discovery (XEP-0030) or entity capabilities (XEP-0115). If the initiator knows that the responder supports Jingle file transfer, it SHOULD first attempt negotiation using XEP-0166 rather than XEP-0095.

+

Support for Jingle file transfer can be determined through discovery of the 'urn:xmpp:jingle:apps:file-transfer:1' namespace &VNOTE;, via either service discovery (XEP-0030) or entity capabilities (XEP-0115). If the initiator knows that the responder supports Jingle file transfer, it SHOULD first attempt negotiation using Jingle rather than SI.

-

In order to secure the data stream, implementations SHOULD use encryption methods appropriate to the transport method being used. For example, end-to-end encryption can be negotiated over either SOCKS5 Bytestreams or In-Band Bytestreams as described in xep-jingle-s5b and xep-jingle-ibb.

+

In order to secure the data stream, implementations SHOULD use encryption methods appropriate to the transport method being used. For example, end-to-end encryption can be negotiated over either SOCKS5 Bytestreams or In-Band Bytestreams as described in XEP-0260 and XEP-0261.

@@ -270,11 +326,11 @@ Initiator Responder -

This specification defines the following XML namespaces:

+

This specification defines the following XML namespace:

  • urn:xmpp:jingle:apps:file-transfer:1
-

Upon advancement of this specification from a status of Experimental to a status of Draft, the ®ISTRAR; shall add the foregoing namespaces to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.

+

Upon advancement of this specification from a status of Experimental to a status of Draft, the ®ISTRAR; shall add the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.

&NSVER;