�g�b�v�y�[�W - �|��h�L�������g - RFC 768
�����Fftp://ftp.rfc-editor.org/in-notes/rfc768.txt
�����Ƃ̑Ζ�Ƃ��ēǂ݂������ցF���̃y�[�W�����[�J���ɕۑ����āA�X�^�C���V�[�g�� original �N���X�� display ������ none ���� block �ɕύX���Ă݂Ă��������B
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. ���[�U�[�f�[�^�O�����v���g�R��(UDP)�́A���ݐڑ����ꂽ�R���s���[�^�l�b�g���[�N���ɂ����āA�p�P�b�g�X�C�b�`�^�R���s���[�^�ʐM�̃f�[�^�O�������[�h�𗘗p�\�ɂ��邽�߂ɒ�`����Ă���B���̃v���g�R���͉��w�v���g�R���Ƃ��� Internet Protocol (IP) [1] ���g�p����Ă��邱�Ƃ�O��Ƃ��Ă���B
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]. ���̃v���g�R���́A�A�v���P�[�V�����v���O�������ŏ����̃v���g�R�����J�j�Y���ɂ���ĕʂ̃v���O�����Ƀ��b�Z�[�W�𑗐M�����i�����B���̃v���g�R���̓g�����U�N�V�����w���ł���B�z�����d���̖h�~���ۏ���Ȃ��B�����t�����ꂽ�M���ł���X�g���[���ʐM��K�v�Ƃ���A�v���P�[�V�����́ATransmission Control Protocol (TCP) [2] ���g�p����ׂ��ł���B
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 +--------+--------+--------+--------+ | ���M�� | ���M�� | | �|�[�g | �|�[�g | +--------+--------+--------+--------+ | | | | ���� | �`�F�b�N�T�� | +--------+--------+--------+--------+ | | �f�[�^�I�N�e�b�g ... +---------------- ... ���[�U�[�f�[�^�O�����̃w�b�_�̏���
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. ���M���|�[�g�̓I�v�V�����ł���B�Ӗ������ꍇ�͑��M���v���Z�X�̃|�[�g��\���A���ɏ�Ȃ�������ԐM��|�[�g�Ɖ��肵�Ă悢�B�g�p���Ȃ��ꍇ�̓[�����ݒ肳���B
Destination Port has a meaning within the context of a particular internet destination address. ���M��|�[�g�͓���̑��M��A�h���X�̃R���e�L�X�g���ɂ����Ă݈̂Ӗ������B
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.) �����́A�w�b�_�ƃf�[�^�Ƃ��܂ނ��̃��[�U�[�f�[�^�O�����̃I�N�e�b�g�P�ʂ̒����ł���B(�w�b�_���܂ނ��߁A�ŏ��l�� 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. �`�F�b�N�T���́AIP �w�b�_�����ɂ����[���w�b�_�� UDP �w�b�_�ƃf�[�^�Ƃ�Ώۂɂ��� 16 �r�b�g�� 1 �̕␔�̍��v�́A����� 1 �̕␔�ł���B�S�̂̃I�N�e�b�g���� 2 �̔{���ɂȂ�悤�ɁA�K�v�ł���Ō�ɒl�[���̃I�N�e�b�g��������̂Ƃ��Čv�Z�����B
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. �[���w�b�_�͊T�O��̂��̂ł���A���M���A�h���X�E���M��A�h���X�E�v���g�R���EUDP �����܂݁AUDP �w�b�_�̑O�ɒu����Ă�����̂ƌ��Ȃ����B���̏�܂܂�邱�ƂŁA����ă��[�e�B���O���ꂽ�f�[�^�O��������̕ی삪����邱�ƂɂȂ�B���̃`�F�b�N�T���̌v�Z���@�� TCP �Ŏg�p����Ă�����̂Ɠ����ł���B
0 7 8 15 16 23 24 31 +--------+--------+--------+--------+ | source address | +--------+--------+--------+--------+ | destination address | +--------+--------+--------+--------+ | zero |protocol| UDP length | +--------+--------+--------+--------+
0 7 8 15 16 23 24 31 +--------+---- ----+--------+--------+ | ���M���A�h���X | +--------+---- ----+--------+--------+ | ���M��A�h���X | +--------+---- ----+--------+--------+ | �[�� |�v���g�R��| 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). �Z�o���ꂽ�`�F�b�N�T�����[���ɂȂ����ꍇ�A���ׂẴr�b�g�� 1 �Ƃ��đ��M�����(����� 1 �̕␔�̌v�Z���ʂɓ�����)�B���M�����`�F�b�N�T���� 0 �ł���A����͑��M�҂��`�F�b�N�T�������Ȃ��������Ƃ��Ӗ�����(�f�o�b�O�p�r�̂��߁A�܂��͏�ʃv���g�R�������̃`�F�b�N�T���𗘗p���Ȃ��ꍇ�̂���)�B
A user interface should allow
���[�U�[�C���^�[�t�F�C�X�͈ȉ��̑����������ׂ��ł���F
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 ���W���[���́A�C���^�[�l�b�g�w�b�_�̒�����A���M���y�ё��M��̃C���^�[�l�b�g�A�h���X�ƃv���g�R���t�B�[���h�Ƃ����ʂł��Ȃ���Ȃ�Ȃ��B��M����ɉ����Ă��ׂẴC���^�[�l�b�g�w�b�_���܂ރC���^�[�l�b�g�f�[�^�O�����S�̂�Ԃ��悤�ȃC���^�[�t�F�C�X���A�L���� UDP/IP �C���^�[�t�F�C�X�ł���B���̂悤�ȃC���^�[�t�F�C�X�́A�w�b�_���܂ރC���^�[�l�b�g�f�[�^�O�����S�̂� UDP �� IP �ɓn�����Ƃ������邾�낤�B�f�[�^�O������n���ꂽ IP �͈�ѐ��̂��߂ɓ���̃t�B�[���h�������A�C���^�[�l�b�g�w�b�_�̃`�F�b�N�T�����v�Z���邾�낤�B
The major uses of this protocol is the Internet Name Server [3], and the Trivial File Transfer [4]. ���̃v���g�R���̎�ȗp�r�́AInternet Name Server [3] �y�� Trivial File Transfer [4] �ł���B
This is protocol 17 (21 octal) when used in the Internet Protocol. Other protocol numbers are listed in [5]. �C���^�[�l�b�g�v���g�R���ɂ����Ă��̃v���g�R�����g�p�����ꍇ�A�v���g�R���ԍ��� 17 (8�i 21)�ł���B���̃v���g�R���̔ԍ��� [5] �Ɏ�����Ă���B
[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.
�g�b�v�y�[�W - �|��h�L�������g - RFC 768