This document defines a Jingle transport method that results in sending data over a raw User Datagram Protocol (UDP) connection.
NOTICE: This document is currently within Last Call or under consideration by the XMPP Council for advancement to the next stage in the JSF standards process.
            Status: 
            Proposed
            Type:
            Standards Track
            Number: 0177
            Version: 0.3
            Last Updated: 2006-10-31
            Publishing Organization: Jabber Software Foundation
                Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0166
                Supersedes: None
                Superseded By: None
            Short Name: raw-udp
              Wiki Page: <http://wiki.jabber.org/index.php/Jingle Raw UDP Transport (XEP-0177)>
            
        Email:
        jbeda@google.com
        JID: 
        jbeda@google.com
        Email:
        stpeter@jabber.org
        JID: 
        stpeter@jabber.org
        Email:
        scottlu@google.com
        JID: 
        scottlu@google.com
        Email:
        jhildebrand@jabber.com
        JID: 
        hildjj@jabber.org
        Email:
        seanegan@google.com
        JID: 
        seanegan@google.com
This XMPP Extension Protocol is copyright 1999 - 2006 by the Jabber Software Foundation (JSF) and is in full conformance with the JSF's Intellectual Property Rights Policy <http://www.xmpp.org/extensions/ipr-policy.shtml>. This material may be distributed only subject to the terms and conditions set forth in the Creative Commons Attribution License (<http://creativecommons.org/licenses/by/2.5/>).
The preferred venue for discussion of this document is the Standards-JIG discussion list: <http://mail.jabber.org/mailman/listinfo/standards-jig>.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the Jabber Software Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The following keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
Jingle [1] defines a framework for negotiating and managing out-of-band data sessions over XMPP. In order to provide a flexible framework, the base Jingle specification defines neither data transport methods nor content formats, leaving that up to separate specifications. The current document defines a transport method for establishing and managing data between XMPP entities using a raw User Datagram Protocol (UDP) connection (see RFC 768 [2]).
The Jingle transport method defined herein is designed to meet the following requirements:
Note: The Raw UDP transport does not provide traversal of Network Address Translators (NATs) and is provided only for the purpose of specifying the IP address and port that an entity considers most likely to succeed without the need for NAT traversal. If NAT traversal is needed, Jingle RTP-ICE Transport Method [3] SHOULD be used.
In order for the initiating entity in a Jingle exchange to start the negotiation, it MUST send a Jingle "session-initiate" stanza as described in XEP-0166. This stanza MUST include at least one transport methods. If the initiating entity wishes to negotiate the Raw UDP transport, it MUST include an empty <transport/> child element qualified by the 'http://jabber.org/protocol/jingle/transport/raw-udp' namespace.
Example 1. Initiation Example
<iq to='juliet@capulet.com/balcony' from='romeo@montague.net/orchard' id='jingle1' type='set'>
  <jingle xmlns='http://jabber.org/protocol/jingle'
          action='session-initiate'
          initiator='romeo@montague.net/orchard'
          sid='a73sjjvkla37jfea'>
    <content name='this-is-the-audio-content'>
      <description ...>
      <transport xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'/>
    </content>
  </jingle>
</iq>
    As described in XEP-0166, to provisionally accept the session initiation request, the receiver returns an IQ-result:
Example 2. Receiver Provisionally Accepts the Session Request
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='result' id='jingle1'/>
    Once the session is provisionally accepted, each entity SHOULD send one <transport/> element in a transport-info meessage, containing exactly one <candidate/> element per content type, whose 'ip' and 'port' attributes specify the IP address and port number of the candidate that the initiator has reason to believe will be most likely to succeed for that content type. This is not necessarily the initiator's preferred address for communication, but instead is the "address most likely to succeed", i.e., the address that is assumed to be reachable by the vast majority of target entities. To determine reachability, the client needs classify ahead of time the permissiveness of the NAT or firewall it is behind, if any. If the NAT is symmetric (not permissive), the candidate SHOULD specify a relay address. Otherwise it SHOULD be an address derived via prior discovery using RFC 3489 [4], which will be an address on the outside of the firewall or NAT.
Note: The Raw UDP candidate is equivalent to the "in-use" candidate as described in Interactive Connectivity Establishment (ICE) [5]. (In older versions of XEP-0166, this was referrred to as the "default candidate".)
Example 3. Address Exchange Example
<iq from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' id='jingle2' type='set'>
  <jingle xmlns='http://jabber.org/protocol/jingle'
          action='transport-info'
          initiator='romeo@montague.net/orchard'
          sid='a73sjjvkla37jfea'>
    <content name='this-is-the-audio-content'>
      <transport xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'>
        <candidate name='myvoicedata' ip='10.1.1.104' port='13540' generation='0'/>
      </transport>
    </content>
  </jingle>
</iq>
    The 'generation', 'ip', 'name', and 'port' attributes are REQUIRED. The 'name' attribute specifies the name of the content type and the 'generation' attribute provides a tracking mechanism for determining which version of this candidate is in force (this is useful if the candidate is redefined mid-stream, for example if the port is changed).
Either entity may send this "transport-info" action at any time, after which the recipient should attempt to send media data to the specified address (either entity MAY also send the Informational Messages described below). If media data can be delivered for the candidate, the recipient MUST send a Jingle "transport-accept" action to the initiator (either explicitly, or implicitly via a "content-accept" or "session-accept" action.
Example 4. Responder Returns Transport-Accept
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='set' id='accept1'>
  <jingle xmlns='http://jabber.org/protocol/jingle'
          action='transport-accept'
          initiator='romeo@montague.net/orchard'
          sid='a73sjjvkla37jfea'>
    <content name='this-is-the-audio-content'>
      <transport xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'>
        <candidate name='myvoicedata' ip='10.1.1.104' port='13540' generation='0'/>
      </transport>
    </content>
  </jingle>
  </jingle>
</iq>
    The initiator MUST then acknowledge acceptance by returning an IQ result (or return a standard XMPP error).
Informational messages may be sent by the receiver within the context of the Raw UDP transport to communicate the status of transport checking. The informational message MUST be an IQ-set containing a <jingle/> element of type "transport-info", where the informational message is a payload element qualified by the 'http://jabber.org/protocol/jingle/info/raw-udp' namespace; the following payload elements are defined:
Table 1: Information Payload Elements
| Element | Meaning | 
|---|---|
| <failed/> | Connectivity checks failed. | 
| <succeeded/> | Connectivity checks succeeded. | 
| <trying/> | Connectivity checks are underway. | 
Note: Because the informational message is sent in an IQ-set, the receiving party MUST return either an IQ-result or an IQ-error (normally only an IQ-result to acknowledge receipt; no error flows are defined or envisioned at this time).
In order to secure the data stream, implementations SHOULD use encryption methods appropriate to the transport method; in the case of UDP, that would include Datagram Transport Layer Security (DTLS) as specified in RFC 4347 [6].
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [7].
The XMPP Registrar [8] shall include 'http://jabber.org/protocol/jingle/transport/raw-udp' in its registry of protocol namespaces.
The XMPP Registrar shall include "http://jabber.org/protocol/jingle/transport/raw-udp" in its registry of Jingle transport methods. The registry submission is as follows:
In order to submit new values to this registry, the registrant must define an XML fragment of the following form and either include it in the relevant XMPP Extension Protocol or send it to the email address <registrar@jabber.org>:
<transport>
  <name>raw-udp</name>
  <desc>A method for exchanging data over a raw UDP connection.</desc>
  <doc>XEP-0176</doc>
</transport>
    
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='http://jabber.org/protocol/jingle/transport/raw-udp'
    xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'
    elementFormDefault='qualified'>
  <xs:element name='transport'>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref='candidate' minOccurs='0' maxOccurs='1'/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name='candidate'>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base='empty'>
          <xs:attribute name='generation' type='xs:unsignedByte' use='required'/>
          <xs:attribute name='name' type='xs:string' use='required'/>
          <xs:attribute name='ip' type='xs:string' use='required'/>
          <xs:attribute name='port' type='xs:unsignedShort' use='required'/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:simpleType name='empty'>
    <xs:restriction base='xs:string'>
      <xs:enumeration value=''/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>
  1. XEP-0166: Jingle <http://www.xmpp.org/extensions/xep-0166.html>.
2. RFC 768: User Datagram Protocol <http://www.ietf.org/rfc/rfc0768.txt>.
3. XEP-0176: Jingle RTP-ICE Transport Method <http://www.xmpp.org/extensions/xep-0176.html>.
4. RFC 3489: STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs) <http://www.ietf.org/rfc/rfc3489.txt>.
5. Interactive Connectivity Establishment (ICE): A Methodology for Network Address Translator (NAT) Traversal for Offer/Answer Protocols <http://www.ietf.org/internet-drafts/draft-ietf-mmusic-ice-12.txt>. Work in progress.
6. RFC 4347: Datagram Transport Layer Security <http://www.ietf.org/rfc/rfc4347.txt>.
7. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
8. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the Jabber Software Foundation. For further information, see <http://www.xmpp.org/registrar/>.
END