Aller au contenu principal

Annexe et références

Annexe​

Ordre des en-têtes​

                                               2 bytes
----------------------------------------------------------
| Local Medium | Internet | Datagram | TFTP Opcode |
----------------------------------------------------------

Formats TFTP​

Type   Op #     Format without header
2 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 |
----------------------------------------

Protocole de connexion initiale pour la lecture d'un fichier​

   1. 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 with
source= B's TID, destination= A's TID.

Codes d'erreur​

Value     Meaning
0 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.

En-tête Internet User Datagram [2] (3)​

Format

 0                   1                   2                   3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port | Destination Port |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Length | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Valeurs des champs

Source Port     Picked by originator of packet.

Dest. Port Picked by destination machine (69 for RRQ or WRQ).

Length Number of bytes in packet after Datagram header.

Checksum Reference 2 describes rules for computing checksum. (4)
Field contains zero if unused.

Remarque : TFTP transmet les identifiants de transfert (TID) à l'Internet User Datagram Protocol pour qu'ils soient utilisés comme ports source et destination.

Notes de bas de page :

  1. Ceci n'a été inclus que par commodité. TFTP n'a pas besoin d'être implémenté au-dessus de l'Internet User Datagram Protocol.
  2. L'implémenteur doit s'assurer que l'algorithme correct est utilisé ici.

Références​

  • [1] USA Standard Code for Information Interchange, USASI X3.4-1968.
  • [2] Postel, Jon., "User Datagram Protocol," RFC768, August 28, 1980.
  • [3] "Telnet Protocol Specification," RFC764, June, 1980.