idnits 2.17.1 draft-ietf-mmusic-sdp-comedia-01.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: ---------------------------------------------------------------------------- == There are 11 instances of lines with non-ascii characters in the document. == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 10 longer pages, the longest (page 2) being 59 lines Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Authors' Addresses Section. ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** The abstract seems to contain references ([SDP], [7], [UTF-8]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. == There are 27 instances of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 80: '... specifies "TCP" MUST further qualify ...' RFC 2119 keyword, line 89: '...at specifies TLS MUST further qualify ...' RFC 2119 keyword, line 123: '...e port number is RECOMMENDED but may b...' RFC 2119 keyword, line 130: '...oint. The endpoint MUST NOT specify a...' RFC 2119 keyword, line 138: '...pposite endpoint MUST NOT attempt to i...' (23 more instances...) 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.) -- The document date (October 2001) is 8229 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '7' on line 58 == Unused Reference: 'T38' is defined on line 484, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2234 (ref. 'ABNF') (Obsoleted by RFC 4234) ** Obsolete normative reference: RFC 2327 (ref. 'SDP') (Obsoleted by RFC 4566) -- Possible downref: Non-RFC (?) normative reference: ref. 'T38' ** Obsolete normative reference: RFC 2246 (ref. 'TLS') (Obsoleted by RFC 4346) ** Obsolete normative reference: RFC 2044 (ref. 'UTF-8') (Obsoleted by RFC 2279) Summary: 9 errors (**), 0 flaws (~~), 7 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 INTERNET-DRAFT D. Yon 2 Document: draft-ietf-mmusic-sdp-comedia-01.txt Dialout.Net 3 Expires April 2002 October 2001 5 Connection-Oriented Media Transport in SDP 6 8 Status of this Memo 10 This document is an Internet-Draft and is in full conformance with 11 all provisions of Section 10 of RFC2026. 13 Internet-Drafts are working documents of the Internet Engineering 14 Task Force (IETF), its areas, and its working groups. Note that 15 other groups may also distribute working documents as Internet- 16 Drafts. 18 Internet-Drafts are draft documents valid for a maximum of six 19 months and may be updated, replaced, or obsoleted by other documents 20 at any time. It is inappropriate to use Internet-Drafts as reference 21 material or to cite them other than as "work in progress." 23 The list of current Internet-Drafts can be accessed at: 24 http://www.ietf.org/ietf/1id-abstracts.txt 26 The list of Internet-Draft Shadow Directories can be accessed at: 27 http://www.ietf.org/shadow.html. 29 Copyright (C) The Internet Society (2001). All Rights Reserved. 31 Abstract 33 This document describes how to express media transport over 34 connection-oriented protocols using the Session Description Protocol 35 (SDP). It defines two new protocol identifiers: TCP and TLS. It 36 also defines the syntax and semantics for an SDP "direction" 37 attribute that describes the connection setup procedure. 39 Yon 1 40 Introduction 42 The Session Description Protocol [SDP] provides a general-purpose 43 format for describing multimedia sessions in announcements or 44 invitations. SDP uses an entirely textual data format (the US-ASCII 45 subset of [UTF-8]) to maximize portability among transports. SDP 46 does not define a protocol, but only the syntax to describe a 47 multimedia session with sufficient information to discover and 48 participate in that session. Session descriptions may be sent using 49 any number of existing application protocols for transport (e.g., 50 SAP, SIP, RTSP, email, HTTP, etc.). 52 Terminology 54 In this document, the key words "MUST", "MUST NOT", "REQUIRED", 55 "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", 56 and "OPTIONAL" are to be interpreted as described in RFC 2119 [7] 57 and indicate requirement levels for compliant implementations. 59 Motivation 61 [SDP] describes two protocol identifiers: RTP/AVP and UDP, both of 62 which are unreliable, connectionless protocols, an appropriate 63 choice for multimedia streams. There are, however, applications for 64 which the connection-oriented transports such as TCP are more 65 appropriate, but [SDP] provides no way to describe a session that 66 uses protocols other than RTP or UDP. 68 Connection-oriented protocols introduce a new factor when describing 69 a session: not only must it be possible to express that a protocol 70 will be based on this protocol, but it must also describe the 71 connection setup procedure. 73 1 Protocol Identifiers 75 1.1 TCP 77 The TCP protocol identifier is similar to the UDP protocol 78 identifier in that it only describes the transport protocol without 79 any connotation as to the upper-layer protocol. An m= line that 80 specifies "TCP" MUST further qualify the protocol using a fmt 81 identifier (see [SDP] Appendix B). 83 1.2 TLS 85 The TLS protocol identifier specifies that the session will use the 86 Transport Layer Security protocol [TLS] with an implied transport 87 protocol of TCP. To describe a media session that uses TLS over 88 TCP, the protocol identifier "TLS" must be specified in the m= line. 89 An m= line that specifies TLS MUST further qualify the protocol 90 using a fmt identifier. 92 Yon INTERNET-DRAFT � Expires January 2002 2 93 2 Direction Attribute 95 An important attribute of connection-oriented protocols is the setup 96 procedure. One endpoint needs to initiate the connection and the 97 other endpoint needs to accept the connection. The direction 98 attribute is used to describe these roles, and the syntax is as 99 follows: 101 a=direction: [] 103 The is one of the following: 105 passive: The endpoint will accept an incoming connection. 107 active: The endpoint will initiate an outgoing connection. 109 both: The endpoint will both accept an incoming connection 110 and will initiate an outgoing connection. 112 reuse: The endpoint will use the connection that has already 113 been established with the opposite endpoint. 115 The is a sequence of values that describe the 116 address and port number from where the connection will originate, 117 and consists of the following values: 119 nettype addrtype unicast-address [port] 121 The is an optional value that may be specified with 122 direction:active, direction:both, or direction:reuse. Within the 123 , the source port number is RECOMMENDED but may be 124 omitted. 126 2.1 Semantics of direction:passive 128 By specifying direction:passive, the endpoint indicates that the 129 port number specified in the m= line is available to accept a 130 connection from the other endpoint. The endpoint MUST NOT specify a 131 after direction:passive. 133 2.2 Semantics of direction:active 135 By specifying direction:active, the endpoint indicates that it will 136 initiate a connection to the port number on the m= line of the other 137 endpoint. The port number on its own m= line is irrelevant, and the 138 opposite endpoint MUST NOT attempt to initiate a connection to the 139 port number specified there. Nevertheless, since the m= line must 140 contain a valid port number, the endpoint specifying 141 direction:active SHOULD specify a port number of 9 (the discard 142 port) on its m= line. The endpoint MUST NOT specify a port number 143 of zero, as that carries other semantics in [SDP]. 145 Yon INTERNET-DRAFT � Expires January 2002 3 146 The endpoint SHOULD specify the address and port number from which 147 it will initiate the connection in the position on 148 the a= line. 150 2.3 Semantics of direction:both 152 By specifying direction:both, the endpoint indicates that it will 153 both accept a TCP connection on the port number of its own m= line, 154 and that it will also initiate a connection to the port number on 155 the m= line of the other endpoint. 157 As with direction:active, the endpoint SHOULD specify the address 158 and port number from which it will initiate the connection in the 159 position on the a= line. 161 Since this attribute describes behavior that is similar to 162 connectionless media descriptions in [SDP], it is the default value 163 for the direction attribute and is therefore optional. 165 Endpoints may choose to specify direction:both for one or more of 166 the following reasons: 168 1) The endpoint has no preference as to whether it accepts or 169 initiates the connection, and therefore is offering the remote 170 endpoint a choice of connection setup procedures. 172 2) The endpoints intend to use a single connection to transport 173 the media, but it is not known whether firewall issues will 174 prevent either endpoint from initiating or accepting the 175 connection. Therefore both endpoints will attempt to initiate 176 a connection in hopes that at least one will succeed. 178 3) The endpoints intend to use two connections to transport the 179 media, and one must be initiated by the remote endpoint and 180 the other must be initiated by the local endpoint. 182 If one endpoint specifies either direction:active or 183 direction:passive and the other specifies direction:both, both 184 endpoints MUST behave as if the latter had specified the inverse 185 direction of the former. For example, specifying direction:both 186 when the other endpoint specifies direction:active SHALL cause both 187 endpoints to behave as if the former had specified 188 direction:passive. Conversely, specifying direction:both when the 189 other endpoint specifies direction:passive SHALL cause both 190 endpoints to behave as if the former had specified direction:active. 192 If both endpoints specify direction:both then each endpoint MUST 193 initiate a connection to the port number specified on the m= line of 194 the opposite endpoint. If a single connection is needed (case #1 or 195 #2 above), there is one exception to this requirement: if an 196 endpoint receives the incoming connection from the opposite endpoint 197 prior to initiating its own outbound connection, then that endpoint 198 MAY use that connection rather than attempt to make an outbound 199 connection to the opposite endpoint. 201 Yon INTERNET-DRAFT � Expires January 2002 4 202 If only one connection succeeds, then that connection will be used 203 to carry the media. Once it has transmitted data on this 204 connection, the initiating endpoint MUST NOT perform another 205 connection attempt to the accepting endpoint. This allows the 206 accepting endpoint to release or recycle the listening port for 207 another session once it has received data from the initiating 208 endpoint. 210 If both connections succeed but only one was needed (case #2 above), 211 the following rules SHALL apply: 213 a) Each endpoint MUST accept data from either connection. 215 b) Once an endpoint has transmitted data to one of the 216 connections, it MUST use that connection exclusively for 217 transmission. 219 c) Once an endpoint has transmitted AND received data, if one of 220 the connections is determined to be idle, the endpoint MAY 221 close the idle connection. 223 2.4 Semantics of direction:reuse 225 By specifying direction:reuse, the endpoint indicates that it is 226 changing the parameter(s) of an existing session on a previously 227 established connection with the opposite endpoint. Therefore no new 228 connections are to be created. This is intended for cases where 229 media types are added, removed, or changed during a session. For 230 example, an endpoint adding a video stream to an existing audio 231 session may elect to multiplex the new stream over the same 232 connection that is currently transporting the audio stream. 234 2.5 Bidirectional versus Unidirectional Media 236 In traditional SDP transport types the flow is unidirectional. If 237 the intent is for media to flow in both directions, both endpoints 238 must specify SDP that describes where to deliver the media and what 239 media type(s) to use. For example, if only Endpoint A presents SDP 240 then media can only flow towards Endpoint A, as Endpoint B has not 241 specified where and how to send media to it. 243 Because most connection-oriented media is inherently bi-directional, 244 endpoints may encounter a situation where only one side presented 245 SDP yet there is now a network path that can carry media in either 246 direction. In keeping with traditional SDP semantics, an endpoint 247 MUST NOT send data to the other endpoint unless it has specified SDP 248 information describing the type of media it can accept. 250 It is, however, perfectly acceptable for an endpoint to transmit 251 data on the same connection it is using to receive data, so long as 252 the other endpoint has advertised its willingness to accept data. 253 Likewise, it is perfectly acceptable for an endpoint to receive data 255 Yon INTERNET-DRAFT � Expires January 2002 5 256 on the same connection it is using to transmit data to the 257 corresponding remote endpoint. In other words, for a bi-directional 258 application-level session, a connection may be used to send data in 259 both directions (contingent to rules outlined in Section 2.3) as 260 long as one side of the connection is attached to either of the 261 advertised SDP transport addresses. 263 3 Source-Address Considerations 265 In the cases where the endpoint is initiating the connection, it is 266 RECOMMENDED that a source address be specified on the a= line by 267 that endpoint. It is also RECOMMENDED that the source port be 268 included in the source address. In most environments, the source 269 port number can be determined by binding the socket before 270 initiating the connect, as shown in the sample C code below: 272 { 273 SOCKET s_id 274 SOCKADDR_IN cli_sin; 275 int namelen; 277 // Create the socket 278 s_id = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP); 280 // Bind the socket to any IP address and port 281 bzero((char *)&cli_sin,sizeof(cli_sin)); 282 cli_sin.sin_family = AF_INET; 283 cli_sin.sin_addr.s_addr = htonl(INADDR_ANY); 284 cli_sin.sin_port = 0; 285 bind(s_id,(SOCKADDR *)&cli_sin,sizeof(cli_sin)); 287 // Find the port number that was bound 288 namelen = sizeof(cli_sin); 289 getsockname(s_id,(SOCKADDR *)&cli_sin,&namelen); 291 // Print the port number 292 printf("Source Port = %d\n",ntohs(cli_sin.sin_port)); 293 } 295 If the source address is omitted, the receiver of the SDP packet 296 MUST NOT make any assumptions in regards to the address or port from 297 where the connection will originate. In particular, the receiver 298 MUST NOT assume that the address information listed on the c= line 299 has any implication as to where the media connection originates. 301 NOTE: 302 The motivation for specifying the source address is 303 twofold. First, it aids Application-Level Proxies by 304 explicitly announcing the source of the outbound 305 connection. This allows, for example, a dynamic 306 firewall pinhole to be created that will allow the 307 connection to pass. 309 Yon INTERNET-DRAFT � Expires January 2002 6 310 Second, it allows the passive endpoint to correlate 311 the incoming connection with the session being 312 negotiated. Note that great care must be taken when 313 using the source address as a means to identify 314 incoming connections, as Network Address Translation 315 (NAT) can render the source address unreliable. In 316 addition if the originating endpoint omits the source 317 port, the source address can be ambiguous if multiple, 318 logical endpoints share the same network address. 319 Therefore it is NOT RECOMMENDED that the source 320 address be used for this purpose unless the SDP occurs 321 in the context of a controlled network topology that 322 guarantees that the source address is both correct 323 (i.e., no NAT, or a NAT with an Application-Level 324 Proxy that rewrites the SDP) and unambiguous (i.e., 325 the source port is specified). 327 3.1 Source Address Timing Considerations 329 When used in conjunction with a session signaling protocol such as 330 SIP, there may be cases where an endpoint initiates a connection 331 prior to the opposite endpoint receiving the SDP that describe the 332 source address of the initiating endpoint. Therefore, an endpoint 333 that has advertised an address and port number with direction:both 334 or direction:passive MUST be ready to accept a connection on that 335 address and port immediately. If the accepting endpoint requires 336 the source address to identify the initiating endpoint, it MUST keep 337 the connection active and allow sufficient time for the source 338 address to arrive before discarding the connection. 340 4 Examples 342 What follows are a number of examples that show the most common 343 usage of the direction attribute combined with TCP-based media 344 descriptions. For the purpose of brevity, the main portion of the 345 session description is omitted in the examples and is assumed to be 346 the following: 348 v=0 349 o=me 2890844526 2890842807 IN IP4 10.1.1.2 350 e=Me 351 s=Call me using TCP 352 t=0 0 354 4.1 Example: simple passive/active 356 An endpoint at 10.1.1.2 signals the availability of a T.38 fax 357 session at port 54111: 359 c=IN IP4 10.1.1.2 360 m=image 54111 TCP t38 361 a=direction:passive 363 Yon INTERNET-DRAFT � Expires January 2002 7 364 An endpoint at 10.1.1.1 receiving this description responds with the 365 following: 367 c=IN IP4 10.1.1.1 368 m=image 9 TCP t38 369 a=direction:active 371 The endpoint at 10.1.1.1 then initiates the TCP connection to port 372 54111 at 10.1.1.2. Note that the TCP connection may originate from 373 any address or port. The endpoint at 10.1.1.1 could have optionally 374 committed to a source address with a simple modification: 376 c=IN IP4 10.1.1.1 377 m=image 9 TCP t38 378 a=direction:active IN IP4 10.1.1.1 1892 380 By adding the source address to the a= line, the endpoint at 381 10.1.1.1 must now use a source port of 1892 when initiating the TCP 382 connection to port 54111 at 10.1.1.2. 384 4.2 Example: agnostic both 386 An endpoint at 10.1.1.2 signals the availability of a T.38 fax 387 session at TCP port 54111, but is also willing to set up the media 388 stream by initiating the TCP connection: 390 c=IN IP4 10.1.1.2 391 m=image 54111 TCP t38 392 a=direction:both 394 The endpoint at 10.1.1.1 has three choices: 396 1) It can respond with either of the two direction:active 397 descriptions listed in the previous example. In this case the 398 endpoint at 10.1.1.1 must initiate a connection to port 54111 399 at 10.1.1.2. 401 2) It can respond with a description similar to the following: 403 c=IN IP4 10.1.1.1 404 m=image 54321 TCP t38 405 a=direction:passive 407 In this case the endpoint at 10.1.1.2 must initiate a 408 connection to port 54321 at 10.1.1.1. 410 3) It can respond with a description that specifies 411 direction:both, which is covered in the next example. 413 4.3 Example: redundant both 415 An endpoint at 10.1.1.2 uses the same description as the previous 416 example: 418 Yon INTERNET-DRAFT � Expires January 2002 8 419 c=IN IP4 10.1.1.2 420 m=image 54111 TCP t38 421 a=direction:both 423 Unlike the previous example, the endpoint at 10.1.1.1 responds with 424 the following description: 426 c=IN IP4 10.1.1.1 427 m=image 54321 TCP t38 428 a=direction:both 430 This will cause the endpoint at 10.1.1.2 to initiate a connection to 431 port 54321 at 10.1.1.1, and the endpoint at 10.1.1.1 to initiate a 432 connection to port 54111 at 10.1.1.2. Whichever TCP connection 433 succeeds will be used. If both succeed, one of the connections may 434 be closed as an optimization, using the rules in section 2.3. 436 5 Security Considerations 438 See [SDP] for security and other considerations specific to the 439 Session Description Protocol in general. There are no new security 440 considerations introduced by these protocol identifiers and 441 attributes. 443 6 IANA Considerations 445 As recommended by [SDP] Appendix B, the direction attribute 446 described in this document should be registered with IANA, as should 447 the "TCP" and "TLS" protocol identifiers. 449 Acknowledgements 451 The author would like to thank Jonathan Rosenberg, Anders 452 Kristensen, Paul Kyzivat, and Robert Fairlie-Cuninghame for their 453 valuable insights. 455 Yon INTERNET-DRAFT � Expires January 2002 9 456 Appendix A: Direction Attribute Syntax 458 This appendix provides an Augmented BNF [ABNF] grammar for 459 expressing the direction attribute for connection setup. It is 460 intended as an extension to the grammar for the Session Description 461 Protocol, as defined in [SDP]. Specifically, it describes the 462 syntax for the new "connection-setup" attribute field, which MAY be 463 either a session-level or media-level attribute. 465 connection-setup = "direction" ":" direction-spec 467 direction-spec = "passive" | qualified-direction 469 qualified-direction = direction-ident | direction-ident source 471 direction-ident = "both" | "active" | "reuse" 473 source = nettype addrtype unicast-address | 474 nettype addrtype unicast-address port 476 References 478 [ABNF] D. Crocker, P. Overell, "Augmented BNF for Syntax 479 Specifications: ABNF," RFC 2234, November 1997 481 [SDP] M. Handley, V. Jacobson, "SDP: Session Description 482 Protocol," RFC 2327, April 1998 484 [T38] International Telecommunication Union, "Procedures for 485 Real-Time Group 3 Facsimile Communications over IP 486 Networks," Recommendation T.38, June 1998 488 [TLS] T. Dierks, C. Allen, "The TLS Protocol," RFC 2246, 489 January 1999 491 [UTF-8] F. Yergeau, "UTF-8, a transformation format of Unicode 492 and ISO 10646," RFC 2044, October 1996 494 Author�s Address 496 David Yon 497 Dialout.Net, Inc. 498 One Indian Head Plaza 499 Nashua, NH 03060 501 Phone: (603) 324-4100 502 EMail: yon@dialout.net 504 Full Copyright Statement 506 Copyright (C) The Internet Society (2001). All Rights Reserved. 508 Yon INTERNET-DRAFT � Expires January 2002 10 509 This document and translations of it may be copied and furnished to 510 others, and derivative works that comment on or otherwise explain it 511 or assist in its implementation may be prepared, copied, published 512 and distributed, in whole or in part, without restriction of any 513 kind, provided that the above copyright notice and this paragraph 514 are included on all such copies and derivative works. However, this 515 document itself may not be modified in any way, such as by removing 516 the copyright notice or references to the Internet Society or other 517 Internet organizations, except as needed for the purpose of 518 developing Internet standards in which case the procedures for 519 copyrights defined in the Internet Standards process must be 520 followed, or as required to translate it into languages other than 521 English. 523 The limited permissions granted above are perpetual and will not be 524 revoked by the Internet Society or its successors or assigns. 526 This document and the information contained herein is provided on an 527 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 528 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 529 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 530 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 531 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE." 533 Yon INTERNET-DRAFT � Expires January 2002 11