idnits 2.17.1 draft-wood-tsvwg-saratoga-18.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- -- The document has an IETF Trust Provisions (28 Dec 2009) Section 6.c(i) Publication Limitation clause. 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 : ---------------------------------------------------------------------------- == There are 1 instance of lines with multicast IPv4 addresses in the document. If these are generic example addresses, they should be changed to use the 233.252.0.x range defined in RFC 5771 == There are 1 instance of lines with non-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors 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 (November 2, 2015) is 3069 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 3309 (Obsoleted by RFC 4960) == Outdated reference: A later version (-12) exists of draft-wood-tsvwg-saratoga-congestion-control-08 -- Obsolete informational reference (is this intentional?): RFC 5405 (Obsoleted by RFC 8085) Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group L. Wood 3 Internet-Draft Surrey alumni 4 Intended status: Experimental W. Eddy 5 Expires: May 5, 2016 MTI Systems 6 C. Smith 7 Vallona 8 W. Ivancic 9 NASA 10 C. Jackson 11 SSTL 12 November 2, 2015 14 Saratoga: A Scalable Data Transfer Protocol 15 draft-wood-tsvwg-saratoga-18 17 Abstract 19 This document specifies the Saratoga transfer protocol. Saratoga was 20 originally developed to transfer remote-sensing imagery efficiently 21 from a low-Earth-orbiting satellite constellation, but is useful in 22 many other scenarios, including ad-hoc peer-to-peer communications, 23 large-scale scientific sensing, and grid computing. Saratoga is a 24 simple, lightweight, content dissemination protocol that builds on 25 UDP, and optionally uses UDP-Lite. Saratoga is intended for use when 26 moving files or streaming data between peers which may have 27 permanent, sporadic or intermittent connectivity, and is capable of 28 transferring very large amounts of data reliably under adverse 29 conditions. The Saratoga protocol is designed to cope with highly 30 asymmetric link or path capacity between peers, and can support 31 fully-unidirectional data transfer if required. Saratoga can also 32 cope with very large files for exascale computing. In scenarios with 33 dedicated links, Saratoga focuses on high link utilization to make 34 the most of limited connectivity times, while standard congestion 35 control mechanisms can be implemented for operation over shared 36 links. Loss recovery is implemented via a simple negative-ack ARQ 37 mechanism. The protocol specified in this document is considered to 38 be appropriate for experimental use on private IP networks. 40 Status of This Memo 42 This Internet-Draft is submitted to IETF in full conformance with the 43 provisions of BCP 78 and BCP 79. 45 Internet-Drafts are working documents of the Internet Engineering 46 Task Force (IETF). Note that other groups may also distribute 47 working documents as Internet-Drafts. The list of current Internet- 48 Drafts is at http://datatracker.ietf.org/drafts/current/. 50 Internet-Drafts are draft documents valid for a maximum of six months 51 and may be updated, replaced, or obsoleted by other documents at any 52 time. It is inappropriate to use Internet-Drafts as reference 53 material or to cite them other than as "work in progress." 55 This Internet-Draft will expire on May 5, 2016. 57 Copyright Notice 59 Copyright (c) 2015 IETF Trust and the persons identified as the 60 document authors. All rights reserved. 62 This document is subject to BCP 78 and the IETF Trust's Legal 63 Provisions Relating to IETF Documents 64 (http://trustee.ietf.org/license-info) in effect on the date of 65 publication of this document. Please review these documents 66 carefully, as they describe your rights and restrictions with respect 67 to this document. 69 This document may not be modified, and derivative works of it may not 70 be created, except to format it for publication as an RFC or to 71 translate it into languages other than English. 73 Table of Contents 75 1. Background and Introduction . . . . . . . . . . . . . . . . . 3 76 2. Overview of Saratoga File Transfer . . . . . . . . . . . . . 6 77 3. Optional Parts of Saratoga . . . . . . . . . . . . . . . . . 11 78 3.1. Optional but useful functions in Saratoga . . . . . . . . 11 79 3.2. Optional congestion control . . . . . . . . . . . . . . . 12 80 3.3. Optional functionality requiring other protocols . . . . 12 81 4. Packet Types . . . . . . . . . . . . . . . . . . . . . . . . 13 82 4.1. BEACON . . . . . . . . . . . . . . . . . . . . . . . . . 16 83 4.2. REQUEST . . . . . . . . . . . . . . . . . . . . . . . . . 21 84 4.3. METADATA . . . . . . . . . . . . . . . . . . . . . . . . 25 85 4.4. DATA . . . . . . . . . . . . . . . . . . . . . . . . . . 30 86 4.5. STATUS . . . . . . . . . . . . . . . . . . . . . . . . . 34 87 5. The Directory Entry . . . . . . . . . . . . . . . . . . . . . 41 88 6. Behaviour of a Saratoga Peer . . . . . . . . . . . . . . . . 45 89 6.1. Saratoga Sessions . . . . . . . . . . . . . . . . . . . . 45 90 6.2. Beacons . . . . . . . . . . . . . . . . . . . . . . . . . 48 91 6.3. Upper-Layer Interface . . . . . . . . . . . . . . . . . . 49 92 6.4. Inactivity Timer . . . . . . . . . . . . . . . . . . . . 49 93 6.5. Streams and wrapping . . . . . . . . . . . . . . . . . . 50 94 6.6. Completing file delivery and ending the session . . . . . 50 95 7. Implementation Development . . . . . . . . . . . . . . . . . 51 96 8. Security Considerations . . . . . . . . . . . . . . . . . . . 51 97 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 52 98 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 52 99 11. A Note on Naming . . . . . . . . . . . . . . . . . . . . . . 52 100 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 53 101 12.1. Normative References . . . . . . . . . . . . . . . . . . 53 102 12.2. Informative References . . . . . . . . . . . . . . . . . 53 103 Appendix A. Timestamp/Nonce field considerations . . . . . . . . 55 104 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 56 106 1. Background and Introduction 108 Saratoga is a file transfer and content delivery protocol capable of 109 efficiently sending both small (kilobyte) and extremely large 110 (yottabyte) files, as well as streaming continuous content. Saratoga 111 was originally designed for the purpose of large file transfer from 112 small low-Earth-orbiting satellites. It has been used in daily 113 operations since 2004 to move mission imaging data files of the order 114 of several hundred megabytes each from the Disaster Monitoring 115 Constellation (DMC) remote-sensing satellites to ground stations. 117 The DMC satellites, built at the University of Surrey by Surrey 118 Satellite Technology Ltd (SSTL), all use IP for payload 119 communications and delivery of Earth imagery. At the time of this 120 writing, in April 2015, nine DMC satellites have been launched into 121 orbit since 2002, four of those are currently operational in orbit, 122 and three more are under construction. The DMC satellites use 123 Saratoga to provide Earth imagery under the aegis of the 124 International Charter on Space and Major Disasters. 126 An orbital pass giving a period of visibility and connectivity 127 between a satellite and ground station offers an 8-12 minute time 128 window in which to transfer imagery files, using a minimum of an 8.1 129 Mbps downlink and a 9.6 kbps uplink. Newer operational DMC 130 satellites can use faster downlinks, capable of 20, 40, 80, 105 or 131 210 Mbps [Brenchley12]. Planned DMC satellites are expected to use 132 downlinks at up to 320 Mbps, without significant increases in uplink 133 rates. SSTL's TechDemoSat-1 satellite, launched in July 2014 and 134 also carrying Sarotoga, uses a 400 Mbps downlink [Brenchley12]. This 135 high degree of link asymmetry, with the need to fully utilize the 136 available downlink capacity to move the volume of data required 137 within the limited time available, motivates much of Saratoga's 138 design. 140 Further details on how these DMC satellites use IP to communicate 141 with the ground and the terrestrial Internet are discussed elsewhere 142 [Hogie05][Wood07a]. Saratoga has also been implemented for use in 143 high-speed private ground networks supporting radio astronomy sensors 144 [Wood11]. 146 Store-and-forward delivery relies on reliable hop-by-hop transfers of 147 files, removing the need for the final receiver to talk to the 148 original sender across long delays and allowing for the possibility 149 that an end-to-end path may never exist between sender and receiver 150 at any given time. Breaking an end-to-end path into multiple hops 151 allows data to be transferred as quickly as possible across each 152 link; congestion on a longer Internet path is then not detrimental to 153 the transfer rate on a space downlink. Use of store-and-forward hop- 154 by-hop delivery is typical of scenarios in space exploration for both 155 near-Earth and deep-space missions, and useful for other scenarios, 156 such as underwater networking, ad-hoc sensor networks, and some 157 message-ferrying relay scenarios, where efficient delivery must not 158 be constrained by the limitations of a bottleneck in the overall end- 159 to-end path. Saratoga is intended to be useful for relaying data in 160 these scenarios. 162 Saratoga contains a Selective Negative Acknowledgement (SNACK) 163 'holestofill' mechanism to provide reliable retransmission of data. 164 This is intended to correct losses of corrupted link-layer frames due 165 to channel noise over a space link. Packet losses in the DMC are due 166 to corruption introducing non-recoverable errors in the frame. The 167 DMC design uses point-to-point links and scheduling of applications 168 in order, so that the link is dedicated to one application transfer 169 at a time, meaning that packet loss cannot be due to congestion when 170 applications compete for link capacity simultaneously. In other 171 wireless environments that may be shared by many nodes and 172 applications, allocation of channel resources to nodes becomes a MAC- 173 layer function. Forward Error Coding (FEC) to get the most reliable 174 transmission through a channel is best left near the physical layer 175 so that it can be tailored for the channel. Use of FEC complements 176 Saratoga's transport-level negative-acknowledgement approach that 177 provides a reliable ARQ mechanism. 179 Saratoga is scalable in that it is capable of efficiently 180 transferring small or large files, by choosing a width of file offset 181 descriptor appropriate for the filesize, and advertising accepted 182 offset descriptor sizes. 16-bit, 32-bit, 64-bit and 128-bit 183 descriptors can be selected, for maximum file sizes of 64KiB-1 (<64 184 Kilobytes of disk space), 4GiB-1 (<4 Gigabytes), 16EiB-1 (<16 185 Exabytes) and 256 EiEiB-1 (<256 Exa-exabytes) respectively. 187 Earth imaging files currently transferred by Saratoga are mostly up 188 to a few gigabytes in size. Some implementations do transfer more 189 than 4 GiB in size, and so require offset descriptors larger than 32 190 bits. We believe that supporting a 128-bit descriptor can satisfy 191 many future Big Data needs, but we expect current implementations to 192 only support up to 32-bit or 64-bit descriptors, depending on their 193 application needs. The 16-bit descriptor is useful for small 194 messages, including messages from 8-bit devices, and is always 195 supported. The 128-bit descriptor can be used for moving very large 196 files stored on a 128-bit filesystem, such as on OpenSolaris ZFS. 198 As a UDP-based protocol, Saratoga can be used with either IPv4 or 199 IPv6. Compatibility between Saratoga and the wide variety of links 200 that can already carry IP traffic is assured. 202 High link utilization is important during periods of limited 203 connectivity. Given that Saratoga was originally developed for 204 scheduled peer-to-peer communications over dedicated links in private 205 networks, where each application has the entire link for the duration 206 of its transfer, many Saratoga implementations deliberately lack any 207 form of congestion control and send at line rate to maximise 208 throughput and link utilisation in their limited, carefully 209 controlled, environments. In accordance with UDP Guidelines 210 [RFC5405] for protocols able to traverse the public Internet, newer 211 implementations may perform TCP-Friendly Rate Control (TFRC) 212 [RFC5348] or other congestion control mechanisms. This is described 213 further in [I-D.wood-tsvwg-saratoga-congestion-control]. 215 Saratoga was originally implemented as outlined in [Jackson04], but 216 the specification given here differs substantially, as we have added 217 a number of capabilities while cleaning up the initial Saratoga 218 specification. The original Saratoga code uses a version number of 219 0, while code that implements this version of the protocol advertises 220 a version number of 1. Further discussion of the history and 221 development of Saratoga is given in [Wood07b]. 223 This document contains an overview of the transfer process and 224 sessions using Saratoga in Section 2, followed by a formal definition 225 of the packet types used by Saratoga in Section 4, and the details of 226 the various protocol mechanisms in Section 6. 228 Here, Saratoga session types are labelled with underscores around 229 lowercase names (such as a "_get_" session), while Saratoga packet 230 types are labelled in all capitals (such as a "REQUEST" packet) in 231 order to distinguish between the two. 233 The remainder of this specification uses 'file' as a shorthand for 234 'binary object', which may be a file, or other type of data. This 235 specification uses 'file' when also discussing streaming of data of 236 indeterminate length. Saratoga uses unsigned integers in its fields, 237 and does not use signed types. 239 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 240 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 241 document are to be interpreted as described in RFC 2119. [RFC2119] 243 2. Overview of Saratoga File Transfer 245 Saratoga is a peer-to-peer protocol in the sense that multiple files 246 may be transferred in both directions simultaneously between two 247 communicating Saratoga peers, and there is not intended to be a 248 strict client-to-server relationship. 250 Saratoga nodes can act as simple file servers. Saratoga supports 251 several types of operations on files including "pull" downloads, 252 "push" uploads, directory listing, and deletion requests. Each 253 operation is handled as a distinct "session" between the peers. 255 Saratoga nodes MAY advertise their presence, capabilities, and 256 desires by sending BEACON packets. These BEACONs are sent to either 257 a reserved, unforwardable, multicast address when using IPv4, or a 258 link-local all-Saratoga-peers multicast address when using IPv6. A 259 BEACON might also be unicast to another known node as a sort of 260 "keepalive". Saratoga nodes may dynamically discover other Saratoga 261 nodes, either through listening for BEACONs, through pre- 262 configuration, via some other trigger from a user, lower-layer 263 protocol, or another process. The BEACON is useful in many 264 situations, such as ad-hoc networking, as a simple, explicit, 265 confirmation that another node is present; a BEACON is not required 266 in order to begin a Saratoga session.. BEACONs have been used by the 267 DMC satellites to indicate to ground stations that a link has become 268 functional, a solid-state data recorder is online, and the software 269 is ready to transfer any requested files. 271 A Saratoga session begins with either a _get_, _put_, _getdir_, or 272 _delete_ session REQUEST packet corresponding to a desired download, 273 upload, directory listing, or deletion operation. _put_ sessions MAY 274 instead begin directly with METADATA and DATA, without an initial 275 REQUEST/OKAY STATUS exchange; these rarer cases are known as 'blind 276 puts'. The most common envisioned session is the _get_, which begins 277 with a single Saratoga REQUEST packet sent from the peer wishing to 278 receive the file, to the peer who currently has the file. If the 279 session is rejected, then a brief STATUS packet that conveys 280 rejection is generated. If the file-serving peer accepts the 281 session, an OKAY STATUS can be optional; the peer can immediately 282 generate and send a more useful descriptive METADATA packet, along 283 with some number of DATA packets constituting the requested file. 285 These DATA packets are finished by (and can intermittently include) a 286 DATA packet with a flag bit set that demands the file-receiver send a 287 reception report in the form of a STATUS packet. This DATA-driven 288 cycle is shown in Figure 1. The STATUS packet can include 289 'holestofill' Selective Negative Acknowledgement (SNACK) information 290 listing spans of octets within the file that have not yet been 291 received, as well as whether or not the METADATA packet was received, 292 or an error code terminating the transfer session. Once the 293 information in this STATUS packet is received, the file-sender can 294 begin a cycle of selective retransmissions of missing DATA packets, 295 until it sees a STATUS packet that acknowledges total reception of 296 all file data. 298 AT SENDER AT RECEIVER 299 +---------+ 300 | START | 301 +---------+ 302 | STATUS is processed when it arrives. 303 ----->|<------------------------------\ 304 / | | 305 | +---------+ | 306 | | DATA |<-------------------- | 307 | +---------+ \ | 308 | | \ repeat until STATUS | | 309 | | \ request or until end | | 310 | | \ of DATA / | 311 | | -------------------- | 312 | +---------+ +---------+ 313 | | DATA* |-------------------->| STATUS | can include HOLESTOFILL 314 | +---------+ STATUS requested +---------+ can include error code 315 | | regularly from receiver 316 \ / while sending DATA packets 317 ------ * request flag set 319 Figure 1: STATUS and DATA cycle 321 In the example scenario in Figure 2, a _get_ request is granted. The 322 reliable file delivery experiences loss of a single DATA packet due 323 to channel-induced errors. 325 File-Receiver File-Sender 327 GET REQUEST ---------------------> 329 (indicating error/reject) <---- STATUS 331 or 333 <------- METADATA 334 <---------------------- DATA #1 335 STATUS -----------------> (voluntarily sent at start) 336 (lost) <------ DATA #2 337 <---------------------- DATA #3 (bit set 338 requesting STATUS) 339 STATUS -----------------> 340 (indicating that range in DATA #2 was lost) 341 <----------------------- DATA #2 (bit set 342 requesting STATUS) 343 STATUS -----------------> 344 (complete file and METADATA received) 346 Figure 2: Example _get_ session sequence 348 A _put_ is similar to _get_, although once the OKAY STATUS is 349 received, DATA is sent from the peer that originated the _put_ 350 request. A less common 'blind _put_' does not require an REQUEST and 351 OKAY STATUS to be exchanged before sending DATA packets, and is 352 efficient for long-delay or unidirectional links. 354 A _getdir_ request proceeds similarly, though the DATA transfer 355 contains a directory record with one or more directory entries, 356 described later, rather than a given file's bytes. _getdir_ is the 357 only request to also apply to directories, where one or more 358 directory entries for individual files is received. 360 The STATUS and DATA packets are allowed to be sent at any time within 361 the scope of a session, in order for the file-sending node to 362 optimize buffer management and transmission order. For example, if 363 the file-receiver already has the first part of a file from a 364 previous disrupted transfer, it may send a STATUS at the beginning of 365 the session indicating that it has the first part of the file, and so 366 only needs the last part of the file. Thus, efficient recovery from 367 interrupted sessions between peers becomes possible, similar to 368 ranged FTP and HTTP requests. (Note that METADATA with a checksum is 369 useful to verify that the parts are of the same file and that the 370 file is reassembled correctly.) 371 The less common Saratoga 'blind _put_' session is initiated by the 372 file-sender sending an optional METADATA packet followed by immediate 373 DATA packets, without requiring a REQUEST or waiting for a STATUS 374 response. This can be considered an "optimistic" mode of protocol 375 operation, as it assumes the implicit session request will be 376 granted. If the sender of a PUT request sees a STATUS packet 377 indicating that the request was declined, it MUST stop sending any 378 DATA packets within that session immediately. Since this type of 379 _put_ is open-loop for some period of time, it should not be used in 380 scenarios where congestion is a valid concern; in these cases, the 381 file-sender should wait on its METADATA to be acknowledged by a 382 STATUS before sending DATA packets within the session. 384 Figure 3 illustrates the sequence of packets in an example _put_ 385 session, beginning directly with METADATA and DATA, where the second 386 DATA packet is lost. The METADATA SHOULD be sent at the beginning of 387 the transfer, but MAY be sent (or resent) at any time. Other than 388 the way that it is initiated, the mechanics of data delivery of a 389 _put_ session are similar to a _get_ session. 391 File-Sender File-Receiver 393 REQUEST -----------------> 394 <------------------------ STATUS 395 METADATA ----------------> 396 DATA #1 ----------------> 397 (transfer accepted) <---------- STATUS 398 DATA #2 ---> (lost) 399 DATA #3 (bit set ------------> 400 requesting STATUS) 401 (DATA #2 lost) <---------- STATUS 402 DATA #2 (bit set ------------> 403 requesting STATUS) 404 (transfer complete) <---------- STATUS 406 Figure 3: Example PUT session sequence 408 In large-distance scenarios such as for deep space, the large 409 propagation delays and round-trip times involved discourage use of 410 ping-pong packet exchanges (such as TCP's SYN/ACK) for starting 411 sessions, and unidirectional transfers via optimistic 'blind _put_s' 412 are desirable. Blind _puts_, skipping the initial REQUEST/STATUS 413 exchanvge, are the the only mode of transfer suitable for 414 unidirectional links. Senders sending on unidirectional links SHOULD 415 send a copy of the METADATA in advance of DATA packets, and MAY 416 resend METADATA at intervals. 418 The _delete_ sessions are simple single packet requests that trigger 419 a STATUS packet with a status code that indicates whether the file 420 was deleted or not. If the file is not able to be deleted for some 421 reason, this reason can be conveyed in the Status field of the STATUS 422 packet. 424 A _get_ REQUEST packet that does not specify a filename (i.e. the 425 request contains a zero-length File Path field) is specially defined 426 to be a request for any chosen file that the peer wishes to send it. 427 This 'blind _get_' allows a Saratoga peer to request any files that 428 the other Saratoga peer has ready for it, without prior knowledge of 429 the directory listing, and without requiring the ability to examine 430 files or decode remote file names/paths for meaningful information 431 such as final destination. 433 If a file is larger than Saratoga can be expected to transfer during 434 a time-limited contact, there are at least two feasible options: 436 (1) The application can use proactive fragmentation to create 437 multiple smaller-sized files. Saratoga can transfer some number of 438 these smaller files fully during a contact. 440 (2) To avoid file fragmentation, a Saratoga file-receiver can retain 441 a partially-transferred file and request transfer of the unreceived 442 bytes during a later contact. This uses a STATUS packet to make 443 clear how much of the file has been successfully received and where 444 transfer should be resumed from, and relies on use of METADATA to 445 identify the file. On resumption of a transfer, the new METADATA 446 (including file length, file timestamps, and possibly a file 447 checksum) MUST match that of the previous METADATA in order to re- 448 establish the transfer. Otherwise, the file-receiver MUST assume 449 that the file has changed and purge the DATA payload received during 450 previous contacts. 452 Like the BEACON packets, a _put_ or a response to a _get_ MAY be sent 453 to the dedicated IPv4 Saratoga multicast address (allocated to 454 224.0.0.108) or the dedicated IPv6 link-local multicast address 455 (allocated to FF02:0:0:0:0:0:0:6C) for multiple file-receivers on the 456 link to hear. This is at the discretion of the file-sender, if it 457 believes that there is interest from multiple receivers. In-progress 458 DATA transfers MAY also be moved seamlessly from unicast to multicast 459 if the file-sender learns during a transfer, from receipt of further 460 unicast _get_ REQUEST packets, that multiple nodes are interested in 461 the file. The associated METADATA packet is multicast when this 462 transition takes place, and is then repeated periodically while the 463 DATA stream is being sent, to inform newly-arrived listeners about 464 the file being multicast. Acknowledgements MUST NOT be demanded by 465 multicast DATA packets, to prevent ack implosion at the file-sender, 466 and instead status SNACK information is aggregated and sent 467 voluntarily by all file-receivers. File-receivers respond to 468 multicast DATA with multicast STATUS packets. File-receivers SHOULD 469 introduce a short random delay before sending a multicast STATUS 470 packet, to prevent ack implosion after a channel-induced loss, and 471 MUST listen for STATUS packets from others, to avoid duplicating fill 472 requests. The file-sender SHOULD repeat any initial unicast portion 473 of the transfer as multicast last of all, and may repeat and cycle 474 through multicast of the file several times while file-receivers 475 express interest via STATUS or _get_ packets. Once in multicast and 476 with METADATA being repeated periodically, new file-receivers do not 477 need to send individual REQUEST packets. If a transfer has been 478 started using UDP-Lite and new receivers indicate UDP-only 479 capability, multicast transfers MUST switch to using UDP to 480 accommodate them. 482 3. Optional Parts of Saratoga 484 Implementing support for some parts of Saratoga is optional. These 485 parts are grouped into three sections, namely useful capabilities in 486 Saratoga that are likely to be supported by implementations, 487 congestion control that is needed in shared networks and across the 488 public Internet, and functionality requiring other protocols that is 489 less likely to be supported. 491 3.1. Optional but useful functions in Saratoga 493 These are useful capabilities in Saratoga that implementations SHOULD 494 support, but may not, depending on scenarios: 496 - sending and parsing BEACONs. 498 - sending METADATA. However, sending and receiving METADATA is 499 considered extremely useful, is strongly recommended, and SHOULD be 500 done. A METADATA that is received MUST be parsed. 502 - streaming data, including real-time streaming of content of unknown 503 length. This streaming can be unreliable (without resend requests) 504 or reliable (with resend requests). Session protocols such as http 505 expect reliable streaming. Although Saratoga data delivery is 506 inherently one-way, where a stream of DATA packets elicits a stream 507 of STATUS packets, bidirectional duplex communication can be 508 established by using two Saratoga transfers flowing in opposite 509 directions. 511 - multicast DATA transfers, if judged useful for the environment in 512 which Saratoga is deployed, when multiple receivers are participating 513 and are receiving the same file or stream. 515 - sending and parsing STATUS messages, which are expected for 516 bidirectional communication, but cannot be sent on and are not 517 required for sending over unidirectional links. 519 - sending and responding to packet timestamps in DATA and STATUS 520 packets. These timestamps are useful for streaming and for giving a 521 file-sender an indication of path latency for rate control. There is 522 no need for a file-receiver to understand the format used for these 523 timestamps for it to be able to receive them from and reflect them 524 back to the file-sender. 526 - support for descriptor sizes greater than 16 bits, for handling 527 small files, is optional, as is support for descriptor sizes greater 528 than 32 bits, and support for descriptor sizes greater than 64 bits. 529 If a descriptor size is implemented, all sizes below that size MUST 530 be implemented. 532 3.2. Optional congestion control 534 Saratoga can be implemented to perform congestion control at the 535 sender, based on feedback from acknowledgement STATUS packets 536 [I-D.wood-tsvwg-saratoga-congestion-control], or have the sender 537 configured to use simple open-loop rate control to only use a fixed 538 amount of link capacity. Congestion control is expected to be 539 undesirable for many of Saratoga's use cases and expected 540 environmental conditions in private networks, where sending as 541 quickly as possible or simple rate control at a fixed output speed 542 are considered useful. 544 In accordance with the UDP Guidelines [RFC5405], congestion control 545 MUST be supported if Saratoga is being used across the public 546 Internet, and SHOULD be supported in environments where links are 547 shared by traffic flows. Congestion control may not be supported 548 across private, single-flow links engineered for performance: 549 Saratoga's primary use case. 551 3.3. Optional functionality requiring other protocols 553 The functionality listed here is useful in rare cases, but requires 554 use of other, optional, protocols. This functionality MAY be 555 supported by Saratoga implementations: 557 - transfers permitting some errors in content delivered, using UDP- 558 Lite [RFC3828]. These can be useful for decreasing delivery time 559 over unreliable channels, especially for unidirectional links, or in 560 decreasing computational overhead for the UDP Lite checksum. To be 561 really usefuly, error tolerance requires that lower-layer frames 562 permit delivery of unreliable data, while header information is still 563 checked to assure that e.g. destination information is reliable. 565 If a file contains separate parts that require reliable transmission 566 without errors or that can tolerate errors in delivered content, 567 proactive fragmentation can be used to split the file into separate 568 reliable and unreliable files that can be transferred separately, 569 using UDP or UDP-Lite. 571 If parts of a file require reliability but the rest can be sent by 572 unreliable transfer, the file-sender can use its knowledge of the 573 internal file structure and vary DATA packet size so that the 574 reliable parts always start after the offset field and are covered by 575 the UDP-Lite checksum. 577 A file that permits unreliable delivery can be transferred onwards 578 using UDP. If the current sender does not understand the internal 579 file format to be able to decide what parts must be protected with 580 payload checksum coverage, the current sender or receiver does not 581 support UDP-Lite, or the current protocol stack only implements 582 error-free frame delivery below the UDP layer, then the file MAY be 583 delivered using UDP. 585 4. Packet Types 587 Saratoga is defined for use with UDP over either IPv4 or IPv6 588 [RFC0768]. UDP checksums, which are mandatory with IPv6, MUST be 589 used with IPv4. Within either version of IP datagram, a Saratoga 590 packet appears as a typical UDP header followed by an octet 591 indicating how the remainder of the packet is to be interpreted: 593 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 594 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 595 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 596 | UDP source port | UDP destination port | 597 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 598 | UDP length | UDP checksum | 599 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 600 |Vers |Pckt Type| other Saratoga fields ... // 601 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+// 603 Saratoga data transfers can also be carried out using UDP-Lite 604 [RFC3828]. If Saratoga can be carried over UDP-Lite, the 605 implementation MUST also support UDP. All packet types except DATA 606 MUST be sent using UDP with checksums turned on. For reliable 607 transfers, DATA packets are sent using UDP with checksums turned on. 608 For files where unreliable transfer has been indicated as desired and 609 possible, the sender MAY send DATA packets unreliably over UDP-Lite, 610 where UDP-Lite protects only the Saratoga headers and parts of the 611 file that must be transmitted reliably. 613 The three-bit Saratoga version field ("Ver") identifies the version 614 of the Saratoga protocol that the packet conforms to. The value 001 615 MUST be used in this field for implementations conforming to the 616 specification in this document, which specifies version 1 of 617 Saratoga. The value 000 was used in earlier implementations, prior 618 to the formal specification and public submission of the protocol 619 design, and is incompatible with version 001 in many respects. 621 The five-bit Saratoga "Packet Type" field indicates how the remainder 622 of the packet is intended to be decoded and processed: 624 +---+----------+----------------------------------------------------+ 625 | # | Type | Use | 626 +---+----------+----------------------------------------------------+ 627 | 0 | BEACON | Beacon packet indicating peer status. | 628 | 1 | REQUEST | Commands peer to start a transfer. | 629 | 2 | METADATA | Carries file transfer metadata. | 630 | 3 | DATA | Carries octets of file data. | 631 | 4 | STATUS | responds to REQUEST or DATA. Can signal list of | 632 | | | unreceived data to sender during a transfer. | 633 +---+----------+----------------------------------------------------+ 635 Several of these packet types include a Flags field, for which only 636 some of the bits have defined meanings and usages in this document. 637 Other, undefined, bits may be reserved for future use. Following the 638 principle of being conservative in what you send and liberal in what 639 you accept, a packet sender MUST set any undefined bits to zero, and 640 a packet recipient MUST NOT rely on these undefined bits being zero 641 on reception. 643 The specific formats for the different types of packets are given in 644 this section. Some packet types contain file offset descriptor 645 fields, which contain unsigned integers. The lengths of the offset 646 descriptors are fixed within a transfer, but vary between file 647 transfers. The size is set for each particular transfer, depending 648 on the choice of offset descriptor width made in the METADATA packet, 649 which in turn depends on the size of file being transferred. 651 In this document, all of the packet structure figures illustrating a 652 packet format assume 32-bit lengths for these offset descriptor 653 fields, and indicate the transfer-dependent length of the fields by 654 using a "(descriptor)" designation within the [field] in all packet 655 diagrams. That is: 657 The example 32-bit descriptors shown in all diagrams here 659 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 660 [ (descriptor) ] 661 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 663 are suitable for files of up to 4GiB - 1 octets in length, and may be 664 replaced in a file transfer by descriptors using a different length, 665 depending on the size of file to be transferred: 667 16-bit descriptor for short files of up to 64KiB - 1 octets in size 668 (MUST be supported) 670 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 671 [ (descriptor) ] 672 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 674 64-bit descriptor for longer files of up to 16EiB - 1 octets in size 675 (optional) 677 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 678 [ (descriptor) / 679 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 680 / (descriptor, continued) ] 681 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 683 128-bit descriptor for very long files of up to 256 EiEiB - 1 octets 684 in size (optional) 686 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 687 [ (descriptor) / 688 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 689 / (descriptor, continued) / 690 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 691 / (descriptor, continued) / 692 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 693 / (descriptor, continued) ] 694 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 696 Descriptors are used for the descriptor size less one octet, e.g. 697 16-bit for files up to 64KB - 1 octets in size, before switching to 698 the larger descriptor, e.g. using the 32-bit descriptor for a 64KB 699 file and larger. 701 For offset descriptors and types of content being transferred, the 702 related flag bits in BEACON and REQUEST indicate capabilities, while 703 in METADATA and DATA those flag bits are used slightly differently, 704 to indicate the content being transferred. 706 Saratoga packets are intended to fit within link MTUs to avoid the 707 inefficiencies and overheads of lower-layer fragmentation. A 708 Saratoga implementation does not itself perform any form of MTU 709 discovery, but is assumed to be configured with knowledge of usable 710 maximum IP MTUs for the link interfaces it uses. 712 4.1. BEACON 714 BEACON packets may be multicast periodically by nodes willing to act 715 as Saratoga peers, or unicast to individual peers to indicate 716 properties for that peer. Some implementations have sent BEACONS 717 every 100 milliseconds, but this rate is arbitrary, and should be 718 chosen to be appropriate for the environment and implementation. 720 The main purpose for sending BEACONs is to announce the presence of 721 the node to potential peers (e.g. satellites, ground stations) to 722 provide automatic service discovery, and also to confirm the activity 723 or presence of the peer. 725 The Endpoint Identifier (EID) in the BEACON serves to uniquely 726 identify the Saratoga peer. Whenever the Saratoga peer begins using 727 a new IP address, it SHOULD issue a BEACON on it and repeat the 728 BEACON periodically, to enable listeners to associate the IP address 729 with the EID and the peer. 731 Format 733 0 1 2 3 734 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 735 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 736 |0 0 1| Type | Flags | 737 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 738 [[ Available free space (optional) ]] 739 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 740 | Endpoint identifier... // 741 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+// 743 where 744 +------------+------------------------------------------------------+ 745 | Field | Description | 746 +------------+------------------------------------------------------+ 747 | Type | 0 | 748 | Flags | convey whether or not the peer is ready to | 749 | | send/receive, what the maximum supported file size | 750 | | range and descriptor is, and whether and how free | 751 | | space is indicated. | 752 | Available | This optional field can be used to indicate the | 753 | free space | current free space available for storage. | 754 | Endpoint | This MUST be used to uniquely identify the sending | 755 | identifier | Saratoga peer, or the administrative node that the | 756 | | BEACON-sender is associated with. | 757 +------------+------------------------------------------------------+ 759 The Flags field is used to provide some additional information about 760 the peer. The first two octets of the Flags field is currently in 761 use. The later octet is reserved for future use, and MUST be set to 762 zero. 764 The BEACON flags field, expanding a line of flag bits with 765 descriptions of each flag, is as follows: 767 BEACON Flags 769 0 1 2 3 770 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 771 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 772 |0|0|1| => Version Field: Saratoga version 1 773 | |0|0|0|0|0| => Type field: BEACON Frame designation 774 | |X|X| => Descriptor size 775 | |O| => Reserved for future functionality 776 | |X| => Supports streaming? 777 | |X|X| => Sending files 778 | |X|X| => Receiving files 779 | |X| => Supports UDP Lite? 780 | |X| => Includes free space size? 781 | |X|X| => Freespace Descriptor 782 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 784 The two highest-order bits (bits 8 and 9 above) indicate the maximum 785 supported file size parameters that the peer's Saratoga 786 implementation permits. Other Saratoga packet types contain 787 variable-length fields that convey file sizes or offsets into a file 788 -- the file offset descriptors. These descriptors may be 16-bit, 789 32-bit, 64-bit, or 128-bit in length, depending on the size of the 790 file being transferred and/or the integer types supported by the 791 sending peer. 793 The indicated bounds for the possible values of these bits are 794 summarized below: 796 +-------+-------+-------------------------+-------------------+ 797 | Bit 8 | Bit 9 | Supported Field Sizes | Maximum File Size | 798 +-------+-------+-------------------------+-------------------+ 799 | 0 | 0 | 16 bits | 2^16 - 1 octets. | 800 | 0 | 1 | 16 or 32 bits | 2^32 - 1 octets. | 801 | 1 | 0 | 16, 32, or 64 bits | 2^64 - 1 octets. | 802 | 1 | 1 | 16, 32, 64, or 128 bits | 2^128 - 1 octets. | 803 +-------+-------+-------------------------+-------------------+ 805 If a Saratoga peer advertises it is capable of receiving a certain 806 size of file, then it MUST also be capable of receiving files sent 807 using smaller descriptor values. This avoids overhead on small 808 files, while increasing interoperability between peers. 810 It is likely when sending unbounded streams that a larger offset 811 descriptor field size will be preferred to minimise problems with 812 offset sequence numbers wrapping. Protecting against sequence number 813 wrapping is discussed in the STATUS section. 815 +-----+-------+--------------------------+ 816 | Bit | Value | Meaning | 817 +-----+-------+--------------------------+ 818 | 10 | 0 | Reserved for future use. | 819 +-----+-------+--------------------------+ 821 Bit 10 is reserved for possible future use, and its use is not 822 specified here. This bit MUST be set to zero by implementations 823 conforming to this specification. 825 +-----+-------+--------------------------------------+ 826 | Bit | Value | Meaning | 827 +-----+-------+--------------------------------------+ 828 | 11 | 0 | not capable of supporting streaming. | 829 | 11 | 1 | capable of supporting streaming. | 830 +-----+-------+--------------------------------------+ 832 Bit 11 is used to indicate whether the sender is capable of sending 833 and receiving continuous streams. 835 +--------+--------+------------------------------------------------+ 836 | Bit 12 | Bit 13 | Capability and willingness to send files | 837 +--------+--------+------------------------------------------------+ 838 | 0 | 0 | cannot send files at all. | 839 | 0 | 1 | invalid. | 840 | 1 | 0 | capable of sending, but not willing right now. | 841 | 1 | 1 | capable of and willing to send files. | 842 +--------+--------+------------------------------------------------+ 844 +-------+-------+---------------------------------------------------+ 845 | Bit | Bit | Capability and willingness to receive files | 846 | 14 | 15 | | 847 +-------+-------+---------------------------------------------------+ 848 | 0 | 0 | cannot receive files at all. | 849 | 0 | 1 | invalid. | 850 | 1 | 0 | capable of receiving, but unwilling. Will reject | 851 | | | METADATA or DATA packets. | 852 | 1 | 1 | capable of and willing to receive files. | 853 +-------+-------+---------------------------------------------------+ 855 Also in the Flags field, bits 12 and 14 act as capability bits, while 856 bits 13 and 15 augment those flags with bits indicating current 857 willingness to use the capability. 859 Bits 12 and 13 deal with sending, while bits 14 and 15 deal with 860 receiving. If bit 12 is set, then the peer has the capability to 861 send files. If bit 14 is set, then the peer has the capability to 862 receive files. Bits 13 and 15 indicate willingness to send and 863 receive files, respectively. 865 A peer that is able to act as a file-sender MUST set the capability 866 bit 12 in all BEACONs that it sends, regardless of whether it is 867 willing to send any particular files to a particular peer at a 868 particular time. Bit 13 indicates the current presence of data to 869 send and a willingness to send it in general, in order to augment the 870 capability advertised by bit 12. 872 If bit 14 is set, then the peer is capable of acting as a receiver, 873 although it still might not currently be ready or willing to receive 874 files (for instance, it may be low on free storage). This bit MUST 875 be set in any BEACON packets sent by nodes capable of acting as file- 876 receivers. Bit 15 augments this by expresses a current general 877 willingness to receive and accept files. 879 +-----+-------+-----------------------------------------------------+ 880 | Bit | Value | Meaning | 881 +-----+-------+-----------------------------------------------------+ 882 | 16 | 0 | supports DATA transfers over UDP only. | 883 | 16 | 1 | supports DATA transfers over both UDP and UDP-Lite. | 884 +-----+-------+-----------------------------------------------------+ 886 Bit 16 is used to indicate whether the sender is capable of sending 887 and receiving unreliable transfers via UDP-Lite. 889 +-----+-------+-----------------------------------------------------+ 890 | Bit | Value | Meaning | 891 +-----+-------+-----------------------------------------------------+ 892 | 17 | 0 | available free space is not advertised in this | 893 | | | BEACON. | 894 | 17 | 1 | available free space is advertised in this BEACON. | 895 +-----+-------+-----------------------------------------------------+ 897 Bit 17 is used to indicate whether the sender includes an optional 898 field in this BEACON packet that tells how much free space is 899 available. If bit 17 is set, then bits 18 and 19 are used to 900 indicate the size in bits of the optional free-space-size field. If 901 bit 17 is not set, then bits 18 and 19 are zero. 903 +--------+--------+--------------------------+ 904 | Bit 18 | Bit 19 | Size of free space field | 905 +--------+--------+--------------------------+ 906 | 0 | 0 | 16 bits. | 907 | 0 | 1 | 32 bits. | 908 | 1 | 0 | 64 bits. | 909 | 1 | 1 | 128 bits. | 910 +--------+--------+--------------------------+ 912 The free space field size can vary as indicated by a varying-size 913 field indicated in bits 18 and 19 of the flags field. Unlike other 914 offset descriptor use where the value in the descriptor indicates a 915 byte or octet position for retransmission, or gives a file size in 916 bytes, this particular field indicates the available free space in 917 KIBIBYTES (KiB, multiples of 1024 octets), rather than octets. 918 Available free space is rounded down to the nearest KiB, so 919 advertising zero means that less than 1KiB is free and available. 920 Advertising the maximum size possible in the field means that more 921 free space than that is available. While this field is intended to 922 be scalable, it is expected that 32 bits (up to 4TiB) will be most 923 common in use. 925 A BEACON unicast to an individual peer MAY choose to indicate the 926 free space available for use by that particular peer, and MAY 927 indicate capabilities only available to that particular peer, 928 overriding or supplementing the properties advertised to all local 929 peers by multicast BEACONs. 931 Any type of host identifier can be used in the endpoint identifier 932 field, as long as it is a reasonably unique string within the range 933 of operational deployment. This identifier MUST be encoded in UTF-8 934 in the packet. This field encompasses the remainder of the packet. 935 No terminating null byte is included. 937 4.2. REQUEST 939 A REQUEST packet is an explicit command to perform either a _put_, 940 _get_, _getdir_, or _delete_ session. 942 Format 944 0 1 2 3 945 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 946 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 947 |0 0 1| Type | Flags | Request Type | 948 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 949 | Session Id | 950 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 951 | variable-length File Path ... / 952 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 953 / / 954 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 955 / | null byte | / 956 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 957 / variable-length Authentication Field (optional) | 958 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 960 where 962 +---------+---------------------------------------------------------+ 963 | Field | Description | 964 +---------+---------------------------------------------------------+ 965 | Type | 1 | 966 | Flags | provide additional information about the requested | 967 | | file/operation; see table below for definition. | 968 | Request | identifies the type of request being made; see table | 969 | Type | further below for request values. | 970 | Id | uniquely identifies the session between two peers. | 971 | File | the path of the requested file/directory following the | 972 | Path | rules described below. | 973 +---------+---------------------------------------------------------+ 974 The Id that is used during sessions serves to uniquely associate a 975 given packet with a particular sessions. This enables multiple 976 simultaneous data transfer or request/status sessions between two 977 peers, with each peer deciding how to multiplex and prioritise the 978 parallel flows it sends. The Id for a session is selected by the 979 initiator so as to not conflict with any other in-progress or recent 980 sessions with the same host. This Id should be unique and generated 981 using properties of the file, which will remain constant across a 982 host reboot. The 3-tuple of both host identifiers and a carefully- 983 generated session Id field can be used to uniquely index a particular 984 session's state. 986 The REQUEST flags field, expanding a line of flag bits with 987 descriptions of each flag, is as follows: 989 REQUEST Flags 991 0 1 2 3 992 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 993 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 994 |0|0|1| => Version field: Saratoga version 1 995 | |0|0|0|0|1| => Type field: REQUEST Frame designation 996 | |X|X| => Descriptor size 997 | |O| => Reserved for future use. 998 | |X| => Supports streaming? 999 | |X| => Supports UDP Lite? 1000 | Request Type field <= |X|X|X|X|X|X|X|X| 1001 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1003 In the Flags field, the bits labelled 8 and 9 in the figure above 1004 indicate the maximum supported file length fields that the peer can 1005 handle, and are interpreted exactly as the bits 8 and 9 in the BEACON 1006 packet described above. Bits 12 and 13, and 14 and 15, indicate 1007 capability and willingness to send and receive files, as described 1008 above. Making a _get_ request would require that the requester is 1009 capable and willing to receive files. The remaining defined 1010 individual bits are as summarised as follows: 1012 +-----+-------+-----------------------------------------------------+ 1013 | Bit | Value | Meaning | 1014 +-----+-------+-----------------------------------------------------+ 1015 | 10 | 0 | Reserved for future use. | 1016 | 11 | 0 | The requester cannot receive streams. | 1017 | 11 | 1 | The requester is also able to receive streams. | 1018 | 16 | 0 | The requester is able to receive DATA over UDP | 1019 | | | only. | 1020 | 16 | 1 | The requester is also able to receive DATA over | 1021 | | | UDP-Lite. | 1022 +-----+-------+-----------------------------------------------------+ 1024 The Request Type field is an octet that contains a value indicated 1025 the type of request being made. Possible values are: 1027 +-------+-----------------------------------------------------------+ 1028 | Value | Meaning | 1029 +-------+-----------------------------------------------------------+ 1030 | 0 | No action is to be taken; similar to a BEACON. | 1031 | 1 | A _get_ session is requested. The File Path field holds | 1032 | | the name of the file to be sent. | 1033 | 2 | A _put_ session is requested. The File Path field | 1034 | | suggests the name of the file that will be delivered only | 1035 | | after an OK STATUS is received from the file receiver. | 1036 | 3 | A _get_ session is requested, and once received | 1037 | | successfully, the original copy should be deleted. The | 1038 | | File Path field holds the name of the file to be sent. | 1039 | | (This get+delete is known as a 'take'.) | 1040 | 4 | A _put_ session is requested, and once sent successfully, | 1041 | | the original copy will be deleted. The File Path field | 1042 | | holds the name of the file to be sent. (This put+delete | 1043 | | is known as a 'give'.) | 1044 | 5 | A _delete_ session is requested, and the File Path field | 1045 | | specifies the name of the file to be deleted. | 1046 | 6 | A _getdir_ session is requested. The File Path field | 1047 | | holds the name of the directory or file on which the | 1048 | | directory record is created. | 1049 +-------+-----------------------------------------------------------+ 1051 The File Path portion of a _get_ packet is a null-terminated UTF-8 1052 encoded string [RFC3629] that represents the path and base file name 1053 on the file-sender of the file (or directory) that the file-receiver 1054 wishes to perform the _get_, _getdir_, or _delete_ operation on. 1055 Implementations SHOULD only send as many octets of File Path as are 1056 needed for carrying this string, although some implementations MAY 1057 choose to send a fixed-size File Path field in all REQUEST packets 1058 that is filled with null octets after the last UTF-8 encoded octet of 1059 the path. A maximum of 1024 octets for this field, and for the File 1060 Path fields in other Saratoga packet types, is used to limit the 1061 total packet size to within a single IPv6 minimum MTU (minus some 1062 padding for network layer headers), and thus avoid the need for 1063 fragmentation. The 1024-octet maximum applies after UTF-8 encoding 1064 and null termination. 1066 As in the standard Internet File Transfer Protocol (FTP) [RFC0959], 1067 for path separators, Saratoga allows the local naming convention on 1068 the peers to be used. There are security implications to processing 1069 these strings without some intelligent filtering and checking on the 1070 filesystem items they refer to. See also the Security Considerations 1071 section later within this document. 1073 If the File Path field is empty, i.e. is a null-terminated zero- 1074 length string one octet long, then this indicates that the file- 1075 receiver is ready to receive any file that the file-sender would like 1076 to send it, rather than requesting a particular file. This allows 1077 the file-sender to determine the order and selection of files that it 1078 would like to forward to the receiver in more of a "push" manner. Of 1079 course, file retrieval could also follow a "pull" manner, with the 1080 file-receiving host requesting specific files from the file-sender. 1081 This may be desirable at times if the file-receiver is low on storage 1082 space, or other resources. The file-receiver could also use the 1083 Saratoga _getdir_ session results in order to select small files, or 1084 make other optimizations, such as using its local knowledge of 1085 contact times to pick files of a size likely to be able to be 1086 delivered completely. File transfer through pushing sender-selected 1087 files implements delivery prioritization decisions made solely at the 1088 Saratoga file-sending node. File transfer through pulling specific 1089 receiver-selected files implements prioritization involving more 1090 participation from the Saratoga file-receiver. This is how Saratoga 1091 implements Quality of Service (QoS). 1093 The null-terminated File Path string MAY be followed by an optional 1094 Authentication Field that can be used to validate the REQUEST packet. 1095 Any value in the Authentication Field is the result of a computation 1096 of packet contents that SHOULD include, at a minimum, source and 1097 destination IP addresses and port numbers and packet length in a 1098 'pseudo-header', as well as the content of all Saratoga fields from 1099 Version to File Path, excluding the predictable null-termination 1100 octet. This Authentication Field can be used to allow the REQUEST 1101 receiver to discriminate between other peers, and permit and deny 1102 various REQUEST actions as appropriate. The format of this field is 1103 unspecified for local use. 1105 Combined get+delete (take) and put+delete (give) requests should only 1106 have the delete carried out once the deleting peer is certain that 1107 the file-receiver has a good copy of the file. This may require the 1108 file receiver to verify checksums before sending a final STATUS 1109 message acknowledging successful delivery of the final DATA segment, 1110 or aborting the transfer if the checksum fails. If the transfer 1111 fails and an error STATUS is sent for any reason, the file should not 1112 be deleted. 1114 REQUEST packets may be sent multicast, to learn about all listening 1115 nodes. A multicast _get_ request for a file that elicits multiple 1116 METADATA or DATA responses should be followed by unicast STATUS 1117 packets with status errors cancelling all but one of the proposed 1118 transfers. File timestamps in the Directory Entry can be used to 1119 select the most recent version of an offered file, and the host to 1120 fetch it from. 1122 If the receiver already has the file at the expected file path and is 1123 requesting an update to that file, REQUEST can be sent after a 1124 METADATA advertising that file, to allow the sender to determine 1125 whether a replacement for the file should be sent. 1127 Delete requests are ignored for files currently being transferred. 1129 4.3. METADATA 1131 METADATA packets are sent as part of a data transfer session (_get_, 1132 _getdir_, and _put_). A METADATA packet says how large the file is 1133 and what its name is, as well as what size of file offset descriptor 1134 is chosen for the session. METADATA packets are optional, but SHOULD 1135 be sent. A METADATA packet that is received MUST be parsed. A 1136 METADATA packet is normally sent at the start of a DATA transfer, but 1137 can be repeated throughout the transfer. Sending METADATA at the 1138 start if using checksums allows for incremental checksum calculation 1139 by the receiver, and is a good idea. 1141 Format 1143 0 1 2 3 1144 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 1145 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1146 |0 0 1| Type | Flags |Sumleng|Sumtype| 1147 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1148 | Session Id | 1149 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1150 | / 1151 / / 1152 / example error-detection checksum (128-bit MD5 shown) / 1153 / / 1154 / | 1155 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1156 | / 1157 / single Directory Entry describing file / 1158 / (variable length) / 1159 / // 1160 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-// 1162 where 1164 +-----------+-------------------------------------------------------+ 1165 | Field | Description | 1166 +-----------+-------------------------------------------------------+ 1167 | Type | 2 | 1168 | Flags | indicate additional boolean metadata about a file. | 1169 | Sumleng | indicates the length of a checksum, as a multiple of | 1170 | | 32 bits. | 1171 | Sumtype | indicates whether a checksum is present after the Id, | 1172 | | and what type it is. | 1173 | Id | identifies the session that this packet describes. | 1174 | Checksum | an example included checksum covering file contents. | 1175 | Directory | describes file system information about the file, | 1176 | Entry | including file length, file timestamps, etc.; the | 1177 | | format is specified in Section 5. | 1178 +-----------+-------------------------------------------------------+ 1180 The first octet of the Flags field is currently specified for use. 1181 The later two octets are reserved for future use, and MUST be set to 1182 zero. 1184 The METADATA flags field is as follows, expanding a line of flag bits 1185 with explanations of each field: 1187 METADATA Flags 1189 0 1 2 3 1190 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 1191 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1192 |0|0|1| => Version Field: Saratoga version 1 1193 | |0|0|0|1|0| => Type field: METADATA Frame designation 1194 | |X|X| => Descriptor 1195 | |X|X| => File/stream/dir record 1196 | |X| => Transfer in progress? 1197 | |X| => UDP Lite permitted? 1198 | Checksum length in no. of 32-bit words <=|X|X|X|X| 1199 | Error detection checksum type <=|X|X|X|X| 1200 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1202 In the Flags field, the bits labelled 8 and 9 in the figure above 1203 indicate the exact size of the offset descriptor fields used in this 1204 particular packet and are interpreted exactly as the bits 8 and 9 in 1205 the BEACON packet described above. The value of these bits 1206 determines the size of the File Length field in the current packet, 1207 as well as indicating the size of the offset fields used in DATA and 1208 STATUS packets within the session that will follow this packet. 1210 +-------+-------+---------------------------------------------------+ 1211 | Bit | Bit | Type of transfer | 1212 | 10 | 11 | | 1213 +-------+-------+---------------------------------------------------+ 1214 | 0 | 0 | a file is being sent. | 1215 | 0 | 1 | the file being sent should be interpreted as a | 1216 | | | Directory Record. | 1217 | 1 | 0 | Reserved for future use. | 1218 | 1 | 1 | an indefinite-length stream is being sent. | 1219 +-------+-------+---------------------------------------------------+ 1221 Also inside the Flags field, bits 10 and 11 indicate what is being 1222 transferred - a file, special directory record file that contains one 1223 or more directory entries, or stream. The value 01 indicates that 1224 the METADATA and DATA packets are being generated in response to a 1225 _getdir_ REQUEST, and that the assembled DATA contents should be 1226 interpreted as a Directory Record containing directory entries, as 1227 defined in Section 5. 1229 +-----+-------+-----------------------------------------------------+ 1230 | Bit | Value | Meaning | 1231 +-----+-------+-----------------------------------------------------+ 1232 | 12 | 0 | This transfer is in progress. | 1233 | 12 | 1 | This transfer is no longer in progress, and has | 1234 | | | been terminated. | 1235 +-----+-------+-----------------------------------------------------+ 1237 Bit 12 indicates whether the transfer is in progress, or has been 1238 terminated by the sender. It is normally set to 1 only when METADATA 1239 is resent to indicate that a stream transfer has been ended. 1241 +-----+-------+-----------------------------------------------------+ 1242 | Bit | Value | Meaning | 1243 +-----+-------+-----------------------------------------------------+ 1244 | 13 | 0 | This file's content MUST be delivered reliably | 1245 | | | without errors using UDP. | 1246 | 13 | 1 | This file's content MAY be delivered unreliably, or | 1247 | | | partly unreliably, where errors are tolerated, | 1248 | | | using UDP-Lite. | 1249 +-----+-------+-----------------------------------------------------+ 1251 Bit 13 indicates whether the file must be sent reliably or can be 1252 sent at least partly unreliably, using UDP-Lite. This flag SHOULD 1253 only be set if the originator of the file knows that at least some of 1254 the file content is suitable for sending unreliably and is robust to 1255 errors. This flag reflects a property of the file itself. This flag 1256 may still be set if the immediate file-receiver is only capable of 1257 UDP delivery, on the assumption that this preference will be 1258 preserved for later transfers where UDP-Lite transfers may be taken 1259 advantage of by senders with knowledge of the internal file 1260 structure. The file-sender may know that the receiver is capable of 1261 handling UDP-Lite, either from a _get_ REQUEST, from exchange of 1262 BEACONs, or a-priori. 1264 The high four bits of the Flags field, bits 28-31, are used to 1265 indicate if an optional error-detection checksum has been included in 1266 the METADATA for the file to be transferred. Here, bits 0000 1267 indicate that no checksum is present, with the implicit assumption 1268 that the application will do its own end-to-end check. Other values 1269 indicate the type of checksum to use. The choice of checksum depends 1270 on the available computing power and the length of the file to be 1271 checksummed. Longer files require stronger checksums to ensure 1272 error-free delivery. The checksum of the file to be transferred is 1273 carried as shown, with a fixed-length field before the varying-length 1274 File Length and File Name information fields. 1276 Assigned values for the checksum type field are: 1278 +-----------+-------------------------------------------------------+ 1279 | Value | Use | 1280 | (0-15) | | 1281 +-----------+-------------------------------------------------------+ 1282 | 0 | No checksum is provided. | 1283 | 1 | 32-bit CRC32 checksum, suitable for small files. | 1284 | 2 | 128-bit MD5 checksum, suitable for larger files. | 1285 | 3 | 160-bit SHA-1 checksum, suitable for larger files but | 1286 | | slower to process than MD5. | 1287 +-----------+-------------------------------------------------------+ 1289 The length of an optional checksum cannot be inferred from the 1290 checksum type field, particularly for unknown checksum types. The 1291 next-highest four bits of the 32-bit word holding the Flags, bits 1292 24-27, indicate the length of the checksum bit field, as a multiple 1293 of 32 bits. 1295 +----------------------+-------------------------------------+ 1296 | Example Value (0-15) | Use | 1297 +----------------------+-------------------------------------+ 1298 | 0 | No checksum is provided. | 1299 | 1 | 32-bit checksum field, e.g. CRC32. | 1300 | 4 | 128-bit checksum field, e.g. MD5. | 1301 | 5 | 160-bit checksum field, e.g. SHA-1. | 1302 +----------------------+-------------------------------------+ 1304 For a 32-bit CRC, the length field holds 1 and the type field holds 1305 1. For MD5, the length field holds 4 and the type field holds 2. 1306 For SHA-1, the length field holds 5 and the type field holds 3. 1308 It is expected that higher values will be allocated to new and 1309 stronger checksums able to better protect larger files. These 1310 checksums can be expected to be longer, with larger checksum length 1311 fields. 1313 A checksum SHOULD be included for files being transferred. The 1314 checksum SHOULD be as strong as possible. Streaming of an 1315 indefinite-length stream MUST set the checksum type field to zero. 1317 It is expected that a minimum of the MD5 checksum will be used, 1318 unless the Saratoga implementation is used exclusively for small 1319 transfers at the low end of the 16-bit file descriptor range, such as 1320 on low-performing hardware, where the weaker CRC-32c checksum can 1321 suffice. 1323 The CRC32 checksum is computed as described for the CRC-32c algorithm 1324 given in [RFC3309]. 1326 The MD5 Sum field is generated via the MD5 algorithm [RFC1321], 1327 computed over the entire contents of the file being transferred. The 1328 file-receiver can compute the MD5 result over the reassembled 1329 Saratoga DATA packet contents, and compare this to the METADATA's MD5 1330 Sum field in order to gain confidence that there were no undetected 1331 protocol errors or UDP checksum weaknesses encountered during the 1332 transfer. Although MD5 is known to be less than optimal for security 1333 uses, it remains excellent for non-security use in error detection 1334 (as is done here in Saratoga), and has better performance 1335 implications than cryptographically-stronger alternatives given the 1336 limited available processing of many use cases [RFC6151]. MD5 use 1337 here has similar properties to an Ethernet frame CRC for error 1338 detection. 1340 Checksums may be privately keyed for local use, to allow transmission 1341 of authenticated or encrypted files delivered in DATA packets. This 1342 has limitations, discussed further in Section 8 at end. 1344 Use of the checksum to ensure that a file has been correctly relayed 1345 to the receiving node is important. A provided checksum MUST be 1346 checked against the received data file. If checksum verification 1347 fails, either due to corruption or due to the receiving node not 1348 having the right key for a keyed checksum), the file MUST be 1349 discarded. If the file is to be relayed onwards later to another 1350 Saratoga peer, the metadata, including the checksum, MUST be retained 1351 with the file and SHOULD be retransmitted onwards unchanged with the 1352 file for end-to-end coverage. If it is necessary to recompute the 1353 checksum or encrypted data for the new peer, either because a 1354 different key is in use or the existing checksum algorithm is not 1355 supported, the new checksum MUST be computed before the old checksum 1356 is verified, to ensure overlapping checksum coverage and detect 1357 errors introduced in file storage. 1359 METADATA can be used as an indication to update copies of files. If 1360 the METADATA is in response to a _get_ REQUEST including a file 1361 record, and the record information for the held file matches what the 1362 requester already has, as has been indicated by a previously-received 1363 METADATA advertisement from the requester, then only the METADATA is 1364 sent repeating this information and verifying that the file is up to 1365 date. If the record information does not match and a newer file can 1366 be supplied, the METADATA begins a transfer with following DATA 1367 packets to update the file. 1369 4.4. DATA 1371 A series of DATA packets form the main part of a data transfer 1372 session (_get_, _put_, or _getdir_). The payloads constitute the 1373 actual file data being transferred. 1375 Format 1377 0 1 2 3 1378 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 1379 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1380 |0 0 1| Type | Flags | 1381 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1382 | Session Id | 1383 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1384 | / 1385 / Timestamp/nonce information (optional) / 1386 / / 1387 / | 1388 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1389 [ Offset (descriptor) ] 1390 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1391 | Payload data... // 1392 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-// 1394 where 1396 +-----------------+-------------------------------------------------+ 1397 | Field | Description | 1398 +-----------------+-------------------------------------------------+ 1399 | Type | 3 | 1400 | Flags | are described below. | 1401 | Id | identifies the session to which this packet | 1402 | | belongs. | 1403 | Timestamp/nonce | is an optional 128-bit field providing timing | 1404 | | or identification information unique to this | 1405 | | packet. See Appendix A for details. | 1406 | Offset | the offset in octets to the location where the | 1407 | | first byte of this packet's payload is to be | 1408 | | written. | 1409 +-----------------+-------------------------------------------------+ 1411 The DATA packet has a minimum size of ten octets, using sixteen-bit 1412 descriptors and no timestamps. 1414 DATA packets are normally checked by the UDP checksum to prevent 1415 errors in either the header or the payload content. However, for 1416 transfers that can tolerate content errors, DATA packets MAY be sent 1417 using UDP-Lite. If UDP-Lite is used, the file-sender must know that 1418 the file-receiver is capable of handling UDP-Lite, and the file 1419 contents to be transferred should be resilient to errors. The UDP- 1420 Lite checksum MUST protect the Saratoga headers, up to and including 1421 the offset descriptor, and MAY protect more of each packet's payload, 1422 depending on the file-sender's knowledge of the internal structure of 1423 the file and the file's reliability requirements. 1425 The DATA flags field is as follows, expanding a line of flag bits 1426 with explanations of each field: 1428 DATA Flags 1430 0 1 2 3 1431 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 1432 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1433 |0|0|1| => Version Field: Saratoga version 1 1434 | |0|0|0|1|1| => Type field: DATA Frame designation 1435 | |X|X| => Descriptor 1436 | |X|X| => File/stream/dir record 1437 | |X| => Includes timestamp? 1438 | |X| => STATUS requested 1439 | |X| => End of Data (EOD) set 1440 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1442 +-------+-------+--------------------------------------------------+ 1443 | Bit 8 | Bit 9 | Type of transfer | 1444 +-------+-------+--------------------------------------------------+ 1445 | 0 | 0 | 16-bit descriptors are in use in this transfer. | 1446 | 0 | 1 | 32-bit descriptors are in use in this transfer. | 1447 | 1 | 0 | 64-bit descriptors are in use in this transfer. | 1448 | 1 | 1 | 128-bit descriptors are in use in this transfer. | 1449 +-------+-------+--------------------------------------------------+ 1451 Flag bits 8 and 9 are set to indicate the size of the offset 1452 descriptor as described for BEACON and METADATA packets, so that each 1453 DATA packet is self-describing. This allows the DATA packet to be 1454 used to construct a file even when an initial METADATA is lost and 1455 must be resent. The flag values for bits 8 and 9 MUST be the same as 1456 indicated in any expected METADATA packet. 1458 +-------+-------+---------------------------------------------------+ 1459 | Bit | Bit | Type of transfer | 1460 | 10 | 11 | | 1461 +-------+-------+---------------------------------------------------+ 1462 | 0 | 0 | a file is being sent. | 1463 | 0 | 1 | the file being sent should be interpreted as a | 1464 | | | directory record. | 1465 | 1 | 0 | Reserved for future use. | 1466 | 1 | 1 | an indefinite-length stream is being sent. | 1467 +-------+-------+---------------------------------------------------+ 1468 Also inside the Flags field, bits 10 and 11 indicate what is being 1469 transferred - a file, special file that contains a Directory Records, 1470 or stream. The value 01 indicates that the METADATA and DATA packets 1471 are being generated in response to a _getdir_ REQUEST, and that the 1472 assembled DATA contents should be interpreted as a Directory Record 1473 containing directory entries, as defined in Section 5. The flag 1474 values for bits 10 and 11 MUST be the same as indicated in the 1475 initial METADATA packet. 1477 +-----+-------+-----------------------------------------------------+ 1478 | Bit | Value | Meaning | 1479 +-----+-------+-----------------------------------------------------+ 1480 | 12 | 0 | This packet does not include an optional | 1481 | | | timestamp/nonce field. | 1482 | 12 | 1 | This packet includes an optional timestamp/nonce | 1483 | | | field. | 1484 +-----+-------+-----------------------------------------------------+ 1486 Flag bit 12 indicates that an optional packet timestamp/nonce is 1487 carried in the packet before the offset field. This packet 1488 timestamp/nonce field is always sixteen octets (128 bits) long. 1489 Timestamps can be useful to the sender even when the receiver does 1490 not understand them, as the receiver can simply echo any provided 1491 timestamps back, as specified for STATUS packets, to allow the sender 1492 to monitor flow conditions. Packet timestamps are particularly 1493 useful when streaming. Packet timestamps are discussed further in 1494 Appendix A. 1496 +-----+-------+-------------------------------+ 1497 | Bit | Value | Meaning | 1498 +-----+-------+-------------------------------+ 1499 | 15 | 0 | No response is requested. | 1500 | 15 | 1 | A STATUS packet is requested. | 1501 +-----+-------+-------------------------------+ 1503 Within the Flags field, if bit 15 of the packet is set, the file- 1504 receiver is expected to immediately generate a STATUS packet to 1505 provide the file-sender with up-to-date information regarding the 1506 status of the file transfer. This flag is set carefully and rarely. 1507 This flag may be set periodically, but infrequently. Asymmetric 1508 links with constrained backchannels can only carry a limited amount 1509 of STATUS packets before ack congestion becomes a problem. This flag 1510 SHOULD NOT be set if an unreliable stream is being transferred, or if 1511 multicast is in use. This flag SHOULD be set periodically for 1512 reliable file transfers, or reliable streaming. The file-receiver 1513 MUST respond to the flag by generating a STATUS packet, unless it 1514 knows that doing so will lead to local congestion, in which case it 1515 may choose to send a later voluntary STATUS message. Voluntary 1516 STATUS packets MAY be sent if a request for one has not been made 1517 within an appropriate time. 1519 +-----+-------+----------------------------------+ 1520 | Bit | Value | Meaning | 1521 +-----+-------+----------------------------------+ 1522 | 16 | 0 | Normal use. | 1523 | 16 | 1 | The EOD End of Data flag is set. | 1524 +-----+-------+----------------------------------+ 1526 The End of Data flag is set in DATA packets carrying the last byte of 1527 a transfer. This is particularly useful for streams and for the rare 1528 Saratoga implementations that do not send or receive METADATA. 1530 Immediately following the DATA header is the payload, which consumes 1531 the remainder of the packet and whose length is implicitly defined by 1532 the end of the packet. The payload octets are directly formed from 1533 the continuous octets starting at the specified Offset in the file 1534 being transferred. No special coding is performed. A zero-octet 1535 payload length is allowable, and a single DATA packet indicating zero 1536 payload, consisting only of a header with the EOD flag set, may be 1537 useful to simply elicit a STATUS response from the receiver. 1539 The length of the Offset fields used within all DATA packets for a 1540 given session MUST be consistent with the length indicated by bits 8 1541 and 9 of any accompanying METADATA packet. If the METADATA packet 1542 has not yet been received, a file-receiver that supports METADATA 1543 MUST indicate that it has not been received via a STATUS packet, and 1544 MAY choose to enqueue received DATA packets for later processing 1545 after the METADATA arrives. 1547 4.5. STATUS 1549 The STATUS packet type is the single acknowledgement method that is 1550 used for feedback from a Saratoga receiver to a Saratoga sender to 1551 indicate session progress, both as a response to a REQUEST, and as a 1552 response to a DATA packet when demanded or volunteered. 1554 When responding to a DATA packet, the STATUS packet MAY, as needed, 1555 include selective acknowledgement (SNACK) 'hole' information to 1556 enable transmission (usually re-transmission) of specific sets of 1557 octets within the current session (called "holes"). This 1558 'holestofill' information can be used to clean up losses (or indicate 1559 no losses) at the end of, or during, a session, or to efficiently 1560 resume a transfer that was interrupted in a previous session. 1562 Format 1564 0 1 2 3 1565 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 1566 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1567 |0 0 1| Type | Flags | Status | 1568 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1569 | Session Id | 1570 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1571 | / 1572 / Timestamp/nonce information (optional) / 1573 / / 1574 / | 1575 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1576 [ Progress Indicator (descriptor) ] 1577 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1578 [ In-Response-To (descriptor) ] 1579 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1580 | (possibly, several Hole fields) / 1581 / ... / 1582 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1584 where 1585 +----------------+--------------------------------------------------+ 1586 | Field | Description | 1587 +----------------+--------------------------------------------------+ 1588 | Type | 4 | 1589 | Flags | are defined below. | 1590 | Id | identifies the session that this packet belongs | 1591 | | to. | 1592 | Status | a value of 00 indicates the transfer is | 1593 | | sucessfully proceeding. All other values are | 1594 | | errors terminating the transfer, explained | 1595 | | below. | 1596 | Zero-Pad | an octet fixed at 00 to allow later fields to be | 1597 | | conveniently aligned for processing. | 1598 | Timestamp | an optional fixed 128-bit field, that is only | 1599 | (optional) | present and used to return a packet timestamp if | 1600 | | the timestamp flag is set. If the STATUS packet | 1601 | | is voluntary and the voluntary flag is set, this | 1602 | | should repeat the timestamp of the DATA packet | 1603 | | containing the highest offset seen. If the | 1604 | | STATUS packet is in response to a mandatory | 1605 | | request, this will repeat the timestamp of the | 1606 | | requesting DATA packet. The file-sender may use | 1607 | | these timestamps to estimate latency. Packet | 1608 | | timestamps are particularly useful when | 1609 | | streaming. There are special considerations for | 1610 | | streaming, discussed further below, to protect | 1611 | | against the ambiguity of wrapped offset | 1612 | | descriptor sequence numbers. Packet timestamps | 1613 | | are discussed further in Appendix A. | 1614 | Progress | the offset of the lowest-numbered octet of the | 1615 | Indicator | file not yet received, and expected. | 1616 | (descriptor) | | 1617 | In-Response-To | the offset of the octet following the DATA | 1618 | (descriptor) | packet that generated this STATUS packet, or the | 1619 | | offset of the next expected octet following the | 1620 | | highest DATA packet seen if this STATUS is | 1621 | | generated voluntarily and the voluntary flag is | 1622 | | set. | 1623 | Holes | indications of offset ranges of missing data, | 1624 | | defined below. | 1625 +----------------+--------------------------------------------------+ 1627 The STATUS packet has a minimum size of twelve octets, using sixteen- 1628 bit descriptors, a progress indicator but no Hole fields, and no 1629 timestamps. The progress indicator is always zero when responding to 1630 requests that may initiate a transfer. 1632 The Id field is needed to associate the STATUS packet with the 1633 session that it refers to. 1635 The Progress Indicator and In-Response-To fields mark the 'left edge' 1636 and 'right edge' of the incomplete working area where holes are being 1637 filled in. If there are no holes, these fields will hold the same 1638 value. At the start of a transfer, both fields begin by expecting 1639 octet zero. When a transfer has completed successfully, these fields 1640 will contain the length of the file. 1642 The STATUS flags field is as follows, expanding a line of flag bits 1643 with explanations of each field: 1645 STATUS Flags 1647 0 1 2 3 1648 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 1649 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1650 |0|0|1| => Version Field: Saratoga version 1 1651 | |0|0|1|0|0| => Type field: STATUS Frame designation 1652 | |X|X| => Descriptor 1653 | |X| => Timestamp included? 1654 | |X| => METADATA received? 1655 | |X| => Hole information complete? 1656 | |X| => Voluntary STATUS message? 1657 | Status code <= |X|X|X|X|X|X|X|X| 1658 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1660 Flags bits 8 and 9 are set to indicate the size of the offset 1661 descriptor as described for BEACON and METADATA packets, so that each 1662 STATUS packet is self-describing. The flag values here MUST be the 1663 same as indicated in the initial METADATA and DATA packets. 1665 Other bits in the Flags field are defined as: 1667 +-----+-------+---------------------------------------------------+ 1668 | Bit | Value | Meaning | 1669 +-----+-------+---------------------------------------------------+ 1670 | 12 | 0 | This packet does not include a timestamp field. | 1671 | 12 | 1 | This packet includes an optional timestamp field. | 1672 +-----+-------+---------------------------------------------------+ 1674 Flag bit 12 indicates that an optional sixteen-byte packet timestamp/ 1675 nonce field is carried in the packet before the Progress Indicator 1676 descriptor, as discussed for the DATA packet format. Packet 1677 timestamps are discussed further in Appendix A. 1679 +-----+-------+--------------------------------------------------+ 1680 | Bit | Value | Meaning | 1681 +-----+-------+--------------------------------------------------+ 1682 | 13 | 0 | file's METADATA has been received or is ignored. | 1683 | 13 | 1 | file's METADATA has not been received. | 1684 +-----+-------+--------------------------------------------------+ 1686 If bit 13 of a STATUS packet has been set to indicate that the 1687 METADATA has not yet been received, then any METADATA SHOULD be 1688 resent. This flag should normally be clear. 1690 A receiver SHOULD tolerate lost METADATA that is later resent, but 1691 MAY insist on receiving METADATA at the start of a transfer. This is 1692 done by responding to early DATA packets with a voluntary STATUS 1693 packet that sets this flag bit, reports a status error code 10, sets 1694 the Progress Indicator field to zero, and does not include 1695 HOLESTOFILL information. 1697 +-----+-------+-----------------------------------------------------+ 1698 | Bit | Value | Meaning | 1699 +-----+-------+-----------------------------------------------------+ 1700 | 14 | 0 | this packet contains the complete current set of | 1701 | | | holes at the file-receiver. | 1702 | 14 | 1 | this packet contains incomplete hole-state; holes | 1703 | | | shown in this packet should supplement other | 1704 | | | incomplete hole-state known to the file-sender. | 1705 +-----+-------+-----------------------------------------------------+ 1707 Bit 14 of a 'holestofill' STATUS packet is only set when there are 1708 too many holes to fit within a single STATUS packet due to MTU 1709 limitations. This causes the hole list to be spread out over 1710 multiple STATUS packets, each of which conveys distinct sets of 1711 holes. This could occur, for instance, in a large file _put_ 1712 scenario with a long-delay feedback loop and poor physical layer 1713 conditions. These multiple STATUS packets will share In-Response-To 1714 information. When losses are light and/or hole reporting and repair 1715 is relatively frequent, all holes should easily fit within a single 1716 STATUS packet, and this flag will be clear. Bit 14 should normally 1717 be clear. 1719 In some rare cases of high loss, there may be too many holes in the 1720 received data to convey within a single STATUS's size, which is 1721 limited by the link MTU size. In this case, multiple STATUS packets 1722 may be generated, and Flags bit 14 should be set on each STATUS 1723 packet accordingly, to indicate that each packet holds incomplete 1724 results. The complete group of STATUS packets, each containing 1725 incomplete information, will share common In-Response-To information 1726 to distinguish them from any earlier groups. 1728 +-----+-------+-----------------------------------------------+ 1729 | Bit | Value | Meaning | 1730 +-----+-------+-----------------------------------------------+ 1731 | 15 | 0 | This STATUS was requested by the file-sender. | 1732 | 15 | 1 | This STATUS is sent voluntarily. | 1733 +-----+-------+-----------------------------------------------+ 1735 Flag bit 15 indicates whether the STATUS is sent voluntarily or due 1736 to a request by the sender. It affects content of the In-Response-To 1737 timestamp and descriptor fields. 1739 In the case of a transfer proceeding normally, immediately following 1740 the STATUS packet header shown above, is a set of "Hole" definitions 1741 indicating any lost packets. Each Hole definition is a pair of 1742 unsigned integers. For a 32-bit offset descriptor, each Hole 1743 definition consists of two four-octet unsigned integers: 1745 Hole Definition Format 1747 0 1 2 3 1748 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 1749 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1750 [ offset to start of hole (descriptor) ] 1751 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1752 [ offset to end of hole (descriptor) ] 1753 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1755 The start of the hole means the offset of the first unreceived byte 1756 in that hole. The end of the hole means the last unreceived byte in 1757 that hole. 1759 For 16-bit descriptors, each Hole definition holds two two-octet 1760 unsigned integers, while Hole definitions for 64- and 128-bit 1761 descriptors require two eight- and two sixteen-octet unsigned 1762 integers respectively. 1764 Holes MUST be listed in order, lowest values first. 1766 Since each Hole definition takes up eight octets when 32-bit offset 1767 lengths are used, we expect that well over 100 such definitions can 1768 fit in a single STATUS packet, given the IPv6 minimum MTU. (There 1769 may be cases where there is a very constrained backchannel compared 1770 to the forward channel streaming DATA packets. For these cases, 1771 implementations might deliberately request large holes that span a 1772 number of smaller holes and intermediate areas where DATA has already 1773 been received, so that previously-received DATA is deliberately 1774 resent. This aggregation of separate holes keeps the backchannel 1775 STATUS packet size down to avoid backchannel congestion.) 1776 A 'voluntary' STATUS can be sent at the start of each session. This 1777 indicates that the receiver is ready to receive the file, or 1778 indicates an error or rejection code, described below. A STATUS 1779 indicating a successfully established transfer has a Progress 1780 Indicator of zero and an In-Response-To field of zero. 1782 On receiving a STATUS packet, the sender SHOULD prioritize sending 1783 the necessary data to fill those holes, in order to advance the 1784 Progress Indicator at the receiver. 1786 4.5.1. Errors and aborting sessions 1788 In the case of an error causing a session to be aborted, the Status 1789 field holds a code that can be used to explain the cause of the error 1790 to the other peer. A zero value indicates that there have been no 1791 significant errors (this is called a "success STATUS" within this 1792 document), while any non-zero value means the session should be 1793 aborted (this is called a "failure STATUS"). 1795 +----------------+--------------------------------------------------+ 1796 | Error Code | Meaning | 1797 | Status Value | | 1798 +----------------+--------------------------------------------------+ 1799 | 0x00 | Success, No Errors. | 1800 | 0x01 | Unspecified Error. | 1801 | 0x02 | Unable to send file due to resource constraints. | 1802 | 0x03 | Unable to receive file due to resource | 1803 | | constraints. | 1804 | 0x04 | File not found. | 1805 | 0x05 | Access Denied. | 1806 | 0x06 | Unknown Id field for session. | 1807 | 0x07 | Did not delete file. | 1808 | 0x08 | File length is longer than receiver can support. | 1809 | 0x09 | File offset descriptors do not match expected | 1810 | | use or file length. | 1811 | 0x0A | Unsupported Saratoga packet type received. | 1812 | 0x0B | Unsupported Request Type received. | 1813 | 0x0C | REQUEST is now terminated due to an internal | 1814 | | timeout. | 1815 | 0x0D | DATA flag bits describing transfer have changed | 1816 | | unexpectedly. | 1817 | 0x0E | Receiver is no longer interested in receiving | 1818 | | this file. | 1819 | 0x0F | File is in use. | 1820 | 0x10 | METADATA required before transfer can be | 1821 | | accepted. | 1822 | 0x11 | A STATUS error message has been received | 1823 | | unexpectedly, so REQUEST is terminated. | 1824 +----------------+--------------------------------------------------+ 1826 The recipient of a failure STATUS MUST NOT try to process the 1827 Progress Indicator, In-Response-To, or Hole offsets, because, in some 1828 types of error conditions, the packet's sender may not have any way 1829 of setting them to the right length for the session. 1831 5. The Directory Entry 1833 Directory Entries have two uses within Saratoga: 1835 1. Within a METADATA packet, a Directory Entry is used to give 1836 information about the file being transferred, in order to 1837 facilitate proper reassembly of the file and to help the file- 1838 receiver understand how recently the file may have been created 1839 or modified. 1841 2. When a peer requests a directory record via a _getdir_ REQUEST, 1842 the other peer generates a file containing a series of one or 1843 more concatenated Directory Entry records, and transfers this 1844 file as it would transfer the response to a normal _get_ REQUEST, 1845 sending the records together within DATA packets. This file may 1846 be either temporary or within-memory and not actually a part of 1847 the host's file system itself. 1849 Directory Entry Format 1851 0 1 2 3 1852 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 1853 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1854 |1| Properties [ Size (descriptor) ] 1855 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1856 | Mtime file modification time (using year 2000 epoch) | 1857 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1858 | Ctime file creation time (using year 2000 epoch) | 1859 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1860 | / 1861 + / 1862 / / 1863 / File Path (max 1024 octets,variable length) / 1864 / ... // 1865 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-// 1867 where 1868 +------------+------------------------------------------------------+ 1869 | field | description | 1870 +------------+------------------------------------------------------+ 1871 | Properties | if set, bit 7 of this field indicates that the entry | 1872 | | corresponds to a directory. Bit 6, if set, indicates | 1873 | | that the file is "special". A special file may not | 1874 | | be directly transferable as it corresponds to a | 1875 | | symbolic link, a named pipe, a device node, or some | 1876 | | other "special" filesystem object. A file-sender | 1877 | | may simply choose not to include these types of | 1878 | | files in the results of a _getdir_ request. Bits 8 | 1879 | | and 9 are flags that indicate the width of the | 1880 | | following descriptor field that gives file size. | 1881 | Size | the size of each file or directory in octets. This | 1882 | | is a descriptor, varying as needed in each entry for | 1883 | | the size of the file. For convenience in the figure, | 1884 | | it is shown here as a 16-bit descriptor for a small | 1885 | | file. | 1886 | Mtime | a timestamp showing when the file or directory was | 1887 | | modified. | 1888 | Ctime | a timestamp of the last status change for this file | 1889 | | or directory. | 1890 | File Path | contains the file's name relative within the | 1891 | | requested path of the _getdir_ session, a maximum of | 1892 | | 1024-octet UTF-8 string, which is null-terminated to | 1893 | | indicate its end. The File Path may contain | 1894 | | additional null padding in the null termination to | 1895 | | allow Directory Entries to each be allocated a fixed | 1896 | | amount of space or to place an integer number of | 1897 | | Directory Entries in each DATA packet for debugging | 1898 | | purposes. | 1899 +------------+------------------------------------------------------+ 1901 The first bit of the Directory Entry is always 1, to indicate the 1902 start of the record and the end of any padding from previous 1903 Directory Entries. 1905 +-------+-------+---------------------+ 1906 | Bit 6 | Bit 7 | Properties conveyed | 1907 +-------+-------+---------------------+ 1908 | 0 | 0 | normal file. | 1909 | 0 | 1 | normal directory. | 1910 | 1 | 0 | special file. | 1911 | 1 | 1 | special directory. | 1912 +-------+-------+---------------------+ 1914 Streams listed in a directory should be marked as special. If a 1915 stream is being transferred, its size is unknown -- otherwise it 1916 would be a file. The size property of a Directory Entry for a stream 1917 is therefore expected to be zero. 1919 +-------+-------+-------------------------------------------------+ 1920 | Bit 8 | Bit 9 | Properties conveyed | 1921 +-------+-------+-------------------------------------------------+ 1922 | 0 | 0 | File size is indicated in a 16-bit descriptor. | 1923 | 0 | 1 | File size is indicated in a 32-bit descriptor. | 1924 | 1 | 0 | File size is indicated in a 64-bit descriptor. | 1925 | 1 | 1 | File size is indicated in a 128-bit descriptor. | 1926 +-------+-------+-------------------------------------------------+ 1928 Flag bits 8 and 9 of Properties are descriptor size flags, with 1929 similar meaning as before, describing the size of the File Size 1930 descriptor that follows the Properties field. When a single 1931 Directory Entry appears in the METADATA packet, these flags SHOULD 1932 match flag bits 8 and 9 in the METADATA header. (A smaller 1933 descriptor size may be indicated in the Directory Entry when doing 1934 test transfers of small files using large descriptors.) 1936 +--------+---------------------------------------+ 1937 | Bit 10 | Properties conveyed | 1938 +--------+---------------------------------------+ 1939 | 0 | Set to zero. Reserved for future use. | 1940 +--------+---------------------------------------+ 1942 +------+------------------------------------------------------------+ 1943 | Bit | Use | 1944 | 13 | | 1945 +------+------------------------------------------------------------+ 1946 | 0 | This file's content MUST be delivered reliably without | 1947 | | errors using UDP. | 1948 | 1 | This file's content MAY be delivered unreliably, or partly | 1949 | | unreliably, where errors are tolerated, using UDP-Lite. | 1950 +------+------------------------------------------------------------+ 1952 Bit 13 indicates whether the file must be sent reliably or can be 1953 sent at least partly unreliably, using UDP-Lite. This matches 1954 METADATA flag use. 1956 Undefined or unused flag bits of the Properties field default to 1957 zero. Bit 0 is always 1, to indicate the start of a Directory Entry. 1958 In general, bits 1-7 of Properties are for matters related to the 1959 sender's filesystem, while bits 8-15 are for matters related to 1960 transport over Saratoga. 1962 It may be reasonable that files are visible in Directory Entries only 1963 when they can be transferred to the requester - this may depend on 1964 e.g. having appropriate access permissions or being able to handle 1965 large filesizes. But requesters only capable of handling small files 1966 MUST be able to skip through large descriptors for large file sizes. 1967 Directory sizes are not calculated or sent, and a Size of 0 is given 1968 instead for directories, which are considered zero-length files. 1970 The "epoch" format used in file creation and modification timestamps 1971 in directory entries indicates the unsigned number of seconds since 1972 the start of January 1, 2000 in UTC. The times MUST include all leap 1973 seconds. Using unsigned 32-bit values means that these time fields 1974 will not wrap until after the year 2136. 1976 Converting from unix CTime/MTime holding a time past January 1, 2000 1977 but with the traditional 1970 epoch means subtracting the fixed value 1978 of 946 684 822 seconds, which includes the 22 leap seconds that were 1979 added to UTC between 1 January 1970 and 1 January 2000. A unix time 1980 before 2000 is rounded to January 1, 2000. 1982 A file-receiver should preserve the timestamp information received in 1983 the METADATA for its own copy of the file, to allow newer versions of 1984 files to propagate and supercede older versions. 1986 6. Behaviour of a Saratoga Peer 1988 This section describes some details of Saratoga implementations and 1989 uses the RFC 2119 standards language to describe which portions are 1990 needed for interoperability. 1992 6.1. Saratoga Sessions 1994 Following are descriptions of the packet exchanges between two peers 1995 for each type of session. Exchanges rely on use of the Id field to 1996 match responses to requests, as described earlier in Section 4.2. 1998 6.1.1. The _get_ Session 2000 1. A peer (the file-receiver) sends a REQUEST packet to its peer 2001 (the file-sender). The Flags bits are set to indicate that this 2002 is not a _delete_ request, nor does the File Path indicate a 2003 directory. Each _get_ session corresponds to a single file, and 2004 fetching multiple files requires sending multiple REQUEST packets 2005 and using multiple different Session Ids so that responses can be 2006 differentiated and matched to REQUESTs based on the Id field. If 2007 a specific file is being requested, then its name is filled into 2008 the File Path field, otherwise it is left null and the file- 2009 sender will send a file of its choice. 2011 2. If the _get_ request is rejected, then a STATUS packet containing 2012 an error code in the Status field is sent and the session is 2013 terminated. This STATUS packet MUST be sent to reject and 2014 terminate the session. The error code MAY make use of the 2015 "Unspecified Error" value for security reasons. Some REQUESTs 2016 might also be rejected for specifying files that are too large to 2017 have their lengths encoded within the maximum integer field width 2018 advertised by bits 8 and 9 of the REQUEST. 2020 3. If the _get_ request is accepted, then a STATUS packet MAY be 2021 sent with an error code of 00 and an In-Response-To field of 2022 zero, to indicate acceptance. Sending other packets (METADATA or 2023 DATA) also indicates acceptance. The file-sender SHOULD generate 2024 and send a METADATA packet. A METADATA packet that is received 2025 MUST be parsed. The sender MUST send the contents of the file or 2026 stream as a series of DATA packets. In the absence of STATUS 2027 packets being requested from the receiver, if the file-sender 2028 believes it has finished sending the file and is not on a 2029 unidirectional link, it MUST send the last DATA packet with the 2030 Flags bit set requesting a STATUS response from the file- 2031 receiver. The last DATA packet MUST always have its End of Data 2032 (EOD) bit set. This can be followed by empty DATA packets with 2033 the Flags bits set with EOD and requesting a STATUS until either 2034 a STATUS packet is received, or the inactivity timer expires. 2035 All of the DATA packets MUST use field widths for the file offset 2036 descriptor fields that match what the Flags of the METADATA 2037 packet specified. Some arbitrarily selected DATA packets may 2038 have the Flags bit set that requests a STATUS packet. The file- 2039 receiver MAY voluntarily send STATUS packets at other times, 2040 where the In-Response-To field MUST set to zero. The file- 2041 receiver SHOULD voluntarily send a STATUS packet in response to 2042 the first DATA packet. 2044 4. As the file-receiver takes in the DATA packets, it writes them 2045 into the file locally. The file-receiver keeps track of missing 2046 data in a hole list. Periodically the file sender will set the 2047 ack flag bit in a DATA packet and request a STATUS packet from 2048 the file-receiver. The STATUS packet can include a copy of this 2049 hole list if there are holes. File-receivers MUST send a STATUS 2050 packet immediately in response to receiving a DATA packet with 2051 the Flags bit set requesting a STATUS. 2053 5. If the file-sender receives a STATUS packet with a non-zero 2054 number of holes, it re-fetches the file data at the specified 2055 offsets and re-transmits it. If the METADATA packet has not been 2056 received, this is indicated by a bit in the STATUS packet, and 2057 the METADATA packet can be retransmitted. The file-sender MUST 2058 retransmit data from any holes reported by the file-receiver 2059 before proceeding further with new DATA packets. 2061 6. When the file-receiver has fully received the file data and any 2062 METADATA packet, then it sends a STATUS packet indicating that 2063 the session is complete, and it terminates the session locally, 2064 although it MUST persist in responding to any further DATA 2065 packets received from the file-sender with 'completed' STATUSes, 2066 as described in Section 4.5, for some reasonable amount of time. 2067 Starting a timer on sending a completed STATUS and resetting it 2068 whenever a received DATA/sent 'completed' STATUS session takes 2069 place, then removing all session state on timer expiry, is one 2070 approach to this. 2072 Given that there may be a high degree of asymmetry in link bandwidth 2073 between the file-sender and file-receiver, the STATUS packets should 2074 be carefully generated so as to not congest the feedback path. This 2075 means that both a file-sender should be cautious in setting the DATA 2076 Flags bit requesting STATUSes, and also that a file-receiver should 2077 be cautious in gratuitously generating STATUS packets of its own 2078 volition. When sending on known unidirectional links, a file-sender 2079 cannot reasonably expect to receive STATUS packets, so should never 2080 request them. 2082 6.1.2. The _getdir_ Session 2084 A _getdir_ session to obtain a Directory Record proceeds through the 2085 same states as the _get_ session. Rather than transferring the 2086 contents of a file from the file-receiver to the file-sender, a set 2087 of records representing the contents of a directory are transferred 2088 as a file. These records can be parsed and dealt with by the file- 2089 receiver as desired. There is no requirement that a Saratoga peer 2090 send the full contents of a directory listing; a peer may filter the 2091 results to only those entries that are actually accessible to the 2092 requesting peer. 2094 Any file system entries that would normally be contained in the 2095 directory records, but that have sizes greater than the receiver has 2096 indicated that it can support in its BEACON, MUST be filtered out. 2098 6.1.3. The _delete_ Session 2100 1. A peer sends a REQUEST packet with the bit set indicating that it 2101 is a deletion request and the path to be deleted is filled into 2102 the File Path field. The File Path MUST be filled in for 2103 _delete_ sessions, unlike for _get_ sessions. 2105 2. The other peer replies with a feedback STATUS packet whose Id 2106 matches the Id field of the _delete_ REQUEST. This STATUS has a 2107 Status code that indicates that the file is not currently present 2108 on the filesystem (indicated by the 00 Status field in a success 2109 STATUS), or whether some error occurred (indicated by the non- 2110 zero Status field in a failure STATUS). This STATUS packet MUST 2111 have no Holes and 16-bit width zero-valued Progress Indicator and 2112 In-Response-To fields. 2114 If a request is received to delete a file that is already deleted, a 2115 STATUS with Status code 00 and other fields as described above is 2116 sent back in acknowledgement. This response indicates that the 2117 indicated file is not present, not the exact action sequence that led 2118 to a not-present file. This idempotent behaviour ensures that loss 2119 of STATUS acknowledgements and repeated _delete_ requests are handled 2120 properly. 2122 6.1.4. The _put_ Session 2124 A _put_ session proceeds as a _get_ does, except the file-sender and 2125 file-receiver roles are exchanged between peers. In a _put_ a PUT 2126 REQUEST is sent. 2128 However, in a 'blind _put_', no REQUEST packet is ever sent. The 2129 file-sending end senses that the session is in progress when it 2130 receives METADATA or DATA packets for which it has no knowledge of 2131 the Id field. 2133 If the file-receiver decides that it will store and handle the _put_ 2134 request (at least provisionally), then it MUST send a voluntary (ie, 2135 not requested) success STATUS packet to the file-sender. Otherwise, 2136 it sends a failure STATUS packet. After sending a failure STATUS 2137 packet, it may ignore future packets with the same Id field from the 2138 file-sender, but it should, at a low rate, periodically regenerate 2139 the failure STATUS packet if the flow of packets does not stop. 2141 6.2. Beacons 2143 Sending BEACON packets is not required in any of the sessions 2144 discussed in this specification, but optional BEACONs can provide 2145 useful information in many situations. If a node periodically 2146 generates BEACON packets, then it should do so at a low rate which 2147 does not significantly affect in-progress data transfers. 2149 A node that supports multiple versions of Saratoga (e.g. version 1 2150 from this specification along with the older version 0), MAY send 2151 multiple BEACON packets showing different version numbers. The 2152 version number in a single BEACON should not be used to infer the 2153 larger set of protocol versions that a peer is compatible with. 2154 Similarly, a node capable of communicating via IPv4 and IPv6 MAY send 2155 separate BEACONs via both protocols, or MAY only send BEACONs on its 2156 preferred protocol. 2158 If a node receives BEACONs from a peer, then it SHOULD NOT attempt to 2159 start any _get_, _getdir_, or _delete_ sessions with that peer if bit 2160 14 is not set in the latest received BEACONs. Likewise, if received 2161 BEACONs from a peer do not have bit 15 set, then _put_ sessions 2162 SHOULD NOT be attempted to that peer. Unlike the capabilities bits 2163 which prevent certain types of sessions from being attempted, the 2164 willingness bits are advisory, and sessions MAY be attempted even if 2165 the node is not advertising a willingness, as long as it advertises a 2166 capability. This avoids waiting for a willingness indication across 2167 long-delay links. 2169 6.3. Upper-Layer Interface 2171 No particular application interface functionality is required in 2172 implementations of this specification. The means and degree of 2173 access to Saratoga configuration settings, and session control that 2174 is offered to upper layers and applications, are completely 2175 implementation-dependent. In general, it is expected that upper 2176 layers (or users) can set timeout values for session requests and for 2177 inactivity periods during the session, on a per-peer or per-session 2178 basis, but in some implementations where the Saratoga code is 2179 restricted to run only over certain interfaces with well-understood 2180 operational latency bounds, then these timers MAY be hard-coded. 2182 6.4. Inactivity Timer 2184 In order to determine the liveliness of a session, Saratoga nodes may 2185 implement an inactivity timer for each peer they are expecting to see 2186 packets from. For each packet received from a peer, its associated 2187 inactivity timer is reset. If no packets are received for some 2188 amount of time, and the inactivity timer expires, this serves as a 2189 signal to the node that it should abort (and optionally retry) any 2190 sessions that were in progress with the peer. Information from the 2191 link interface (i.e. link down) can override this timer for point-to- 2192 point links. 2194 The actual length of time that the inactivity timer runs for is a 2195 matter of both implementation and deployment situation. Relatively 2196 short timers (on the order of several round-trip times) allow nodes 2197 to quickly react to loss of contact, while longer timers allow for 2198 session robustness in the presence of transient link problems. This 2199 document deliberately does not specify a particular inactivity timer 2200 value nor any rules for setting the inactivity timer, because the 2201 protocol is intended to be used in both long- and short-delay 2202 regimes. 2204 Specifically, the inactivity timer is started on sending REQUEST or 2205 STATUS packets. When sending packets not expected to elicit 2206 responses (BEACON, METADATA, or DATA without acknowledgement 2207 requests), there is no point to starting the local inactivity timer. 2209 For normal file transfers, there are simple rules for handling 2210 expiration of the inactivity timer during a _get_ or _put_ session. 2211 Once the timer expires, the file-sender SHOULD terminate the session 2212 state and cease to send DATA or METADATA packets. The file-receiver 2213 SHOULD stop sending STATUS packets, and MAY choose to store the file 2214 in some cache location so that the transfer can be recovered. This 2215 is possible by waiting for an opportunity to re-attempt the session 2216 and immediately sending a STATUS that only lists the parts of the 2217 file not yet received if the session is granted. In any case, a 2218 partially-received file MUST NOT be handled in any way that would 2219 allow another application to think it is complete. 2221 The file-sender may implement more complex timers to allow rate-based 2222 pacing or simple congestion control using information provided in 2223 STATUS packets, but such possible timers and their effects are 2224 deliberately not specified here. 2226 6.5. Streams and wrapping 2228 When sending an indefinite-length stream, the possibility of offset 2229 sequence numbers wrapping back to zero must be considered. This can 2230 be protected against by using large offsets, and by the stream 2231 receiver. The receiver MUST separate out holes before the offset 2232 wraps to zero from holes after the wrap, and send Hole definitions in 2233 different STATUS packets, with Flag 14 set to mark them as 2234 incomplete. Any Hole straddling a sequence wrap MUST be broken into 2235 two separate Holes, with the second Hole starting at zero. The 2236 timestamps in STATUS packets carrying any pre-wrap holes should be 2237 earlier than the timestamp in later packets, and should repeat the 2238 timestamp of the last DATA packet seen for that offset sequence 2239 before the following wrap to zero occurred. Receivers indicate that 2240 they no longer wish to receive streams by sending Status Code 0C. 2242 6.6. Completing file delivery and ending the session 2244 The sender infers a completely-received transfer from the reported 2245 receiver window position. In the final STATUS packet sent by the 2246 receiver once the file to be transferred has been completely 2247 received, bit 14 MUST be 0 (indicating a complete set of holes in 2248 this packet), there MUST NOT be any holestofill offset pairs 2249 indicating holes, the In-Response-To and Progress Indicator fields 2250 contain the length of the file (i.e. point to the next octet after 2251 the file), and the voluntary flag MUST be set. This 'completed' 2252 STATUS may be repeated, depending on subsequent sender behaviour, 2253 while internal state about the transfer remains available to the 2254 receiver. 2256 Because METADATA not mandatory for implementations, the file receiver 2257 may not know the length of a file if METADATA is never sent. The 2258 sender MUST set the EOD End of Data flag in each DATA packet that 2259 sends the last byte of the file, and SHOULD request a STATUS 2260 acknowledgement when the EOD flag is set. If METADATA has been sent 2261 and the EOD comes earlier than a previously reported length of a 2262 file, an unspecified error 0x01, as described below, is returned in 2263 the STATUS message responding to that DATA packet and EOD flag. If a 2264 stream is being marked EOD, the receiver acknowledges this with a 2265 Success 0x00 code. 2267 7. Implementation Development 2269 There is a mailing list for discussion of Saratoga and its 2270 implementations. Contact Lloyd Wood for details. Further 2271 information on the Saratoga protocol is at: 2272 http://saratoga.sourceforge.net/ 2274 8. Security Considerations 2276 The design of Saratoga provides limited, deliberately lightweight, 2277 services for authentication of session requests, and for 2278 authentication or encryption of data files via keyed metadata 2279 checksums. This document does not specify privacy or access control 2280 for data files transferred. Privacy, access, authentication and 2281 encryption issues may be addressed within an implementation or 2282 deployment in several ways that do not affect the file transfer 2283 protocol itself. As examples, IPSec may be used to protect Saratoga 2284 implementations from forged packets, to provide privacy, or to 2285 authenticate the identity of a peer. Other implementation-specific 2286 or configuration-specific mechanisms and policies might also be 2287 employed for authentication and authorization of requests. 2288 Protection of file data and meta-data can also be provided by a 2289 higher-level file encryption facility. If IPsec is not required, use 2290 of encryption before the file is given to Saratoga is preferable. 2292 Basic security practices like not accepting paths with "..", not 2293 following symbolic links, and using a chroot() system call, among 2294 others, should also be considered within an implementation. 2296 Note that Saratoga is intended for single-hop transfers between 2297 peers. A METADATA checksum using a previously shared key can be used 2298 to decrypt or authenticate delivered DATA files. Saratoga can only 2299 provide payload encryption across a single Saratoga transfer, not 2300 end-to-end across concatenated separate hop-by-hop transfers through 2301 untrusted peers, as checksum verification of file integrity is 2302 required at each node. End-to-end data encryption, if required, MUST 2303 be implemented by the application using Saratoga. 2305 9. IANA Considerations 2307 IANA has allocated port 7542 (tcp/udp) for use by Saratoga. 2309 saratoga 7542/tcp Saratoga Transfer Protocol 2310 saratoga 7542/udp Saratoga Transfer Protocol 2312 IANA has allocated a dedicated IPv4 all-hosts multicast address 2313 (224.0.0.108) and a dedicated IPv6 link-local multicast addresses 2314 (FF02:0:0:0:0:0:0:6c) for use by Saratoga. 2316 10. Acknowledgements 2318 Developing and deploying the on-orbit IP-based infrastructure of the 2319 Disaster Monitoring Constellation, in which Saratoga has proven 2320 useful, has taken the efforts of hundreds of people over more than a 2321 decade. We thank them all. 2323 We thank James H. McKim as an early contributor to Saratoga 2324 implementations and specifications, while working for RSIS 2325 Information Systems at NASA Glenn. We regard Jim as an author of 2326 this document, but are prevented by the boilerplate five-author limit 2327 from naming him earlier. 2329 We thank Stewart Bryant, Dale Mellor, Cathryn Peoples, Kerrin Pine, 2330 Abu Zafar Shahriar and Dave Stewart for their review comments. 2332 Work on this specification at NASA's Glenn Research Center was funded 2333 by NASA's Earth Science Technology Office (ESTO). 2335 11. A Note on Naming 2337 Saratoga is named for the USS Saratoga (CV-3), the aircraft carrier 2338 sunk at Bikini Atoll that is now a popular diving site. 2340 12. References 2342 12.1. Normative References 2344 [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 2345 DOI 10.17487/RFC0768, August 1980, 2346 . 2348 [RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, 2349 DOI 10.17487/RFC1321, April 1992, 2350 . 2352 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2353 Requirement Levels", BCP 14, RFC 2119, 2354 DOI 10.17487/RFC2119, March 1997, 2355 . 2357 [RFC3309] Stone, J., Stewart, R., and D. Otis, "Stream Control 2358 Transmission Protocol (SCTP) Checksum Change", RFC 3309, 2359 DOI 10.17487/RFC3309, September 2002, 2360 . 2362 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 2363 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 2364 2003, . 2366 12.2. Informative References 2368 [Brenchley12] 2369 Brenchley, M., Garner, P., Cawthorne, A., Wisniewska, K., 2370 and P. Davies, "Bridging the Abyss - Agile Data Downlink 2371 Solutions for the Disaster Monitoring Constellation", 2372 Small Satellites Systems and Services (4S) 2373 Symposium, European Space Agency, Portoroz, Slovenia, June 2374 2012. 2376 [Hogie05] Hogie, K., Criscuolo, E., and R. Parise, "Using Standard 2377 Internet Protocols and Applications in Space", Computer 2378 Networks, Special Issue on Interplanetary Internet, vol. 2379 47, no. 5, pp. 603-650, April 2005. 2381 [I-D.wood-tsvwg-saratoga-congestion-control] 2382 Wood, L., Eddy, W., and W. Ivancic, "Congestion control 2383 for the Saratoga protocol", draft-wood-tsvwg-saratoga- 2384 congestion-control-08 (work in progress) , November 2015. 2386 [Jackson04] 2387 Jackson, C., "Saratoga File Transfer Protocol", Surrey 2388 Satellite Technology Ltd internal technical document , 2389 2004. 2391 [RFC0959] Postel, J. and J. Reynolds, "File Transfer Protocol", 2392 STD 9, RFC 959, DOI 10.17487/RFC0959, October 1985, 2393 . 2395 [RFC3828] Larzon, L-A., Degermark, M., Pink, S., Jonsson, L-E., Ed., 2396 and G. Fairhurst, Ed., "The Lightweight User Datagram 2397 Protocol (UDP-Lite)", RFC 3828, DOI 10.17487/RFC3828, July 2398 2004, . 2400 [RFC5348] Floyd, S., Handley, M., Padhye, J., and J. Widmer, "TCP 2401 Friendly Rate Control (TFRC): Protocol Specification", 2402 RFC 5348, DOI 10.17487/RFC5348, September 2008, 2403 . 2405 [RFC5405] Eggert, L. and G. Fairhurst, "Unicast UDP Usage Guidelines 2406 for Application Designers", BCP 145, RFC 5405, 2407 DOI 10.17487/RFC5405, November 2008, 2408 . 2410 [RFC6151] Turner, S. and L. Chen, "Updated Security Considerations 2411 for the MD5 Message-Digest and the HMAC-MD5 Algorithms", 2412 RFC 6151, DOI 10.17487/RFC6151, March 2011, 2413 . 2415 [Wood07a] Wood, L., Ivancic, W., Hodgson, D., Miller, E., Conner, 2416 B., Lynch, S., Jackson, C., da Silva Curiel, A., Cooke, 2417 D., Shell, D., Walke, J., and D. Stewart, "Using Internet 2418 Nodes and Routers Onboard Satellites", International 2419 Journal of Satellite Communications and 2420 Networking, Special Issue on Space Networks, vol. 25, no. 2421 2, pp. 195-216, March/April 2007. 2423 [Wood07b] Wood, L., Eddy, W., Ivancic, W., Miller, E., McKim, J., 2424 and C. Jackson, "Saratoga: a Delay-Tolerant Networking 2425 convergence layer with efficient link utilization", 2426 International Workshop on Satellite and Space 2427 Communications (IWSSC '07) Salzburg, September 2007. 2429 [Wood11] Wood, L., Smith, C., Eddy, W., Ivancic, W., and C. 2430 Jackson, "Taking Saratoga from space-based ground sensors 2431 to ground-based space sensors", IEEE Aerospace 2432 Conference Big Sky, Montana, March 2011. 2434 Appendix A. Timestamp/Nonce field considerations 2436 Timestamps are useful in DATA packets when the time that the packet 2437 or its payload was generated is of importance; this can be necessary 2438 when streaming sensor data recorded and packetized in real time. The 2439 format of the optional timestamp, whose presence is indicated by a 2440 flag bit, is implementation-dependent within the available fixed- 2441 length 128-bit field. How the contents of this timestamp field are 2442 used and interpreted depends on local needs and conventions and the 2443 local implementation. 2445 However, one simple suggested format for timestamps is to begin with 2446 a POSIX time_t representation of time, in network byte order. This 2447 is either a 32-bit or 64-bit signed integer representing the number 2448 of seconds since 1970. The remainder of this field can be used 2449 either for a representation of elapsed time within the current 2450 second, if that level of accuracy is required, or as a nonce field 2451 uniquely identifying the packet or including other information. Any 2452 locally-meaningful flags identifying a type of timestamp or timebase 2453 can be included before the end of the field. Unused parts of this 2454 field MUST be set to zero. 2456 There are many different representations of timestamps and timebases, 2457 and this draft is too short to cover them in detail. One suggested 2458 flag representation of different timestamp fields is to use the least 2459 significant bits at the end of the timestamp/nonce field as: 2461 +--------+----------------------------------------------------------+ 2462 | Status | Meaning | 2463 | Value | | 2464 +--------+----------------------------------------------------------+ 2465 | 00 | No flags set, local interpretation of field. | 2466 | 01 | 32-bit POSIX timestamp at start of field indicating | 2467 | | whole seconds from epoch. | 2468 | 02 | 64-bit POSIX timestamp at start of field indicating | 2469 | | whole seconds elapsed from epoch. | 2470 | 03 | 32-bit POSIX timestamp, as in 01, followed by 32-bit | 2471 | | timestamp indicating fraction of the second elapsed. | 2472 | 04 | 64-bit POSIX timestamp, as in 02, followed by 32-bit | 2473 | | timestamp indicating fraction of the second elapsed. | 2474 | 05 | 32-bit timestamp giving seconds elapsed since the 2000 | 2475 | | epoch, as in file timestamps. This option is likely only | 2476 | | useful for very slow links. | 2477 +--------+----------------------------------------------------------+ 2479 Other values may indicate specific epochs or timebases, as local 2480 requirements dictate. There are many ways to define and use time 2481 usefully. 2483 Echoing timestamps back to the file-sender is also useful for 2484 tracking flow conditions. This does not require the echoing receiver 2485 to understand the timestamp format or values in use. The use of 2486 timestamp values may assist in developing algorithms for flow control 2487 (including TCP-Friendly Rate Control 2488 [I-D.wood-tsvwg-saratoga-congestion-control]) or other purposes. 2489 Timestamp values provide a useful mechanism for Saratoga peers to 2490 measure path and round-trip latency. 2492 Authors' Addresses 2494 Lloyd Wood 2495 University of Surrey alumni 2496 Sydney, New South Wales 2497 Australia 2499 Email: L.Wood@society.surrey.ac.uk 2501 Wesley M. Eddy 2502 MTI Systems 2503 MS 500-ASRC 2504 NASA Glenn Research Center 2505 21000 Brookpark Road 2506 Cleveland, OH 44135 2507 USA 2509 Phone: +1-216-433-6682 2510 Email: wes@mti-systems.com 2512 Charles Smith 2513 Vallona Networks 2514 7 Wattle Crescent 2515 Phegans Bay, New South Wales 2256 2516 Australia 2518 Phone: +61-404-05-8974 2519 Email: charlesetsmith@me.com 2520 Will Ivancic 2521 NASA Glenn Research Center 2522 21000 Brookpark Road, MS 54-5 2523 Cleveland, OH 44135 2524 USA 2526 Phone: +1-216-433-3494 2527 Email: William.D.Ivancic@grc.nasa.gov 2529 Chris Jackson 2530 Surrey Satellite Technology Ltd 2531 Tycho House 2532 Surrey Space Centre 2533 20 Stephenson Road 2534 Guildford, Surrey GU2 7YE 2535 United Kingdom 2537 Phone: +44-1483-803803 2538 Email: C.Jackson@sstl.co.uk