OSDN Git Service

ae0c17d5e444a1060fa23bd2d98acc2a269b0968
[linuxjm/LDP_man-pages.git] / draft / 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 .\"O .SH NAME
31 .SH Ì¾Á°
32 .\"O udplite \- Lightweight User Datagram Protocol
33 udplite \- ·ÚÎ̤ʥ桼¥¶¡¼¥Ç¡¼¥¿¥°¥é¥à¥×¥í¥È¥³¥ë
34 .\"O .SH SYNOPSIS
35 .SH ½ñ¼°
36 .B #include <sys/socket.h>
37 .br
38 .\" FIXME . see #defines under `BUGS',
39 .\"        when glibc supports this, add
40 .\"        #include <netinet/udplite.h>
41 .sp
42 .B sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDPLITE);
43 .\"O .SH DESCRIPTION
44 .SH ÀâÌÀ
45 .\"O This is an implementation of the Lightweight User Datagram Protocol
46 .\"O (UDP-Lite), as described in RFC\ 3828.
47 ¤³¤ì¤Ï RFC\ 3828 ¤Ë½ñ¤«¤ì¤Æ¤¤¤ë·ÚÎ̤ʥ桼¥¶¡¼¥Ç¡¼¥¿¥°¥é¥à¥×¥í¥È¥³¥ë
48 (Lightweight User Datagram Protocol; UDP-Lite) ¤Î¼ÂÁõ¤Ç¤¢¤ë¡£
49
50 .\"O UDP-Lite is an extension of UDP (RFC\ 768) to support variable-length
51 .\"O checksums.
52 .\"O This has advantages for some types of multimedia transport that
53 .\"O may be able to make use of slightly damaged datagrams,
54 .\"O rather than having them discarded by lower-layer protocols.
55 UDP-Lite ¤Ï UDP (RFC\ 768) ¤Î³ÈÄ¥¤Ç¡¢²ÄÊÑĹ¤Î¥Á¥§¥Ã¥¯¥µ¥à¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¡£
56 ¤³¤Î¥×¥í¥È¥³¥ë¤¬¸ú²Ì¤òȯ´ø¤¹¤ë¤Î¤Ï¡¢¾¯¤·¤À¤±²õ¤ì¤¿¥Ç¡¼¥¿¥°¥é¥à¤¬¤¢¤Ã¤¿¾ì¹ç¤Ë¡¢
57 ¤½¤Î¥Ç¡¼¥¿¥°¥é¥à¤ò²¼°Ì¥ì¥¤¥ä¡¼¤Î¥×¥í¥È¥³¥ë¤ËÇÑ´þ¤µ¤»¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢
58 ¤½¤ì¤òÍøÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ê¡¢¤¢¤ë¼ï¤Î¥Þ¥ë¥Á¥á¥Ç¥£¥¢Å¾Á÷¤Ë¤ª¤¤¤Æ¤Ç¤¢¤ë¡£
59
60 .\"O The variable-length checksum coverage is set via a
61 .\"O .BR setsockopt (2)
62 .\"O option.
63 .\"O If this option is not set, the only difference to UDP is
64 .\"O in using a different IP protocol identifier (IANA number 136).
65 ²ÄÊÑĹ¤Î¥Á¥§¥Ã¥¯¥µ¥à¤ÎÂоÝÈϰϤÏ
66 .BR setsockopt (2)
67 ¥ª¥×¥·¥ç¥ó·Ðͳ¤ÇÀßÄꤵ¤ì¤ë¡£
68 ¤³¤Î¥ª¥×¥·¥ç¥ó¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢UDP ¤È°Û¤Ê¤ë¤Î¤Ï
69 °ã¤¦ IP ¥×¥í¥È¥³¥ë¼±Ê̻Ҡ(IANA ÈÖ¹æ 136) ¤ò»ÈÍѤ¹¤ëÅÀ¤À¤±¤Ç¤¢¤ë¡£
70
71 .\"O The UDP-Lite implementation is a full extension of
72 .\"O .BR udp (7),
73 .\"O i.e., it shares the same API and API behaviour, and in addition
74 .\"O offers two socket options to control the checksum coverage.
75 UDP-Lite ¤Î¼ÂÁõ¤Ï
76 .BR udp (7)
77 ¤Î´°Á´¤Ê³ÈÄ¥¡¢¤¹¤Ê¤ï¤Á API ¤È API ¤ÎÆ°ºî¤ÏƱ¤¸¤Ç¤¢¤ë¡£
78 ¤³¤ì¤Ë²Ã¤¨¤Æ¡¢2 ¤Ä¤Î¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤¬¥Á¥§¥Ã¥¯¥µ¥à¤ÎÂоÝÈϰϤò
79 À©¸æ¤¹¤ë¤¿¤á¤ËÄ󶡤µ¤ì¤Æ¤¤¤ë¡£
80 .\"O .SS "Address Format"
81 .SS ¥¢¥É¥ì¥¹¤Î¥Õ¥©¡¼¥Þ¥Ã¥È
82 .\"O UDP-Litev4 uses the
83 .\"O .I sockaddr_in
84 .\"O address format described in
85 .\"O .BR ip (7).
86 .\"O UDP-Litev6 uses the
87 .\"O .I sockaddr_in6
88 .\"O address format described in
89 .\"O .BR ipv6 (7).
90 UDP-Litev4 ¤Ï
91 .BR ip (7)
92 ¤ÇÀâÌÀ¤µ¤ì¤Æ¤¤¤ë
93 .I sockaddr_in
94 ¥¢¥É¥ì¥¹¤ò»ÈÍѤ¹¤ë¡£
95 UDP-Litev6 ¤Ï
96 .BR ipv6 (7)
97 ¤ÇÀâÌÀ¤µ¤ì¤Æ¤¤¤ë
98 .I sockaddr_in6
99 ¥¢¥É¥ì¥¹¤ò»ÈÍѤ¹¤ë¡£
100 .\"O .SS "Socket Options"
101 .SS ¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó
102 .\"O To set or get a UDP-Lite socket option, call
103 .\"O .BR getsockopt (2)
104 .\"O to read or
105 .\"O .BR setsockopt (2)
106 .\"O to write the option with the option level argument set to
107 .\"O .BR IPPROTO_UDPLITE .
108 .\"O In addition, all
109 .\"O .B IPPROTO_UDP
110 .\"O socket options are valid on a UDP-Lite socket.
111 .\"O See
112 .\"O .BR udp (7)
113 .\"O for more information.
114 UDP-Lite ¤Î¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤òÀßÄê/¼èÆÀ¤¹¤ë¤Ë¤Ï¡¢
115 ¥ª¥×¥·¥ç¥ó¥ì¥Ù¥ë°ú¤­¿ô¤Ë
116 .B IPPROTO_UDPLITE
117 ¤ò»ØÄꤷ¤Æ¡¢¼èÆÀ»þ¤Ë¤Ï
118 .BR getsockopt (2)
119 ¤ò¡¢ÀßÄê»þ¤Ë¤Ï
120 .BR setsockopt (2)
121 ¤ò¸Æ¤Ó½Ð¤¹¡£¤µ¤é¤Ë¡¢Á´¤Æ¤Î
122 .B IPPROTO_UDP
123 ¤Î¥½¥±¥Ã¥È¥ª¥×¥·¥ç¥ó¤¬ UDP-Lite ¥½¥±¥Ã¥È¤Ç¤â»ÈÍѤǤ­¤ë¡£
124 ¾ÜºÙ¤Ï
125 .BR udp (7)
126 ¤ò»²¾È¤Î¤³¤È¡£
127
128 .\"O The following two options are specific to UDP-Lite.
129 °Ê²¼¤Î 2 ¤Ä¤¬ UDP-Lite ¤Ë¸ÇÍ­¤Î¥ª¥×¥·¥ç¥ó¤Ç¤¢¤ë¡£
130 .TP
131 .BR UDPLITE_SEND_CSCOV
132 .\"O This option sets the sender checksum coverage and takes an
133 .\"O .I int
134 .\"O as argument, with a checksum coverage value in the range 0..2^16-1.
135 ¤³¤Î¥ª¥×¥·¥ç¥ó¤ÏÁ÷¿®Â¦¤Î¥Á¥§¥Ã¥¯¥µ¥à¤ÎÂоÝÈϰϤòÀßÄꤹ¤ë¡£
136 .I int
137 ·¿¤ò°ú¤­¿ô¤È¤·¤Æ¼è¤ê¡¢ÀßÄê²Äǽ¤ÊÃͤÎÈϰϤϠ0 ¤«¤é 2^16-1 ¤Þ¤Ç¤Ç¤¢¤ë¡£
138
139 .\"O A value of 0 means that the entire datagram is always covered.
140 .\"O Values from 1-7 are illegal (RFC\ 3828, 3.1) and are rounded up to
141 .\"O the minimum coverage of 8.
142 ÃÍ 0 ¤Ï¥Ç¡¼¥¿¥°¥é¥àÁ´ÂΤ¬¾ï¤Ë¥Á¥§¥Ã¥¯¥µ¥à¤ÎÂоݤȤʤ뤳¤È¤ò°ÕÌ£¤¹¤ë¡£
143 ÃÍ 1¡Á7 ¤ÏÉÔÀµ¤Ç¤¢¤ê (RFC\ 3828 ¤Î 3.1 ¾Ï)¡¢ÈϰϤÎÀßÄê¤È¤·¤ÆºÇ¾®ÃͤǤ¢¤ë
144 8 ¤ËÀÚ¤ê¾å¤²¤é¤ì¤ë¡£
145
146 .\"O With regard to IPv6 jumbograms (RFC\ 2675), the UDP-Litev6 checksum
147 .\"O coverage is limited to the first 2^16-1 octets, as per RFC\ 3828, 3.5.
148 .\"O Higher values are therefore silently truncated to 2^16-1.
149 .\"O If in doubt, the current coverage value can always be queried using
150 .\"O .BR getsockopt (2).
151 IPv6 ¤Î jumbograms (µðÂç¤Ê¥Ç¡¼¥¿¥°¥é¥à; RFC\ 2675) ¤Î¾ì¹ç¤Ë¤Ï¡¢
152 UDP-Litev6 ¤Î¥Á¥§¥Ã¥¯¥µ¥à¤ÎÂоÝÈϰϤϡ¢RFC\ 3828 ¤Î 3.5 ¾Ï¤Ë¤¢¤ë¤è¤¦¤Ë¡¢
153 ÀèƬ¤«¤é 2^16-1 ¥ª¥¯¥Æ¥Ã¥È¤Þ¤Ç¤Ë¸ÂÄꤵ¤ì¤ë¡£
154 ¤½¤Î¤¿¤á¡¢¤½¤ì¤è¤êÂ礭¤ÊÃͤϠ2^16-1 ¤ËÌۤäÆÀÚ¤êµÍ¤á¤é¤ì¤ë¡£
155 ¸½ºß¤ÎÂоÝÈϰϤÎÃͤòÃΤꤿ¤±¤ì¤Ð¡¢¤¤¤Ä¤Ç¤â
156 .BR getsockopt (2)
157 ¤ò»È¤Ã¤ÆÃͤòÌ䤤¹ç¤ï¤»¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
158 .TP
159 .BR UDPLITE_RECV_CSCOV
160 .\"O This is the receiver-side analogue and uses the same argument format
161 .\"O and value range as
162 .\"O .BR UDPLITE_SEND_CSCOV .
163 .\"O This option is not required to enable traffic with partial checksum
164 .\"O coverage.
165 .\"O Its function is that of a traffic filter: when enabled, it
166 .\"O instructs the kernel to drop all packets which have a coverage
167 .\"O .I less
168 .\"O than the specified coverage value.
169 ¤³¤ì¤Ï¼õ¿®Â¦¤Î¥Á¥§¥Ã¥¯¥µ¥à¤ÎÂоÝÈϰϤòÀßÄꤹ¤ë¤â¤Î¤Ç¡¢
170 »ÈÍѤµ¤ì¤ë°ú¤­¿ô·Á¼°¤ÈÃͤÎÈϰϤÏ
171 .B UDPLITE_SEND_CSCOV
172 ¤ÈƱ¤¸¤Ç¤¢¤ë¡£
173 ¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢ÉôʬŪ¤Ê¥Á¥§¥Ã¥¯¥µ¥àÂоÝÈϰϤò»ý¤Ä¥È¥é¥Õ¥£¥Ã¥¯¤ò
174 Í­¸ú¤Ë¤¹¤ë¤Î¤ËɬÍפʤ櫓¤Ç¤Ï¤Ê¤¯¡¢¥È¥é¥Õ¥£¥Ã¥¯¥Õ¥£¥ë¥¿¡¼¤È¤·¤Æµ¡Ç½¤¹¤ë¡£
175 ¤³¤Î¥ª¥×¥·¥ç¥ó¤¬Í­¸ú¤Ë¤¹¤ë¤È¡¢¥«¡¼¥Í¥ë¤Ï»ØÄꤵ¤ì¤¿¥Á¥§¥Ã¥¯¥µ¥àÂоÝÈÏ°Ï
176 ¤è¤ê¤â¡Öû¤«¤¤¡×ÂоÝÈϰϤò»ý¤Ä¥Ñ¥±¥Ã¥È¤òÁ´¤ÆÇÑ´þ¤¹¤ë¤è¤¦¤Ë¤Ê¤ë¡£
177
178 .\"O When the value of
179 .\"O .B UDPLITE_RECV_CSCOV
180 .\"O exceeds the actual packet coverage, incoming packets are silently dropped,
181 .\"O but may generate a warning message in the system log.
182 .B UDPLITE_RECV_CSCOV
183 ¤ÎÃͤ¬¼ÂºÝ¤Î¥Ñ¥±¥Ã¥È¤Î¥Á¥§¥Ã¥¯¥µ¥àÂоÝÈϰϤè¤ê¤âÂ礭¤¤¾ì¹ç¡¢
184 ¼õ¿®¤·¤¿¥Ñ¥±¥Ã¥È¤ÏÌۤäÆÇÑ´þ¤µ¤ì¤ë¡£
185 ¤¿¤À¤·¡¢¥·¥¹¥Æ¥à¥í¥°¤ËÂФ·¤Æ·Ù¹ð¥á¥Ã¥»¡¼¥¸¤¬À¸À®¤µ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
186 .\" SO_NO_CHECK exists and is supported by UDPv4, but is
187 .\" commented out in socket(7), hence also commented out here
188 .\".PP
189 .\"Since UDP-Lite mandates checksums, checksumming can not be disabled
190 .\"via the
191 .\".B SO_NO_CHECK
192 .\"option from
193 .\".BR socket (7).
194 .\"O .SH ERRORS
195 .SH ¥¨¥é¡¼
196 .\"O All errors documented for
197 .\"O .BR udp (7)
198 .\"O may be returned.
199 .\"O UDP-Lite does not add further errors.
200 .BR udp (7)
201 ¤Ë¤Ä¤¤¤Æ½ñ¤«¤ì¤Æ¤¤¤ëÁ´¤Æ¤Î¥¨¥é¡¼¤ÏÊÖ¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
202 UDP-Lite ¼«ÂΤϿ·¤¿¤Ê¥¨¥é¡¼¤ÏÄɲ䷤Ƥ¤¤Ê¤¤¡£
203 .\"O .SH BUGS
204 .SH ¥Ð¥°
205 .\" FIXME . remove this section once glibc supports UDP-Lite
206 .\"O Where glibc support is missing, the following definitions are needed:
207 glibc ¤Ë¤è¤ë¥µ¥Ý¡¼¥È¤¬¤Ê¤¤¾ì¹ç¤Ï¡¢°Ê²¼¤ÎÄêµÁ¤ò¹Ô¤¦É¬Íפ¬¤¢¤ë¡£
208 .in +4n
209 .nf
210
211 #define IPPROTO_UDPLITE     136
212 .\" The following two are defined in the kernel in linux/net/udplite.h
213 #define UDPLITE_SEND_CSCOV  10
214 #define UDPLITE_RECV_CSCOV  11
215 .fi
216 .in
217 .\"O .SH FILES
218 .SH ¥Õ¥¡¥¤¥ë
219 .I /proc/net/snmp
220 .\"O \- basic UDP-Litev4 statistics counters.
221 \- UDP-Litev4 ¤Î´ðËÜŪ¤ÊÅý·×¾ðÊ󥫥¦¥ó¥¿¡¼¡£
222 .br
223 .I /proc/net/snmp6
224 .\"O \- basic UDP-Litev6 statistics counters.
225 \- UDP-Litev6 ¤Î´ðËÜŪ¤ÊÅý·×¾ðÊ󥫥¦¥ó¥¿¡¼¡£
226 .\"O .SH VERSIONS
227 .SH ¥Ð¡¼¥¸¥ç¥ó
228 .\"O UDP-Litev4/v6 first appeared in Linux 2.6.20.
229 UDP-Litev4/v6 ¤Ï Linux 2.6.20 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
230 .\"O .SH "SEE ALSO"
231 .SH ´ØÏ¢¹àÌÜ
232 .BR udp (7),
233 .BR ip (7),
234 .BR ipv6 (7),
235 .BR socket (7)
236
237 RFC\ 3828 for the Lightweight User Datagram Protocol (UDP-Lite)
238 .br
239 .I Documentation/networking/udplite.txt