text
stringlengths
0
99.6k
depends on the value of the DR Transport Parameter:
0x01 - A `Fr' (Failed Resume) Packet is sent
0x02 - A `Tf' (CRC Failed) Packet is sent
Some operating environments complicate Download Recovery.
Since the Initiator has no knowledge of any data
transformations, such as Carriage Return and Line Feed
mappings, the Responder must take any such transformations
into consideration when calculating <length> and <CRC-16>.
Under some environments, it is probably simpler to maintain
this information during the download and preserve it in a
file (Apple Macintosh (TM) for example.)
12
2) Packet `Tu' : Upload Resume.
The Upload Resume Packet is sent by the Initiator if both
entities have the Transport Parameter UR > 0x00, the target
file already exists on the Initiator, and the application
software has decided to attempt an upload resumption. It is
essentially a `TU' Packet with <length> and <CRC-16> fields.
It is constructed as follows:
<Lead-in> <Sequence > T u <Data Type> <Length> <CRC-16>
<File Name> <Trailer>
where:
<Data Type> = same as for the `TU' Packet
<Length> = number of bytes in existing file on
Initiator
<CRC-16> = XMODEM CRC-16, initialized to 0xffff, of
all <Length> bytes
<File Name> = same as for the `TU' Packet
The Responder opens <File Name> and calculates the CRC-16
for <Length> bytes. If the resulting CRC-16 agrees with
<CRC-16> from the `Tu' Packet, it continues by sending `N'
Packets.
If the CRC-16 values do not match, the action depends on the
value of Transport Parameter UR:
0x01 - A `Fr' (Failed Resume) Packet is sent
0x02 - A `Tf' (Failed CRC) Packet is sent
The same operating environment considerations mentioned
under the `Tr' Packet apply here.
13
3) Packet `Tf' : Failed CRC.
The `Tf' packet is sent when a Resume request fails due to
CRC failure. It will be sent only if the Responder and
Initiator both specify Transport Parameter DR > 1. It
implies that the transfer is to continue from the beginning
of the file.
Sample packet exchanges for transfer resumption:
Initiator Responder Comments
--------- --------- -----------------
DR = 0x01 or 0x02:
TD ---------------> Download Request
<--------------- Tr Resume Download
N ---------------> CRC matched
...
TC ---------------> End of transfer
DR = 0x01:
TD ---------------> Download Request