237 lines
5.8 KiB
HTML
237 lines
5.8 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of UDPLITE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>UDPLITE</H1>
|
|
Section: Linux Programmer's Manual (7)<BR>Updated: 2017-09-15<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
udplite - Lightweight User Datagram Protocol
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>#include <<A HREF="file:///usr/include/sys/socket.h">sys/socket.h</A>></B>
|
|
|
|
<BR>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<B>sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDPLITE);</B>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
This is an implementation of the Lightweight User Datagram Protocol
|
|
(UDP-Lite), as described in RFC 3828.
|
|
<P>
|
|
|
|
UDP-Lite is an extension of UDP (RFC 768) to support variable-length
|
|
checksums.
|
|
This has advantages for some types of multimedia transport that
|
|
may be able to make use of slightly damaged datagrams,
|
|
rather than having them discarded by lower-layer protocols.
|
|
<P>
|
|
|
|
The variable-length checksum coverage is set via a
|
|
<B><A HREF="/cgi-bin/man/man2html?2+setsockopt">setsockopt</A></B>(2)
|
|
|
|
option.
|
|
If this option is not set, the only difference from UDP is
|
|
in using a different IP protocol identifier (IANA number 136).
|
|
<P>
|
|
|
|
The UDP-Lite implementation is a full extension of
|
|
<B><A HREF="/cgi-bin/man/man2html?7+udp">udp</A></B>(7)---that
|
|
|
|
is, it shares the same API and API behavior, and in addition
|
|
offers two socket options to control the checksum coverage.
|
|
<A NAME="lbAE"> </A>
|
|
<H3>Address format</H3>
|
|
|
|
UDP-Litev4 uses the
|
|
<I>sockaddr_in</I>
|
|
|
|
address format described in
|
|
<B><A HREF="/cgi-bin/man/man2html?7+ip">ip</A></B>(7).
|
|
|
|
UDP-Litev6 uses the
|
|
<I>sockaddr_in6</I>
|
|
|
|
address format described in
|
|
<B><A HREF="/cgi-bin/man/man2html?7+ipv6">ipv6</A></B>(7).
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H3>Socket options</H3>
|
|
|
|
To set or get a UDP-Lite socket option, call
|
|
<B><A HREF="/cgi-bin/man/man2html?2+getsockopt">getsockopt</A></B>(2)
|
|
|
|
to read or
|
|
<B><A HREF="/cgi-bin/man/man2html?2+setsockopt">setsockopt</A></B>(2)
|
|
|
|
to write the option with the option level argument set to
|
|
<B>IPPROTO_UDPLITE</B>.
|
|
|
|
In addition, all
|
|
<B>IPPROTO_UDP</B>
|
|
|
|
socket options are valid on a UDP-Lite socket.
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+udp">udp</A></B>(7)
|
|
|
|
for more information.
|
|
<P>
|
|
|
|
The following two options are specific to UDP-Lite.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>UDPLITE_SEND_CSCOV</B>
|
|
|
|
<DD>
|
|
This option sets the sender checksum coverage and takes an
|
|
<I>int</I>
|
|
|
|
as argument, with a checksum coverage value in the range 0..2^16-1.
|
|
<DT id="2"><DD>
|
|
A value of 0 means that the entire datagram is always covered.
|
|
Values from 1-7 are illegal (RFC 3828, 3.1) and are rounded up to
|
|
the minimum coverage of 8.
|
|
<DT id="3"><DD>
|
|
With regard to IPv6 jumbograms (RFC 2675), the UDP-Litev6 checksum
|
|
coverage is limited to the first 2^16-1 octets, as per RFC 3828, 3.5.
|
|
Higher values are therefore silently truncated to 2^16-1.
|
|
If in doubt, the current coverage value can always be queried using
|
|
<B><A HREF="/cgi-bin/man/man2html?2+getsockopt">getsockopt</A></B>(2).
|
|
|
|
<DT id="4"><B>UDPLITE_RECV_CSCOV</B>
|
|
|
|
<DD>
|
|
This is the receiver-side analogue and uses the same argument format
|
|
and value range as
|
|
<B>UDPLITE_SEND_CSCOV</B>.
|
|
|
|
This option is not required to enable traffic with partial checksum
|
|
coverage.
|
|
Its function is that of a traffic filter: when enabled, it
|
|
instructs the kernel to drop all packets which have a coverage
|
|
<I>less</I>
|
|
|
|
than the specified coverage value.
|
|
<DT id="5"><DD>
|
|
When the value of
|
|
<B>UDPLITE_RECV_CSCOV</B>
|
|
|
|
exceeds the actual packet coverage, incoming packets are silently dropped,
|
|
but may generate a warning message in the system log.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>ERRORS</H2>
|
|
|
|
All errors documented for
|
|
<B><A HREF="/cgi-bin/man/man2html?7+udp">udp</A></B>(7)
|
|
|
|
may be returned.
|
|
UDP-Lite does not add further errors.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="6"><I>/proc/net/snmp</I>
|
|
|
|
<DD>
|
|
Basic UDP-Litev4 statistics counters.
|
|
<DT id="7"><I>/proc/net/snmp6</I>
|
|
|
|
<DD>
|
|
Basic UDP-Litev6 statistics counters.
|
|
</DL>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>VERSIONS</H2>
|
|
|
|
UDP-Litev4/v6 first appeared in Linux 2.6.20.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
|
|
Where glibc support is missing, the following definitions are needed:
|
|
<P>
|
|
|
|
|
|
|
|
#define IPPROTO_UDPLITE 136
|
|
|
|
#define UDPLITE_SEND_CSCOV 10
|
|
#define UDPLITE_RECV_CSCOV 11
|
|
|
|
|
|
<A NAME="lbAK"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+ip">ip</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+ipv6">ipv6</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+socket">socket</A></B>(7),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+udp">udp</A></B>(7)
|
|
|
|
<P>
|
|
|
|
RFC 3828 for the Lightweight User Datagram Protocol (UDP-Lite).
|
|
<P>
|
|
|
|
<I>Documentation/networking/udplite.txt</I>
|
|
|
|
in the Linux kernel source tree
|
|
<A NAME="lbAL"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="8"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="9"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="10"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="11"><A HREF="#lbAE">Address format</A><DD>
|
|
<DT id="12"><A HREF="#lbAF">Socket options</A><DD>
|
|
</DL>
|
|
<DT id="13"><A HREF="#lbAG">ERRORS</A><DD>
|
|
<DT id="14"><A HREF="#lbAH">FILES</A><DD>
|
|
<DT id="15"><A HREF="#lbAI">VERSIONS</A><DD>
|
|
<DT id="16"><A HREF="#lbAJ">BUGS</A><DD>
|
|
<DT id="17"><A HREF="#lbAK">SEE ALSO</A><DD>
|
|
<DT id="18"><A HREF="#lbAL">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:10 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|