OSDN Git Service

c1e840ad69c32168060e368c92099dada1b210fe
[linuxjm/LDP_man-pages.git] / release / man7 / udplite.7
1 .\" Copyright (c) 2008 by Gerrit Renker <gerrit@erg.abdn.ac.uk>
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" $Id: udplite.7,v 1.12 2008/07/23 15:22:22 gerrit Exp gerrit $
24 .\"
25 .\" Japanese Version Copyright (c) 2008  Akihiro MOTOKI
26 .\"         all rights reserved.
27 .\" Translated 2008-08-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.07
28 .\" 
29 .TH UDPLITE  7 2008-12-03 "Linux" "Linux Programmer's Manual"
30 .SH 名前
31 udplite \- 軽量なユーザーデータグラムプロトコル
32 .SH 書式
33 .B #include <sys/socket.h>
34 .br
35 .\" FIXME . see #defines under `BUGS',
36 .\"        when glibc supports this, add
37 .\"        #include <netinet/udplite.h>
38 .sp
39 .B sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDPLITE);
40 .SH 説明
41 これは RFC\ 3828 に書かれている軽量なユーザーデータグラムプロトコル
42 (Lightweight User Datagram Protocol; UDP-Lite) の実装である。
43
44 UDP-Lite は UDP (RFC\ 768) の拡張で、可変長のチェックサムをサポートしている。
45 このプロトコルが効果を発揮するのは、少しだけ壊れたデータグラムがあった場合に、
46 そのデータグラムを下位レイヤーのプロトコルに廃棄させるのではなく、
47 それを利用することができるような、ある種のマルチメディア転送においてである。
48
49 可変長のチェックサムの対象範囲は
50 .BR setsockopt (2)
51 オプション経由で設定される。
52 このオプションが設定されていない場合、UDP と異なるのは
53 違う IP プロトコル識別子 (IANA 番号 136) を使用する点だけである。
54
55 UDP-Lite の実装は
56 .BR udp (7)
57 の完全な拡張、すなわち API と API の動作は同じである。
58 これに加えて、2 つのソケットオプションがチェックサムの対象範囲を
59 制御するために提供されている。
60 .SS アドレスのフォーマット
61 UDP-Litev4 は
62 .BR ip (7)
63 で説明されている
64 .I sockaddr_in
65 アドレスを使用する。
66 UDP-Litev6 は
67 .BR ipv6 (7)
68 で説明されている
69 .I sockaddr_in6
70 アドレスを使用する。
71 .SS ソケットオプション
72 UDP-Lite のソケットオプションを設定/取得するには、
73 オプションレベル引き数に
74 .B IPPROTO_UDPLITE
75 を指定して、取得時には
76 .BR getsockopt (2)
77 を、設定時には
78 .BR setsockopt (2)
79 を呼び出す。さらに、全ての
80 .B IPPROTO_UDP
81 のソケットオプションが UDP-Lite ソケットでも使用できる。
82 詳細は
83 .BR udp (7)
84 を参照のこと。
85
86 以下の 2 つが UDP-Lite に固有のオプションである。
87 .TP
88 .BR UDPLITE_SEND_CSCOV
89 このオプションは送信側のチェックサムの対象範囲を設定する。
90 .I int
91 型を引き数として取り、設定可能な値の範囲は 0 から 2^16-1 までである。
92
93 値 0 はデータグラム全体が常にチェックサムの対象となることを意味する。
94 値 1〜7 は不正であり (RFC\ 3828 の 3.1 章)、範囲の設定として最小値である
95 8 に切り上げられる。
96
97 IPv6 の jumbograms (巨大なデータグラム; RFC\ 2675) の場合には、
98 UDP-Litev6 のチェックサムの対象範囲は、RFC\ 3828 の 3.5 章にあるように、
99 先頭から 2^16-1 オクテットまでに限定される。
100 そのため、それより大きな値は 2^16-1 に黙って切り詰められる。
101 現在の対象範囲の値を知りたければ、いつでも
102 .BR getsockopt (2)
103 を使って値を問い合わせることができる。
104 .TP
105 .BR UDPLITE_RECV_CSCOV
106 これは受信側のチェックサムの対象範囲を設定するもので、
107 使用される引き数形式と値の範囲は
108 .B UDPLITE_SEND_CSCOV
109 と同じである。
110 このオプションは、部分的なチェックサム対象範囲を持つトラフィックを
111 有効にするのに必要なわけではなく、トラフィックフィルターとして機能する。
112 このオプションが有効にすると、カーネルは指定されたチェックサム対象範囲
113 よりも「短かい」対象範囲を持つパケットを全て廃棄するようになる。
114
115 .B UDPLITE_RECV_CSCOV
116 の値が実際のパケットのチェックサム対象範囲よりも大きい場合、
117 受信したパケットは黙って廃棄される。
118 ただし、システムログに対して警告メッセージが生成されるかもしれない。
119 .\" SO_NO_CHECK exists and is supported by UDPv4, but is
120 .\" commented out in socket(7), hence also commented out here
121 .\".PP
122 .\"Since UDP-Lite mandates checksums, checksumming can not be disabled
123 .\"via the
124 .\".B SO_NO_CHECK
125 .\"option from
126 .\".BR socket (7).
127 .SH エラー
128 .BR udp (7)
129 について書かれている全てのエラーは返る可能性がある。
130 UDP-Lite 自体は新たなエラーは追加していない。
131 .SH バグ
132 .\" FIXME . remove this section once glibc supports UDP-Lite
133 glibc によるサポートがない場合は、以下の定義を行う必要がある。
134 .in +4n
135 .nf
136
137 #define IPPROTO_UDPLITE     136
138 .\" The following two are defined in the kernel in linux/net/udplite.h
139 #define UDPLITE_SEND_CSCOV  10
140 #define UDPLITE_RECV_CSCOV  11
141 .fi
142 .in
143 .SH ファイル
144 .I /proc/net/snmp
145 \- UDP-Litev4 の基本的な統計情報カウンター。
146 .br
147 .I /proc/net/snmp6
148 \- UDP-Litev6 の基本的な統計情報カウンター。
149 .SH バージョン
150 UDP-Litev4/v6 は Linux 2.6.20 で初めて登場した。
151 .SH 関連項目
152 .BR ip (7),
153 .BR ipv6 (7),
154 .BR socket (7),
155 .BR udp (7)
156
157 RFC\ 3828 for the Lightweight User Datagram Protocol (UDP-Lite)
158 .br
159 .I Documentation/networking/udplite.txt