home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / rfc / rfc768 < prev    next >
Text File  |  1991-04-21  |  6KB  |  174 lines

  1.  
  2.  
  3. RFC 768                                                        J. Postel
  4.                                                                      ISI
  5.                                                           28 August 1980
  6.  
  7.  
  8.  
  9.                          User Datagram Protocol
  10.                          ----------------------
  11.  
  12. Introduction
  13. ------------
  14.  
  15. This User Datagram  Protocol  (UDP)  is  defined  to  make  available  a
  16. datagram   mode  of  packet-switched   computer   communication  in  the
  17. environment  of  an  interconnected  set  of  computer  networks.   This
  18. protocol  assumes  that the Internet  Protocol  (IP)  [1] is used as the
  19. underlying protocol.
  20.  
  21. This protocol  provides  a procedure  for application  programs  to send
  22. messages  to other programs  with a minimum  of protocol mechanism.  The
  23. protocol  is transaction oriented, and delivery and duplicate protection
  24. are not guaranteed.  Applications requiring ordered reliable delivery of
  25. streams of data should use the Transmission Control Protocol (TCP) [2].
  26.  
  27. Format
  28. ------
  29.  
  30.                                     
  31.                   0      7 8     15 16    23 24    31  
  32.                  +--------+--------+--------+--------+ 
  33.                  |     Source      |   Destination   | 
  34.                  |      Port       |      Port       | 
  35.                  +--------+--------+--------+--------+ 
  36.                  |                 |                 | 
  37.                  |     Length      |    Checksum     | 
  38.                  +--------+--------+--------+--------+ 
  39.                  |                                     
  40.                  |          data octets ...            
  41.                  +---------------- ...                 
  42.  
  43.                       User Datagram Header Format
  44.  
  45. Fields
  46. ------
  47.  
  48. Source Port is an optional field, when meaningful, it indicates the port
  49. of the sending  process,  and may be assumed  to be the port  to which a
  50. reply should  be addressed  in the absence of any other information.  If
  51. not used, a value of zero is inserted.
  52.  
  53.  
  54.  
  55.  
  56.  
  57. Postel                                                          [page 1]
  58.  
  59.  
  60.                                                              28 Aug 1980
  61. User Datagram Protocol                                           RFC 768
  62. Fields
  63.  
  64.  
  65.  
  66. Destination  Port has a meaning  within  the  context  of  a  particular
  67. internet destination address.
  68.  
  69. Length  is the length  in octets  of this user datagram  including  this
  70. header  and the data.   (This  means  the minimum value of the length is
  71. eight.)
  72.  
  73. Checksum is the 16-bit one's complement of the one's complement sum of a
  74. pseudo header of information from the IP header, the UDP header, and the
  75. data,  padded  with zero octets  at the end (if  necessary)  to  make  a
  76. multiple of two octets.
  77.  
  78. The pseudo  header  conceptually prefixed to the UDP header contains the
  79. source  address,  the destination  address,  the protocol,  and the  UDP
  80. length.   This information gives protection against misrouted datagrams.
  81. This checksum procedure is the same as is used in TCP.
  82.  
  83.                   0      7 8     15 16    23 24    31 
  84.                  +--------+--------+--------+--------+
  85.                  |          source address           |
  86.                  +--------+--------+--------+--------+
  87.                  |        destination address        |
  88.                  +--------+--------+--------+--------+
  89.                  |  zero  |protocol|   UDP length    |
  90.                  +--------+--------+--------+--------+
  91.  
  92. If the computed  checksum  is zero,  it is transmitted  as all ones (the
  93. equivalent  in one's complement  arithmetic).   An all zero  transmitted
  94. checksum  value means that the transmitter  generated  no checksum  (for
  95. debugging or for higher level protocols that don't care).
  96.  
  97. User Interface
  98. --------------
  99.  
  100. A user interface should allow
  101.  
  102.   the creation of new receive ports,
  103.  
  104.   receive  operations  on the receive  ports that return the data octets
  105.   and an indication of source port and source address,
  106.  
  107.   and an operation  that allows  a datagram  to be sent,  specifying the
  108.   data, source and destination ports and addresses to be sent.
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115. [page 2]                                                          Postel
  116.  
  117.  
  118. 28 Aug 1980
  119. RFC 768                                           User Datagram Protocol
  120.                                                             IP Interface
  121.  
  122.  
  123.  
  124. IP Interface
  125. -------------
  126.  
  127. The UDP module  must be able to determine  the  source  and  destination
  128. internet addresses and the protocol field from the internet header.  One
  129. possible  UDP/IP  interface  would return  the whole  internet  datagram
  130. including all of the internet header in response to a receive operation.
  131. Such an interface  would  also allow  the UDP to pass  a  full  internet
  132. datagram  complete  with header  to the IP to send.  The IP would verify
  133. certain fields for consistency and compute the internet header checksum.
  134.  
  135. Protocol Application
  136. --------------------
  137.  
  138. The major uses of this protocol is the Internet Name Server [3], and the
  139. Trivial File Transfer [4].
  140.  
  141. Protocol Number
  142. ---------------
  143.  
  144. This is protocol  17 (21 octal)  when used  in  the  Internet  Protocol.
  145. Other protocol numbers are listed in [5].
  146.  
  147. References
  148. ----------
  149.  
  150. [1]     Postel,   J.,   "Internet  Protocol,"  RFC 760,  USC/Information
  151.         Sciences Institute, January 1980.
  152.  
  153. [2]     Postel,    J.,   "Transmission   Control   Protocol,"   RFC 761,
  154.         USC/Information Sciences Institute, January 1980.
  155.  
  156. [3]     Postel,  J.,  "Internet  Name Server,"  USC/Information Sciences
  157.         Institute, IEN 116, August 1979.
  158.  
  159. [4]     Sollins,  K.,  "The TFTP Protocol,"  Massachusetts  Institute of
  160.         Technology, IEN 133, January 1980.
  161.  
  162. [5]     Postel,   J.,   "Assigned   Numbers,"  USC/Information  Sciences
  163.         Institute, RFC 762, January 1980.
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173. Postel                                                          [page 3]
  174.