{"id":4032,"date":"2022-12-20T17:28:45","date_gmt":"2022-12-20T20:28:45","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/udplite-man7\/"},"modified":"2022-12-20T17:28:45","modified_gmt":"2022-12-20T20:28:45","slug":"udplite-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/udplite-man7\/","title":{"rendered":"UDPLITE (man7)"},"content":{"rendered":"<h1 align=\"center\">UDPLITE<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#ERRORS\">ERRORS<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#VERSIONS\">VERSIONS<\/a><br \/> <a href=\"#BUGS\">BUGS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COLOPHON\">COLOPHON<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">udplite \u2212 Lightweight User Datagram Protocol<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>#include <sys\/socket.h><\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDPLITE);<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This is an implementation of the Lightweight User Datagram Protocol (UDP-Lite), as described in RFC\u00a03828.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">UDP-Lite is an extension of UDP (RFC\u00a0768) 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>\n<p style=\"margin-left:11%; margin-top: 1em\">The variable-length checksum coverage is set via a <b>setsockopt<\/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>\n<p style=\"margin-left:11%; margin-top: 1em\">The UDP-Lite implementation is a full extension of <b>udp<\/b>(7)\u2014that is, it shares the same API and API behavior, and in addition offers two socket options to control the checksum coverage.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Address format<\/b> <br \/> UDP-Litev4 uses the <i>sockaddr_in<\/i> address format described in <b>ip<\/b>(7). UDP-Litev6 uses the <i>sockaddr_in6<\/i> address format described in <b>ipv6<\/b>(7).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Socket options<\/b> <br \/> To set or get a UDP-Lite socket option, call <b>getsockopt<\/b>(2) to read or <b>setsockopt<\/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>udp<\/b>(7) for more information.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The following two options are specific to UDP-Lite. <b><br \/> UDPLITE_SEND_CSCOV<\/b><\/p>\n<p style=\"margin-left:22%;\">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.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">A value of 0 means that the entire datagram is always covered. Values from 1\u22127 are illegal (RFC\u00a03828, 3.1) and are rounded up to the minimum coverage of 8.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">With regard to IPv6 jumbograms (RFC\u00a02675), the UDP-Litev6 checksum coverage is limited to the first 2^16-1 octets, as per RFC\u00a03828, 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>getsockopt<\/b>(2).<\/p>\n<p style=\"margin-left:11%;\"><b>UDPLITE_RECV_CSCOV<\/b><\/p>\n<p style=\"margin-left:22%;\">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.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">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.<\/p>\n<h2>ERRORS <a name=\"ERRORS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">All errors documented for <b>udp<\/b>(7) may be returned. UDP-Lite does not add further errors.<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/proc\/net\/snmp<\/i><\/p>\n<p style=\"margin-left:22%;\">Basic UDP-Litev4 statistics counters.<\/p>\n<p style=\"margin-left:11%;\"><i>\/proc\/net\/snmp6<\/i><\/p>\n<p style=\"margin-left:22%;\">Basic UDP-Litev6 statistics counters.<\/p>\n<h2>VERSIONS <a name=\"VERSIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">UDP-Litev4\/v6 first appeared in Linux 2.6.20.<\/p>\n<h2>BUGS <a name=\"BUGS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Where glibc support is missing, the following definitions are needed:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">#define IPPROTO_UDPLITE 136 <br \/> #define UDPLITE_SEND_CSCOV 10 <br \/> #define UDPLITE_RECV_CSCOV 11<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ip<\/b>(7), <b>ipv6<\/b>(7), <b>socket<\/b>(7), <b>udp<\/b>(7)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">RFC\u00a03828 for the Lightweight User Datagram Protocol (UDP-Lite).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Documentation\/networking\/udplite.txt<\/i> in the Linux kernel source tree<\/p>\n<h2>COLOPHON <a name=\"COLOPHON\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This page is part of release 5.10 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 https:\/\/www.kernel.org\/doc\/man\u2212pages\/.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  udplite \u2212 Lightweight User Datagram Protocol <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[971],"tags":[973,972,1114],"class_list":["post-4032","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-man7","tag-udplite"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4032","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4032"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4032\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4032"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4032"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}