UDP Lite
   HOME

TheInfoList



OR:

UDP-Lite (Lightweight User Datagram Protocol) is a connectionless protocol that allows a potentially damaged data payload to be delivered to an application rather than being discarded by the receiving station. This is useful as it allows decisions about the integrity of the data to be made in the application layer (application or the
codec A codec is a device or computer program that encodes or decodes a data stream or signal. ''Codec'' is a portmanteau of coder/decoder. In electronic communications, an endec is a device that acts as both an encoder and a decoder on a signal or ...
), where the significance of the bits is understood. UDP-Lite is described in .


Protocol

UDP-Lite is based on
User Datagram Protocol In computer networking, the User Datagram Protocol (UDP) is one of the core communication protocols of the Internet protocol suite used to send messages (transported as datagrams in packets) to other hosts on an Internet Protocol (IP) network ...
(UDP), but unlike UDP, where either all or none of a packet is protected by a checksum, UDP-Lite allows for ''partial checksums'' that only covers part of a datagram (an arbitrary count of octets at the beginning of the packet), and will therefore deliver packets that have been partially corrupted. It is designed for multimedia protocols, such as
Voice over IP Voice over Internet Protocol (VoIP), also called IP telephony, is a method and group of technologies for the delivery of voice communications and multimedia sessions over Internet Protocol (IP) networks, such as the Internet. The terms Internet t ...
(VoIP) or streamed video, in which receiving a packet with a damaged payload is better than receiving no packet at all. For conventional UDP and
Transmission Control Protocol The Transmission Control Protocol (TCP) is one of the main protocols of the Internet protocol suite. It originated in the initial network implementation in which it complemented the Internet Protocol (IP). Therefore, the entire suite is common ...
(TCP), a single bit in error will cause a "bad" checksum, meaning that the whole packet must be discarded: in this way, bit errors are "promoted" to entire packet errors even where the damage to the data is trivial. For computing the checksum UDP-Lite uses the same checksum algorithm used for UDP (and TCP). Modern multimedia codecs, like
G.718 G.718 is an ITU-T Recommendation embedded scalable speech and audio codec providing high quality narrowband (250 Hz to 3.5 kHz) speech over the lower bit rates and high quality wideband (50 Hz to 7 kHz) speech over the complete ...
and
Adaptive Multi-Rate The Adaptive Multi-Rate (AMR, AMR-NB or GSM-AMR) audio codec is an audio compression format optimized for speech coding. AMR speech codec consists of a multi-rate narrowband speech codec that encodes narrowband (200–3400 Hz) signals at var ...
(AMR) for audio and
H.264 Advanced Video Coding (AVC), also referred to as H.264 or MPEG-4 Part 10, is a video compression standard based on block-oriented, motion-compensated coding. It is by far the most commonly used format for the recording, compression, and distr ...
and MPEG-4 for video, have resilience features already built into the syntax and structure of the stream. This allows the codec to (a) detect errors in the stream and (b) potentially correct, or at least conceal, the error during playback. These codecs are ideal partners for UDP-Lite, since they are designed to work with a damaged data stream, and it is better for these codecs to receive perhaps 200 bytes where a few bits are damaged rather than have to conceal the loss of an entire packet that was discarded due to a bad checksum. The application layer understands the significance of the data, where the transport only sees UDP packets. This means that error protection can be added if necessary at a higher layer, for example with a forward error correction scheme. The application is the best place to decide which parts of the stream are most sensitive to error and protect them accordingly, rather than have a single "brute force" checksum that covers everything equally. An example of this can be seen in research by Hammer et al. where UDP-Lite is coupled with the AMR codec to give improved speech quality in lossy network conditions. Since most modern link layers protect the carried data with a strong cyclic redundancy check (CRC) and will discard damaged frames, making effective use of UDP Lite requires the link layer to be aware of the network layer data being carried. Since no current IP stacks implement such ''cross-layer'' interactions, making effective use of UDP-Lite currently requires specially modified device drivers. The IP protocol identifier is 136. UDP-Lite uses the same set of port numbers assigned by the
Internet Assigned Numbers Authority The Internet Assigned Numbers Authority (IANA) is a standards organization that oversees global IP address allocation, autonomous system number allocation, root zone management in the Domain Name System (DNS), media types, and other Inte ...
(IANA) for use by UDP. Support for UDP-Lite was added in the Linux kernel version 2.6.20. Support for UDP-Lite was added in the
FreeBSD kernel FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
from r264212. The changeset was also MFC'ed back to stable/10 and became available in FreeBSD 10.1-RELEASE. The BSD socket API is extended to support UDP-Lite by the third parameter of the system call: Set it to to request a UDP-Lite socket: int fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDPLITE); One can also easily set what part of the packet will be covered by the checksum (starting from the beginning including header): int val = 20; /* 8 octets of header + 12 octets of the application protocol. */ (void)setsockopt(fd, SOL_UDPLITE, UDPLITE_SEND_CSCOV, &val, sizeof val); If a packet smaller than 12 octets is sent in such a setup, the checksum will cover the whole packet. On the receiving side a socket will by default drop all packets which are not covered completely (UDP emulation.) To permit for smaller coverage one can use: int val = 20; /* 8 octets of header + 12 octets of the application protocol. */ (void)setsockopt(fd, SOL_UDPLITE, UDPLITE_RECV_CSCOV, &val, sizeof val); This will allow for packets where at minimum 12 octets of user data are checksummed. Any packet with a smaller coverage will be silently dropped as bad. If a packet has a coverage length of at least 20 octets (including header) and its checksum is correct, it will be delivered to application (whole or part of the payload can still be corrupted, because it could be not covered by checksum or because the checksum was correct incidentally, but the latter is very unlikely.) If the checksum is incorrect the packet will be dropped, because it is actually impossible to know if the error was inside the payload data or in the UDP-Lite header, so the packet could actually be destined for a different program. The smallest possible coverage is 8 octets. Headers need to be included in checksum. Packets with a smaller length of coverage will always be dropped independent of any settings (ignoring sniffers which are interested in all traffic) as not conforming to standard.


Support

UDP-Lite is supported by the following operating systems: * FreeBSD, since version 10.1-RELEASE *
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
, since kernel version 2.6.20 * Also available on Windows through a third-party library, WULL


References


External links

* — The Lightweight User Datagram Protocol (UDP-Lite) * — MIB for the UDP-Lite protocol * — RObust Header Compression (ROHC): Profiles for User Datagram Protocol (UDP) Lite * {{IETF RFC, 5405, link=no — Unicast UDP Usage Guidelines for Application Designers Transport layer protocols