1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-25 02:32:18 -05:00
xeps/xep-0177.xml
Peter Saint-Andre 6bdc208181 0.3-pre1
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@133 4b5297f7-1745-476d-ba37-a9c6900126ab
2006-10-30 22:18:25 +00:00

216 lines
12 KiB
XML

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Jingle Raw UDP Transport</title>
<abstract>This document defines a Jingle transport method that results in sending data over a raw User Datagram Protocol (UDP) connection.</abstract>
&LEGALNOTICE;
<number>0177</number>
<status>Experimental</status>
<type>Standards Track</type>
<jig>Standards JIG</jig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0166</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>raw-udp</shortname>
&joebeda;
&stpeter;
&scottlu;
&hildjj;
&seanegan;
<revision>
<version>0.3</version>
<date>2006-10-30</date>
<initials>psa</initials>
<remark>Added informational messages; mentioned that the Raw UDP candidate is conceptually equivalent to the concept of an in-use candidate from the ICE specification; added reference to RFC 4347.</remark>
</revision>
<revision>
<version>0.2</version>
<date>2006-07-12</date>
<initials>se/psa</initials>
<remark>Removed candidate element and specified exchange of address information via transport-info messages; clarified usage of name attribute.</remark>
</revision>
<revision>
<version>0.1</version>
<date>2006-03-01</date>
<initials>psa/jb</initials>
<remark>Initial version (split from XEP-0166).</remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>&xep0166; 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 &rfc0768;).</p>
</section1>
<section1 topic='Requirements' anchor='reqs'>
<p>The Jingle transport method defined herein is designed to meet the following requirements:</p>
<ol>
<li>Make it possible to establish and manage out-of-band connections between two XMPP entities over the IP address and port that the initiator considers most likely to succeed.</li>
<li>Make it relatively easy to implement support in standard Jabber/XMPP clients.</li>
<li>Where communication with non-XMPP entities is needed, push as much complexity as possible onto server-side gateways between the XMPP network and the non-XMPP network.</li>
</ol>
<p>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, &xep0176; SHOULD be used.</p>
</section1>
<section1 topic='Protocol Description' anchor='protocol'>
<section2 topic='Transport Initiation' anchor='protocol-initiate'>
<p>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 <cite>XEP-0166</cite>. 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.</p>
<example caption="Initiation Example"><![CDATA[
<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'>
<description ...>
<transport xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'/>
</jingle>
</iq>
]]></example>
</section2>
<section2 topic='Receiver Response' anchor='protocol-response'>
<p>As described in <cite>XEP-0166</cite>, to provisionally accept the session initiation request, the receiver returns an IQ-result:</p>
<example caption="Receiver Provisionally Accepts the Session Request"><![CDATA[
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='result' id='jingle1'/>
]]></example>
</section2>
<section2 topic='Exchanging Address Information' anchor='protocol-addresses'>
<p>Once the session is provisionally accepted, each entity should send one &TRANSPORT; element in a transport-info meessage, containing exactly one &CANDIDATE; element per channel, 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 channel. 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 &rfc3489;, which will be an address on the outside of the firewall or NAT.</p>
<p>Note: The Raw UDP candidate is equivalent to the "in-use" candidate as described in &ice;. (In older versions of XEP-0166, this was referrred to as the "default candidate".)</p>
<example caption="Address Exchange Example"><![CDATA[
<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'>
<transport xmlns='http://jabber.org/protocol/jingle/transport/raw-udp'>
<candidate name='myvoicedata' ip='10.1.1.104' port='13540' generation='0'/>
</transport>
</jingle>
</iq>
]]></example>
<p>The 'generation', 'ip', 'name', and 'port' attributes are REQUIRED. The 'name' attribute specifies the name of the channel 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).</p>
<p>Either entity may send this transport-info message at any time, after which the recipient should attempt to send data to the specified address. If the data can be delivered, the recipient MUST send a Jingle transport-accept, content-accept, or session-accept action to the initiator.</p>
<example caption="Responder Returns Transport-Accept"><![CDATA[
<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'/>
</iq>
]]></example>
<example caption="Responder Returns Content-Accept"><![CDATA[
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='set' id='accept2'>
<jingle xmlns='http://jabber.org/protocol/jingle'
action='content-accept'
initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'/>
</iq>
]]></example>
<example caption="Responder Returns Session-Accept"><![CDATA[
<iq from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' type='set' id='accept3'>
<jingle xmlns='http://jabber.org/protocol/jingle'
action='session-accept'
initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'/>
</iq>
]]></example>
<p>The initiator MUST then acknowledge acceptance by returning an IQ result (or return a standard XMPP error).</p>
</section2>
<section2 topic='Informational Messages' anchor='protocol-info'>
<p>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:</p>
<table caption='Information Payload Elements'>
<tr>
<th>Element</th>
<th>Meaning</th>
</tr>
<tr>
<td>&lt;failed/&gt;</td>
<td>Connectivity checks failed.</td>
</tr>
<tr>
<td>&lt;succeeded/&gt;</td>
<td>Connectivity checks succeeded.</td>
</tr>
<tr>
<td>&lt;trying/&gt;</td>
<td>Connectivity checks are underway.</td>
</tr>
</table>
<p>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).</p>
</section2>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<section2 topic='End-to-End Data Encryption' anchor='security-e2e'>
<p>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 &rfc4347;.</p>
</section2>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The &REGISTRAR; shall include 'http://jabber.org/protocol/jingle/transport/raw-udp' in its registry of protocol namespaces.</p>
</section2>
<section2 topic='Jingle Transport Methods' anchor='registrar-transports'>
<p>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:</p>
&REGPROCESS;
<code><![CDATA[
<transport>
<name>raw-udp</name>
<desc>A method for exchanging data over a raw UDP connection.</desc>
<doc>XEP-0176</doc>
</transport>
]]></code>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?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>
]]></code>
</section1>
</xep>