rfc-2349

TFTP Timeout Interval and Transfer Size Options

G. Malkin, A. Harkin
date1998-05 streamLegacy statusDRAFT STANDARD pages5 canonicalhttps://www.rfc-editor.org/rfc/rfc2349 doi10.17487/RFC2349
The Trivial File Transfer Protocol is a simple, lock-step, file transfer protocol which allows a client to get or put a file onto a remote host. This document describes two TFTP options. [STANDARDS-TRACK]

obsoletes

updates

Extracted elements (10)

design-rationale §Transfer Size Option Specification

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.

interoperability-note §Timeout Interval Option Specification

Both option names ('timeout' and 'tsize') are case-insensitive, ensuring interoperability between implementations that may use different capitalizations.

normative-requirement §Transfer Size Option Specification MAY

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.

normative-requirement §Timeout Interval Option Specification MUST

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.

protocol-element §Transfer Size Option Specification

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.

protocol-element §Timeout Interval Option Specification

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.

protocol-element §Transfer Size Option Specification

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.

security-consideration §Security Considerations

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.

security

wire-format §Timeout Interval Option Specification

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.

wire-format §Transfer Size Option Specification

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.