]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man7/udplite.7
sock_diag.7: ffix: white space tweaks in example program
[thirdparty/man-pages.git] / man7 / udplite.7
CommitLineData
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.\"
c77eace5 27.TH UDPLITE 7 2014-07-08 "Linux" "Linux Programmer's Manual"
1dd4e8b0
MK
28.SH NAME
29udplite \- 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
39This is an implementation of the Lightweight User Datagram Protocol
40(UDP-Lite), as described in RFC\ 3828.
41
42UDP-Lite is an extension of UDP (RFC\ 768) to support variable-length
43checksums.
44This has advantages for some types of multimedia transport that
45may be able to make use of slightly damaged datagrams,
46rather than having them discarded by lower-layer protocols.
47
48The variable-length checksum coverage is set via a
49.BR setsockopt (2)
50option.
1d99db5f 51If this option is not set, the only difference from UDP is
1dd4e8b0
MK
52in using a different IP protocol identifier (IANA number 136).
53
54The UDP-Lite implementation is a full extension of
88879aeb 55.BR udp (7)\(emthat
a1fa36af 56is, it shares the same API and API behavior, and in addition
1dd4e8b0 57offers two socket options to control the checksum coverage.
73d8cece 58.SS Address format
1dd4e8b0
MK
59UDP-Litev4 uses the
60.I sockaddr_in
61address format described in
62.BR ip (7).
63UDP-Litev6 uses the
64.I sockaddr_in6
65address format described in
66.BR ipv6 (7).
73d8cece 67.SS Socket options
1dd4e8b0
MK
68To set or get a UDP-Lite socket option, call
69.BR getsockopt (2)
70to read or
71.BR setsockopt (2)
72to write the option with the option level argument set to
73.BR IPPROTO_UDPLITE .
74In addition, all
75.B IPPROTO_UDP
76socket options are valid on a UDP-Lite socket.
77See
78.BR udp (7)
79for more information.
80
81The following two options are specific to UDP-Lite.
82.TP
83.BR UDPLITE_SEND_CSCOV
84This option sets the sender checksum coverage and takes an
85.I int
86as argument, with a checksum coverage value in the range 0..2^16-1.
87
88A value of 0 means that the entire datagram is always covered.
89Values from 1-7 are illegal (RFC\ 3828, 3.1) and are rounded up to
90the minimum coverage of 8.
91
92With regard to IPv6 jumbograms (RFC\ 2675), the UDP-Litev6 checksum
93coverage is limited to the first 2^16-1 octets, as per RFC\ 3828, 3.5.
94Higher values are therefore silently truncated to 2^16-1.
95If in doubt, the current coverage value can always be queried using
96.BR getsockopt (2).
97.TP
98.BR UDPLITE_RECV_CSCOV