TFTP Timeout Interval and Transfer Size Options
obsoletes
- rfc-1784 — TFTP Timeout Interval and Transfer Size Options
updates
- rfc-1350 — The TFTP Protocol (Revision 2)
Extracted elements (10)
The tsize option allows the receiving side to determine the ultimate size of the transfer before it begins, enabling pre-allocation of resources and early rejection if the file is too large, without requiring a separate metadata request.
Both option names ('timeout' and 'tsize') are case-insensitive, ensuring interoperability between implementations that may use different capitalizations.
If the file is too large for the client (in RRQ) or server (in WRQ) to handle, it MAY abort the transfer with an Error packet using error code 3.
If the server accepts the timeout option, it sends an OACK to the client. The timeout value in the OACK must match the value specified by the client.
In a Read Request, the client specifies tsize value '0'; the server returns the actual file size in octets in the OACK. In a Write Request, the client specifies the actual file size, which the server echoes back in the OACK.
The timeout option is negotiated by including the string 'timeout' (case-insensitive, NULL-terminated) and a #secs value in ASCII in the RRQ or WRQ packet. Valid timeout values range from '1' to '255' seconds inclusive.
The tsize option is negotiated by including the string 'tsize' (case-insensitive, NULL-terminated) and the file size in octets as an ASCII decimal string in the RRQ or WRQ packet.
The basic TFTP protocol has no security mechanism, which is why it lacks rename, delete, or file overwrite capabilities. This document does not add any security to TFTP, but the specified extensions also do not introduce any additional security risks.
The timeout option extends the RRQ/WRQ packet with two NULL-terminated fields: the option name 'timeout' and the number of seconds as an ASCII decimal string. Fields follow the standard opcode/filename/mode fields.
The tsize option extends the RRQ/WRQ packet with two NULL-terminated fields: the option name 'tsize' and the file size in octets as an ASCII decimal string. Fields follow the standard opcode/filename/mode fields.