⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc1350.ps

📁 this gives details of the network programming
💻 PS
📖 第 1 页 / 共 3 页
字号:
5 400 M(   The mail recipient string should be of the form "username" or) s5 387 M(   "username@hostname".  If the second form is used, it allows the) s5 374 M(   option of mail forwarding by a relay computer.) s5 348 M(   The discussion above assumes that both the sender and recipient are) s5 335 M(   operating in the same mode, but there is no reason that this has to) s5 322 M(   be the case.  For example, one might build a storage server.  There) s5 309 M(   is no reason that such a machine needs to translate netascii into its) s5 296 M(   own form of text.  Rather, the sender might send files in netascii,) s5 283 M(   but the storage server might simply store them without translation in) s5 270 M(   8-bit format.  Another such situation is a problem that currently) s5 257 M(   exists on DEC-20 systems.  Neither netascii nor octet accesses all) s5 244 M(   the bits in a word.  One might create a special mode for such a) s5 231 M(   machine which read all the bits in a word, but in which the receiver) s5 218 M(   stored the information in 8-bit format.  When such a file is) s5 205 M(   retrieved from the storage site, it must be restored to its original) s5 192 M(   form to be useful, so the reverse mode must also be implemented.  The) s5 179 M(   user site will have to remember some information to achieve this.  In) s5 166 M(   both of these examples, the request packets would specify octet mode) s5 153 M(   to the foreign host, but the local host would be in some other mode.) s5 140 M(   No such machine or application specific modes have been specified in) s5 127 M(   TFTP, but one would be compatible with this specification.) s5 101 M(   It is also possible to define other modes for cooperating pairs of) s5 49 M(Sollins                                                         [Page 6]) s_RS%%Page: (7) 7%%BeginPageSetup_S24 24 translate/pagenum 7 def/fname (/usr/local/share/doc/rfc/Mirrors/ftp.isi.edu/in-notes/rfc1350.txt) def/fdir (/usr/local/share/doc/rfc/Mirrors/ftp.isi.edu/in-notes/) def/ftail (rfc1350.txt) def% User defined strings:/fmodstr (Wed Jul 08 00:00:00 1992) def/pagenumstr (7) def/user_header_p true def/user_header_left_str (RFC1350) def/user_header_center_str (RFC.net) def/user_header_right_str (Page 7 of 11) def%%EndPageSetupdo_header5 751 M(RFC 1350                    TFTP Revision 2                    July 1992) s5 712 M(   hosts, although this must be done with care.  There is no requirement) s5 699 M(   that any other hosts implement these.  There is no central authority) s5 686 M(   that will define these modes or assign them names.) s5 647 M(                   2 bytes     2 bytes      n bytes) s5 634 M(                   ----------------------------------) s5 621 M(                  | Opcode |   Block #  |   Data     |) s5 608 M(                   ----------------------------------) s5 582 M(                        Figure 5-2: DATA packet) s5 543 M(   Data is actually transferred in DATA packets depicted in Figure 5-2.) s5 530 M(   DATA packets \(opcode = 3\) have a block number and data field.  The) s5 517 M(   block numbers on data packets begin with one and increase by one for) s5 504 M(   each new block of data.  This restriction allows the program to use a) s5 491 M(   single number to discriminate between new packets and duplicates.) s5 478 M(   The data field is from zero to 512 bytes long.  If it is 512 bytes) s5 465 M(   long, the block is not the last block of data; if it is from zero to) s5 452 M(   511 bytes long, it signals the end of the transfer.  \(See the section) s5 439 M(   on Normal Termination for details.\)) s5 413 M(   All  packets other than duplicate ACK's and those used for) s5 400 M(   termination are acknowledged unless a timeout occurs [4].  Sending a) s5 387 M(   DATA packet is an acknowledgment for the first ACK packet of the) s5 374 M(   previous DATA packet. The WRQ and DATA packets are acknowledged by) s5 361 M(   ACK or ERROR packets, while RRQ) s5 322 M(                         2 bytes     2 bytes) s5 309 M(                         ---------------------) s5 296 M(                        | Opcode |   Block #  |) s5 283 M(                         ---------------------) s5 257 M(                         Figure 5-3: ACK packet) s5 218 M(   and ACK packets are acknowledged by  DATA  or ERROR packets.  Figure) s5 205 M(   5-3 depicts an ACK packet; the opcode is 4.  The  block  number  in) s5 192 M(   an  ACK echoes the block number of the DATA packet being) s5 179 M(   acknowledged.  A WRQ is acknowledged with an ACK packet having a) s5 166 M(   block number of zero.) s5 49 M(Sollins                                                         [Page 7]) s_RS%%Page: (8) 8%%BeginPageSetup_S24 24 translate/pagenum 8 def/fname (/usr/local/share/doc/rfc/Mirrors/ftp.isi.edu/in-notes/rfc1350.txt) def/fdir (/usr/local/share/doc/rfc/Mirrors/ftp.isi.edu/in-notes/) def/ftail (rfc1350.txt) def% User defined strings:/fmodstr (Wed Jul 08 00:00:00 1992) def/pagenumstr (8) def/user_header_p true def/user_header_left_str (RFC1350) def/user_header_center_str (RFC.net) def/user_header_right_str (Page 8 of 11) def%%EndPageSetupdo_header5 751 M(RFC 1350                    TFTP Revision 2                    July 1992) s5 712 M(               2 bytes     2 bytes      string    1 byte) s5 699 M(               -----------------------------------------) s5 686 M(              | Opcode |  ErrorCode |   ErrMsg   |   0  |) s5 673 M(               -----------------------------------------) s5 647 M(                        Figure 5-4: ERROR packet) s5 608 M(   An ERROR packet \(opcode 5\) takes the form depicted in Figure 5-4.  An) s5 595 M(   ERROR packet can be the acknowledgment of any other type of packet.) s5 582 M(   The error code is an integer indicating the nature of the error.  A) s5 569 M(   table of values and meanings is given in the appendix.  \(Note that) s5 556 M(   several error codes have been added to this version of this) s5 543 M(   document.\) The error message is intended for human consumption, and) s5 530 M(   should be in netascii.  Like all other strings, it is terminated with) s5 517 M(   a zero byte.) s5 491 M(6. Normal Termination) s5 465 M(   The end of a transfer is marked by a DATA packet that contains) s5 452 M(   between 0 and 511 bytes of data \(i.e., Datagram length < 516\).  This) s5 439 M(   packet is acknowledged by an ACK packet like all other DATA packets.) s5 426 M(   The host acknowledging the final DATA packet may terminate its side) s5 413 M(   of the connection on sending the final ACK.  On the other hand,) s5 400 M(   dallying is encouraged.  This means that the host sending the final) s5 387 M(   ACK will wait for a while before terminating in order to retransmit) s5 374 M(   the final ACK if it has been lost.  The acknowledger will know that) s5 361 M(   the ACK has been lost if it receives the final DATA packet again.) s5 348 M(   The host sending the last DATA must retransmit it until the packet is) s5 335 M(   acknowledged or the sending host times out.  If the response is an) s5 322 M(   ACK, the transmission was completed successfully.  If the sender of) s5 309 M(   the data times out and is not prepared to retransmit any more, the) s5 296 M(   transfer may still have been completed successfully, after which the) s5 283 M(   acknowledger or network may have experienced a problem.  It is also) s5 270 M(   possible in this case that the transfer was unsuccessful.  In any) s5 257 M(   case, the connection has been closed.) s5 231 M(7. Premature Termination) s5 205 M(   If a request can not be granted, or some error occurs during the) s5 192 M(   transfer, then an ERROR packet \(opcode 5\) is sent.  This is only a) s5 179 M(   courtesy since it will not be retransmitted or acknowledged, so it) s5 166 M(   may never be received.  Timeouts must also be used to detect errors.) s5 49 M(Sollins                                                         [Page 8]) s_RS%%Page: (9) 9%%BeginPageSetup_S24 24 translate/pagenum 9 def/fname (/usr/local/share/doc/rfc/Mirrors/ftp.isi.edu/in-notes/rfc1350.txt) def/fdir (/usr/local/share/doc/rfc/Mirrors/ftp.isi.edu/in-notes/) def/ftail (rfc1350.txt) def% User defined strings:/fmodstr (Wed Jul 08 00:00:00 1992) def/pagenumstr (9) def/user_header_p true def/user_header_left_str (RFC1350) def/user_header_center_str (RFC.net) def/user_header_right_str (Page 9 of 11) def%%EndPageSetupdo_header5 751 M(RFC 1350                    TFTP Revision 2                    July 1992) s5 712 M(I. Appendix) s5 686 M(Order of Headers) s5 660 M(                                                  2 bytes) s5 647 M(    ----------------------------------------------------------) s5 634 M(   |  Local Medium  |  Internet  |  Datagram  |  TFTP Opcode  |) s5 621 M(    ----------------------------------------------------------) s5 595 M(TFTP Formats) s5 569 M(   Type   Op #     Format without header) s5 543 M(          2 bytes    string   1 byte     string   1 byte) s5 530 M(          -----------------------------------------------) s5 517 M(   RRQ/  | 01/02 |  Filename  |   0  |    Mode    |   0  |) s5 504 M(   WRQ    -----------------------------------------------) s5 491 M(          2 bytes    2 bytes       n bytes) s5 478 M(          ---------------------------------) s5 465 M(   DATA  | 03    |   Block #  |    Data    |) s5 452 M(          ---------------------------------) s5 439 M(          2 bytes    2 bytes) s5 426 M(          -------------------) s5 413 M(   ACK   | 04    |   Block #  |) s5 400 M(          --------------------) s5 387 M(          2 bytes  2 bytes        string    1 byte) s5 374 M(          ----------------------------------------) s5 361 M(   ERROR | 05    |  ErrorCode |   ErrMsg   |   0  |) s5 348 M(          ----------------------------------------) s5 322 M(Initial Connection Protocol for reading a file) s5 296 M(   1. Host  A  sends  a  "RRQ"  to  host  B  with  source= A's TID,) s5 283 M(      destination= 69.) s5 257 M(   2. Host B sends a "DATA" \(with block number= 1\) to host  A  with) s5 244 M(      source= B's TID, destination= A's TID.) s5 49 M(Sollins                                                         [Page 9]) s_RS%%Page: (10) 10%%BeginPageSetup_S24 24 translate/pagenum 10 def/fname (/usr/local/share/doc/rfc/Mirrors/ftp.isi.edu/in-notes/rfc1350.txt) def/fdir (/usr/local/share/doc/rfc/Mirrors/ftp.isi.edu/in-notes/) def/ftail (rfc1350.txt) def% User defined strings:/fmodstr (Wed Jul 08 00:00:00 1992) def/pagenumstr (10) def/user_header_p true def/user_header_left_str (RFC1350) def/user_header_center_str (RFC.net) def/user_header_right_str (Page 10 of 11) def%%EndPageSetupdo_header5 751 M(RFC 1350                    TFTP Revision 2                    July 1992) s5 712 M(Error Codes) s5 686 M(   Value     Meaning) s5 660 M(   0         Not defined, see error message \(if any\).) s5 647 M(   1         File not found.) s5 634 M(   2         Access violation.) s5 621 M(   3         Disk full or allocation exceeded.) s5 608 M(   4         Illegal TFTP operation.) s5 595 M(   5         Unknown transfer ID.) s5 582 M(   6         File already exists.) s5 569 M(   7         No such user.) s5 543 M(Internet User Datagram Header [2]) s5 517 M(   \(This has been included only for convenience.  TFTP need not be) s5 504 M(   implemented on top of the Internet User Datagram Protocol.\)) s5 478 M(     Format) s5 452 M(    0                   1                   2                   3) s5 439 M(    0 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) s5 426 M(   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+) s5 413 M(   |          Source Port          |       Destination Port        |) s5 400 M(   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+) s5 387 M(   |            Length             |           Checksum            |) s5 374 M(   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+) s5 335 M(   Values of Fields) s5 296 M(   Source Port     Picked by originator of packet.) s5 270 M(   Dest. Port      Picked by destination machine \(69 for RRQ or WRQ\).) s5 244 M(   Length          Number of bytes in UDP packet, including UDP header.) s5 218 M(   Checksum        Reference 2 describes rules for computing checksum.) s5 205 M(                   \(The implementor of this should be sure that the) s5 192 M(                   correct algorithm is used here.\)) s5 179 M(                   Field contains zero if unused.) s5 153 M(   Note: TFTP passes transfer identifiers \(TID's\) to the Internet User) s5 140 M(   Datagram protocol to be used as the source and destination ports.) s5 49 M(Sollins                                                        [Page 10]) s_RS%%Page: (11) 11%%BeginPageSetup_S24 24 translate/pagenum 11 def/fname (/usr/local/share/doc/rfc/Mirrors/ftp.isi.edu/in-notes/rfc1350.txt) def/fdir (/usr/local/share/doc/rfc/Mirrors/ftp.isi.edu/in-notes/) def/ftail (rfc1350.txt) def% User defined strings:/fmodstr (Wed Jul 08 00:00:00 1992) def/pagenumstr (11) def/user_header_p true def/user_header_left_str (RFC1350) def/user_header_center_str (RFC.net) def/user_header_right_str (Page 11 of 11) def%%EndPageSetupdo_header5 751 M(RFC 1350                    TFTP Revision 2                    July 1992) s5 712 M(References) s5 686 M(   [1]  USA Standard Code for Information Interchange, USASI X3.4-1968.) s5 660 M(   [2]  Postel, J., "User Datagram  Protocol," RFC 768, USC/Information) s5 647 M(        Sciences Institute, 28 August 1980.) s5 621 M(   [3]  Postel, J., "Telnet Protocol Specification," RFC 764,) s5 608 M(        USC/Information Sciences Institute, June, 1980.) s5 582 M(   [4]  Braden, R., Editor, "Requirements for Internet Hosts --) s5 569 M(        Application and Support", RFC 1123, USC/Information Sciences) s5 556 M(        Institute, October 1989.) s5 530 M(Security Considerations) s5 504 M(   Since TFTP includes no login or access control mechanisms, care must) s5 491 M(   be taken in the rights granted to a TFTP server process so as not to) s5 478 M(   violate the security of the server hosts file system.  TFTP is often) s5 465 M(   installed with controls such that only files that have public read) s5 452 M(   access are available via TFTP and writing files via TFTP is) s5 439 M(   disallowed.) s5 413 M(Author's Address) s5 387 M(   Karen R. Sollins) s5 374 M(   Massachusetts Institute of Technology) s5 361 M(   Laboratory for Computer Science) s5 348 M(   545 Technology Square) s5 335 M(   Cambridge, MA 02139-1986) s5 309 M(   Phone: \(617\) 253-6006) s5 283 M(   EMail: SOLLINS@LCS.MIT.EDU) s5 49 M(Sollins                                                        [Page 11]) s_RS%%Trailer%%Pages: 11%%DocumentNeededResources: font Courier Times-Italic %%EOF

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -