]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man7/udplite.7
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man7 / udplite.7
CommitLineData
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
9udplite \- 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
20This is an implementation of the Lightweight User Datagram Protocol
21(UDP-Lite), as described in RFC\ 3828.
5711c04f 22.PP
1dd4e8b0
MK
23UDP-Lite is an extension of UDP (RFC\ 768) to support variable-length
24checksums.
25This has advantages for some types of multimedia transport that
26may be able to make use of slightly damaged datagrams,
27rather than having them discarded by lower-layer protocols.
5711c04f 28.PP
1dd4e8b0
MK
29The variable-length checksum coverage is set via a
30.BR setsockopt (2)
31option.
1d99db5f 32If this option is not set, the only difference from UDP is
1dd4e8b0 33in using a different IP protocol identifier (IANA number 136).
5711c04f 34.PP
1dd4e8b0 35The UDP-Lite implementation is a full extension of
88879aeb 36.BR udp (7)\(emthat
a1fa36af 37is, it shares the same API and API behavior, and in addition
1dd4e8b0 38offers two socket options to control the checksum coverage.
73d8cece 39.SS Address format
1dd4e8b0
MK
40UDP-Litev4 uses the
41.I sockaddr_in
42address format described in
43.BR ip (7).
44UDP-Litev6 uses the
45.I sockaddr_in6
46address format described in
47.BR ipv6 (7).
73d8cece 48.SS Socket options
1dd4e8b0
MK
49To set or get a UDP-Lite socket option, call
50.BR getsockopt (2)
51to read or
52.BR setsockopt (2)
53to write the option with the option level argument set to
54.BR IPPROTO_UDPLITE .
55In addition, all
56.B IPPROTO_UDP
57socket options are valid on a UDP-Lite socket.
58See
59.BR udp (7)
60for more information.
5711c04f 61.PP
1dd4e8b0
MK
62The following two options are specific to UDP-Lite.
63.TP
1ae6b2c7 64.B UDPLITE_SEND_CSCOV
1dd4e8b0
MK
65This option sets the sender checksum coverage and takes an
66.I int
67as argument, with a checksum coverage value in the range 0..2^16-1.
5711c04f 68.IP
1dd4e8b0 69A value of 0 means that the entire datagram is always covered.
9bc87ed0 70Values from 1\-7 are illegal (RFC\ 3828, 3.1) and are rounded up to
1dd4e8b0 71the minimum coverage of 8.
5711c04f 72.IP
1dd4e8b0
MK
73With regard to IPv6 jumbograms (RFC\ 2675), the UDP-Litev6 checksum
74coverage is limited to the first 2^16-1 octets, as per RFC\ 3828, 3.5.
75Higher values are therefore silently truncated to 2^16-1.
76If in doubt, the current coverage value can always be queried using
77.BR getsockopt (2).
78.TP
1ae6b2c7 79.B UDPLITE_RECV_CSCOV