.\" Copyright (c) 2008 by Gerrit Renker .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" $Id: udplite.7,v 1.12 2008/07/23 15:22:22 gerrit Exp gerrit $ .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2008 Akihiro MOTOKI .\" all rights reserved. .\" Translated 2008-08-21, Akihiro MOTOKI , LDP v3.07 .\" .TH UDPLITE 7 2017\-09\-15 Linux "Linux Programmer's Manual" .SH 名前 udplite \- 軽量なユーザーデータグラムプロトコル .SH 書式 \fB#include \fP .br .\" FIXME . see #defines under `BUGS', .\" when glibc supports this, add .\" #include .PP \fBsockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDPLITE);\fP .SH 説明 これは RFC\ 3828 に書かれている軽量なユーザーデータグラムプロトコル (Lightweight User Datagram Protocol; UDP\-Lite) の実装である。 .PP UDP\-Lite は UDP (RFC\ 768) の拡張で、可変長のチェックサムをサポートしている。 このプロトコルが効果を発揮するのは、少しだけ壊れたデータグラムがあった場合に、 そのデータグラムを下位レイヤーのプロトコルに廃棄させるのではなく、 それを利用することができるような、ある種のマルチメディア転送においてである。 .PP 可変長のチェックサムの対象範囲は \fBsetsockopt\fP(2) オプション経由で設定される。 このオプションが設定されていない場合、UDP と異なるのは 違う IP プロトコル識別子 (IANA 番号 136) を使用する点だけである。 .PP UDP\-Lite の実装は \fBudp\fP(7) の完全な拡張、すなわち API と API の動作は同じである。 これに加えて、2 つのソケットオプションがチェックサムの対象範囲を 制御するために提供されている。 .SS アドレスのフォーマット UDP\-Litev4 は \fBip\fP(7) で説明されている \fIsockaddr_in\fP アドレスを使用する。 UDP\-Litev6 は \fBipv6\fP(7) で説明されている \fIsockaddr_in6\fP アドレスを使用する。 .SS ソケットオプション UDP\-Lite のソケットオプションを設定/取得するには、 オプションレベル引数に \fBIPPROTO_UDPLITE\fP を指定して、取得時には \fBgetsockopt\fP(2) を、設定時には \fBsetsockopt\fP(2) を呼び出す。さらに、全ての \fBIPPROTO_UDP\fP のソケットオプションが UDP\-Lite ソケットでも使用できる。 詳細は \fBudp\fP(7) を参照のこと。 .PP 以下の 2 つが UDP\-Lite に固有のオプションである。 .TP \fBUDPLITE_SEND_CSCOV\fP このオプションは送信側のチェックサムの対象範囲を設定する。 \fIint\fP 型を引数として取り、設定可能な値の範囲は 0 から 2^16\-1 までである。 .IP 値 0 はデータグラム全体が常にチェックサムの対象となることを意味する。 値 1〜7 は不正であり (RFC\ 3828 の 3.1 章)、範囲の設定として最小値である 8 に切り上げられる。 .IP IPv6 の jumbograms (巨大なデータグラム; RFC\ 2675) の場合には、 UDP\-Litev6 のチェックサムの対象範囲は、RFC\ 3828 の 3.5 章にあるように、 先頭から 2^16\-1 オクテットまでに限定される。 そのため、それより大きな値は 2^16\-1 に黙って切り詰められる。 現在の対象範囲の値を知りたければ、いつでも \fBgetsockopt\fP(2) を使って値を問い合わせることができる。 .TP \fBUDPLITE_RECV_CSCOV\fP これは受信側のチェックサムの対象範囲を設定するもので、 使用される引数形式と値の範囲は \fBUDPLITE_SEND_CSCOV\fP と同じである。 このオプションは、部分的なチェックサム対象範囲を持つトラフィックを 有効にするのに必要なわけではなく、トラフィックフィルターとして機能する。 このオプションが有効にすると、カーネルは指定されたチェックサム対象範囲 よりも「短かい」対象範囲を持つパケットを全て廃棄するようになる。 .IP .\" SO_NO_CHECK exists and is supported by UDPv4, but is .\" commented out in socket(7), hence also commented out here .\".PP .\"Since UDP-Lite mandates checksums, checksumming can not be disabled .\"via the .\".B SO_NO_CHECK .\"option from .\".BR socket (7). \fBUDPLITE_RECV_CSCOV\fP の値が実際のパケットのチェックサム対象範囲よりも大きい場合、 受信したパケットは黙って廃棄される。 ただし、システムログに対して警告メッセージが生成されるかもしれない。 .SH エラー \fBudp\fP(7) について書かれている全てのエラーは返る可能性がある。 UDP\-Lite 自体は新たなエラーは追加していない。 .SH ファイル .TP \fI/proc/net/snmp\fP UDP\-Litev4 の基本的な統計情報カウンター。 .TP \fI/proc/net/snmp6\fP UDP\-Litev6 の基本的な統計情報カウンター。 .SH バージョン UDP\-Litev4/v6 は Linux 2.6.20 で初めて登場した。 .SH バグ .\" FIXME . remove this section once glibc supports UDP-Lite glibc によるサポートがない場合は、以下の定義を行う必要がある。 .PP .in +4n .EX .\" The following two are defined in the kernel in linux/net/udplite.h #define IPPROTO_UDPLITE 136 #define UDPLITE_SEND_CSCOV 10 #define UDPLITE_RECV_CSCOV 11 .EE .in .SH 関連項目 \fBip\fP(7), \fBipv6\fP(7), \fBsocket\fP(7), \fBudp\fP(7) .PP RFC\ 3828 for the Lightweight User Datagram Protocol (UDP\-Lite). .PP Linux カーネルソース内の \fIDocumentation/networking/udplite.txt\fP .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。