idnits 2.17.1 draft-ietf-avt-rtp-framing-contrans-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack a Security Considerations section. ** The document seems to lack an Authors' Addresses Section. -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Missing reference section? '1' on line 262 looks like a reference -- Missing reference section? '2' on line 266 looks like a reference -- Missing reference section? '4' on line 273 looks like a reference -- Missing reference section? '11' on line 74 looks like a reference -- Missing reference section? '3' on line 270 looks like a reference -- Missing reference section? '5' on line 277 looks like a reference Summary: 3 errors (**), 0 flaws (~~), 2 warnings (==), 9 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 INTERNET-DRAFT John Lazzaro 3 November 17, 2003 CS Division 4 Expires: May 17, 2004 UC Berkeley 6 Framing RTP and RTCP Packets over Connection-Oriented Transport 8 10 Status of this Memo 12 This document is an Internet-Draft and is subject to all provisions of 13 Section 10 of RFC2026. 15 Internet-Drafts are working documents of the Internet Engineering Task 16 Force (IETF), its areas, and its working groups. Note that other groups 17 may also distribute working documents as Internet-Drafts. 19 Internet-Drafts are draft documents valid for a maximum of six months 20 and may be updated, replaced, or obsoleted by other documents at any 21 time. It is inappropriate to use Internet-Drafts as reference material 22 or to cite them other than as "work in progress." 24 The list of current Internet-Drafts can be accessed at 25 http://www.ietf.org/1id-abstracts.html 27 The list of Internet-Draft Shadow Directories can be accessed at 28 http://www.ietf.org/shadow.html 30 Copyright Notice 32 Copyright (C) The Internet Society (2003). All Rights Reserved. 34 Abstract 36 This memo defines a method for framing Real Time Protocol (RTP) and 37 Real Time Control Protocol (RTCP) packets onto connection-oriented 38 transport (such as TCP and TLS). The memo also defines how to 39 specify the framing method in a session description. 41 Table of Contents 43 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 2 44 1.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . 2 45 2. The Framing Method . . . . . . . . . . . . . . . . . . . . . . . 2 46 3. Undefined Properties . . . . . . . . . . . . . . . . . . . . . . 3 47 4. Session Descriptions for RTP/AVP over TCP or TLS . . . . . . . . 4 48 5. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 49 A. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 6 50 B. Security Considerations . . . . . . . . . . . . . . . . . . . . . 6 51 C. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . . 6 52 D. References . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 53 D.1 Normative References . . . . . . . . . . . . . . . . . . . 7 54 E. Author Address . . . . . . . . . . . . . . . . . . . . . . . . . 7 55 F. Intellectual Property Rights Statement . . . . . . . . . . . . . 7 56 G. Full Copyright Statement . . . . . . . . . . . . . . . . . . . . 8 58 1. Introduction 60 The Audio/Video Profile (AVP, [1]) for the Real-Time Protocol (RTP, [2]) 61 does not define a method for framing RTP and Real Time Control Protocol 62 (RTCP) packets onto connection-oriented transport protocols (such as TCP 63 and TLS). However, earlier versions of RTP/AVP did define a framing 64 method, and this method is in use in several implementations. 66 In this memo, we document the method and show how a session description 67 [4] may specify the use of the method. 69 1.1 Terminology 71 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 72 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 73 document are to be interpreted as described in BCP 14, RFC 2119 [11]. 75 2. The Framing Method 77 Figure 1 defines the framing method. 79 0 1 2 3 80 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 81 --------------------------------------------------------------- 82 | LENGTH | RTP or RTCP packet ... | 83 --------------------------------------------------------------- 85 Figure 1 -- The bitfield definition of the framing method. 87 A 16-bit unsigned integer LENGTH field, coded in network byte order 88 (big-endian), begins the frame. If LENGTH is non-zero, an RTP or RTCP 89 packet follows the LENGTH field. The value coded in the LENGTH field 90 MUST equal the number of octets in the RTP or RTCP packet. Zero is a 91 valid value for LENGTH, and codes the null packet. 93 This framing method does not use frame markers (i.e. an octet of 94 constant value that would precede the LENGTH field). Frame markers are 95 useful for detecting errors in the LENGTH field. In lieu of a frame 96 marker, receivers SHOULD monitor the RTP and RTCP header fields whose 97 values are predictable (for example, the RTP version number). 99 3. Undefined Properties 101 The framing method does not specify properties above the level of a 102 single packet. In particular, Section 2 does not specify: 104 The number of RTP or RTCP streams on the connection. 106 The framing method is commonly used for sending a single 107 RTP or RTCP stream over a connection. However, Section 108 2 does not define this common use as normative, so that 109 (for example) a memo that defines an RTP SSRC multiplexing 110 protocol may use the framing method. 112 Bi-directional issues. 114 Section 2 defines a framing method for use in one direction 115 on a connection. The relationship between framed packets 116 flowing in defined direction and in the reverse direction is 117 not specified. 119 Packet loss and reordering. 121 The reliable nature of a connection does not imply that a 122 framed RTP stream has a contiguous sequence number ordering. 123 For example, if the connection is used to tunnel a UDP stream 124 through a network middlebox that only passes TCP, the sequence 125 numbers in the framed stream reflect any packet loss or 126 reordering on the UDP portion of the end-to-end flow. 128 Out-of-band semantics. 130 Section 2 does not define the RTP or RTCP semantics for closing 131 a TCP socket, or of any other "out of band" signal for the 132 connection. 134 Memos that normatively include the framing method MAY specify these 135 properties. For example, Section 4 of this memo specifies these 136 properties for RTP sessions specified in session descriptions. 138 4. Session Descriptions for RTP/AVP over TCP or TLS 140 [3] defines how to specify connection-oriented media streams in session 141 descriptions. In this section, we show how to use [3] with the framing 142 method. 144 Figure 2 shows the syntax of a media (m=) line [4] of a session 145 description: 147 "m=" media SP port ["/" integer] SP proto 1*(SP fmt) CRLF 149 Figure 2 -- Syntax for an SDP media (m=) line (from [4]). 151 [4] defines "TCP" as the token that specifies TCP transport, and 152 [3] defines "TLS" as the token that specifies TLS transport. We 153 now define how to declare that an RTP/AVP stream that uses the framing 154 method appears on the TCP or TLS connection. 156 At least two tokens MUST follow . The first token 157 MUST be "RTP/AVP". Subsequent tokens MUST be unique unsigned 158 integers in the range 0 to 127, that specify an RTP payload type 159 associated with the stream. 161 The TCP or TLS on the media line exclusively receives RTP 162 packets. If a media stream uses RTCP, a second connection exclusively 163 receives the RTCP packets. The port for the RTCP connection is chosen 164 using the algorithms defined in [4] and in related documents. 166 The TCP or TLS connections MAY carry bi-directional traffic, following 167 the semantics defined in [3]. Both directions of a connection MUST 168 carry the same type of packets (RTP or RTCP). The packets MUST 169 exclusively code the RTP or RTCP streams specified on the media line(s) 170 associated with the connection. 172 The RTP stream MUST have an unbroken sequence number order. RTCP stream 173 packets MUST appear as defined in [2], with no lost or re-ordered 174 packets. IETF standards-track documents MAY loosen these restrictions 175 on packet loss and packet ordering. 177 The out-of-band semantics for the connection MUST comply with [3]. 179 5. Example 181 The session descriptions in Figure 3-4 define a TCP RTP/AVT session. 183 v=0 184 o=first 2520644554 2838152170 IN IP4 first.example.net 185 s=Example 186 t=0 0 187 c=IN IP4 192.0.2.105 188 m=audio 9 TCP RTP/AVP 11 189 a=direction:active 191 Figure 3 -- TCP session description for first participant. 193 v=0 194 o=second 2520644554 2838152170 IN IP4 second.example.net 195 s=Example 196 t=0 0 197 c=IN IP4 192.0.2.94 198 m=audio 16112 TCP RTP/AVP 10 11 199 a=direction:passive 201 Figure 4 -- TCP session description for second participant. 203 The session descriptions define two parties that participate in a 204 connection-oriented RTP/AVP session. The first party (Figure 3) is 205 capable of receiving stereo L16 streams (static payload type 11). The 206 second party (Figure 4) is capable of receiving mono (static payload 207 type 10) or stereo L16 streams. 209 The direction attribute in Figure 3 specifies that the first party is 210 "active" and initiates connections, and the direction attribute in 211 Figure 4 specifies that the second party is "passive" and accepts 212 connections [3]. 214 The first party connects to the network address (192.0.2.94) and port 215 (16112) of the second party. Once the connection is established, it is 216 used bi-directionally: the first party sends framed RTP packets to the 217 second party on one direction of the connection, and the second party 218 sends framed RTP packets to the first party in the other direction of 219 the connection. 221 The first party also initiates an RTCP TCP connection to port 16113 222 (16112 + 1, as defined in [4]) of the second party. Once the connection 223 is established, the first party sends framed RTCP packets to the second 224 party on one direction of the connection, and the second party sends 225 framed RTCP packets to the first party in the other direction of the 226 connection. 228 A. Acknowledgements 230 This memo, in part, documents discussions on the AVT mailing list about 231 TCP and RTP. Thanks to all of the participants in these discussions. 233 B. Security Considerations 235 Attackers may send framed packets with large LENGTH values, to exploit 236 security holes in applications. For example, a C implementation may 237 declare a 1500-byte array as a stack variable, and use LENGTH as the 238 bound on the loop that reads the framed packet into the array. This 239 code would work fine for friendly applications that use Etherframe-sized 240 RTP packets, but may be open to exploit by an attacker. 242 C. IANA Considerations 244 [4] defines the syntax of session description media lines. We reproduce 245 this definition in Figure 2 of Section 4 of this memo. 247 [4] defines "TCP" as a token value for the field of media lines, 248 and [3] defines "TLS" as a token value for the field of media 249 lines. [3] and [4] permit other memos to define tokens for the 250 fields that follow "TCP" or "TLS" on a media line. 252 This memo defines tokens for use the "TCP" and "TLS" tokens. At 253 least two tokens MUST follow . The first token MUST 254 be "RTP/AVP". Subsequent tokens MUST be unique unsigned integers 255 in the range 0-127. Section 4 of this memo specifies the semantics 256 associated with the tokens. 258 D. References 260 D.1 Normative References 262 [1] Schulzrinne, H., and S. Casner. "RTP Profile for Audio and Video 263 Conferences with Minimal Control", work in progress, 264 draft-ietf-avt-profile-new-13.txt. 266 [2] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson. 267 "RTP: A transport protocol for real-time applications", work in 268 progress, draft-ietf-avt-rtp-new-12.txt. 270 [3] Yon, D. "Connection-Oriented Media Transport in SDP", work in 271 progress, draft-ietf-mmusic-sdp-comedia-05.txt. 273 [4] Handley, M., Jacobson, V., and C. Perkins. "SDP: Session 274 Description Protocol", work in progress, 275 draft-ietf-mmusic-sdp-new-12.txt. 277 [5] Bradner, S. "Key words for use in RFCs to Indicate Requirement 278 Levels", BCP 14, RFC 2119, March 1997. 280 E. Author Address 282 John Lazzaro 283 UC Berkeley 284 CS Division 285 315 Soda Hall 286 Berkeley CA 94720-1776 287 Email: lazzaro@cs.berkeley.edu 289 F. Intellectual Property Rights Statement 291 The IETF takes no position regarding the validity or scope of any 292 intellectual property or other rights that might be claimed to pertain 293 to the implementation or use of the technology described in this 294 document or the extent to which any license under such rights might or 295 might not be available; neither does it represent that it has made any 296 effort to identify any such rights. Information on the IETF's 297 procedures with respect to rights in standards-track and standards- 298 related documentation can be found in BCP-11. Copies of claims of 299 rights made available for publication and any assurances of licenses to 300 be made available, or the result of an attempt made to obtain a general 301 license or permission for the use of such proprietary rights by 302 implementors or users of this specification can be obtained from the 303 IETF Secretariat. 305 The IETF invites any interested party to bring to its attention any 306 copyrights, patents or patent applications, or other proprietary rights 307 which may cover technology that may be required to practice this 308 standard. Please address the information to the IETF Executive 309 Director. 311 G. Full Copyright Statement 313 Copyright (C) The Internet Society (2002-2003). All Rights Reserved. 315 This document and translations of it may be copied and furnished to 316 others, and derivative works that comment on or otherwise explain it or 317 assist in its implementation may be prepared, copied, published and 318 distributed, in whole or in part, without restriction of any kind, 319 provided that the above copyright notice and this paragraph are included 320 on all such copies and derivative works. However, this document itself 321 may not be modified in any way, such as by removing the copyright notice 322 or references to the Internet Society or other Internet organizations, 323 except as needed for the purpose of developing Internet standards in 324 which case the procedures for copyrights defined in the Internet 325 Standards process must be followed, or as required to translate it into 326 languages other than English. 328 The limited permissions granted above are perpetual and will not be 329 revoked by the Internet Society or its successors or assigns. 331 This document and the information contained herein is provided on an "AS 332 IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK 333 FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT 334 LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT 335 INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR 336 FITNESS FOR A PARTICULAR PURPOSE. 338 Acknowledgement 340 Funding for the RFC Editor function is currently provided by the 341 Internet Society.