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