xref: /freebsd/share/man/man4/udplite.4 (revision 315ee00f)
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.Dd October 1, 2014
26.Dt UDPLITE 4
27.Os
28.Sh NAME
29.Nm udplite
30.Nd Lightweight User Datagram Protocol
31.Sh SYNOPSIS
32.In sys/types.h
33.In sys/socket.h
34.In netinet/udplite.h
35.Ft int
36.Fn socket AF_INET SOCK_DGRAM IPPROTO_UDPLITE
37.Sh DESCRIPTION
38The
39.Tn UDP-Lite
40protocol provides a partial checksum which allows
41corrupted packets to be transmitted to the receiving
42application.
43This has advantages for some types of multimedia
44transport that may be able to make use of slightly
45damaged datagrams, rather than having them discarded
46by lower-layer protocols.
47.Pp
48.Tn UDP-Lite
49supports a number of socket options which can be set with
50.Xr setsockopt 2
51and tested with
52.Xr getsockopt 2 :
53.Bl -tag -width ".Dv UDPLITE_SEND_CSCOV"
54.It Dv UDPLITE_SEND_CSCOV
55This option sets the sender checksum coverage.
56A value of zero indicates that all sent packets will have
57full checksum coverage.
58A value of 8 to 65535 limits the checksum coverage of all sent packets
59to the value given.
60.It Dv UDPLITE_RECV_CSCOV
61This option is the receiver-side analogue.
62A value of zero instructs the kernel to drop all received packets
63not having full checksum coverage.
64A value of 8 to 65535 instructs the kernel to drop all received
65packets with a partial checksum coverage smaller than the value specified.
66.El
67.Sh ERRORS
68A socket operation may fail with one of the following errors returned:
69.Bl -tag -width Er
70.It Bq Er EISCONN
71when trying to establish a connection on a socket which
72already has one, or when trying to send a datagram with the destination
73address specified and the socket is already connected;
74.It Bq Er ENOTCONN
75when trying to send a datagram, but
76no destination address is specified, and the socket has not been
77connected;
78.It Bq Er ENOBUFS
79when the system runs out of memory for
80an internal data structure;
81.It Bq Er EADDRINUSE
82when an attempt
83is made to create a socket with a port which has already been
84allocated;
85.It Bq Er EADDRNOTAVAIL
86when an attempt is made to create a
87socket with a network address for which no network interface
88exists.
89.El
90.Sh SEE ALSO
91.Xr getsockopt 2 ,
92.Xr recv 2 ,
93.Xr send 2 ,
94.Xr socket 2
95