原文:ftp://ftp.rfc-editor.org/in-notes/rfc768.txt
原文との対訳として読みたい方へ:このページをローカルに保存して、スタイルシートの original クラスの display 属性を none から block に変更してみてください。


RFC 768



J. Postel
ISI
28 August 1980

User Datagram Protocol ユーザーデータグラムプロトコル(UDP)
User Datagram Protocol

Introduction 導入

This User Datagram Protocol (UDP) is defined to make available a datagram mode of packet-switched computer communication in the environment of an interconnected set of computer networks. This protocol assumes that the Internet Protocol (IP) [1] is used as the underlying protocol. ユーザーデータグラムプロトコル(UDP)は、相互接続されたコンピュータネットワーク環境において、パケットスイッチ型コンピュータ通信のデータグラムモードを利用可能にするために定義されている。このプロトコルは下層プロトコルとして Internet Protocol (IP) [1] が使用されていることを前提としている。

This protocol provides a procedure for application programs to send messages to other programs with a minimum of protocol mechanism. The protocol is transaction oriented, and delivery and duplicate protection are not guaranteed. Applications requiring ordered reliable delivery of streams of data should use the Transmission Control Protocol (TCP) [2]. このプロトコルは、アプリケーションプログラムが最小限のプロトコルメカニズムによって別のプログラムにメッセージを送信する手段を提供する。このプロトコルはトランザクション指向である。配送も重複の防止も保証されない。順序付けされた信頼できるストリーム通信を必要とするアプリケーションは、Transmission Control Protocol (TCP) [2] を使用するべきである。

Format 書式

                  0      7 8     15 16    23 24    31  
                 +--------+--------+--------+--------+ 
                 |     Source      |   Destination   | 
                 |      Port       |      Port       | 
                 +--------+--------+--------+--------+ 
                 |                 |                 | 
                 |     Length      |    Checksum     | 
                 +--------+--------+--------+--------+ 
                 |                                     
                 |          data octets ...            
                 +---------------- ...                 

                      User Datagram Header Format
                  0      7 8     15 16    23 24    31  
                 +--------+--------+--------+--------+ 
                 |     送信元      |      送信先     | 
                 |     ポート      |      ポート     | 
                 +--------+--------+--------+--------+ 
                 |                 |                 | 
                 |       長さ      |  チェックサム   | 
                 +--------+--------+--------+--------+ 
                 |                                     
                 |     データオクテット ...            
                 +---------------- ...                 

                    ユーザーデータグラムのヘッダの書式

Fields フィールド

Source Port is an optional field, when meaningful, it indicates the port of the sending process, and may be assumed to be the port to which a reply should be addressed in the absence of any other information. If not used, a value of zero is inserted. 送信元ポートはオプションである。意味を持つ場合は送信側プロセスのポートを表し、他に情報がなければそれを返信先ポートと仮定してよい。使用しない場合はゼロが設定される。

Destination Port has a meaning within the context of a particular internet destination address. 送信先ポートは特定の送信先アドレスのコンテキスト内においてのみ意味を持つ。

Length is the length in octets of this user datagram including this header and the data. (This means the minimum value of the length is eight.) 長さは、ヘッダとデータとを含むこのユーザーデータグラムのオクテット単位の長さである。(ヘッダを含むため、最小値は 8 ということになる)

Checksum is the 16-bit one's complement of the one's complement sum of a pseudo header of information from the IP header, the UDP header, and the data, padded with zero octets at the end (if necessary) to make a multiple of two octets. チェックサムは、IP ヘッダを元にした擬似ヘッダと UDP ヘッダとデータとを対象にした 16 ビットの 1 の補数の合計の、さらに 1 の補数である。全体のオクテット数が 2 の倍数になるように、必要であれば最後に値ゼロのオクテットがあるものとして計算される。

The pseudo header conceptually prefixed to the UDP header contains the source address, the destination address, the protocol, and the UDP length. This information gives protection against misrouted datagrams. This checksum procedure is the same as is used in TCP. 擬似ヘッダは概念上のものであり、送信元アドレス・送信先アドレス・プロトコル・UDP 長を含み、UDP ヘッダの前に置かれているものと見なされる。この情報が含まれることで、誤ってルーティングされたデータグラムからの保護が提供されることになる。このチェックサムの計算方法は TCP で使用されているものと同じである。

                  0      7 8     15 16    23 24    31 
                 +--------+--------+--------+--------+
                 |          source address           |
                 +--------+--------+--------+--------+
                 |        destination address        |
                 +--------+--------+--------+--------+
                 |  zero  |protocol|   UDP length    |
                 +--------+--------+--------+--------+
                  0      7 8       15 16    23 24    31 
                 +--------+----  ----+--------+--------+
                 |          送信元アドレス             |
                 +--------+----  ----+--------+--------+
                 |          送信先アドレス             |
                 +--------+----  ----+--------+--------+
                 |  ゼロ  |プロトコル|    UDP の長さ   |
                 +--------+----  ----+--------+--------+

If the computed checksum is zero, it is transmitted as all ones (the equivalent in one's complement arithmetic). An all zero transmitted checksum value means that the transmitter generated no checksum (for debugging or for higher level protocols that don't care). 算出されたチェックサムがゼロになった場合、すべてのビットが 1 として送信される(これは 1 の補数の計算結果に等しい)。送信されるチェックサムが 0 であれば、それは送信者がチェックサムを生成しなかったことを意味する(デバッグ用途のため、または上位プロトコルがこのチェックサムを利用しない場合のため)。

User Interface ユーザーインターフェイス

A user interface should allow

ユーザーインターフェイスは以下の操作を許可するべきである:

IP Interface IP インターフェイス

The UDP module must be able to determine the source and destination internet addresses and the protocol field from the internet header. One possible UDP/IP interface would return the whole internet datagram including all of the internet header in response to a receive operation. Such an interface would also allow the UDP to pass a full internet datagram complete with header to the IP to send. The IP would verify certain fields for consistency and compute the internet header checksum. UDP モジュールは、インターネットヘッダの中から、送信元及び送信先のインターネットアドレスとプロトコルフィールドとを識別できなければならない。受信操作に応えてすべてのインターネットヘッダを含むインターネットデータグラム全体を返すようなインターフェイスも、有効な UDP/IP インターフェイスである。そのようなインターフェイスは、ヘッダを含むインターネットデータグラム全体を UDP が IP に渡すことも許可するだろう。データグラムを渡された IP は一貫性のために特定のフィールドを検証し、インターネットヘッダのチェックサムを計算するだろう。

Protocol Application プロトコルアプリケーション

The major uses of this protocol is the Internet Name Server [3], and the Trivial File Transfer [4]. このプロトコルの主な用途は、Internet Name Server [3] 及び Trivial File Transfer [4] である。

Protocol Number プロトコル番号

This is protocol 17 (21 octal) when used in the Internet Protocol. Other protocol numbers are listed in [5]. インターネットプロトコルにおいてこのプロトコルが使用される場合、プロトコル番号は 17 (8進 21)である。他のプロトコルの番号は [5] に示されている。

References 参考文献

[1] Postel, J., "Internet Protocol," RFC 760, USC/Information Sciences Institute, January 1980.

[2] Postel, J., "Transmission Control Protocol," RFC 761, USC/Information Sciences Institute, January 1980.

[3] Postel, J., "Internet Name Server," USC/Information Sciences Institute, IEN 116, August 1979.

[4] Sollins, K., "The TFTP Protocol," Massachusetts Institute of Technology, IEN 133, January 1980.

[5] Postel, J., "Assigned Numbers," USC/Information Sciences Institute, RFC 762, January 1980.