1UDPLITE(7) Linux Programmer's Manual UDPLITE(7)
2
3
4
6 udplite - Lightweight User Datagram Protocol
7
9 #include <sys/socket.h>
10
11 sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDPLITE);
12
14 This is an implementation of the Lightweight User Datagram Protocol
15 (UDP-Lite), as described in RFC 3828.
16
17 UDP-Lite is an extension of UDP (RFC 768) to support variable-length
18 checksums. This has advantages for some types of multimedia transport
19 that may be able to make use of slightly damaged datagrams, rather than
20 having them discarded by lower-layer protocols.
21
22 The variable-length checksum coverage is set via a setsockopt(2)
23 option. If this option is not set, the only difference to UDP is in
24 using a different IP protocol identifier (IANA number 136).
25
26 The UDP-Lite implementation is a full extension of udp(7), i.e., it
27 shares the same API and API behaviour, and in addition offers two
28 socket options to control the checksum coverage.
29
30 Address Format
31 UDP-Litev4 uses the sockaddr_in address format described in ip(7).
32 UDP-Litev6 uses the sockaddr_in6 address format described in ipv6(7).
33
34 Socket Options
35 To set or get a UDP-Lite socket option, call getsockopt(2) to read or
36 setsockopt(2) to write the option with the option level argument set to
37 IPPROTO_UDPLITE. In addition, all IPPROTO_UDP socket options are valid
38 on a UDP-Lite socket. See udp(7) for more information.
39
40 The following two options are specific to UDP-Lite.
41
42 UDPLITE_SEND_CSCOV
43 This option sets the sender checksum coverage and takes an int
44 as argument, with a checksum coverage value in the range
45 0..2^16-1.
46
47 A value of 0 means that the entire datagram is always covered.
48 Values from 1-7 are illegal (RFC 3828, 3.1) and are rounded up
49 to the minimum coverage of 8.
50
51 With regard to IPv6 jumbograms (RFC 2675), the UDP-Litev6 check‐
52 sum coverage is limited to the first 2^16-1 octets, as per
53 RFC 3828, 3.5. Higher values are therefore silently truncated
54 to 2^16-1. If in doubt, the current coverage value can always
55 be queried using getsockopt(2).
56
57 UDPLITE_RECV_CSCOV
58 This is the receiver-side analogue and uses the same argument
59 format and value range as UDPLITE_SEND_CSCOV. This option is
60 not required to enable traffic with partial checksum coverage.
61 Its function is that of a traffic filter: when enabled, it
62 instructs the kernel to drop all packets which have a coverage
63 less than the specified coverage value.
64
65 When the value of UDPLITE_RECV_CSCOV exceeds the actual packet
66 coverage, incoming packets are silently dropped, but may gener‐
67 ate a warning message in the system log.
68
70 All errors documented for udp(7) may be returned. UDP-Lite does not
71 add further errors.
72
74 Where glibc support is missing, the following definitions are needed:
75
76 #define IPPROTO_UDPLITE 136
77 #define UDPLITE_SEND_CSCOV 10
78 #define UDPLITE_RECV_CSCOV 11
79
81 /proc/net/snmp - basic UDP-Litev4 statistics counters.
82 /proc/net/snmp6 - basic UDP-Litev6 statistics counters.
83
85 UDP-Litev4/v6 first appeared in Linux 2.6.20.
86
88 udp(7), ip(7), ipv6(7), socket(7)
89
90 RFC 3828 for the Lightweight User Datagram Protocol (UDP-Lite)
91 Documentation/networking/udplite.txt
92
94 This page is part of release 3.25 of the Linux man-pages project. A
95 description of the project, and information about reporting bugs, can
96 be found at http://www.kernel.org/doc/man-pages/.
97
98
99
100Linux 2008-12-03 UDPLITE(7)