xref: /freebsd/share/man/man4/udplite.4 (revision 298f5fdc242b760e70cd3494e3a4f1f50b20664d)
1.\" Copyright (c) 2014, Kevin Lo.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd April 7, 2014
28.Dt UDPLITE 4
29.Os
30.Sh NAME
31.Nm udplite
32.Nd Lightweight User Datagram Protocol
33.Sh SYNOPSIS
34.In sys/types.h
35.In sys/socket.h
36.In netinet/udplite.h
37.Ft int
38.Fn socket AF_INET SOCK_DGRAM IPPROTO_UDPLITE
39.Sh DESCRIPTION
40The
41.Tn UDP-Lite
42protocol provides a partial checksum which allows
43corrupted packets to be transmitted to the receiving
44application.
45This has advantages for some types of multimedia
46transport that may be able to make use of slightly
47damaged datagrams, rather than having them discarded
48by lower-layer protocols.
49.Pp
50.Tn UDP-Lite
51supports a number of socket options which can be set with
52.Xr setsockopt 2
53and tested with
54.Xr getsockopt 2 :
55.Bl -tag -width ".Dv UDPLITE_SEND_CSCOV"
56.It Dv UDPLITE_SEND_CSCOV
57This option sets the sender checksum coverage.
58A value of zero indicates that the entire packet
59is covered by the checksum.
60A value of 1 to 7 must be discarded by the receiver.
61.It Dv UDPLITE_RECV_CSCOV
62This option is the receiver-side analogue.
63It is truly optional, i.e. not required to enable traffic
64with partial checksum coverage.
65Its function is that of a traffic filter:
66when enabled, it instructs the kernel to drop
67all packets which have a coverage less than this value.
68.El
69.Sh ERRORS
70A socket operation may fail with one of the following errors returned:
71.Bl -tag -width Er
72.It Bq Er EISCONN
73when trying to establish a connection on a socket which
74already has one, or when trying to send a datagram with the destination
75address specified and the socket is already connected;
76.It Bq Er ENOTCONN
77when trying to send a datagram, but
78no destination address is specified, and the socket has not been
79connected;
80.It Bq Er ENOBUFS
81when the system runs out of memory for
82an internal data structure;
83.It Bq Er EADDRINUSE
84when an attempt
85is made to create a socket with a port which has already been
86allocated;
87.It Bq Er EADDRNOTAVAIL
88when an attempt is made to create a
89socket with a network address for which no network interface
90exists.
91.El
92.Sh SEE ALSO
93.Xr getsockopt 2 ,
94.Xr recv 2 ,
95.Xr send 2 ,
96.Xr socket 2
97