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