summaryrefslogtreecommitdiff
path: root/static/freebsd/man4/udplite.4 3.html
blob: b65b1db4d91a4b7c1ada1a270bc08179c0328476 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<table class="head">
  <tr>
    <td class="head-ltitle">UDPLITE(4)</td>
    <td class="head-vol">Device Drivers Manual</td>
    <td class="head-rtitle">UDPLITE(4)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">udplite</code> &#x2014;
    <span class="Nd">Lightweight User Datagram Protocol</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
    &lt;<a class="In">sys/types.h</a>&gt;</code>
  <br/>
  <code class="In">#include &lt;<a class="In">sys/socket.h</a>&gt;</code>
  <br/>
  <code class="In">#include
  &lt;<a class="In">netinet/udplite.h</a>&gt;</code></p>
<p class="Pp"><var class="Ft">int</var>
  <br/>
  <code class="Fn">socket</code>(<var class="Fa" style="white-space: nowrap;">AF_INET</var>,
    <var class="Fa" style="white-space: nowrap;">SOCK_DGRAM</var>,
    <var class="Fa" style="white-space: nowrap;">IPPROTO_UDPLITE</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The UDP-Lite protocol provides a partial checksum which allows
    corrupted packets to be transmitted to the receiving application. 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>
<p class="Pp">UDP-Lite supports a number of socket options which can be set with
    <a class="Xr">setsockopt(2)</a> and tested with
    <a class="Xr">getsockopt(2)</a>:</p>
<dl class="Bl-tag">
  <dt id="UDPLITE_SEND_CSCOV"><a class="permalink" href="#UDPLITE_SEND_CSCOV"><code class="Dv">UDPLITE_SEND_CSCOV</code></a></dt>
  <dd>This option sets the sender checksum coverage. A value of zero indicates
      that all sent packets will have full checksum coverage. A value of 8 to
      65535 limits the checksum coverage of all sent packets to the value
    given.</dd>
  <dt id="UDPLITE_RECV_CSCOV"><a class="permalink" href="#UDPLITE_RECV_CSCOV"><code class="Dv">UDPLITE_RECV_CSCOV</code></a></dt>
  <dd>This option is the receiver-side analogue. A value of zero instructs the
      kernel to drop all received packets not having full checksum coverage. A
      value of 8 to 65535 instructs the kernel to drop all received packets with
      a partial checksum coverage smaller than the value specified.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="ERRORS"><a class="permalink" href="#ERRORS">ERRORS</a></h1>
<p class="Pp">A socket operation may fail with one of the following errors
    returned:</p>
<dl class="Bl-tag">
  <dt id="EISCONN">[<a class="permalink" href="#EISCONN"><code class="Er">EISCONN</code></a>]</dt>
  <dd>when trying to establish a connection on a socket which already has one,
      or when trying to send a datagram with the destination address specified
      and the socket is already connected;</dd>
  <dt id="ENOTCONN">[<a class="permalink" href="#ENOTCONN"><code class="Er">ENOTCONN</code></a>]</dt>
  <dd>when trying to send a datagram, but no destination address is specified,
      and the socket has not been connected;</dd>
  <dt id="ENOBUFS">[<a class="permalink" href="#ENOBUFS"><code class="Er">ENOBUFS</code></a>]</dt>
  <dd>when the system runs out of memory for an internal data structure;</dd>
  <dt id="EADDRINUSE">[<a class="permalink" href="#EADDRINUSE"><code class="Er">EADDRINUSE</code></a>]</dt>
  <dd>when an attempt is made to create a socket with a port which has already
      been allocated;</dd>
  <dt id="EADDRNOTAVAIL">[<a class="permalink" href="#EADDRNOTAVAIL"><code class="Er">EADDRNOTAVAIL</code></a>]</dt>
  <dd>when an attempt is made to create a socket with a network address for
      which no network interface exists.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<p class="Pp"><a class="Xr">getsockopt(2)</a>, <a class="Xr">recv(2)</a>,
    <a class="Xr">send(2)</a>, <a class="Xr">socket(2)</a></p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">October 1, 2014</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>