idnits 2.17.1 draft-ietf-dtn-tcpclv4-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document obsoletes RFC7242, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (Mar 20, 2018) is 2228 days in the past. Is this intentional? 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: 'I1' is mentioned on line 419, but not defined == Missing Reference: 'L1' is mentioned on line 407, but not defined == Missing Reference: 'L2' is mentioned on line 407, but not defined == Missing Reference: 'L3' is mentioned on line 413, but not defined == Outdated reference: A later version (-31) exists of draft-ietf-dtn-bpbis-10 ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Downref: Normative reference to an Experimental RFC: RFC 5050 ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 7525 (Obsoleted by RFC 9325) == Outdated reference: A later version (-27) exists of draft-ietf-dtn-bpsec-06 Summary: 5 errors (**), 0 flaws (~~), 7 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Delay Tolerant Networking B. Sipos 3 Internet-Draft RKF Engineering 4 Obsoletes: 7242 (if approved) M. Demmer 5 Intended status: Standards Track UC Berkeley 6 Expires: September 21, 2018 J. Ott 7 Aalto University 8 S. Perreault 9 Mar 20, 2018 11 Delay-Tolerant Networking TCP Convergence Layer Protocol Version 4 12 draft-ietf-dtn-tcpclv4-07 14 Abstract 16 This document describes a revised protocol for the TCP-based 17 convergence layer (TCPCL) for Delay-Tolerant Networking (DTN). The 18 protocol revision is based on implementation issues in the original 19 TCPCL Version 3 and updates to the Bundle Protocol contents, 20 encodings, and convergence layer requirements in Bundle Protocol 21 Version 7. Specifically, the TCPCLv4 uses CBOR-encoded BPv7 bundles 22 as its service data unit being transported and provides a reliable 23 transport of such bundles. Several new IANA registries are defined 24 for TCPCLv4 which define some behaviors inherited from TCPCLv3 but 25 with updated encodings and/or semantics. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at https://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on September 21, 2018. 44 Copyright Notice 46 Copyright (c) 2018 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (https://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 62 1.1. Convergence Layer Services . . . . . . . . . . . . . . . 4 63 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 6 64 2.1. Definitions Specific to the TCPCL Protocol . . . . . . . 6 65 3. General Protocol Description . . . . . . . . . . . . . . . . 7 66 3.1. TCPCL Session Overview . . . . . . . . . . . . . . . . . 7 67 3.2. Example Message Exchange . . . . . . . . . . . . . . . . 8 68 4. Session Establishment . . . . . . . . . . . . . . . . . . . . 10 69 4.1. TCP Connection . . . . . . . . . . . . . . . . . . . . . 11 70 4.2. Contact Header . . . . . . . . . . . . . . . . . . . . . 11 71 4.2.1. Header Extension Items . . . . . . . . . . . . . . . 14 72 4.3. Validation and Parameter Negotiation . . . . . . . . . . 15 73 4.3.1. Reactive Fragmentation Extension . . . . . . . . . . 16 74 4.4. Session Security . . . . . . . . . . . . . . . . . . . . 17 75 4.4.1. TLS Handshake Result . . . . . . . . . . . . . . . . 18 76 4.4.2. Example TLS Initiation . . . . . . . . . . . . . . . 18 77 5. Established Session Operation . . . . . . . . . . . . . . . . 19 78 5.1. Message Type Codes . . . . . . . . . . . . . . . . . . . 19 79 5.2. Upkeep and Status Messages . . . . . . . . . . . . . . . 20 80 5.2.1. Session Upkeep (KEEPALIVE) . . . . . . . . . . . . . 20 81 5.2.2. Message Rejection (MSG_REJECT) . . . . . . . . . . . 21 82 5.3. Bundle Transfer . . . . . . . . . . . . . . . . . . . . . 22 83 5.3.1. Bundle Transfer ID . . . . . . . . . . . . . . . . . 23 84 5.3.2. Transfer Initialization (XFER_INIT) . . . . . . . . . 23 85 5.3.3. Data Transmission (XFER_SEGMENT) . . . . . . . . . . 24 86 5.3.4. Data Acknowledgments (XFER_ACK) . . . . . . . . . . . 26 87 5.3.5. Transfer Refusal (XFER_REFUSE) . . . . . . . . . . . 27 88 6. Session Termination . . . . . . . . . . . . . . . . . . . . . 29 89 6.1. Shutdown Message (SHUTDOWN) . . . . . . . . . . . . . . . 29 90 6.2. Idle Session Shutdown . . . . . . . . . . . . . . . . . . 32 91 7. Security Considerations . . . . . . . . . . . . . . . . . . . 32 92 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33 93 8.1. Port Number . . . . . . . . . . . . . . . . . . . . . . . 34 94 8.2. Protocol Versions . . . . . . . . . . . . . . . . . . . . 34 95 8.3. Header Extension Types . . . . . . . . . . . . . . . . . 35 96 8.4. Message Types . . . . . . . . . . . . . . . . . . . . . . 35 97 8.5. XFER_REFUSE Reason Codes . . . . . . . . . . . . . . . . 36 98 8.6. SHUTDOWN Reason Codes . . . . . . . . . . . . . . . . . . 37 99 8.7. MSG_REJECT Reason Codes . . . . . . . . . . . . . . . . . 38 100 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 38 101 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 38 102 10.1. Normative References . . . . . . . . . . . . . . . . . . 38 103 10.2. Informative References . . . . . . . . . . . . . . . . . 39 104 Appendix A. Significant changes from RFC7242 . . . . . . . . . . 40 105 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 41 107 1. Introduction 109 This document describes the TCP-based convergence-layer protocol for 110 Delay-Tolerant Networking. Delay-Tolerant Networking is an end-to- 111 end architecture providing communications in and/or through highly 112 stressed environments, including those with intermittent 113 connectivity, long and/or variable delays, and high bit error rates. 114 More detailed descriptions of the rationale and capabilities of these 115 networks can be found in "Delay-Tolerant Network Architecture" 116 [RFC4838]. 118 An important goal of the DTN architecture is to accommodate a wide 119 range of networking technologies and environments. The protocol used 120 for DTN communications is the Bundle Protocol Version 7 (BPv7) 121 [I-D.ietf-dtn-bpbis], an application-layer protocol that is used to 122 construct a store-and-forward overlay network. BPv7 requires the 123 services of a "convergence-layer adapter" (CLA) to send and receive 124 bundles using the service of some "native" link, network, or Internet 125 protocol. This document describes one such convergence-layer adapter 126 that uses the well-known Transmission Control Protocol (TCP). This 127 convergence layer is referred to as TCP Convergence Layer Version 4 128 (TCPCLv4). For the remainder of this document, the abbreviation "BP" 129 without the version suffix refers to BPv7. For the remainder of this 130 document, the abbreviation "TCPCL" without the version suffix refers 131 to TCPCLv4. 133 The locations of the TCPCL and the BP in the Internet model protocol 134 stack (described in [RFC1122]) are shown in Figure 1. In particular, 135 when BP is using TCP as its bearer with TCPCL as its convergence 136 layer, both BP and TCPCL reside at the application layer of the 137 Internet model. 139 +-------------------------+ 140 | DTN Application | -\ 141 +-------------------------| | 142 | Bundle Protocol (BP) | -> Application Layer 143 +-------------------------+ | 144 | TCP Conv. Layer (TCPCL) | | 145 +-------------------------+ | 146 | TLS (optional) | -/ 147 +-------------------------+ 148 | TCP | ---> Transport Layer 149 +-------------------------+ 150 | IPv4/IPv6 | ---> Network Layer 151 +-------------------------+ 152 | Link-Layer Protocol | ---> Link Layer 153 +-------------------------+ 155 Figure 1: The Locations of the Bundle Protocol and the TCP 156 Convergence-Layer Protocol above the Internet Protocol Stack 158 This document describes the format of the protocol data units passed 159 between entities participating in TCPCL communications. This 160 document does not address: 162 o The format of protocol data units of the Bundle Protocol, as those 163 are defined elsewhere in [RFC5050] and [I-D.ietf-dtn-bpbis]. This 164 includes the concept of bundle fragmentation or bundle 165 encapsulation. The TCPCL transfers bundles as opaque data blocks. 167 o Mechanisms for locating or identifying other bundle nodes within 168 an internet. 170 1.1. Convergence Layer Services 172 This version of the TCPCL provides the following services to support 173 the overlaying Bundle Protocol agent: 175 Attempt Session The TCPCL allows a BP agent to pre-emptively attempt 176 to establish a TCPCL session with a peer node. Each session 177 attempt can send a different set of contact header parameters as 178 directed by the BP agent. 180 Shutdown Session The TCPCL allows a BP agent to pre-emptively 181 shutdown an established TCPCL session with a peer node. The 182 shutdown request is on a per-session basis. 184 Session is Started The TCPCL supports indication when a new TCP 185 connection has been started (as either client or server) before 186 the TCPCL handshake has begun. 188 Session is Established The TCPCL supports indication when a new 189 session has been fully established and is ready for its first 190 transfer. 192 Session is Shutdown The TCPCL supports indication when an 193 established session has been ended by normal exchange of SHUTDOWN 194 messages with all transfers completed. 196 Session is Failed The TCPCL supports indication when a session 197 fails, either during contact negotiation, TLS negotiation, or 198 after establishement for any reason other than normal shutdown. 200 Begin Transmission The principal purpose of the TCPCL is to allow a 201 BP agent to transmit bundle data over an established TCPCL 202 session. Transmission request is on a per-session basis, the CL 203 does not necessarily perform any per-session or inter-session 204 queueing. Any queueing of transmissions is the obligation of the 205 BP agent. 207 Transmission Availability Because TCPCL transmits serially over a 208 TCP connection, it suffers from "head of queue blocking" and 209 supports indication of when an established session is live-but- 210 idle (i.e. available for immediate transfer start) or live-and- 211 not-idle. 213 Transmission Success The TCPCL supports positive indication when a 214 bundle has been fully transferred to a peer node. 216 Transmission Intermediate Progress The TCPCL supports positive 217 indication of intermediate progress of transferr to a peer node. 218 This intermediate progress is at the granularity of each 219 transferred segment. 221 Transmission Failure The TCPCL supports positive indication of 222 certain reasons for bundle transmission failure, notably when the 223 peer node rejects the bundle or when a TCPCL session ends before 224 transferr success. The TCPCL itself does not have a notion of 225 transfer timeout. 227 Interrupt Reception The TCPCL allows a BP agent to interrupt an 228 individual transfer before it has fully completed (successfully or 229 not). 231 Reception Success The TCPCL supports positive indication when a 232 bundle has been fully transferred from a peer node. 234 Reception Intermediate Progress The TCPCL supports positive 235 indication of intermediate progress of transfer from the peer 236 node. This intermediate progress is at the granularity of each 237 transferred segment. Intermediate reception indication allows a 238 BP agent the chance to inspect bundle header contents before the 239 entire bundle is available, and thus supports the "Reception 240 Interruption" capability. 242 Reception Failure The TCPCL supports positive indication of certain 243 reasons for reception failure, notably when the local node rejects 244 an attempted transfer for some local policy reason or when a TCPCL 245 session ends before transfer success. The TCPCL itself does not 246 have a notion of transfer timeout. 248 2. Requirements Language 250 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 251 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 252 document are to be interpreted as described in [RFC2119]. 254 2.1. Definitions Specific to the TCPCL Protocol 256 This section contains definitions specific to the TCPCL protocol. 258 TCPCL Node: This term refers to either side of a negotiating or in- 259 service TCPCL Session. For most TCPCL behavior, the two nodes are 260 symmetric and there is no protocol distinction between them. Some 261 specific behavior, particularly during negotiation, distinguishes 262 between the connecting node and the connected-to node. For the 263 remainder of this document, the term "node" without the prefix 264 "TCPCL" refers to a TCPCL node. 266 TCP Connection: This term refers to a transport connection using TCP 267 as the transport protocol. 269 TCPCL Session: A TCPCL session (as opposed to a TCP connection) is a 270 TCPCL communication relationship between two bundle nodes. The 271 lifetime of a TCPCL session is bound to the lifetime of an 272 underlying TCP connection. A TCPCL session is terminated when the 273 TCP connection ends, due either to one or both nodes actively 274 terminating the TCP connection or due to network errors causing a 275 failure of the TCP connection. For the remainder of this 276 document, the term "session" without the prefix "TCPCL" refers to 277 a TCPCL session. 279 Session parameters: These are a set of values used to affect the 280 operation of the TCPCL for a given session. The manner in which 281 these parameters are conveyed to the bundle node and thereby to 282 the TCPCL is implementation dependent. However, the mechanism by 283 which two bundle nodes exchange and negotiate the values to be 284 used for a given session is described in Section 4.3. 286 Transfer: This refers to the procedures and mechanisms for 287 conveyance of an individual bundle from one node to another. Each 288 transfer within TCPCL is identified by a Transfer ID number which 289 is unique only to a single direction within a single Session. 291 Idle Session: A TCPCL session is idle while the only messages being 292 transmitted or received are KEEPALIVE messages. 294 Live Session: A TCPCL session is live while any messages are being 295 transmitted or received. 297 Reason Codes: The TCPCL uses numeric codes to encode specific 298 reasons for individual failure/error message types. 300 3. General Protocol Description 302 The service of this protocol is the transmission of DTN bundles via 303 the Transmission Control Protocol (TCP). This document specifies the 304 encapsulation of bundles, procedures for TCP setup and teardown, and 305 a set of messages and node requirements. The general operation of 306 the protocol is as follows. 308 3.1. TCPCL Session Overview 310 First, one node establishes a TCPCL session to the other by 311 initiating a TCP connection in accordance with [RFC0793]. After 312 setup of the TCP connection is complete, an initial contact header is 313 exchanged in both directions to set parameters of the TCPCL session 314 and exchange a singleton endpoint identifier for each node (not the 315 singleton Endpoint Identifier (EID) of any application running on the 316 node) to denote the bundle-layer identity of each DTN node. This is 317 used to assist in routing and forwarding messages (e.g. to prevent 318 loops). 320 Once the TCPCL session is established and configured in this way, 321 bundles can be transferred in either direction. Each transfer is 322 performed by an initialization (XFER_INIT) message followed by one or 323 more logical segments of data within an XFER_SEGMENT message. 324 Multiple bundles can be transmitted consecutively on a single TCPCL 325 connection. Segments from different bundles are never interleaved. 326 Bundle interleaving can be accomplished by fragmentation at the BP 327 layer or by establishing multiple TCPCL sessions between the same 328 peers. 330 A feature of this protocol is for the receiving node to send 331 acknowledgment (XFER_ACK) messages as bundle data segments arrive . 332 The rationale behind these acknowledgments is to enable the sender 333 node to determine how much of the bundle has been received, so that 334 in case the session is interrupted, it can perform reactive 335 fragmentation to avoid re-sending the already transmitted part of the 336 bundle. In addition, there is no explicit flow control on the TCPCL 337 layer. 339 A TCPCL receiver can interrupt the transmission of a bundle at any 340 point in time by replying with a XFER_REFUSE message, which causes 341 the sender to stop transmission of the associated bundle (if it 342 hasn't already finished transmission) Note: This enables a cross- 343 layer optimization in that it allows a receiver that detects that it 344 already has received a certain bundle to interrupt transmission as 345 early as possible and thus save transmission capacity for other 346 bundles. 348 For sessions that are idle, a KEEPALIVE message is sent at a 349 negotiated interval. This is used to convey node live-ness 350 information during otherwise message-less time intervals. 352 A SHUTDOWN message is used to start the closing of a TCPCL session 353 (see Section 6.1). During shutdown sequencing, in-progress transfers 354 can be completed but no new transfers can be initiated. A SHUTDOWN 355 message can also be used to refuse a session setup by a peer (see 356 Section 4.3). It is an implementation matter to determine whether or 357 not to close a TCPCL session while there are no transfers queued or 358 in-progress. 360 TCPCL is a symmetric protocol between the peers of a session. Both 361 sides can start sending data segments in a session, and one side's 362 bundle transfer does not have to complete before the other side can 363 start sending data segments on its own. Hence, the protocol allows 364 for a bi-directional mode of communication. Note that in the case of 365 concurrent bidirectional transmission, acknowledgment segments MAY be 366 interleaved with data segments. 368 3.2. Example Message Exchange 370 The following figure depicts the protocol exchange for a simple 371 session, showing the session establishment and the transmission of a 372 single bundle split into three data segments (of lengths "L1", "L2", 373 and "L3") from Node A to Node B. 375 Note that the sending node MAY transmit multiple XFER_SEGMENT 376 messages without necessarily waiting for the corresponding XFER_ACK 377 responses. This enables pipelining of messages on a channel. 379 Although this example only demonstrates a single bundle transmission, 380 it is also possible to pipeline multiple XFER_SEGMENT messages for 381 different bundles without necessarily waiting for XFER_ACK messages 382 to be returned for each one. However, interleaving data segments 383 from different bundles is not allowed. 385 No errors or rejections are shown in this example. 387 Node A Node B 388 ====== ====== 389 +-------------------------+ +-------------------------+ 390 | Contact Header | -> <- | Contact Header | 391 +-------------------------+ +-------------------------+ 393 +-------------------------+ 394 | XFER_INIT | -> 395 | Transfer ID [I1] | 396 | Total Length [L1] | 397 +-------------------------+ 398 +-------------------------+ 399 | XFER_SEGMENT (start) | -> 400 | Transfer ID [I1] | 401 | Length [L1] | 402 | Bundle Data 0..(L1-1) | 403 +-------------------------+ 404 +-------------------------+ +-------------------------+ 405 | XFER_SEGMENT | -> <- | XFER_ACK (start) | 406 | Transfer ID [I1] | | Transfer ID [I1] | 407 | Length [L2] | | Length [L1] | 408 |Bundle Data L1..(L1+L2-1)| +-------------------------+ 409 +-------------------------+ 410 +-------------------------+ +-------------------------+ 411 | XFER_SEGMENT (end) | -> <- | XFER_ACK | 412 | Transfer ID [I1] | | Transfer ID [I1] | 413 | Length [L3] | | Length [L1+L2] | 414 |Bundle Data | +-------------------------+ 415 | (L1+L2)..(L1+L2+L3-1)| 416 +-------------------------+ 417 +-------------------------+ 418 <- | XFER_ACK (end) | 419 | Transfer ID [I1] | 420 | Length [L1+L2+L3] | 421 +-------------------------+ 423 +-------------------------+ +-------------------------+ 424 | SHUTDOWN | -> <- | SHUTDOWN | 425 +-------------------------+ +-------------------------+ 427 Figure 2: An Example of the Flow of Protocol Messages on a Single TCP 428 Session between Two Nodes (A and B) 430 4. Session Establishment 432 For bundle transmissions to occur using the TCPCL, a TCPCL session 433 MUST first be established between communicating nodes. It is up to 434 the implementation to decide how and when session setup is triggered. 436 For example, some sessions MAY be opened proactively and maintained 437 for as long as is possible given the network conditions, while other 438 sessions MAY be opened only when there is a bundle that is queued for 439 transmission and the routing algorithm selects a certain next-hop 440 node. 442 4.1. TCP Connection 444 To establish a TCPCL session, a node MUST first establish a TCP 445 connection with the intended peer node, typically by using the 446 services provided by the operating system. Destination port number 447 4556 has been assigned by IANA as the Registered Port number for the 448 TCP convergence layer. Other destination port numbers MAY be used 449 per local configuration. Determining a peer's destination port 450 number (if different from the registered TCPCL port number) is up to 451 the implementation. Any source port number MAY be used for TCPCL 452 sessions. Typically an operating system assigned number in the TCP 453 Ephemeral range (49152-65535) is used. 455 If the node is unable to establish a TCP connection for any reason, 456 then it is an implementation matter to determine how to handle the 457 connection failure. A node MAY decide to re-attempt to establish the 458 connection. If it does so, it MUST NOT overwhelm its target with 459 repeated connection attempts. Therefore, the node MUST retry the 460 connection setup no earlier than some delay time from the last 461 attempt, and it SHOULD use a (binary) exponential backoff mechanism 462 to increase this delay in case of repeated failures. In case a 463 SHUTDOWN message specifying a reconnection delay is received, that 464 delay is used as the initial delay. The default initial re-attempt 465 delay SHOULD be no shorter than 1 second and SHOULD be configurable 466 since it will be application and network type dependent. 468 Once a TCP connection is established, each node MUST immediately 469 transmit a contact header over the TCP connection. The format of the 470 contact header is described in Section 4.2. 472 4.2. Contact Header 474 Once a TCP connection is established, both parties exchange a contact 475 header. This section describes the format of the contact header and 476 the meaning of its fields. 478 Upon receipt of the contact header, both nodes perform the validation 479 and negotiation procedures defined in Section 4.3. After receiving 480 the contact header from the other node, either node MAY refuse the 481 session by sending a SHUTDOWN message with an appropriate reason 482 code. 484 The format for the Contact Header is as follows: 486 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 487 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 488 +---------------+---------------+---------------+---------------+ 489 | magic='dtn!' | 490 +---------------+---------------+---------------+---------------+ 491 | Version | Flags | Keepalive Interval | 492 +---------------+---------------+---------------+---------------+ 493 | Segment MRU... | 494 +---------------+---------------+---------------+---------------+ 495 | contd. | 496 +---------------+---------------+---------------+---------------+ 497 | Transfer MRU... | 498 +---------------+---------------+---------------+---------------+ 499 | contd. | 500 +---------------+---------------+---------------+---------------+ 501 | EID Length | EID Data... | 502 +---------------+---------------+---------------+---------------+ 503 | EID Data contd. | 504 +---------------+---------------+---------------+---------------+ 505 | Header Extension Length... | 506 +---------------+---------------+---------------+---------------+ 507 | contd. | 508 +---------------+---------------+---------------+---------------+ 509 | Header Extension Items... | 510 +---------------+---------------+---------------+---------------+ 512 Figure 3: Contact Header Format 514 See Section 4.3 for details on the use of each of these contact 515 header fields. The fields of the contact header are: 517 magic: A four-octet field that always contains the octet sequence 518 0x64 0x74 0x6e 0x21, i.e., the text string "dtn!" in US-ASCII (and 519 UTF-8). 521 Version: A one-octet field value containing the value 4 (current 522 version of the protocol). 524 Flags: A one-octet field of single-bit flags, interpreted according 525 to the descriptions in Table 1. 527 Keepalive Interval: A 16-bit unsigned integer indicating the 528 interval, in seconds, between any subsequent messages being 529 transmitted by the peer. The peer receiving this contact header 530 uses this interval to determine how long to wait after any last- 531 message transmission and a necessary subsequent KEEPALIVE message 532 transmission. 534 Segment MRU: A 64-bit unsigned integer indicating the largest 535 allowable single-segment data payload size to be received in this 536 session. Any XFER_SEGMENT sent to this peer SHALL have a data 537 payload no longer than the peer's Segment MRU. The two nodes of a 538 single session MAY have different Segment MRUs, and no relation 539 between the two is required. 541 Transfer MRU: A 64-bit unsigned integer indicating the largest 542 allowable total-bundle data size to be received in this session. 543 Any bundle transfer sent to this peer SHALL have a Total Bundle 544 Length payload no longer than the peer's Transfer MRU. This value 545 can be used to perform proactive bundle fragmentation. The two 546 nodes of a single session MAY have different Transfer MRUs, and no 547 relation between the two is required. 549 EID Length and EID Data: Together these fields represent a variable- 550 length text string. The EID Length is a 16-bit unsigned integer 551 indicating the number of octets of EID Data to follow. A zero EID 552 Length SHALL be used to indicate the lack of EID rather than a 553 truly empty EID. This case allows a node to avoid exposing EID 554 information on an untrusted network. A non-zero-length EID Data 555 SHALL contain the UTF-8 encoded EID of some singleton endpoint in 556 which the sending node is a member, in the canonical format of 557 :. This EID encoding is 558 consistent with [I-D.ietf-dtn-bpbis]. 560 Header Extension Length and Header Extension Items: Together these 561 fields represent protocol extension data not defined by this 562 specification. The Header Extension Length is the total number of 563 octets to follow which are used to encode the Header Extension 564 Item list. The encoding of each Header Extension Item is within a 565 consistent data container as described in Section 4.2.1. 567 +----------+--------+-----------------------------------------------+ 568 | Name | Code | Description | 569 +----------+--------+-----------------------------------------------+ 570 | CAN_TLS | 0x01 | If bit is set, indicates that the sending | 571 | | | peer is capable of TLS security. | 572 | | | | 573 | Reserved | others | 574 +----------+--------+-----------------------------------------------+ 576 Table 1: Contact Header Flags 578 4.2.1. Header Extension Items 580 Each of the Header Extension Items SHALL be encoded in an identical 581 Type-Length-Value (TLV) container form as indicated in Figure 4. The 582 fields of the Header Extension Item are: 584 Flags: A one-octet field containing generic bit flags about the 585 Item, which are listed in Table 2. If a TCPCL node receives a 586 Header Extension Item with an unknown Item Type and the CRITICAL 587 flag set, the node SHALL close the TCPCL session with SHUTDOWN 588 reason code of "Contact Failure". If the CRITICAL flag is not 589 set, a node SHALL skip over and ignore any item with an unknown 590 Item Type. 592 Item Type: A 16-bit unsigned integer field containing the type of 593 the extension item. This specification does not define any 594 extension types directly, but does allocate an IANA registry for 595 such codes (see Section 8.3). 597 Item Length: A 32-bit unsigned integer field containing the number 598 of Item Value octets to follow. 600 Item Value: A variable-length data field which is interpreted 601 according to the associated Item Type. This specification places 602 no restrictions on an extension's use of available Item Value 603 data. Extension specification SHOULD avoid the use of large data 604 exchanges within the TCPCL contact header as no bundle transfers 605 can begin until the full contact exchange and negotiation has been 606 completed. 608 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 609 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 610 +---------------+---------------+---------------+---------------+ 611 | Item Flags | Item Type | Item Length...| 612 +---------------+---------------+---------------+---------------+ 613 | length contd. | Item Value... | 614 +---------------+---------------+---------------+---------------+ 615 | value contd. | 616 +---------------+---------------+---------------+---------------+ 618 Figure 4: Header Extension Item Format 620 +----------+--------+-----------------------------------------------+ 621 | Name | Code | Description | 622 +----------+--------+-----------------------------------------------+ 623 | CRITICAL | 0x01 | If bit is set, indicates that the receiving | 624 | | | peer must handle the extension item. | 625 | | | | 626 | Reserved | others | 627 +----------+--------+-----------------------------------------------+ 629 Table 2: Header Extension Item Flags 631 4.3. Validation and Parameter Negotiation 633 Upon reception of the contact header, each node follows the following 634 procedures to ensure the validity of the TCPCL session and to 635 negotiate values for the session parameters. 637 If the magic string is not present or is not valid, the connection 638 MUST be terminated. The intent of the magic string is to provide 639 some protection against an inadvertent TCP connection by a different 640 protocol than the one described in this document. To prevent a flood 641 of repeated connections from a misconfigured application, a node MAY 642 elect to hold an invalid connection open and idle for some time 643 before closing it. 645 A connecting TCPCL node SHALL send the highest TCPCL protocol version 646 on a first session attempt for a TCPCL peer. If a connecting node 647 receives a SHUTDOWN message with reason of "Version Mismatch", that 648 node MAY attempt further TCPCL sessions with the peer using earlier 649 protocol version numbers in decreasing order. Managing multi-TCPCL- 650 session state such as this is an implementation matter. 652 If a node receives a contact header containing a version that is 653 greater than the current version of the protocol that the node 654 implements, then the node SHALL shutdown the session with a reason 655 code of "Version mismatch". If a node receives a contact header with 656 a version that is lower than the version of the protocol that the 657 node implements, the node MAY either terminate the session (with a 658 reason code of "Version mismatch") or the node MAY adapt its 659 operation to conform to the older version of the protocol. The 660 decision of version fall-back is an implementation matter. 662 A node calculates the parameters for a TCPCL session by negotiating 663 the values from its own preferences (conveyed by the contact header 664 it sent to the peer) with the preferences of the peer node (expressed 665 in the contact header that it received from the peer). The 666 negotiated parameters defined by this specification are described in 667 the following paragraphs. 669 Transfer MTU and Segment MTU: The maximum transmit unit (MTU) for 670 whole transfers and individual segments are idententical to the 671 Transfer MRU and Segment MRU, respectively, of the recevied 672 contact header. A transmitting peer can send individual segments 673 with any size smaller than the Segment MTU, depending on local 674 policy, dynamic network conditions, etc. Determining the size of 675 each transmitted segment is an implementation matter. 677 Session Keepalive: Negotiation of the Session Keepalive parameter is 678 performed by taking the minimum of this two contact headers' 679 Keepalive Interval. The Session Keepalive interval is a parameter 680 for the behavior described in Section 5.2.1. 682 Enable TLS: Negotiation of the Enable TLS parameter is performed by 683 taking the logical AND of the two contact headers' CAN_TLS flags. 684 A local security policy is then applied to determine of the 685 negotated value of Enable TLS is acceptable. If not, the node 686 SHALL shutdown the session with a reason code of "Contact 687 Failure". Note that this contact failure is different than a "TLS 688 Failure" after an agreed-upon and acceptable Enable TLS state. If 689 the negotiated Enable TLS value is true and acceptable then TLS 690 negotiation feature (described in Section 4.4) begins immediately 691 following the contact header exchange. 693 Once this process of parameter negotiation is completed (which 694 includes a possible completed TLS handshake of the connection to use 695 TLS), this protocol defines no additional mechanism to change the 696 parameters of an established session; to effect such a change, the 697 TCPCL session MUST be terminated and a new session established. 699 4.3.1. Reactive Fragmentation Extension 701 In order to allow BP agents to use this reliable convergence layer to 702 perform reactive fragmentation, a header extension type 703 REACTIVE_FRAGMENT is defined to negotate the fragmentation 704 capabilities of the node sending the extension item. If either node 705 does not send a REACTIVE_FRAGMENT item then no reactive fragmentation 706 is allowed to be initiated within that session. Reactive 707 fragmentation is performed after a failed transfer, so it necessarily 708 spans more than a single TCPCL session. In fact, follow-on bundle 709 fragments may be sent via an entirely different convergence layer. 710 For these reasons, details of how reactive fragmentation and 711 reassembly takes place are outside the scope of this specification. 713 Within a single contact header there SHALL be no more than one item 714 with an extension type of REACTIVE_FRAGMENT. If no REACTIVE_FRAGMENT 715 item is received from a peer, all REACTIVE_FRAGMENT flags of that 716 peer SHALL be considered to be not set. The CRITICAL flag of the 717 REACTIVE_FRAGMENT item MAY be set to indicate that the peer node has 718 to interpret and negotiate the reactive fragmentation capability. 719 The order of the REACTIVE_FRAGMENT item within the extension items is 720 not significant. The Item Length of a REACTIVE_FRAGMENT item SHALL 721 be a single octet. The contents of the REACTIVE_FRAGMENT item shall 722 be interpreted as a bit mask, with flags interpreted according to 723 Table 3. 725 When a transfer-sending node has set the CAN_GENERATE flag and the 726 peer node has set the CAN_RECEIVE flag, the sending node SHALL use 727 acknowledged data segment information to reactively fragment a failed 728 transfer within some later transfers. When a transfer-receving node 729 has set the CAN_RECEIVE flag and the peer node has set the 730 CAN_GENERATE flag, the receving node SHALL treat partial received 731 transfers as reactively fragmented bundles and use the partial 732 transfer to reassemble future fragments of that bundle. 734 +--------------+--------+-------------------------------------------+ 735 | Name | Code | Description | 736 +--------------+--------+-------------------------------------------+ 737 | CAN_GENERATE | 0x01 | If bit is set, indicates that the sending | 738 | | | node is capable of generating reactively | 739 | | | fragmented bundles. | 740 | | | | 741 | CAN_RECEIVE | 0x02 | If bit is set, indicates that the sending | 742 | | | node is capable of receving and | 743 | | | reassembling reactively fragmented | 744 | | | bundles. | 745 | | | | 746 | Reserved | others | 747 +--------------+--------+-------------------------------------------+ 749 Table 3: REACTIVE_FRAGMENT Flags 751 4.4. Session Security 753 This version of the TCPCL supports establishing a Transport Layer 754 Security (TLS) session within an existing TCP connection. When TLS 755 is used within the TCPCL it affects the entire session. Once 756 established, there is no mechanism available to downgrade a TCPCL 757 session to non-TLS operation. If this is desired, the entire TCPCL 758 session MUST be shutdown and a new non-TLS-negotiated session 759 established. 761 The use of TLS is negotated using the Contact Header as described in 762 Section 4.3. After negotiating an Enable TLS parameter of true, and 763 before any other TCPCL messages are sent within the session, the 764 session nodes SHALL begin a TLS handshake in accordance with 766 [RFC5246]. The parameters within each TLS negotiation are 767 implementation dependent but any TCPCL node SHOULD follow all 768 recommended best practices of [RFC7525]. By convention, this 769 protocol uses the node which initiated the underlying TCP connection 770 as the "client" role of the TLS handshake request. 772 The TLS handshake, if it occurs, is considered to be part of the 773 contact negotiation before the TCPCL session itself is established. 774 Specifics about sensitive data exposure are discussed in Section 7. 776 4.4.1. TLS Handshake Result 778 If a TLS handshake cannot negotiate a TLS session, both nodes of the 779 TCPCL session SHALL start a TCPCL shutdown with reason "TLS Failure". 781 After a TLS session is successfully established, both TCPCL nodes 782 SHALL re-exchange TCPCL Contact Header messages. Any information 783 cached from the prior Contact Header exchange SHALL be discarded. 784 This re-exchange avoids a "man-in-the-middle" attack in identical 785 fashion to [RFC2595]. Each re-exchange header CAN_TLS flag SHALL be 786 identical to the original header CAN_TLS flag from the same node. 787 The CAN_TLS logic (TLS negotiation) SHALL NOT apply during header re- 788 exchange. This reinforces the fact that there is no TLS downgrade 789 mechanism. 791 4.4.2. Example TLS Initiation 793 A summary of a typical CAN_TLS usage is shown in the sequence in 794 Figure 5 below. 796 Node A Node B 797 ====== ====== 799 +-------------------------+ 800 | Open TCP Connnection | -> 801 +-------------------------+ +-------------------------+ 802 <- | Accept Connection | 803 +-------------------------+ 805 +-------------------------+ +-------------------------+ 806 | Contact Header | -> <- | Contact Header | 807 +-------------------------+ +-------------------------+ 809 +-------------------------+ +-------------------------+ 810 | TLS Negotiation | -> <- | TLS Negotiation | 811 | (as client) | | (as server) | 812 +-------------------------+ +-------------------------+ 814 +-------------------------+ +-------------------------+ 815 | Contact Header | -> <- | Contact Header | 816 +-------------------------+ +-------------------------+ 818 ... secured TCPCL messaging ... 820 +-------------------------+ +-------------------------+ 821 | SHUTDOWN | -> <- | SHUTDOWN | 822 +-------------------------+ +-------------------------+ 824 Figure 5: A simple visual example of TCPCL TLS Establishment between 825 two nodes 827 5. Established Session Operation 829 This section describes the protocol operation for the duration of an 830 established session, including the mechanism for transmitting bundles 831 over the session. 833 5.1. Message Type Codes 835 After the initial exchange of a contact header, all messages 836 transmitted over the session are identified by a one-octet header 837 with the following structure: 839 0 1 2 3 4 5 6 7 840 +---------------+ 841 | Message Type | 842 +---------------+ 844 Figure 6: Format of the Message Header 846 The message header fields are as follows: 848 Message Type: Indicates the type of the message as per Table 4 849 below. Encoded values are listed in Section 8.4. 851 +--------------+----------------------------------------------------+ 852 | Type | Description | 853 +--------------+----------------------------------------------------+ 854 | XFER_INIT | Contains the length (in octets) of the next | 855 | | transfer, as described in Section 5.3.2. | 856 | | | 857 | XFER_SEGMENT | Indicates the transmission of a segment of bundle | 858 | | data, as described in Section 5.3.3. | 859 | | | 860 | XFER_ACK | Acknowledges reception of a data segment, as | 861 | | described in Section 5.3.4. | 862 | | | 863 | XFER_REFUSE | Indicates that the transmission of the current | 864 | | bundle SHALL be stopped, as described in Section | 865 | | 5.3.5. | 866 | | | 867 | KEEPALIVE | Used to keep TCPCL session active, as described in | 868 | | Section 5.2.1. | 869 | | | 870 | SHUTDOWN | Indicates that one of the nodes participating in | 871 | | the session wishes to cleanly terminate the | 872 | | session, as described in Section 6. | 873 | | | 874 | MSG_REJECT | Contains a TCPCL message rejection, as described | 875 | | in Section 5.2.2. | 876 +--------------+----------------------------------------------------+ 878 Table 4: TCPCL Message Types 880 5.2. Upkeep and Status Messages 882 5.2.1. Session Upkeep (KEEPALIVE) 884 The protocol includes a provision for transmission of KEEPALIVE 885 messages over the TCPCL session to help determine if the underlying 886 TCP connection has been disrupted. 888 As described in Section 4.3, a negotiated parameter of each session 889 is the Session Keepalive interval. If the negotiated Session 890 Keepalive is zero (i.e. one or both contact headers contains a zero 891 Keepalive Interval), then the keepalive feature is disabled. There 892 is no logical minimum value for the keepalive interval, but when used 893 for many sessions on an open, shared network a short interval could 894 lead to excessive traffic. For shared network use, nodes SHOULD 895 choose a keepalive interval no shorter than 30 seconds. There is no 896 logical maximum value for the keepalive interval, but an idle TCP 897 connection is liable for closure by the host operating system if the 898 keepalive time is longer than tens-of-minutes. Nodes SHOULD choose a 899 keepalive interval no longer than 10 minutes (600 seconds). 901 Note: The Keepalive Interval SHOULD NOT be chosen too short as TCP 902 retransmissions MAY occur in case of packet loss. Those will have to 903 be triggered by a timeout (TCP retransmission timeout (RTO)), which 904 is dependent on the measured RTT for the TCP connection so that 905 KEEPALIVE messages MAY experience noticeable latency. 907 The format of a KEEPALIVE message is a one-octet message type code of 908 KEEPALIVE (as described in Table 4) with no additional data. Both 909 sides SHOULD send a KEEPALIVE message whenever the negotiated 910 interval has elapsed with no transmission of any message (KEEPALIVE 911 or other). 913 If no message (KEEPALIVE or other) has been received in a session 914 after some implementation-defined time duration, then the node MAY 915 terminate the session by transmitting a one-octet SHUTDOWN message 916 (as described in Section 6.1) with reason code "Idle Timeout. 918 5.2.2. Message Rejection (MSG_REJECT) 920 If a TCPCL node receives a message which is unknown to it (possibly 921 due to an unhandled protocol mismatch) or is inappropriate for the 922 current session state (e.g. a KEEPALIVE message received after 923 contact header negotiation has disabled that feature), there is a 924 protocol-level message to signal this condition in the form of a 925 MSG_REJECT reply. 927 The format of a MSG_REJECT message follows: 929 +-----------------------------+ 930 | Message Header | 931 +-----------------------------+ 932 | Reason Code (U8) | 933 +-----------------------------+ 934 | Rejected Message Header | 935 +-----------------------------+ 937 Figure 7: Format of MSG_REJECT Messages 939 The fields of the MSG_REJECT message are: 941 Reason Code: A one-octet refusal reason code interpreted according 942 to the descriptions in Table 5. 944 Rejected Message Header: The Rejected Message Header is a copy of 945 the Message Header to which the MSG_REJECT message is sent as a 946 response. 948 +-------------+------+----------------------------------------------+ 949 | Name | Code | Description | 950 +-------------+------+----------------------------------------------+ 951 | Message | 0x01 | A message was received with a Message Type | 952 | Type | | code unknown to the TCPCL node. | 953 | Unknown | | | 954 | | | | 955 | Message | 0x02 | A message was received but the TCPCL node | 956 | Unsupported | | cannot comply with the message contents. | 957 | | | | 958 | Message | 0x03 | A message was received while the session is | 959 | Unexpected | | in a state in which the message is not | 960 | | | expected. | 961 +-------------+------+----------------------------------------------+ 963 Table 5: MSG_REJECT Reason Codes 965 5.3. Bundle Transfer 967 All of the messages in this section are directly associated with 968 transferring a bundle between TCPCL nodes. 970 A single TCPCL transfer results in a bundle (handled by the 971 convergence layer as opaque data) being exchanged from one node to 972 the other. In TCPCL a transfer is accomplished by dividing a single 973 bundle up into "segments" based on the receiving-side Segment MRU 974 (see Section 4.2). The choice of the length to use for segments is 975 an implementation matter, but each segment MUST be no larger than the 976 receiving node's maximum receive unit (MRU) (see the field "Segment 977 MRU" of Section 4.2). The first segment for a bundle MUST set the 978 'START' flag, and the last one MUST set the 'end' flag in the 979 XFER_SEGMENT message flags. 981 A single transfer (and by extension a single segment) SHALL NOT 982 contain data of more than a single bundle. This requirement is 983 imposed on the agent using the TCPCL rather than TCPCL itself. 985 If multiple bundles are transmitted on a single TCPCL connection, 986 they MUST be transmitted consecutively without interleaving of 987 segments from multiple bundles. 989 5.3.1. Bundle Transfer ID 991 Each of the bundle transfer messages contains a Transfer ID which is 992 used to correlate messages (from both sides of a transfer) for each 993 bundle. A Transfer ID does not attempt to address uniqueness of the 994 bundle data itself and has no relation to concepts such as bundle 995 fragmentation. Each invocation of TCPCL by the bundle protocol 996 agent, requesting transmission of a bundle (fragmentary or 997 otherwise), results in the initiation of a single TCPCL transfer. 998 Each transfer entails the sending of a XFER_INIT message and some 999 number of XFER_SEGMENT and XFER_ACK messages; all are correlated by 1000 the same Transfer ID. 1002 Transfer IDs from each node SHALL be unique within a single TCPCL 1003 session. The initial Transfer ID from each node SHALL have value 1004 zero. Subsequent Transfer ID values SHALL be incremented from the 1005 prior Transfer ID value by one. Upon exhaustion of the entire 64-bit 1006 Transfer ID space, the sending node SHALL terminate the session with 1007 SHUTDOWN reason code "Resource Exhaustion". 1009 For bidirectional bundle transfers, a TCPCL node SHOULD NOT rely on 1010 any relation between Transfer IDs originating from each side of the 1011 TCPCL session. 1013 5.3.2. Transfer Initialization (XFER_INIT) 1015 The XFER_INIT message contains the total length, in octets, of the 1016 bundle data in the associated transfer. The total length is 1017 formatted as a 64-bit unsigned integer. 1019 The purpose of the XFER_INIT message is to allow nodes to 1020 preemptively refuse bundles that would exceed their resources or to 1021 prepare storage on the receiving node for the upcoming bundle data. 1022 See Section 5.3.5 for details on when refusal based on XFER_INIT 1023 content is acceptable. 1025 The Total Bundle Length field within a XFER_INIT message SHALL be 1026 treated as authoritative by the receiver. If, for whatever reason, 1027 the actual total length of bundle data received differs from the 1028 value indicated by the XFER_INIT message, the receiver SHOULD treat 1029 the transmitted data as invalid. 1031 The format of the XFER_INIT message is as follows: 1033 +-----------------------------+ 1034 | Message Header | 1035 +-----------------------------+ 1036 | Transfer ID (U64) | 1037 +-----------------------------+ 1038 | Total Bundle Length (U64) | 1039 +-----------------------------+ 1041 Figure 8: Format of XFER_INIT Messages 1043 The fields of the XFER_INIT message are: 1045 Transfer ID: A 64-bit unsigned integer identifying the transfer 1046 about to begin. 1048 Total Bundle Length: A 64-bit unsigned integer indicating the size 1049 of the data-to-be-transferred. 1051 An XFER_INIT message SHALL be sent as the first message in a transfer 1052 sequence, before transmission of any XFER_SEGMENT messages for the 1053 same Transfer ID. XFER_INIT messages MUST NOT be sent unless the 1054 next XFER_SEGMENT message has the 'START' bit set to "1" (i.e., just 1055 before the start of a new transfer). 1057 5.3.3. Data Transmission (XFER_SEGMENT) 1059 Each bundle is transmitted in one or more data segments. The format 1060 of a XFER_SEGMENT message follows in Figure 9. 1062 +------------------------------+ 1063 | Message Header | 1064 +------------------------------+ 1065 | Message Flags (U8) | 1066 +------------------------------+ 1067 | Transfer ID (U64) | 1068 +------------------------------+ 1069 | Data length (U64) | 1070 +------------------------------+ 1071 | Data contents (octet string) | 1072 +------------------------------+ 1074 Figure 9: Format of XFER_SEGMENT Messages 1076 The fields of the XFER_SEGMENT message are: 1078 Message Flags: A one-octet field of single-bit flags, interpreted 1079 according to the descriptions in Table 6. 1081 Transfer ID: A 64-bit unsigned integer identifying the transfer 1082 being made. 1084 Data length: A 64-bit unsigned integer indicating the number of 1085 octets in the Data contents to follow. 1087 Data contents: The variable-length data payload of the message. 1089 +----------+--------+-----------------------------------------------+ 1090 | Name | Code | Description | 1091 +----------+--------+-----------------------------------------------+ 1092 | END | 0x01 | If bit is set, indicates that this is the | 1093 | | | last segment of the transfer. | 1094 | | | | 1095 | START | 0x02 | If bit is set, indicates that this is the | 1096 | | | first segment of the transfer. | 1097 | | | | 1098 | Reserved | others | 1099 +----------+--------+-----------------------------------------------+ 1101 Table 6: XFER_SEGMENT Flags 1103 The flags portion of the message contains two optional values in the 1104 two low-order bits, denoted 'START' and 'END' in Table 6. The 1105 'START' bit MUST be set to one if it precedes the transmission of the 1106 first segment of a transfer. The 'END' bit MUST be set to one when 1107 transmitting the last segment of a transfer. In the case where an 1108 entire transfer is accomplished in a single segment, both the 'START' 1109 and 'END' bits MUST be set to one. 1111 Once a transfer of a bundle has commenced, the node MUST only send 1112 segments containing sequential portions of that bundle until it sends 1113 a segment with the 'END' bit set. No interleaving of multiple 1114 transfers from the same node is possible within a single TCPCL 1115 session. Simultaneous transfers between two nodes MAY be achieved 1116 using multiple TCPCL sessions. 1118 5.3.4. Data Acknowledgments (XFER_ACK) 1120 Although the TCP transport provides reliable transfer of data between 1121 transport peers, the typical BSD sockets interface provides no means 1122 to inform a sending application of when the receiving application has 1123 processed some amount of transmitted data. Thus, after transmitting 1124 some data, the TCPCL needs an additional mechanism to determine 1125 whether the receiving agent has successfully received the segment. 1126 To this end, the TCPCL protocol provides feedback messaging whereby a 1127 receiving node transmits acknowledgments of reception of data 1128 segments. 1130 The format of an XFER_ACK message follows in Figure 10. 1132 +-----------------------------+ 1133 | Message Header | 1134 +-----------------------------+ 1135 | Message Flags (U8) | 1136 +-----------------------------+ 1137 | Transfer ID (U64) | 1138 +-----------------------------+ 1139 | Acknowledged length (U64) | 1140 +-----------------------------+ 1142 Figure 10: Format of XFER_ACK Messages 1144 The fields of the XFER_ACK message are: 1146 Message Flags: A one-octet field of single-bit flags, interpreted 1147 according to the descriptions in Table 6. 1149 Transfer ID: A 64-bit unsigned integer identifying the transfer 1150 being acknowledged. 1152 Acknowledged length: A 64-bit unsigned integer indicating the total 1153 number of octets in the transfer which are being acknowledged. 1155 A receiving TCPCL node SHALL send an XFER_ACK message in response to 1156 each received XFER_SEGMENT message. The flags portion of the 1157 XFER_ACK header SHALL be set to match the corresponding DATA_SEGMENT 1158 message being acknowledged. The acknowledged length of each XFER_ACK 1159 contains the sum of the data length fields of all XFER_SEGMENT 1160 messages received so far in the course of the indicated transfer. 1161 The sending node MAY transmit multiple XFER_SEGMENT messages without 1162 necessarily waiting for the corresponding XFER_ACK responses. This 1163 enables pipelining of messages on a channel. 1165 For example, suppose the sending node transmits four segments of 1166 bundle data with lengths 100, 200, 500, and 1000, respectively. 1167 After receiving the first segment, the node sends an acknowledgment 1168 of length 100. After the second segment is received, the node sends 1169 an acknowledgment of length 300. The third and fourth 1170 acknowledgments are of length 800 and 1800, respectively. 1172 5.3.5. Transfer Refusal (XFER_REFUSE) 1174 The TCPCL supports a mechanism by which a receiving node can indicate 1175 to the sender that it does not want to receive the corresponding 1176 bundle. To do so, upon receiving a XFER_INIT or XFER_SEGMENT 1177 message, the node MAY transmit a XFER_REFUSE message. As data 1178 segments and acknowledgments MAY cross on the wire, the bundle that 1179 is being refused SHALL be identified by the Transfer ID of the 1180 refusal. 1182 There is no required relation between the Transfer MRU of a TCPCL 1183 node (which is supposed to represent a firm limitation of what the 1184 node will accept) and sending of a XFER_REFUSE message. A 1185 XFER_REFUSE can be used in cases where the agent's bundle storage is 1186 temporarily depleted or somehow constrained. A XFER_REFUSE can also 1187 be used after the bundle header or any bundle data is inspected by an 1188 agent and determined to be unacceptable. 1190 A receiver MAY send an XFER_REFUSE message as soon as it receives a 1191 XFER_INIT message without waiting for the next XFER_SEGMENT message. 1192 The sender MUST be prepared for this and MUST associate the refusal 1193 with the correct bundle via the Transfer ID fields. 1195 The format of the XFER_REFUSE message is as follows: 1197 +-----------------------------+ 1198 | Message Header | 1199 +-----------------------------+ 1200 | Reason Code (U8) | 1201 +-----------------------------+ 1202 | Transfer ID (U64) | 1203 +-----------------------------+ 1205 Figure 11: Format of XFER_REFUSE Messages 1207 The fields of the XFER_REFUSE message are: 1209 Reason Code: A one-octet refusal reason code interpreted according 1210 to the descriptions in Table 7. 1212 Transfer ID: A 64-bit unsigned integer identifying the transfer 1213 being refused. 1215 +------------+------------------------------------------------------+ 1216 | Name | Semantics | 1217 +------------+------------------------------------------------------+ 1218 | Unknown | Reason for refusal is unknown or not specified. | 1219 | | | 1220 | Completed | The receiver already has the complete bundle. The | 1221 | | sender MAY consider the bundle as completely | 1222 | | received. | 1223 | | | 1224 | No | The receiver's resources are exhausted. The sender | 1225 | Resources | SHOULD apply reactive bundle fragmentation before | 1226 | | retrying. | 1227 | | | 1228 | Retransmit | The receiver has encountered a problem that requires | 1229 | | the bundle to be retransmitted in its entirety. | 1230 +------------+------------------------------------------------------+ 1232 Table 7: XFER_REFUSE Reason Codes 1234 The receiver MUST, for each transfer preceding the one to be refused, 1235 have either acknowledged all XFER_SEGMENTs or refused the bundle 1236 transfer. 1238 The bundle transfer refusal MAY be sent before an entire data segment 1239 is received. If a sender receives a XFER_REFUSE message, the sender 1240 MUST complete the transmission of any partially sent XFER_SEGMENT 1241 message. There is no way to interrupt an individual TCPCL message 1242 partway through sending it. The sender MUST NOT commence 1243 transmission of any further segments of the refused bundle 1244 subsequently. Note, however, that this requirement does not ensure 1245 that a node will not receive another XFER_SEGMENT for the same bundle 1246 after transmitting a XFER_REFUSE message since messages MAY cross on 1247 the wire; if this happens, subsequent segments of the bundle SHOULD 1248 also be refused with a XFER_REFUSE message. 1250 Note: If a bundle transmission is aborted in this way, the receiver 1251 MAY not receive a segment with the 'END' flag set to '1' for the 1252 aborted bundle. The beginning of the next bundle is identified by 1253 the 'START' bit set to '1', indicating the start of a new transfer, 1254 and with a distinct Transfer ID value. 1256 6. Session Termination 1258 This section describes the procedures for ending a TCPCL session. 1260 6.1. Shutdown Message (SHUTDOWN) 1262 To cleanly shut down a session, a SHUTDOWN message SHALL be 1263 transmitted by either node at any point following complete 1264 transmission of any other message. Upon receiving a SHUTDOWN message 1265 after not sending a SHUTDOWN message in the same session, a node 1266 SHOULD send a confirmation SHUTDOWN message with identical content to 1267 the SHUTDOWN for which it is confirming. 1269 After sending a SHUTDOWN message, a node MAY continue a possible in- 1270 progress transfer in either direction. After sending a SHUTDOWN 1271 message, a node SHALL NOT begin any new outgoing transfer (i.e. send 1272 an XFER_INIT message) for the remainder of the session. After 1273 receving a SHUTDOWN message, a node SHALL NOT accept any new incoming 1274 transfer for the remainder of the session. 1276 Instead of following a clean shutdown sequence, after transmitting a 1277 SHUTDOWN message a node MAY immediately close the associated TCP 1278 connection. When performing an unclean shutdown, a receiving node 1279 SHOULD acknowledge all received data segments before closing the TCP 1280 connection. When performing an unclean shutodwn, a transmitting node 1281 SHALL treat either sending or receiving a SHUTDOWN message (i.e. 1282 before the final acknowledgment) as a failure of the transfer. Any 1283 delay between request to terminate the TCP connection and actual 1284 closing of the connection (a "half-closed" state) MAY be ignored by 1285 the TCPCL node. 1287 The format of the SHUTDOWN message is as follows: 1289 +-----------------------------------+ 1290 | Message Header | 1291 +-----------------------------------+ 1292 | Message Flags (U8) | 1293 +-----------------------------------+ 1294 | Reason Code (optional U8) | 1295 +-----------------------------------+ 1296 | Reconnection Delay (optional U16) | 1297 +-----------------------------------+ 1299 Figure 12: Format of SHUTDOWN Messages 1301 The fields of the SHUTDOWN message are: 1303 Message Flags: A one-octet field of single-bit flags, interpreted 1304 according to the descriptions in Table 8. 1306 Reason Code: A one-octet refusal reason code interpreted according 1307 to the descriptions in Table 9. The Reason Code is present or 1308 absent as indicated by one of the flags. 1310 Reconnection Delay: A 16-bit unsigned integer indicating the desired 1311 delay, in seconds, before re-attepmting a TCPCL session to the 1312 sending node. The Reconnection Delay is present or absent as 1313 indicated by one of the flags. 1315 +----------+--------+-----------------------------------------------+ 1316 | Name | Code | Description | 1317 +----------+--------+-----------------------------------------------+ 1318 | D | 0x01 | If bit is set, indicates that a Reconnection | 1319 | | | Delay field is present. | 1320 | | | | 1321 | R | 0x02 | If bit is set, indicates that a Reason Code | 1322 | | | field is present. | 1323 | | | | 1324 | Reserved | others | 1325 +----------+--------+-----------------------------------------------+ 1327 Table 8: SHUTDOWN Flags 1329 It is possible for a node to convey optional information regarding 1330 the reason for session termination. To do so, the node MUST set the 1331 'R' bit in the message flags and transmit a one-octet reason code 1332 immediately following the message header. The specified values of 1333 the reason code are: 1335 +---------------+---------------------------------------------------+ 1336 | Name | Description | 1337 +---------------+---------------------------------------------------+ 1338 | Idle timeout | The session is being closed due to idleness. | 1339 | | | 1340 | Version | The node cannot conform to the specified TCPCL | 1341 | mismatch | protocol version. | 1342 | | | 1343 | Busy | The node is too busy to handle the current | 1344 | | session. | 1345 | | | 1346 | Contact | The node cannot interpret or negotiate contact | 1347 | Failure | header option. | 1348 | | | 1349 | TLS Failure | The node failed to negotiate TLS session and | 1350 | | cannot continue the session. | 1351 | | | 1352 | Resource | The node has run into some resource limit and | 1353 | Exhaustion | cannot continue the session. | 1354 +---------------+---------------------------------------------------+ 1356 Table 9: SHUTDOWN Reason Codes 1358 If a node does not want its peer to reopen a connection immediately, 1359 it SHALL set the 'D' bit in the flags and include a reconnection 1360 delay to indicate when the peer is allowed to attempt another session 1361 setup. The Reconnection Delay value 0 SHALL be interpreted as an 1362 infinite delay, i.e., that the connecting node MUST NOT re-establish 1363 the session. 1365 A session shutdown MAY occur immediately after transmission of a 1366 contact header (and prior to any further message transmit). This 1367 MAY, for example, be used to notify that the node is currently not 1368 able or willing to communicate. However, a node MUST always send the 1369 contact header to its peer before sending a SHUTDOWN message. 1371 If reception of the contact header itself somehow fails (e.g. an 1372 invalid "magic string" is recevied), a node SHOULD close the TCP 1373 connection without sending a SHUTDOWN message. If the content of the 1374 Header Extension Items data disagrees with the Header Extension 1375 Length (i.e. the last Item claims to use more octets than are present 1376 in the Header Extension Length), the reception of the contact header 1377 is considered to have failed. 1379 If a session is to be terminated before a protocol message has 1380 completed being sent, then the node MUST NOT transmit the SHUTDOWN 1381 message but still SHOULD close the TCP connection. Each TCPCL 1382 message is contiguous in the octet stream and has no ability to be 1383 cut short and/or preempted by an other message. This is particularly 1384 important when large segment sizes are being transmitted; either 1385 entire XFER_SEGMENT is sent before a SHUTDOWN message or the 1386 connection is simply terminated mid-XFER_SEGMENT. 1388 6.2. Idle Session Shutdown 1390 The protocol includes a provision for clean shutdown of idle 1391 sessions. Determining the length of time to wait before closing idle 1392 sessions, if they are to be closed at all, is an implementation and 1393 configuration matter. 1395 If there is a configured time to close idle links and if no TCPCL 1396 messages (other than KEEPALIVE messages) has been received for at 1397 least that amount of time, then either node MAY terminate the session 1398 by transmitting a SHUTDOWN message indicating the reason code of 1399 "Idle timeout" (as described in Table 9). 1401 7. Security Considerations 1403 One security consideration for this protocol relates to the fact that 1404 nodes present their endpoint identifier as part of the contact header 1405 exchange. It would be possible for a node to fake this value and 1406 present the identity of a singleton endpoint in which the node is not 1407 a member, essentially masquerading as another DTN node. If this 1408 identifier is used outside of a TLS-secured session or without 1409 further verification as a means to determine which bundles are 1410 transmitted over the session, then the node that has falsified its 1411 identity would be able to obtain bundles that it otherwise would not 1412 have. Therefore, a node SHALL NOT use the EID value of an unsecured 1413 contact header to derive a peer node's identity unless it can 1414 corroborate it via other means. When TCPCL session security is 1415 mandated by a TCPCL peer, that peer SHALL transmit initial unsecured 1416 contact header values indicated in Table 10 in order. These values 1417 avoid unnecessarily leaking session parameters and will be ignored 1418 when secure contact header re-exchange occurs. 1420 +--------------------+---------------------------------------------+ 1421 | Parameter | Value | 1422 +--------------------+---------------------------------------------+ 1423 | Flags | The USE_TLS flag is set. | 1424 | | | 1425 | Keepalive Interval | Zero, indicating no keepalive. | 1426 | | | 1427 | Segment MRU | Zero, indicating all segments are refused. | 1428 | | | 1429 | Transfer MRU | Zero, indicating all transfers are refused. | 1430 | | | 1431 | EID | Empty, indicating lack of EID. | 1432 +--------------------+---------------------------------------------+ 1434 Table 10: Recommended Unsecured Contact Header 1436 TCPCL can be used to provide point-to-point transport security, but 1437 does not provide security of data-at-rest and does not guarantee end- 1438 to-end bundle security. The mechanisms defined in [RFC6257] and 1439 [I-D.ietf-dtn-bpsec] are to be used instead. 1441 Even when using TLS to secure the TCPCL session, the actual 1442 ciphersuite negotiated between the TLS peers MAY be insecure. TLS 1443 can be used to perform authentication without data confidentiality, 1444 for example. It is up to security policies within each TCPCL node to 1445 ensure that the negotiated TLS ciphersuite meets transport security 1446 requirements. This is identical behavior to STARTTLS use in 1447 [RFC2595]. 1449 Another consideration for this protocol relates to denial-of-service 1450 attacks. A node MAY send a large amount of data over a TCPCL 1451 session, requiring the receiving node to handle the data, attempt to 1452 stop the flood of data by sending a XFER_REFUSE message, or forcibly 1453 terminate the session. This burden could cause denial of service on 1454 other, well-behaving sessions. There is also nothing to prevent a 1455 malicious node from continually establishing sessions and repeatedly 1456 trying to send copious amounts of bundle data. A listening node MAY 1457 take countermeasures such as ignoring TCP SYN messages, closing TCP 1458 connections as soon as they are established, waiting before sending 1459 the contact header, sending a SHUTDOWN message quickly or with a 1460 delay, etc. 1462 8. IANA Considerations 1464 In this section, registration procedures are as defined in [RFC5226]. 1466 Some of the registries below are created new for TCPCLv4 but share 1467 code values with TCPCLv3. This was done to disambiguate the use of 1468 these values between TCPCLv3 and TCPCLv4 while preserving the 1469 semantics of some values. 1471 8.1. Port Number 1473 Port number 4556 has been previously assigned as the default port for 1474 the TCP convergence layer in [RFC7242]. This assignment is unchanged 1475 by protocol version 4. Each TCPCL node identifies its TCPCL protocol 1476 version in its initial contact (see Section 8.2), so there is no 1477 ambiguity about what protocol is being used. 1479 +------------------------+-------------------------------------+ 1480 | Parameter | Value | 1481 +------------------------+-------------------------------------+ 1482 | Service Name: | dtn-bundle | 1483 | | | 1484 | Transport Protocol(s): | TCP | 1485 | | | 1486 | Assignee: | Simon Perreault | 1487 | | | 1488 | Contact: | Simon Perreault | 1489 | | | 1490 | Description: | DTN Bundle TCP CL Protocol | 1491 | | | 1492 | Reference: | [RFC7242] | 1493 | | | 1494 | Port Number: | 4556 | 1495 +------------------------+-------------------------------------+ 1497 8.2. Protocol Versions 1499 IANA has created, under the "Bundle Protocol" registry, a sub- 1500 registry titled "Bundle Protocol TCP Convergence-Layer Version 1501 Numbers" and initialize it with the following table. The 1502 registration procedure is RFC Required. 1504 +-------+-------------+---------------------+ 1505 | Value | Description | Reference | 1506 +-------+-------------+---------------------+ 1507 | 0 | Reserved | [RFC7242] | 1508 | | | | 1509 | 1 | Reserved | [RFC7242] | 1510 | | | | 1511 | 2 | Reserved | [RFC7242] | 1512 | | | | 1513 | 3 | TCPCL | [RFC7242] | 1514 | | | | 1515 | 4 | TCPCLbis | This specification. | 1516 | | | | 1517 | 5-255 | Unassigned | 1518 +-------+-------------+---------------------+ 1520 8.3. Header Extension Types 1522 EDITOR NOTE: sub-registry to-be-created upon publication of this 1523 specification. 1525 IANA will create, under the "Bundle Protocol" registry, a sub- 1526 registry titled "Bundle Protocol TCP Convergence-Layer Version 4 1527 Header Extension Types" and initialize it with the contents of 1528 Table 11. The registration procedure is RFC Required within the 1529 lower range 0x0001--0x3fff. Values in the range 0x8000--0xffff are 1530 reserved for use on private networks for functions not published to 1531 the IANA. 1533 +----------------+--------------------------+ 1534 | Code | Message Type | 1535 +----------------+--------------------------+ 1536 | 0x0000 | Reserved | 1537 | | | 1538 | 0x0001 | REACTIVE_FRAGMENT | 1539 | | | 1540 | 0x0002--0x3fff | Unassigned | 1541 | | | 1542 | 0x8000--0xffff | Private/Experimental Use | 1543 +----------------+--------------------------+ 1545 Table 11: Header Extension Type Codes 1547 8.4. Message Types 1549 EDITOR NOTE: sub-registry to-be-created upon publication of this 1550 specification. 1552 IANA will create, under the "Bundle Protocol" registry, a sub- 1553 registry titled "Bundle Protocol TCP Convergence-Layer Version 4 1554 Message Types" and initialize it with the contents of Table 12. The 1555 registration procedure is RFC Required. 1557 +-----------+--------------+ 1558 | Code | Message Type | 1559 +-----------+--------------+ 1560 | 0x00 | Reserved | 1561 | | | 1562 | 0x01 | XFER_SEGMENT | 1563 | | | 1564 | 0x02 | XFER_ACK | 1565 | | | 1566 | 0x03 | XFER_REFUSE | 1567 | | | 1568 | 0x04 | KEEPALIVE | 1569 | | | 1570 | 0x05 | SHUTDOWN | 1571 | | | 1572 | 0x06 | XFER_INIT | 1573 | | | 1574 | 0x07 | MSG_REJECT | 1575 | | | 1576 | 0x08--0xf | Unassigned | 1577 +-----------+--------------+ 1579 Table 12: Message Type Codes 1581 8.5. XFER_REFUSE Reason Codes 1583 EDITOR NOTE: sub-registry to-be-created upon publication of this 1584 specification. 1586 IANA will create, under the "Bundle Protocol" registry, a sub- 1587 registry titled "Bundle Protocol TCP Convergence-Layer Version 4 1588 XFER_REFUSE Reason Codes" and initialize it with the contents of 1589 Table 13. The registration procedure is RFC Required. 1591 +----------+---------------------------+ 1592 | Code | Refusal Reason | 1593 +----------+---------------------------+ 1594 | 0x0 | Unknown | 1595 | | | 1596 | 0x1 | Completed | 1597 | | | 1598 | 0x2 | No Resources | 1599 | | | 1600 | 0x3 | Retransmit | 1601 | | | 1602 | 0x4--0x7 | Unassigned | 1603 | | | 1604 | 0x8--0xf | Reserved for future usage | 1605 +----------+---------------------------+ 1607 Table 13: XFER_REFUSE Reason Codes 1609 8.6. SHUTDOWN Reason Codes 1611 EDITOR NOTE: sub-registry to-be-created upon publication of this 1612 specification. 1614 IANA will create, under the "Bundle Protocol" registry, a sub- 1615 registry titled "Bundle Protocol TCP Convergence-Layer Version 4 1616 SHUTDOWN Reason Codes" and initialize it with the contents of 1617 Table 14. The registration procedure is RFC Required. 1619 +------------+---------------------+ 1620 | Code | Shutdown Reason | 1621 +------------+---------------------+ 1622 | 0x00 | Idle timeout | 1623 | | | 1624 | 0x01 | Version mismatch | 1625 | | | 1626 | 0x02 | Busy | 1627 | | | 1628 | 0x03 | Contact Failure | 1629 | | | 1630 | 0x04 | TLS failure | 1631 | | | 1632 | 0x05 | Resource Exhaustion | 1633 | | | 1634 | 0x06--0xFF | Unassigned | 1635 +------------+---------------------+ 1637 Table 14: SHUTDOWN Reason Codes 1639 8.7. MSG_REJECT Reason Codes 1641 EDITOR NOTE: sub-registry to-be-created upon publication of this 1642 specification. 1644 IANA will create, under the "Bundle Protocol" registry, a sub- 1645 registry titled "Bundle Protocol TCP Convergence-Layer Version 4 1646 MSG_REJECT Reason Codes" and initialize it with the contents of 1647 Table 15. The registration procedure is RFC Required. 1649 +-----------+----------------------+ 1650 | Code | Rejection Reason | 1651 +-----------+----------------------+ 1652 | 0x00 | reserved | 1653 | | | 1654 | 0x01 | Message Type Unknown | 1655 | | | 1656 | 0x02 | Message Unsupported | 1657 | | | 1658 | 0x03 | Message Unexpected | 1659 | | | 1660 | 0x04-0xFF | Unassigned | 1661 +-----------+----------------------+ 1663 Table 15: REJECT Reason Codes 1665 9. Acknowledgments 1667 This specification is based on comments on implementation of 1668 [RFC7242] provided from Scott Burleigh. 1670 10. References 1672 10.1. Normative References 1674 [I-D.ietf-dtn-bpbis] 1675 Burleigh, S., Fall, K., and E. Birrane, "Bundle Protocol 1676 Version 7", draft-ietf-dtn-bpbis-10 (work in progress), 1677 November 2017. 1679 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 1680 RFC 793, DOI 10.17487/RFC0793, September 1981, 1681 . 1683 [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - 1684 Communication Layers", STD 3, RFC 1122, 1685 DOI 10.17487/RFC1122, October 1989, 1686 . 1688 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1689 Requirement Levels", BCP 14, RFC 2119, 1690 DOI 10.17487/RFC2119, March 1997, 1691 . 1693 [RFC5050] Scott, K. and S. Burleigh, "Bundle Protocol 1694 Specification", RFC 5050, DOI 10.17487/RFC5050, November 1695 2007, . 1697 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 1698 IANA Considerations Section in RFCs", RFC 5226, 1699 DOI 10.17487/RFC5226, May 2008, 1700 . 1702 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1703 (TLS) Protocol Version 1.2", RFC 5246, 1704 DOI 10.17487/RFC5246, August 2008, 1705 . 1707 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 1708 "Recommendations for Secure Use of Transport Layer 1709 Security (TLS) and Datagram Transport Layer Security 1710 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 1711 2015, . 1713 10.2. Informative References 1715 [I-D.ietf-dtn-bpsec] 1716 Birrane, E. and K. McKeever, "Bundle Protocol Security 1717 Specification", draft-ietf-dtn-bpsec-06 (work in 1718 progress), October 2017. 1720 [RFC2595] Newman, C., "Using TLS with IMAP, POP3 and ACAP", 1721 RFC 2595, DOI 10.17487/RFC2595, June 1999, 1722 . 1724 [RFC4838] Cerf, V., Burleigh, S., Hooke, A., Torgerson, L., Durst, 1725 R., Scott, K., Fall, K., and H. Weiss, "Delay-Tolerant 1726 Networking Architecture", RFC 4838, DOI 10.17487/RFC4838, 1727 April 2007, . 1729 [RFC6257] Symington, S., Farrell, S., Weiss, H., and P. Lovell, 1730 "Bundle Security Protocol Specification", RFC 6257, 1731 DOI 10.17487/RFC6257, May 2011, 1732 . 1734 [RFC7242] Demmer, M., Ott, J., and S. Perreault, "Delay-Tolerant 1735 Networking TCP Convergence-Layer Protocol", RFC 7242, 1736 DOI 10.17487/RFC7242, June 2014, 1737 . 1739 Appendix A. Significant changes from RFC7242 1741 The areas in which changes from [RFC7242] have been made to existing 1742 headers and messages are: 1744 o Changed contact header content to limit number of negotiated 1745 options. 1747 o Added contact option to negotiate maximum segment size (per each 1748 direction). 1750 o Added contact header extension capability. 1752 o Defined new IANA registries for message / type / reason codes to 1753 allow renaming some codes for clarity. 1755 o Expanded Message Header to octet-aligned fields instead of bit- 1756 packing. 1758 o Added a bundle transfer identification number to all bundle- 1759 related messages (XFER_INIT, XFER_SEGMENT, XFER_ACK, XFER_REFUSE). 1761 o Use flags in XFER_ACK to mirror flags from XFER_SEGMENT. 1763 o Removed all uses of SDNV fields and replaced with fixed-bit-length 1764 fields. 1766 The areas in which extensions from [RFC7242] have been made as new 1767 messages and codes are: 1769 o Added contact negotiation failure SHUTDOWN reason code. 1771 o Added MSG_REJECT message to indicate an unknown or unhandled 1772 message was received. 1774 o Added TLS session security mechanism. 1776 o Added TLS failure and Resource Exhaustion SHUTDOWN reason code. 1778 o Added extension for reactive fragmentation negotiation 1779 (REACTIVE_FRAGMENT). 1781 Authors' Addresses 1783 Brian Sipos 1784 RKF Engineering Solutions, LLC 1785 7500 Old Georgetown Road 1786 Suite 1275 1787 Bethesda, MD 20814-6198 1788 US 1790 Email: BSipos@rkf-eng.com 1792 Michael Demmer 1793 University of California, Berkeley 1794 Computer Science Division 1795 445 Soda Hall 1796 Berkeley, CA 94720-1776 1797 US 1799 Email: demmer@cs.berkeley.edu 1801 Joerg Ott 1802 Aalto University 1803 Department of Communications and Networking 1804 PO Box 13000 1805 Aalto 02015 1806 Finland 1808 Email: jo@netlab.tkk.fi 1810 Simon Perreault 1811 Quebec, QC 1812 Canada 1814 Email: simon@per.reau.lt