RFC 2347
TFTP Option Extension
RFC 2347: TFTP Option Extension β¨
Okay bestie, so this is RFC 2347 π, the TFTP Option Extension, written by Gary Scott Malkin (Bay Networks) and Art Harkin (Hewlett Packard Co.). It's a Standards Track doc, dated May 1998. It updates RFC 1350 and obsoletes RFC 1782 π .
Status of This Memo π
Okay so this doc is an Internet standards track protocol for the whole Internet community π, and it's literally begging for discussion and suggestions to make it better π₯Ί. For the current standardization state and status of this protocol, check the "Internet Official Protocol Standards" (STD 1), iykyk. And distribution of this memo is unlimited, so share away π.
Copyright Notice Β©οΈ
Copyright (C) The Internet Society (1998). All Rights Reserved. The Internet Society holds it down π.
Abstract π¦
TFTP [1] is the Trivial File Transfer Protocol, and it's giving simple, lock-step energy. A client can get a file from a remote host or put one onto it π. This doc adds a simple extension to TFTP so the two sides can negotiate options before the file transfer even starts β¨.
Introduction πΈ
Okay so the option negotiation mechanism in this doc is a backward-compatible extension to TFTP, which is honestly iconic π. It lets file transfer options get negotiated before the transfer, and it does this in a way that matches TFTP's Request Packet format, so it fits right in π«Ά.
It's kept simple by enforcing a request-respond-acknowledge sequence, which is basically the same lock-step approach TFTP already uses itself π§.
Now, the mechanism is general purpose, so lots of different kinds of options can be negotiated π. It was originally created to support the Blocksize option defined in [2]. Additional options are defined in [3] π.
Packet Formats π
Okay so TFTP options get tacked onto the end of the Read Request and Write Request packets π¦. There's also a brand new packet type, the Option Acknowledgment (OACK), which is used to acknowledge a client's option negotiation request π . And a new error code, 8, is hereby defined to signal that a transfer should be terminated because of option negotiation π.
Here's how options get appended to a TFTP Read Request or Write Request packet:
+-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+-->
| opc |filename| 0 | mode | 0 | opt1 | 0 | value1 | 0 | <
+-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+-->
>-------+---+---~~---+---+
< optN | 0 | valueN | 0 |
>-------+---+---~~---+---+
Let's break down each field, bestie π§:
opcis the opcode field. It contains either a 1, for Read Requests, or 2, for Write Requests, as defined in [1] π₯.filenameis the name of the file to be read or written, as defined in [1]. It's a NULL-terminated field π.modeis the mode of the file transfer: "netascii", "octet", or "mail", as defined in [1]. It's also NULL-terminated π.opt1is the first option, in case-insensitive ASCII (e.g.,blksize). It's NULL-terminated too π§.value1is the value associated with the first option, in case-insensitive ASCII. Yep, NULL-terminated π.optN,valueNis the final option/value pair. Each NULL-terminated field is specified in case-insensitive ASCII π¦.
Okay so the options and values are all NULL-terminated, same as the original request format, which is so consistent of them π₯Ή. If you're negotiating multiple options, they just get appended to each other π«Ά. The order of the options doesn't matter at all, not significant, periodt π .
Heads up: the maximum size of a request packet is 512 octets. β οΈ
Now the OACK packet looks like this:
+-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
| opc | opt1 | 0 | value1 | 0 | optN | 0 | valueN | 0 |
+-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
And the fields work like this β¨:
opccontains a 6, for Option Acknowledgment π.opt1is the first option acknowledgment, copied from the original request π.value1is the acknowledged value associated with the first option. Whether and how this value can differ from the original request is spelled out in the specification for that option π.optN,valueNis the final option/value acknowledgment pair π.
Full Copyright Statement π
Okay bestie, the legal bit at the end! π Copyright (C) The Internet Society (1998). All Rights Reserved. πΈ
So you can copy this document and hand it out to people, and you can make derivative works that comment on or explain it or help people implement it. You can publish and distribute those too, in whole or in part, with no restrictions of any kind, as long as the copyright notice and this paragraph are on every copy and derivative work. β¨
But the document itself can't be modified in any way. That means no removing the copyright notice or the references to the Internet Society or other Internet organizations. There are two exceptions: developing Internet standards, where the procedures for copyrights defined in the Internet Standards process must be followed, or translating it into languages other than English. π
The permissions above are perpetual, so the Internet Society or its successors or assigns won't revoke them. π¦
And the boring-but-important part π: this document and the info in it is provided on an "AS IS" basis, and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. no cap, they're not promising it's perfect π
π¦ where this page comes from
- ietf: rfc2347 1998-05
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms