]>
Commit | Line | Data |
---|---|---|
1dd4e8b0 MK |
1 | .\" Copyright (c) 2008 by Gerrit Renker <gerrit@erg.abdn.ac.uk> |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
1dd4e8b0 MK |
4 | .\" Permission is granted to make and distribute verbatim copies of this |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
12 | .\" | |
13 | .\" Since the Linux kernel and libraries are constantly changing, this | |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
20 | .\" | |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by | |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
1dd4e8b0 MK |
24 | .\" |
25 | .\" $Id: udplite.7,v 1.12 2008/07/23 15:22:22 gerrit Exp gerrit $ | |
26 | .\" | |
c4e7b714 | 27 | .TH UDPLITE 7 2008-12-03 "Linux" "Linux Programmer's Manual" |
1dd4e8b0 MK |
28 | .SH NAME |
29 | udplite \- Lightweight User Datagram Protocol | |
30 | .SH SYNOPSIS | |
31 | .B #include <sys/socket.h> | |
32 | .br | |
33 | .\" FIXME . see #defines under `BUGS', | |
34 | .\" when glibc supports this, add | |
35 | .\" #include <netinet/udplite.h> | |
36 | .sp | |
c4e7b714 | 37 | .B sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDPLITE); |
1dd4e8b0 MK |
38 | .SH DESCRIPTION |
39 | This is an implementation of the Lightweight User Datagram Protocol | |
40 | (UDP-Lite), as described in RFC\ 3828. | |
41 | ||
42 | UDP-Lite is an extension of UDP (RFC\ 768) to support variable-length | |
43 | checksums. | |
44 | This has advantages for some types of multimedia transport that | |
45 | may be able to make use of slightly damaged datagrams, | |
46 | rather than having them discarded by lower-layer protocols. | |
47 | ||
48 | The variable-length checksum coverage is set via a | |
49 | .BR setsockopt (2) | |
50 | option. | |
51 | If this option is not set, the only difference to UDP is | |
52 | in using a different IP protocol identifier (IANA number 136). | |
53 | ||
54 | The UDP-Lite implementation is a full extension of | |
88879aeb | 55 | .BR udp (7)\(emthat |
a1fa36af | 56 | is, it shares the same API and API behavior, and in addition |
1dd4e8b0 | 57 | offers two socket options to control the checksum coverage. |
73d8cece | 58 | .SS Address format |
1dd4e8b0 MK |
59 | UDP-Litev4 uses the |
60 | .I sockaddr_in | |
61 | address format described in | |
62 | .BR ip (7). | |
63 | UDP-Litev6 uses the | |
64 | .I sockaddr_in6 | |
65 | address format described in | |
66 | .BR ipv6 (7). | |
73d8cece | 67 | .SS Socket options |
1dd4e8b0 MK |
68 | To set or get a UDP-Lite socket option, call |
69 | .BR getsockopt (2) | |
70 | to read or | |
71 | .BR setsockopt (2) | |
72 | to write the option with the option level argument set to | |
73 | .BR IPPROTO_UDPLITE . | |
74 | In addition, all | |
75 | .B IPPROTO_UDP | |
76 | socket options are valid on a UDP-Lite socket. | |
77 | See | |
78 | .BR udp (7) | |
79 | for more information. | |
80 | ||
81 | The following two options are specific to UDP-Lite. | |
82 | .TP | |
83 | .BR UDPLITE_SEND_CSCOV | |
84 | This option sets the sender checksum coverage and takes an | |
85 | .I int | |
86 | as argument, with a checksum coverage value in the range 0..2^16-1. | |
87 | ||
88 | A value of 0 means that the entire datagram is always covered. | |
89 | Values from 1-7 are illegal (RFC\ 3828, 3.1) and are rounded up to | |
90 | the minimum coverage of 8. | |
91 | ||
92 | With regard to IPv6 jumbograms (RFC\ 2675), the UDP-Litev6 checksum | |
93 | coverage is limited to the first 2^16-1 octets, as per RFC\ 3828, 3.5. | |
94 | Higher values are therefore silently truncated to 2^16-1. | |
95 | If in doubt, the current coverage value can always be queried using | |
96 | .BR getsockopt (2). | |
97 | .TP | |
98 | .BR UDPLITE_RECV_CSCOV | |