OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / original / 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 .TH UDPLITE  7 2008-12-03 "Linux" "Linux Programmer's Manual"
26 .SH NAME
27 udplite \- Lightweight User Datagram Protocol
28 .SH SYNOPSIS
29 .B #include <sys/socket.h>
30 .br
31 .\" FIXME . see #defines under `BUGS',
32 .\"        when glibc supports this, add
33 .\"        #include <netinet/udplite.h>
34 .sp
35 .B sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDPLITE);
36 .SH DESCRIPTION
37 This is an implementation of the Lightweight User Datagram Protocol
38 (UDP-Lite), as described in RFC\ 3828.
39
40 UDP-Lite is an extension of UDP (RFC\ 768) to support variable-length
41 checksums.
42 This has advantages for some types of multimedia transport that
43 may be able to make use of slightly damaged datagrams,
44 rather than having them discarded by lower-layer protocols.
45
46 The variable-length checksum coverage is set via a
47 .BR setsockopt (2)
48 option.
49 If this option is not set, the only difference to UDP is
50 in using a different IP protocol identifier (IANA number 136).
51
52 The UDP-Lite implementation is a full extension of
53 .BR udp (7),
54 i.e., it shares the same API and API behaviour, and in addition
55 offers two socket options to control the checksum coverage.
56 .SS "Address Format"
57 UDP-Litev4 uses the
58 .I sockaddr_in
59 address format described in
60 .BR ip (7).
61 UDP-Litev6 uses the
62 .I sockaddr_in6
63 address format described in
64 .BR ipv6 (7).
65 .SS "Socket Options"
66 To set or get a UDP-Lite socket option, call
67 .BR getsockopt (2)
68 to read or
69 .BR setsockopt (2)
70 to write the option with the option level argument set to
71 .BR IPPROTO_UDPLITE .
72 In addition, all
73 .B IPPROTO_UDP
74 socket options are valid on a UDP-Lite socket.
75 See
76 .BR udp (7)
77 for more information.
78
79 The following two options are specific to UDP-Lite.
80 .TP
81 .BR UDPLITE_SEND_CSCOV
82 This option sets the sender checksum coverage and takes an
83 .I int
84 as argument, with a checksum coverage value in the range 0..2^16-1.
85
86 A value of 0 means that the entire datagram is always covered.
87 Values from 1-7 are illegal (RFC\ 3828, 3.1) and are rounded up to
88 the minimum coverage of 8.
89
90 With regard to IPv6 jumbograms (RFC\ 2675), the UDP-Litev6 checksum
91 coverage is limited to the first 2^16-1 octets, as per RFC\ 3828, 3.5.
92 Higher values are therefore silently truncated to 2^16-1.
93 If in doubt, the current coverage value can always be queried using
94 .BR getsockopt (2).
95 .TP
96 .BR UDPLITE_RECV_CSCOV
97 This is the receiver-side analogue and uses the same argument format
98 and value range as
99 .BR UDPLITE_SEND_CSCOV .
100 This option is not required to enable traffic with partial checksum
101 coverage.
102 Its function is that of a traffic filter: when enabled, it
103 instructs the kernel to drop all packets which have a coverage
104 .I less
105 than the specified coverage value.
106
107 When the value of
108 .B UDPLITE_RECV_CSCOV
109 exceeds the actual packet coverage, incoming packets are silently dropped,
110 but may generate a warning message in the system log.
111 .\" SO_NO_CHECK exists and is supported by UDPv4, but is
112 .\" commented out in socket(7), hence also commented out here
113 .\".PP
114 .\"Since UDP-Lite mandates checksums, checksumming can not be disabled
115 .\"via the
116 .\".B SO_NO_CHECK
117 .\"option from
118 .\".BR socket (7).
119 .SH ERRORS
120 All errors documented for
121 .BR udp (7)
122 may be returned.
123 UDP-Lite does not add further errors.
124 .SH BUGS
125 .\" FIXME . remove this section once glibc supports UDP-Lite
126 Where glibc support is missing, the following definitions are needed:
127 .in +4n
128 .nf
129
130 #define IPPROTO_UDPLITE     136
131 .\" The following two are defined in the kernel in linux/net/udplite.h
132 #define UDPLITE_SEND_CSCOV  10
133 #define UDPLITE_RECV_CSCOV  11
134 .fi
135 .in
136 .SH FILES
137 .I /proc/net/snmp
138 \- basic UDP-Litev4 statistics counters.
139 .br
140 .I /proc/net/snmp6
141 \- basic UDP-Litev6 statistics counters.
142 .SH VERSIONS
143 UDP-Litev4/v6 first appeared in Linux 2.6.20.
144 .SH "SEE ALSO"
145 .BR udp (7),
146 .BR ip (7),
147 .BR ipv6 (7),
148 .BR socket (7)
149
150 RFC\ 3828 for the Lightweight User Datagram Protocol (UDP-Lite)
151 .br
152 .I Documentation/networking/udplite.txt