Network Working Group                                          G. Malkin
Request for Commments: 2349                                 Bay Networks
Updates: 1350                                                  A. Harkin
Obsoletes: 1784                                      Hewlett Packard Co.
Category: Standards Track                                       May 1998
        
Network Working Group                                          G. Malkin
Request for Commments: 2349                                 Bay Networks
Updates: 1350                                                  A. Harkin
Obsoletes: 1784                                      Hewlett Packard Co.
Category: Standards Track                                       May 1998
        

TFTP Timeout Interval and Transfer Size Options

TFTP超时间隔和传输大小选项

Status of this Memo

本备忘录的状况

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (1998). All Rights Reserved.

版权所有(C)互联网协会(1998年)。版权所有。

Abstract

摘要

The Trivial File Transfer Protocol [1] is a simple, lock-step, file transfer protocol which allows a client to get or put a file onto a remote host.

琐碎文件传输协议[1]是一个简单的、锁定步骤的文件传输协议,它允许客户端获取文件或将文件放到远程主机上。

This document describes two TFTP options. The first allows the client and server to negotiate the Timeout Interval. The second allows the side receiving the file to determine the ultimate size of the transfer before it begins. The TFTP Option Extension mechanism is described in [2].

本文档描述了两个TFTP选项。第一个允许客户端和服务器协商超时时间间隔。第二种方法允许接收文件的一方在传输开始之前确定传输的最终大小。TFTP选项扩展机制如[2]所述。

Timeout Interval Option Specification

超时间隔选项规范

The TFTP Read Request or Write Request packet is modified to include the timeout option as follows:

修改TFTP读取请求或写入请求数据包以包括超时选项,如下所示:

      +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
      |  opc  |filename| 0 |  mode  | 0 | timeout| 0 |  #secs | 0 |
      +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
        
      +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
      |  opc  |filename| 0 |  mode  | 0 | timeout| 0 |  #secs | 0 |
      +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
        

opc The opcode field contains either a 1, for Read Requests, or 2, for Write Requests, as defined in [1].

opc操作码字段包含1(用于读取请求)或2(用于写入请求),如[1]中所定义。

filename The name of the file to be read or written, as defined in [1]. This is a NULL-terminated field.

filename要读取或写入的文件名,如[1]中所定义。这是以NULL结尾的字段。

mode The mode of the file transfer: "netascii", "octet", or "mail", as defined in [1]. This is a NULL-terminated field.

模式文件传输模式:“netascii”、“八位字节”或“邮件”,如[1]中所定义。这是以NULL结尾的字段。

timeout The Timeout Interval option, "timeout" (case in-sensitive). This is a NULL-terminated field.

超时超时时间间隔选项“超时”(区分大小写)。这是以NULL结尾的字段。

#secs The number of seconds to wait before retransmitting, specified in ASCII. Valid values range between "1" and "255" seconds, inclusive. This is a NULL-terminated field.

#秒重新传输前等待的秒数,以ASCII指定。有效值的范围为“1”到“255”秒(含)之间。这是以NULL结尾的字段。

For example:

例如:

      +-------+--------+---+--------+---+--------+---+-------+---+
      |   1   | foobar | 0 | octet  | 0 | timeout| 0 |   1   | 0 |
      +-------+--------+---+--------+---+--------+---+-------+---+
        
      +-------+--------+---+--------+---+--------+---+-------+---+
      |   1   | foobar | 0 | octet  | 0 | timeout| 0 |   1   | 0 |
      +-------+--------+---+--------+---+--------+---+-------+---+
        

is a Read Request, for the file named "foobar", in octet (binary) transfer mode, with a timeout interval of 1 second.

是以八位字节(二进制)传输模式对名为“foobar”的文件的读取请求,超时间隔为1秒。

If the server is willing to accept the timeout option, it sends an Option Acknowledgment (OACK) to the client. The specified timeout value must match the value specified by the client.

如果服务器愿意接受超时选项,它将向客户端发送选项确认(OACK)。指定的超时值必须与客户端指定的值匹配。

Transfer Size Option Specification

传输大小选项规范

The TFTP Read Request or Write Request packet is modified to include the tsize option as follows:

TFTP读请求或写请求数据包修改为包括tsize选项,如下所示:

      +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
      |  opc  |filename| 0 |  mode  | 0 | tsize  | 0 |  size  | 0 |
      +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
        
      +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
      |  opc  |filename| 0 |  mode  | 0 | tsize  | 0 |  size  | 0 |
      +-------+---~~---+---+---~~---+---+---~~---+---+---~~---+---+
        

opc The opcode field contains either a 1, for Read Requests, or 2, for Write Requests, as defined in [1].

opc操作码字段包含1(用于读取请求)或2(用于写入请求),如[1]中所定义。

filename The name of the file to be read or written, as defined in [1]. This is a NULL-terminated field.

filename要读取或写入的文件名,如[1]中所定义。这是以NULL结尾的字段。

mode The mode of the file transfer: "netascii", "octet", or "mail", as defined in [1]. This is a NULL-terminated field.

模式文件传输模式:“netascii”、“八位字节”或“邮件”,如[1]中所定义。这是以NULL结尾的字段。

tsize The Transfer Size option, "tsize" (case in-sensitive). This is a NULL-terminated field.

t调整传输大小选项“tsize”(区分大小写)。这是以NULL结尾的字段。

size The size of the file to be transfered. This is a NULL-terminated field.

大小要传输的文件的大小。这是以NULL结尾的字段。

For example:

例如:

      +-------+--------+---+--------+---+--------+---+--------+---+
      |   2   | foobar | 0 | octet  | 0 | tsize  | 0 | 673312 | 0 |
      +-------+--------+---+--------+---+--------+---+--------+---+
        
      +-------+--------+---+--------+---+--------+---+--------+---+
      |   2   | foobar | 0 | octet  | 0 | tsize  | 0 | 673312 | 0 |
      +-------+--------+---+--------+---+--------+---+--------+---+
        

is a Write Request, with the 673312-octet file named "foobar", in octet (binary) transfer mode.

是一个写请求,具有名为“foobar”的673312八位字节文件,处于八位字节(二进制)传输模式。

In Read Request packets, a size of "0" is specified in the request and the size of the file, in octets, is returned in the OACK. If the file is too large for the client to handle, it may abort the transfer with an Error packet (error code 3). In Write Request packets, the size of the file, in octets, is specified in the request and echoed back in the OACK. If the file is too large for the server to handle, it may abort the transfer with an Error packet (error code 3).

在读请求数据包中,请求中指定的大小为“0”,文件的大小(以八位字节为单位)在OACK中返回。如果文件太大,客户端无法处理,它可能会中止传输,并返回错误数据包(错误代码3)。在写请求包中,文件的大小(以八位字节为单位)在请求中指定,并在OACK中回显。如果文件太大,服务器无法处理,它可能会中止传输并产生错误包(错误代码3)。

Security Considerations

安全考虑

The basic TFTP protocol has no security mechanism. This is why it has no rename, delete, or file overwrite capabilities. This document does not add any security to TFTP; however, the specified extensions do not add any additional security risks.

基本TFTP协议没有安全机制。这就是为什么它没有重命名、删除或文件覆盖功能。本文件不向TFTP添加任何安全性;但是,指定的扩展不会增加任何额外的安全风险。

References

工具书类

[1] Sollins, K., "The TFTP Protocol (Revision 2)", STD 33, RFC 1350, October 92.

[1] Sollins,K.,“TFTP协议(第2版)”,STD 33,RFC 1350,1992年10月。

[2] Malkin, G., and A. Harkin, "TFTP Option Extension", RFC 2347, May 1998.

[2] Malkin,G.和A.Harkin,“TFTP期权扩展”,RFC 2347,1998年5月。

Authors' Addresses

作者地址

Gary Scott Malkin Bay Networks 8 Federal Street Billerica, MA 01821

加里·斯科特·马尔金湾网络8号联邦街马里兰州比尔里卡01821

Phone: (978) 916-4237 EMail: gmalkin@baynetworks.com

电话:(978)916-4237电子邮件:gmalkin@baynetworks.com

Art Harkin Internet Services Project Information Networks Division 19420 Homestead Road MS 43LN Cupertino, CA 95014

Art Harkin互联网服务项目信息网络部加利福尼亚州库珀蒂诺市霍姆斯特德路19420号,邮编95014,邮编43LN

Phone: (408) 447-3755 EMail: ash@cup.hp.com

电话:(408)447-3755电子邮件:ash@cup.hp.com

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society (1998). All Rights Reserved.

版权所有(C)互联网协会(1998年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein 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.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。