TFTP
The Trivial File Transfer Protocol is a minimal lock-step file transfer protocol over UDP, defined by RFC 1350. DataStream also implements the option-negotiation extension of RFC 2347, which is what makes block sizes above 512 bytes available.
The tftp device receives files only. Read requests are refused.
Binary Layout
| Field | Internal Name | Description | Type / Format | Example / Values |
|---|---|---|---|---|
| Opcode | opcode | Operation type | uint16 | 1 = RRQ, 2 = WRQ, 3 = DATA, 4 = ACK, 5 = ERROR |
| Filename | filename | File path (RRQ/WRQ only) | Null-terminated string | config.txt\0 |
| Mode | mode | Transfer mode (RRQ/WRQ only) | Null-terminated string | octet\0, netascii\0 |
| Block Number | block_num | Data block sequence (DATA/ACK) | uint16 | e.g. 1, 2, 3 |
| Data | data | File content (DATA only) | Binary | 512 bytes by default, up to 65464 when negotiated |
| Error Code | error_code | Error type (ERROR only) | uint16 | 0 = Not defined, 1 = File not found |
| Error Message | error_msg | Error description (ERROR only) | Null-terminated string | File not found\0 |