]>
Commit | Line | Data |
---|---|---|
1dd4e8b0 MK |
1 | .\" Copyright (c) 2008 by Gerrit Renker <gerrit@erg.abdn.ac.uk> |
2 | .\" | |
5fbde956 | 3 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
1dd4e8b0 MK |
4 | .\" |
5 | .\" $Id: udplite.7,v 1.12 2008/07/23 15:22:22 gerrit Exp gerrit $ | |
6 | .\" | |
4c1c5274 | 7 | .TH udplite 7 (date) "Linux man-pages (unreleased)" |
1dd4e8b0 MK |
8 | .SH NAME |
9 | udplite \- Lightweight User Datagram Protocol | |
10 | .SH SYNOPSIS | |
c7db92b9 | 11 | .nf |
1dd4e8b0 | 12 | .B #include <sys/socket.h> |
1dd4e8b0 MK |
13 | .\" FIXME . see #defines under `BUGS', |
14 | .\" when glibc supports this, add | |
15 | .\" #include <netinet/udplite.h> | |
68e4db0a | 16 | .PP |
c4e7b714 | 17 | .B sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDPLITE); |
c7db92b9 | 18 | .fi |
1dd4e8b0 MK |
19 | .SH DESCRIPTION |
20 | This is an implementation of the Lightweight User Datagram Protocol | |
21 | (UDP-Lite), as described in RFC\ 3828. | |
5711c04f | 22 | .PP |
1dd4e8b0 MK |
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. | |
5711c04f | 28 | .PP |
1dd4e8b0 MK |
29 | The variable-length checksum coverage is set via a |
30 | .BR setsockopt (2) | |
31 | option. | |
1d99db5f | 32 | If this option is not set, the only difference from UDP is |
1dd4e8b0 | 33 | in using a different IP protocol identifier (IANA number 136). |
5711c04f | 34 | .PP |
1dd4e8b0 | 35 | The UDP-Lite implementation is a full extension of |
88879aeb | 36 | .BR udp (7)\(emthat |
a1fa36af | 37 | is, it shares the same API and API behavior, and in addition |
1dd4e8b0 | 38 | offers two socket options to control the checksum coverage. |
73d8cece | 39 | .SS Address format |
1dd4e8b0 MK |
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). | |
73d8cece | 48 | .SS Socket options |
1dd4e8b0 MK |
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. | |
5711c04f | 61 | .PP |
1dd4e8b0 MK |
62 | The following two options are specific to UDP-Lite. |
63 | .TP | |
1ae6b2c7 | 64 | .B UDPLITE_SEND_CSCOV |
1dd4e8b0 MK |
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^16-1. | |
5711c04f | 68 | .IP |
1dd4e8b0 | 69 | A value of 0 means that the entire datagram is always covered. |
9bc87ed0 | 70 | Values from 1\-7 are illegal (RFC\ 3828, 3.1) and are rounded up to |
1dd4e8b0 | 71 | the minimum coverage of 8. |
5711c04f | 72 | .IP |
1dd4e8b0 MK |
73 | With regard to IPv6 jumbograms (RFC\ 2675), the UDP-Litev6 checksum |
74 | coverage is limited to the first 2^16-1 octets, as per RFC\ 3828, 3.5. | |
75 | Higher values are therefore silently truncated to 2^16-1. | |
76 | If in doubt, the current coverage value can always be queried using | |
77 | .BR getsockopt (2). | |
78 | .TP | |
1ae6b2c7 | 79 | .B UDPLITE_RECV_CSCOV |