[ Pobierz całość w formacie PDF ]
.If the response is anACK, the transmission was completed successfully.If the sender ofthe data times out and is not prepared to retransmit any more, thetransfer may still have been completed successfully, after which theacknowledger or network may have experienced a problem.It is alsopossible in this case that the transfer was unsuccessful.In anycase, the connection has been closed.7.Premature TerminationIf a request can not be granted, or some error occurs during thetransfer, then an ERROR packet (opcode 5) is sent.This is only acourtesy since it will not be retransmitted or acknowledged, so itmay never be received.Timeouts must also be used to detect errors.Sollins [Page 8]RFC 1350 TFTP Revision 2 July 1992I.AppendixOrder of Headers2 bytes----------------------------------------------------------| Local Medium | Internet | Datagram | TFTP Opcode |----------------------------------------------------------TFTP FormatsType Op # Format without header2 bytes string 1 byte string 1 byte-----------------------------------------------RRQ/ | 01/02 | Filename | 0 | Mode | 0 |WRQ -----------------------------------------------2 bytes 2 bytes n bytes---------------------------------DATA | 03 | Block # | Data |---------------------------------2 bytes 2 bytes-------------------ACK | 04 | Block # |--------------------2 bytes 2 bytes string 1 byte----------------------------------------ERROR | 05 | ErrorCode | ErrMsg | 0 |----------------------------------------Initial Connection Protocol for reading a file1.Host A sends a "RRQ" to host B with source= A's TID,destination= 69.2.Host B sends a "DATA" (with block number= 1) to host A withsource= B's TID, destination= A's TID.Sollins [Page 9]RFC 1350 TFTP Revision 2 July 1992Error CodesValue Meaning0 Not defined, see error message (if any).1 File not found.2 Access violation.3 Disk full or allocation exceeded.4 Illegal TFTP operation.5 Unknown transfer ID.6 File already exists.7 No such user.Internet User Datagram Header [2](This has been included only for convenience.TFTP need not beimplemented on top of the Internet User Datagram Protocol.)Format0 1 2 30 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Source Port | Destination Port |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Length | Checksum |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Values of FieldsSource Port Picked by originator of packet.Dest.Port Picked by destination machine (69 for RRQ or WRQ).Length Number of bytes in UDP packet, including UDP header.Checksum Reference 2 describes rules for computing checksum.(The implementor of this should be sure that thecorrect algorithm is used here.)Field contains zero if unused.Note: TFTP passes transfer identifiers (TID's) to the Internet UserDatagram protocol to be used as the source and destination ports.Sollins [Page 10]RFC 1350 TFTP Revision 2 July 1992References[1] USA Standard Code for Information Interchange, USASI X3.4-1968.[2] Postel, J., "User Datagram Protocol," RFC 768, USC/InformationSciences Institute, 28 August 1980.[3] Postel, J., "Telnet Protocol Specification," RFC 764,USC/Information Sciences Institute, June, 1980.[4] Braden, R., Editor, "Requirements for Internet Hosts --Application and Support", RFC 1123, USC/Information SciencesInstitute, October 1989.Security ConsiderationsSince TFTP includes no login or access control mechanisms, care mustbe taken in the rights granted to a TFTP server process so as not toviolate the security of the server hosts file system.TFTP is ofteninstalled with controls such that only files that have public readaccess are available via TFTP and writing files via TFTP isdisallowed.Author's AddressKaren R.SollinsMassachusetts Institute of TechnologyLaboratory for Computer Science545 Technology SquareCambridge, MA 02139-1986Phone: (617) 253-6006EMail: SOLLINS@LCS.MIT.EDUSollins [Page 11]
[ Pobierz całość w formacie PDF ]