draft-ietf-rtcweb-data-channel-10.txt | draft-ietf-rtcweb-data-channel-11.txt | |||
---|---|---|---|---|
Network Working Group R. Jesup | Network Working Group R. Jesup | |||
Internet-Draft Mozilla | Internet-Draft Mozilla | |||
Intended status: Standards Track S. Loreto | Intended status: Standards Track S. Loreto | |||
Expires: December 11, 2014 Ericsson | Expires: January 5, 2015 Ericsson | |||
M. Tuexen | M. Tuexen | |||
Muenster Univ. of Appl. Sciences | Muenster Univ. of Appl. Sciences | |||
June 9, 2014 | July 4, 2014 | |||
WebRTC Data Channels | WebRTC Data Channels | |||
draft-ietf-rtcweb-data-channel-10.txt | draft-ietf-rtcweb-data-channel-11.txt | |||
Abstract | Abstract | |||
The Real-Time Communication in WEB-browsers working group is charged | The WebRTC framework specifies protocol support for direct | |||
to provide protocol support for direct interactive rich communication | interactive rich communication using audio, video, and data between | |||
using audio, video, and data between two peers' web-browsers. This | two peers' web-browsers. This document specifies the non-media data | |||
document specifies the non-SRTP media data transport aspects of the | transport aspects of the WebRTC framework. It provides an | |||
WebRTC framework. It provides an architectural overview of how the | architectural overview of how the Stream Control Transmission | |||
Stream Control Transmission Protocol (SCTP) is used in the WebRTC | Protocol (SCTP) is used in the WebRTC context as a generic transport | |||
context as a generic transport service allowing WEB-browsers to | service allowing WEB-browsers to exchange generic data from peer to | |||
exchange generic data from peer to peer. | peer. | |||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at http://datatracker.ietf.org/drafts/current/. | |||
Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
This Internet-Draft will expire on December 11, 2014. | This Internet-Draft will expire on January 5, 2015. | |||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2014 IETF Trust and the persons identified as the | Copyright (c) 2014 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
(http://trustee.ietf.org/license-info) in effect on the date of | (http://trustee.ietf.org/license-info) in effect on the date of | |||
publication of this document. Please review these documents | publication of this document. Please review these documents | |||
skipping to change at page 2, line 24 | skipping to change at page 2, line 24 | |||
2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3 | 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
3. Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . 3 | 3. Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
3.1. Use Cases for Unreliable Data Channels . . . . . . . . . 3 | 3.1. Use Cases for Unreliable Data Channels . . . . . . . . . 3 | |||
3.2. Use Cases for Reliable Data Channels . . . . . . . . . . 4 | 3.2. Use Cases for Reliable Data Channels . . . . . . . . . . 4 | |||
4. Requirements . . . . . . . . . . . . . . . . . . . . . . . . 4 | 4. Requirements . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
5. SCTP over DTLS over UDP Considerations . . . . . . . . . . . 5 | 5. SCTP over DTLS over UDP Considerations . . . . . . . . . . . 5 | |||
6. The Usage of SCTP for Data Channels . . . . . . . . . . . . . 8 | 6. The Usage of SCTP for Data Channels . . . . . . . . . . . . . 8 | |||
6.1. SCTP Protocol Considerations . . . . . . . . . . . . . . 8 | 6.1. SCTP Protocol Considerations . . . . . . . . . . . . . . 8 | |||
6.2. Association Setup . . . . . . . . . . . . . . . . . . . . 9 | 6.2. Association Setup . . . . . . . . . . . . . . . . . . . . 9 | |||
6.3. SCTP Streams . . . . . . . . . . . . . . . . . . . . . . 9 | 6.3. SCTP Streams . . . . . . . . . . . . . . . . . . . . . . 9 | |||
6.4. Channel Definition . . . . . . . . . . . . . . . . . . . 9 | 6.4. WebRTC Data Channel Definition . . . . . . . . . . . . . 9 | |||
6.5. Opening a Channel . . . . . . . . . . . . . . . . . . . . 10 | 6.5. Opening a Channel . . . . . . . . . . . . . . . . . . . . 10 | |||
6.6. Transferring User Data on a Channel . . . . . . . . . . . 10 | 6.6. Transferring User Data on a Channel . . . . . . . . . . . 10 | |||
6.7. Closing a Channel . . . . . . . . . . . . . . . . . . . . 11 | 6.7. Closing a Channel . . . . . . . . . . . . . . . . . . . . 11 | |||
7. Security Considerations . . . . . . . . . . . . . . . . . . . 11 | 7. Security Considerations . . . . . . . . . . . . . . . . . . . 11 | |||
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 | 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 | |||
9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 12 | 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 | 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
10.1. Normative References . . . . . . . . . . . . . . . . . . 12 | 10.1. Normative References . . . . . . . . . . . . . . . . . . 12 | |||
10.2. Informative References . . . . . . . . . . . . . . . . . 14 | 10.2. Informative References . . . . . . . . . . . . . . . . . 14 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 | |||
1. Introduction | 1. Introduction | |||
Non-SRTP media data types in the context of WebRTC are handled by | In the WebRTC framework, communication between the parties consists | |||
using SCTP [RFC4960] encapsulated in DTLS [RFC6347]. | of media (for example audio and video) and non-media data. Media is | |||
sent using SRTP, and is not specified further here. Non-media data | ||||
is handled by using SCTP [RFC4960] encapsulated in DTLS [RFC4347]. | ||||
+----------+ | +----------+ | |||
| SCTP | | | SCTP | | |||
+----------+ | +----------+ | |||
| DTLS | | | DTLS | | |||
+----------+ | +----------+ | |||
| ICE/UDP | | | ICE/UDP | | |||
+----------+ | +----------+ | |||
Figure 1: Basic stack diagram | Figure 1: Basic stack diagram | |||
skipping to change at page 3, line 29 | skipping to change at page 3, line 29 | |||
lifetime of an SCTP association and to reset individual SCTP streams. | lifetime of an SCTP association and to reset individual SCTP streams. | |||
Using [I-D.ietf-tsvwg-sctp-ndata] allows to interleave large messages | Using [I-D.ietf-tsvwg-sctp-ndata] allows to interleave large messages | |||
to avoid the monopolization and adds the support of prioritizing of | to avoid the monopolization and adds the support of prioritizing of | |||
SCTP streams. | SCTP streams. | |||
The remainder of this document is organized as follows: Section 3 and | The remainder of this document is organized as follows: Section 3 and | |||
Section 4 provide use cases and requirements for both unreliable and | Section 4 provide use cases and requirements for both unreliable and | |||
reliable peer to peer data channels; Section 5 discusses SCTP over | reliable peer to peer data channels; Section 5 discusses SCTP over | |||
DTLS over UDP; Section 6 provides the specification of how SCTP | DTLS over UDP; Section 6 provides the specification of how SCTP | |||
should be used by the WebRTC protocol framework for transporting non- | should be used by the WebRTC protocol framework for transporting non- | |||
SRTP media data between WEB-browsers. | media data between WEB-browsers. | |||
2. Conventions | 2. Conventions | |||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | |||
document are to be interpreted as described in [RFC2119]. | document are to be interpreted as described in [RFC2119]. | |||
3. Use Cases | 3. Use Cases | |||
This section defines use cases specific to data channels. For | This section defines use cases specific to data channels. For WebRTC | |||
general use cases see [I-D.ietf-rtcweb-use-cases-and-requirements]. | use cases see [I-D.ietf-rtcweb-use-cases-and-requirements]. | |||
3.1. Use Cases for Unreliable Data Channels | 3.1. Use Cases for Unreliable Data Channels | |||
U-C 1: A real-time game where position and object state information | U-C 1: A real-time game where position and object state information | |||
is sent via one or more unreliable data channels. Note that | is sent via one or more unreliable data channels. Note that | |||
at any time there may be no SRTP media channels, or all SRTP | at any time there may be no SRTP media channels, or all SRTP | |||
media channels may be inactive, and that there may also be | media channels may be inactive, and that there may also be | |||
reliable data channels in use. | reliable data channels in use. | |||
U-C 2: Providing non-critical information to a user about the reason | U-C 2: Providing non-critical information to a user about the reason | |||
skipping to change at page 4, line 46 | skipping to change at page 4, line 46 | |||
media streams may change at any time. | media streams may change at any time. | |||
Req. 2: Both reliable and unreliable data channels MUST be | Req. 2: Both reliable and unreliable data channels MUST be | |||
supported. | supported. | |||
Req. 3: Data channels of a PeerConnection MUST be congestion | Req. 3: Data channels of a PeerConnection MUST be congestion | |||
controlled; either individually, as a class, or in | controlled; either individually, as a class, or in | |||
conjunction with the SRTP media streams of the | conjunction with the SRTP media streams of the | |||
PeerConnection, to ensure that data channels don't cause | PeerConnection, to ensure that data channels don't cause | |||
congestion problems for these SRTP media streams, and that | congestion problems for these SRTP media streams, and that | |||
the WebRTC PeerConnection as a whole is fair with competing | the WebRTC PeerConnection does not cause excessive problems | |||
traffic such as TCP. | when run in parallel with TCP connections. | |||
Req. 4: The application SHOULD be able to provide guidance as to | Req. 4: The application SHOULD be able to provide guidance as to | |||
the relative priority of each data channel relative to each | the relative priority of each data channel relative to each | |||
other, and relative to the SRTP media streams. This will | other, and relative to the SRTP media streams. This will | |||
interact with the congestion control algorithms. | interact with the congestion control algorithms. | |||
Req. 5: Data channels MUST be secured; allowing for | Req. 5: Data channels MUST be secured; allowing for | |||
confidentiality, integrity and source authentication. See | confidentiality, integrity and source authentication. See | |||
[I-D.ietf-rtcweb-security] and | [I-D.ietf-rtcweb-security] and | |||
[I-D.ietf-rtcweb-security-arch] for detailed info. | [I-D.ietf-rtcweb-security-arch] for detailed info. | |||
skipping to change at page 6, line 9 | skipping to change at page 6, line 9 | |||
o Support of ordered and out-of-order message delivery. | o Support of ordered and out-of-order message delivery. | |||
o Supporting arbitrary large user messages by providing | o Supporting arbitrary large user messages by providing | |||
fragmentation and reassembly. | fragmentation and reassembly. | |||
o Support of PMTU-discovery. | o Support of PMTU-discovery. | |||
o Support of reliable or partially reliable message transport. | o Support of reliable or partially reliable message transport. | |||
SCTP multihoming will not be used in WebRTC. The SCTP layer will | The WebRTC Data Channel mechanism does not support SCTP multihoming. | |||
simply act as if it were running on a single-homed host, since that | The SCTP layer will simply act as if it were running on a single- | |||
is the abstraction that the lower layer (a connection oriented, | homed host, since that is the abstraction that the DTLS layer (a | |||
unreliable datagram service) exposes. | connection oriented, unreliable datagram service) exposes. | |||
The encapsulation of SCTP over DTLS defined in | The encapsulation of SCTP over DTLS defined in | |||
[I-D.ietf-tsvwg-sctp-dtls-encaps] provides confidentiality, source | [I-D.ietf-tsvwg-sctp-dtls-encaps] provides confidentiality, source | |||
authenticated, and integrity protected transfers. Using DTLS over | authenticated, and integrity protected transfers. Using DTLS over | |||
UDP in combination with ICE enables middlebox traversal in IPv4 and | UDP in combination with ICE enables middlebox traversal in IPv4 and | |||
IPv6 based networks. SCTP as specified in [RFC4960] MUST be used in | IPv6 based networks. SCTP as specified in [RFC4960] MUST be used in | |||
combination with the extension defined in [RFC3758] and provides the | combination with the extension defined in [RFC3758] and provides the | |||
following features for transporting non-SRTP media data between | following features for transporting non-media data between browsers: | |||
browsers: | ||||
o Support of multiple unidirectional streams. | o Support of multiple unidirectional streams. | |||
o Ordered and unordered delivery of user messages. | o Ordered and unordered delivery of user messages. | |||
o Reliable and partial-reliable transport of user messages. | o Reliable and partial-reliable transport of user messages. | |||
Each SCTP user message contains a Payload Protocol Identifier (PPID) | Each SCTP user message contains a Payload Protocol Identifier (PPID) | |||
that is passed to SCTP by its upper layer on the sending side and | that is passed to SCTP by its upper layer on the sending side and | |||
provided to its upper layer on the receiving side. The PPID can be | provided to its upper layer on the receiving side. The PPID can be | |||
skipping to change at page 7, line 31 | skipping to change at page 7, line 31 | |||
combination with SCTP over UDP [RFC6951]) has been chosen because it | combination with SCTP over UDP [RFC6951]) has been chosen because it | |||
o supports the transmission of arbitrary large user messages. | o supports the transmission of arbitrary large user messages. | |||
o shares the DTLS connection with the SRTP media channels of the | o shares the DTLS connection with the SRTP media channels of the | |||
PeerConnection. | PeerConnection. | |||
o provides privacy for the SCTP control information. | o provides privacy for the SCTP control information. | |||
Considering the protocol stack of Figure 2 the usage of DTLS over UDP | Considering the protocol stack of Figure 2 the usage of DTLS over UDP | |||
is specified in [RFC6347], while the usage of SCTP on top of DTLS is | is specified in [RFC4347], while the usage of SCTP on top of DTLS is | |||
specified in [I-D.ietf-tsvwg-sctp-dtls-encaps]. Please note that the | specified in [I-D.ietf-tsvwg-sctp-dtls-encaps]. Please note that the | |||
demultiplexing STUN vs. SRTP vs. DTLS is done as described in | demultiplexing STUN vs. SRTP vs. DTLS is done as described in | |||
Section 5.1.2 of [RFC5764] and SCTP is the only payload of DTLS. | Section 5.1.2 of [RFC5764] and SCTP is the only payload of DTLS. | |||
Since DTLS is typically implemented in user-land, the SCTP stack also | Since DTLS is typically implemented in user application space, the | |||
needs to be a user-land stack. | SCTP stack also needs to be a user application space stack. | |||
When using DTLS as the lower layer, only single homed SCTP | The ICE/UDP layer can handle IP address changes during a session | |||
associations are supported, since DTLS does not expose any address | without needing interaction with the DTLS and SCTP layers. However, | |||
management to its upper layer. The ICE/UDP layer can handle IP | SCTP SHOULD be notified when an address changes has happened. In | |||
address changes during a session without needing interaction with the | this case SCTP SHOULD retest the Path MTU and reset the congestion | |||
DTLS and SCTP layers. However, SCTP SHOULD be notified when an | state to the initial state. In case of a window based congestion | |||
address changes has happened. In this case SCTP SHOULD retest the | control like the one specified in [RFC4960], this means setting the | |||
Path MTU and reset the congestion state to the initial state. In | congestion window and slow start threshold to its initial values. | |||
case of a window based congestion control like the one specified in | ||||
[RFC4960], this means setting the congestion window and slow start | ||||
threshold to its initial values. | ||||
Incoming ICMP or ICMPv6 messages can't be processed by the SCTP | Incoming ICMP or ICMPv6 messages can't be processed by the SCTP | |||
layer, since there is no way to identify the corresponding | layer, since there is no way to identify the corresponding | |||
association. Therefore SCTP MUST support performing Path MTU | association. Therefore SCTP MUST support performing Path MTU | |||
discovery without relying on ICMP or ICMPv6 as specified in [RFC4821] | discovery without relying on ICMP or ICMPv6 as specified in [RFC4821] | |||
using probing messages specified in [RFC4820]. The initial Path MTU | using probing messages specified in [RFC4820]. The initial Path MTU | |||
at the IP layer SHOULD NOT exceed 1200 bytes for IPv4 and 1280 for | at the IP layer SHOULD NOT exceed 1200 bytes for IPv4 and 1280 for | |||
IPv6. | IPv6. | |||
In general, the lower layer interface of an SCTP implementation | In general, the lower layer interface of an SCTP implementation | |||
SHOULD be adapted to address the differences between IPv4 and IPv6 | SHOULD be adapted to address the differences between IPv4 and IPv6 | |||
(being connection-less) or DTLS (being connection-oriented). | (being connection-less) or DTLS (being connection-oriented). | |||
When the protocol stack of Figure 2 is used, DTLS protects the | When the protocol stack of Figure 2 is used, DTLS protects the | |||
complete SCTP packet, so it provides confidentiality, integrity and | complete SCTP packet, so it provides confidentiality, integrity and | |||
source authentication of the complete SCTP packet. | source authentication of the complete SCTP packet. | |||
This SCTP stack and its upper layer MUST support the usage of | ||||
multiple SCTP streams. A user message can be sent ordered or | ||||
unordered and with partial or full reliability. The partial | ||||
reliability extension MUST support policies to limit | ||||
o the transmission and retransmission by time. | ||||
o the number of retransmissions. | ||||
Limiting the number of retransmissions to zero combined with | ||||
unordered delivery provides a UDP-like service where each user | ||||
message is sent exactly once and delivered in the order received. | ||||
SCTP provides congestion control on a per-association base. This | SCTP provides congestion control on a per-association base. This | |||
means that all SCTP streams within a single SCTP association share | means that all SCTP streams within a single SCTP association share | |||
the same congestion window. Traffic not being sent over SCTP is not | the same congestion window. Traffic not being sent over SCTP is not | |||
covered by the SCTP congestion control. Using a congestion control | covered by the SCTP congestion control. Using a congestion control | |||
different from than the standard one might improve the impact on the | different from than the standard one might improve the impact on the | |||
parallel SRTP media streams. | parallel SRTP media streams. | |||
6. The Usage of SCTP for Data Channels | 6. The Usage of SCTP for Data Channels | |||
6.1. SCTP Protocol Considerations | 6.1. SCTP Protocol Considerations | |||
The DTLS encapsulation of SCTP packets as described in | The DTLS encapsulation of SCTP packets as described in | |||
[I-D.ietf-tsvwg-sctp-dtls-encaps] MUST be used. | [I-D.ietf-tsvwg-sctp-dtls-encaps] MUST be used. | |||
This SCTP stack and its upper layer MUST support the usage of | ||||
multiple SCTP streams. A user message can be sent ordered or | ||||
unordered and with partial or full reliability. | ||||
The following SCTP protocol extensions are required: | The following SCTP protocol extensions are required: | |||
o The stream reset extension defined in [RFC6525] MUST be supported. | o The stream reconfiguration extension defined in [RFC6525] MUST be | |||
It is used for closing channels. | supported. It is used for closing channels. | |||
o The dynamic address reconfiguration extension defined in [RFC5061] | o The dynamic address reconfiguration extension defined in [RFC5061] | |||
MUST be used to signal the support of the stream reset extension | MUST be used to signal the support of the stream reset extension | |||
defined in [RFC6525], other features of [RFC5061] are not REQUIRED | defined in [RFC6525], other features of [RFC5061] are not REQUIRED | |||
to be implemented. | to be implemented. | |||
o The partial reliability extension defined in [RFC3758] MUST be | o The partial reliability extension defined in [RFC3758] MUST be | |||
supported. In addition to the timed reliability PR-SCTP policy | supported. In addition to the timed reliability PR-SCTP policy | |||
defined in [RFC3758], the limited retransmission policy defined in | defined in [RFC3758], the limited retransmission policy defined in | |||
[I-D.ietf-tsvwg-sctp-prpolicies] MUST be supported. | [I-D.ietf-tsvwg-sctp-prpolicies] MUST be supported. Limiting the | |||
number of retransmissions to zero combined with unordered delivery | ||||
provides a UDP-like service where each user message is sent | ||||
exactly once and delivered in the order received. | ||||
The support for message interleaving as defined in | The support for message interleaving as defined in | |||
[I-D.ietf-tsvwg-sctp-ndata] SHOULD be used. | [I-D.ietf-tsvwg-sctp-ndata] SHOULD be used. | |||
6.2. Association Setup | 6.2. Association Setup | |||
The SCTP association will be set up when the two endpoints of the | In the WebRTC context, the SCTP association will be set up when the | |||
WebRTC PeerConnection agree on opening it, as negotiated by JSEP | two endpoints of the WebRTC PeerConnection agree on opening it, as | |||
(typically an exchange of SDP) [I-D.ietf-rtcweb-jsep]. It will use | negotiated by JSEP (typically an exchange of SDP) | |||
the DTLS connection selected via ICE; typically this will be shared | [I-D.ietf-rtcweb-jsep]. It will use the DTLS connection selected via | |||
via BUNDLE or equivalent with DTLS connections used to key the SRTP | ICE; typically this will be shared via BUNDLE or equivalent with DTLS | |||
media streams. | connections used to key the SRTP media streams. | |||
The number of streams negotiated during SCTP association setup SHOULD | The number of streams negotiated during SCTP association setup SHOULD | |||
be 65535, which is the maximum number of streams that can negotiated | be 65535, which is the maximum number of streams that can be | |||
during the association setup. | negotiated during the association setup. | |||
6.3. SCTP Streams | 6.3. SCTP Streams | |||
SCTP defines a stream as a unidirectional logical channel existing | SCTP defines a stream as a unidirectional logical channel existing | |||
within an SCTP association to another SCTP endpoint. The streams are | within an SCTP association to another SCTP endpoint. The streams are | |||
used to provide the notion of in-sequence delivery and for | used to provide the notion of in-sequence delivery and for | |||
multiplexing. Each user message is sent on a particular stream, | multiplexing. Each user message is sent on a particular stream, | |||
either ordered or unordered. Ordering is preserved only for ordered | either ordered or unordered. Ordering is preserved only for ordered | |||
messages sent on the same stream. | messages sent on the same stream. | |||
6.4. Channel Definition | 6.4. WebRTC Data Channel Definition | |||
The W3C has consensus on defining the application API for WebRTC | The WebRTC Data Channels are bidirectional. They also consider the | |||
DataChannels to be bidirectional. They also consider the notions of | notions of in-sequence, out-of-sequence, reliable and unreliable as | |||
in-sequence, out-of-sequence, reliable and unreliable as properties | properties of channels. One strong wish is for the application-level | |||
of Channels. One strong wish is for the application-level API to be | API to be close to the API for WebSockets, which implies | |||
close to the API for WebSockets, which implies bidirectional streams | bidirectional streams of data and waiting for onopen to fire before | |||
of data and waiting for onopen to fire before sending, a textual | sending, a textual label used to identify the meaning of the streams. | |||
label used to identify the meaning of the stream, among other things. | ||||
The realization of a bidirectional data channel is a pair of one | ||||
incoming stream and one outgoing SCTP stream having the same stream | ||||
SCTP identifier. | ||||
How stream values are selected is protocol and implementation | ||||
dependent. | ||||
Each data channel also has a priority, which is an 2 byte unsigned | Each data channel also has a priority, which is an 2 byte unsigned | |||
integer value. These priorities MUST be interpreted as weighted- | integer value. These priorities MUST be interpreted as weighted- | |||
fair-queuing scheduling priorities per the definition of the | fair-queuing scheduling priorities per the definition of the | |||
corresponding stream scheduler supporting interleaving in | corresponding stream scheduler supporting interleaving in | |||
[I-D.ietf-tsvwg-sctp-ndata]. For use in WebRTC, the values used | [I-D.ietf-tsvwg-sctp-ndata]. For use in WebRTC, the values used | |||
SHOULD be one of 128 ("below normal"), 256 ("normal"), 512 ("high") | SHOULD be one of 128 ("below normal"), 256 ("normal"), 512 ("high") | |||
or 1024 ("extra high"). | or 1024 ("extra high"). | |||
The realization of a bidirectional Data Channel is a pair of one | ||||
incoming stream and one outgoing SCTP stream having the same stream | ||||
SCTP identifier. | ||||
How stream values are selected is protocol and implementation | ||||
dependent. | ||||
6.5. Opening a Channel | 6.5. Opening a Channel | |||
Data channels can be opened by using negotiation within the SCTP | Data channels can be opened by using negotiation within the SCTP | |||
association, called in-band negotiation, or out-of-band negotiation. | association, called in-band negotiation, or out-of-band negotiation. | |||
Out-of-band negotiation is defined as any method which results in an | Out-of-band negotiation is defined as any method which results in an | |||
agreement as to the parameters of a channel and the creation thereof. | agreement as to the parameters of a channel and the creation thereof. | |||
The details are out of scope of this document. | The details are out of scope of this document. | |||
A simple protocol for in-band negotiation is specified in | A simple protocol for in-band negotiation is specified in | |||
[I-D.ietf-rtcweb-data-protocol]. | [I-D.ietf-rtcweb-data-protocol]. | |||
When one side wants to open a channel using out-of-band negotiation, | When one side wants to open a channel using out-of-band negotiation, | |||
it picks a stream. Unless otherwise defined or negotiated, the | it picks a stream. Unless otherwise defined or negotiated, the | |||
streams are picked based on the DTLS role (the client picks even | streams are picked based on the DTLS role (the client picks even | |||
stream identifiers, the server odd stream identifiers). However, the | stream identifiers, the server odd stream identifiers). However, the | |||
application is responsible for avoiding collisions with existing | application is responsible for avoiding collisions with existing | |||
streams. If it attempts to re-use a stream which is part of an | streams. If it attempts to re-use a stream which is part of an | |||
existing Channel, the addition SHOULD fail. In addition to choosing | existing data channel, the addition SHOULD fail. In addition to | |||
a stream, the application SHOULD also determine the options to use | choosing a stream, the application SHOULD also determine the options | |||
for sending messages. The application MUST ensure in an application- | to use for sending messages. The application MUST ensure in an | |||
specific manner that the application at the peer will also know the | application-specific manner that the application at the peer will | |||
selected stream to be used, and the options for sending data from | also know the selected stream to be used, and the options for sending | |||
that side. | data from that side. | |||
6.6. Transferring User Data on a Channel | 6.6. Transferring User Data on a Channel | |||
All data sent on a Channel in both directions MUST be sent over the | All data sent on a data channel in both directions MUST be sent over | |||
underlying stream using the reliability defined when the Channel was | the underlying stream using the reliability defined when the data | |||
opened unless the options are changed, or per-message options are | channel was opened unless the options are changed, or per-message | |||
specified by a higher level. | options are specified by a higher level. | |||
No more than one message should be put into an SCTP user message. | No more than one message should be put into an SCTP user message. | |||
The SCTP Payload Protocol Identifiers (PPIDs) are used to signal the | The SCTP Payload Protocol Identifiers (PPIDs) are used to signal the | |||
interpretation of the "Payload data". For identifying a JavaScript | interpretation of the "Payload data". For identifying a JavaScript | |||
string encoded in UTF-8 the PPID "WebRTC String" MUST be used, for | string encoded in UTF-8 the PPID "WebRTC String" MUST be used, for | |||
JavaScript binary data (ArrayBuffer or Blob) the PPID "WebRTC Binary" | JavaScript binary data (ArrayBuffer or Blob) the PPID "WebRTC Binary" | |||
MUST be used (see Section 8). | MUST be used (see Section 8). | |||
The usage of the PPIDs "WebRTC String Partial" and "WebRTC Binary | The usage of the PPIDs "WebRTC String Partial" and "WebRTC Binary | |||
Partial" is deprecated. They were used for a PPID-based | Partial" is deprecated. They were used for a PPID-based | |||
fragmentation and reassembly of user messages belonging to reliable | fragmentation and reassembly of user messages belonging to reliable | |||
and ordered data channels. | and ordered data channels. | |||
If a message with an unsupported PPID is received or some error is | If a message with an unsupported PPID is received or some error is | |||
detected by the receiver (for example, illegal ordering), the | detected by the receiver (for example, illegal ordering), the | |||
receiver SHOULD close the corresponding channel. | receiver SHOULD close the corresponding data channel. | |||
The SCTP base protocol specified in [RFC4960] does not support the | The SCTP base protocol specified in [RFC4960] does not support the | |||
interleaving of user messages. Therefore sending a large user | interleaving of user messages. Therefore sending a large user | |||
message can monopolize the SCTP association. To overcome this | message can monopolize the SCTP association. To overcome this | |||
limitation, [I-D.ietf-tsvwg-sctp-ndata] defines an extension to | limitation, [I-D.ietf-tsvwg-sctp-ndata] defines an extension to | |||
support message interleaving, which SHOULD be used. As long as | support message interleaving, which SHOULD be used. As long as | |||
message interleaving is not supported, the sender SHOULD limit the | message interleaving is not supported, the sender SHOULD limit the | |||
maximum message size to 16 KB to avoid monopolization. | maximum message size to 16 KB to avoid monopolization. | |||
It is recommended that the message size be kept within certain size | It is recommended that the message size be kept within certain size | |||
bounds as applications will not be able to support arbitrarily-large | bounds as applications will not be able to support arbitrarily-large | |||
single messages. This limit has to be negotiated, for example by | single messages. This limit has to be negotiated, for example by | |||
using [I-D.ietf-mmusic-sctp-sdp]. | using [I-D.ietf-mmusic-sctp-sdp]. | |||
The sender SHOULD disable the Nagle algorithm to minimize the | The sender SHOULD disable the Nagle algorithm to minimize the | |||
latency. | latency. | |||
6.7. Closing a Channel | 6.7. Closing a Channel | |||
Closing of a Data Channel MUST be signaled by resetting the | Closing of a data channel MUST be signaled by resetting the | |||
corresponding outgoing streams [RFC6525]. This means that if one | corresponding outgoing streams [RFC6525]. This means that if one | |||
side decides to close the channel, it resets the corresponding | side decides to close the data channel, it resets the corresponding | |||
outgoing stream. When the peer sees that an incoming stream was | outgoing stream. When the peer sees that an incoming stream was | |||
reset, it also resets its corresponding outgoing stream. Once this | reset, it also resets its corresponding outgoing stream. Once this | |||
is completed, the channel is closed. Resetting a stream sets the | is completed, the data channel is closed. Resetting a stream sets | |||
Stream Sequence Numbers (SSNs) of the stream back to 'zero' with a | the Stream Sequence Numbers (SSNs) of the stream back to 'zero' with | |||
corresponding notification to the application layer that the reset | a corresponding notification to the application layer that the reset | |||
has been performed. Streams are available to reuse after a reset has | has been performed. Streams are available for reuse after a reset | |||
been performed. | has been performed. | |||
[RFC6525] also guarantees that all the messages are delivered (or | [RFC6525] also guarantees that all the messages are delivered (or | |||
abandoned) before resetting the stream. | abandoned) before the stream is reset. | |||
7. Security Considerations | 7. Security Considerations | |||
This document does not add any additional considerations to the ones | This document does not add any additional considerations to the ones | |||
given in [I-D.ietf-rtcweb-security] and | given in [I-D.ietf-rtcweb-security] and | |||
[I-D.ietf-rtcweb-security-arch]. | [I-D.ietf-rtcweb-security-arch]. | |||
I should be noted that a receiver must be prepared that the sender | ||||
tries to send arbitrary large messages. | ||||
8. IANA Considerations | 8. IANA Considerations | |||
[NOTE to RFC-Editor: | [NOTE to RFC-Editor: | |||
"RFCXXXX" is to be replaced by the RFC number you assign this | "RFCXXXX" is to be replaced by the RFC number you assign this | |||
document. | document. | |||
] | ] | |||
This document uses four already registered SCTP Payload Protocol | This document uses four already registered SCTP Payload Protocol | |||
skipping to change at page 12, line 49 | skipping to change at page 12, line 42 | |||
10.1. Normative References | 10.1. Normative References | |||
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
Requirement Levels", BCP 14, RFC 2119, March 1997. | Requirement Levels", BCP 14, RFC 2119, March 1997. | |||
[RFC3758] Stewart, R., Ramalho, M., Xie, Q., Tuexen, M., and P. | [RFC3758] Stewart, R., Ramalho, M., Xie, Q., Tuexen, M., and P. | |||
Conrad, "Stream Control Transmission Protocol (SCTP) | Conrad, "Stream Control Transmission Protocol (SCTP) | |||
Partial Reliability Extension", RFC 3758, May 2004. | Partial Reliability Extension", RFC 3758, May 2004. | |||
[RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer | ||||
Security", RFC 4347, April 2006. | ||||
[RFC4820] Tuexen, M., Stewart, R., and P. Lei, "Padding Chunk and | [RFC4820] Tuexen, M., Stewart, R., and P. Lei, "Padding Chunk and | |||
Parameter for the Stream Control Transmission Protocol | Parameter for the Stream Control Transmission Protocol | |||
(SCTP)", RFC 4820, March 2007. | (SCTP)", RFC 4820, March 2007. | |||
[RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU | [RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU | |||
Discovery", RFC 4821, March 2007. | Discovery", RFC 4821, March 2007. | |||
[RFC4960] Stewart, R., "Stream Control Transmission Protocol", RFC | [RFC4960] Stewart, R., "Stream Control Transmission Protocol", RFC | |||
4960, September 2007. | 4960, September 2007. | |||
[RFC5061] Stewart, R., Xie, Q., Tuexen, M., Maruyama, S., and M. | [RFC5061] Stewart, R., Xie, Q., Tuexen, M., Maruyama, S., and M. | |||
Kozuka, "Stream Control Transmission Protocol (SCTP) | Kozuka, "Stream Control Transmission Protocol (SCTP) | |||
Dynamic Address Reconfiguration", RFC 5061, September | Dynamic Address Reconfiguration", RFC 5061, September | |||
2007. | 2007. | |||
[RFC5245] Rosenberg, J., "Interactive Connectivity Establishment | [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment | |||
(ICE): A Protocol for Network Address Translator (NAT) | (ICE): A Protocol for Network Address Translator (NAT) | |||
Traversal for Offer/Answer Protocols", RFC 5245, April | Traversal for Offer/Answer Protocols", RFC 5245, April | |||
2010. | 2010. | |||
[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer | ||||
Security Version 1.2", RFC 6347, January 2012. | ||||
[RFC6525] Stewart, R., Tuexen, M., and P. Lei, "Stream Control | [RFC6525] Stewart, R., Tuexen, M., and P. Lei, "Stream Control | |||
Transmission Protocol (SCTP) Stream Reconfiguration", RFC | Transmission Protocol (SCTP) Stream Reconfiguration", RFC | |||
6525, February 2012. | 6525, February 2012. | |||
[I-D.ietf-tsvwg-sctp-ndata] | [I-D.ietf-tsvwg-sctp-ndata] | |||
Stewart, R., Tuexen, M., Loreto, S., and R. Seggelmann, "A | Stewart, R., Tuexen, M., Loreto, S., and R. Seggelmann, "A | |||
New Data Chunk for Stream Control Transmission Protocol", | New Data Chunk for Stream Control Transmission Protocol", | |||
draft-ietf-tsvwg-sctp-ndata-00 (work in progress), | draft-ietf-tsvwg-sctp-ndata-00 (work in progress), | |||
February 2014. | February 2014. | |||
[I-D.ietf-rtcweb-data-protocol] | [I-D.ietf-rtcweb-data-protocol] | |||
Jesup, R., Loreto, S., and M. Tuexen, "WebRTC Data Channel | Jesup, R., Loreto, S., and M. Tuexen, "WebRTC Data Channel | |||
Establishment Protocol", draft-ietf-rtcweb-data- | Establishment Protocol", draft-ietf-rtcweb-data- | |||
protocol-05 (work in progress), May 2014. | protocol-06 (work in progress), June 2014. | |||
[I-D.ietf-tsvwg-sctp-dtls-encaps] | [I-D.ietf-tsvwg-sctp-dtls-encaps] | |||
Tuexen, M., Stewart, R., Jesup, R., and S. Loreto, "DTLS | Tuexen, M., Stewart, R., Jesup, R., and S. Loreto, "DTLS | |||
Encapsulation of SCTP Packets", draft-ietf-tsvwg-sctp- | Encapsulation of SCTP Packets", draft-ietf-tsvwg-sctp- | |||
dtls-encaps-04 (work in progress), May 2014. | dtls-encaps-04 (work in progress), May 2014. | |||
[I-D.ietf-rtcweb-security] | [I-D.ietf-rtcweb-security] | |||
Rescorla, E., "Security Considerations for WebRTC", draft- | Rescorla, E., "Security Considerations for WebRTC", draft- | |||
ietf-rtcweb-security-06 (work in progress), January 2014. | ietf-rtcweb-security-06 (work in progress), January 2014. | |||
End of changes. 36 change blocks. | ||||
102 lines changed or deleted | 96 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |