Skip to Content
Internet Core Protocols: The Definitive Guide
book

Internet Core Protocols: The Definitive Guide

by Eric Hall
February 2000
Intermediate to advanced
464 pages
15h 57m
English
O'Reilly Media, Inc.
Content preview from Internet Core Protocols: The Definitive Guide

Datagram-centric transport services

Another unique aspect of UDP is the way in which it deals with only one datagram at a time. Rather than attempting to manage a stream of application data the way that TCP does, UDP deals with only individual blocks of data, as generated by the application protocols in use. For example, if an application gives UDP a four-kilobyte block of data, then UDP will hand that data to IP as a single datagram, without trying to create efficient segment sizes (one of TCP’s most significant traits). The data may be fragmented by IP when it builds and sends IP packets for that four-kilobyte block of data, but UDP does not care if this happens and is not involved in that process whatsoever.

Furthermore, since each IP datagram contains a fully formed UDP datagram, the destination system will not receive any portion of the UDP message until the entire IP datagram has been received. For example, if the underlying IP datagram has been fragmented, then UDP will not receive any portion of the message until all of the fragments have arrived and been reassembled by IP. But once that happens, then UDP (and the application in use with UDP) will get and read the entire four-kilobyte message in one shot.

Tip

Some UDP stacks require that the application have enough buffers to read the entire datagram. If the application cannot accept all of the data, then it will not get any of the data, since the datagram will be discarded.

Conversely, remember that TCP does not generally ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Packet Guide to Core Network Protocols

Packet Guide to Core Network Protocols

Bruce Hartpence
Ethernet: The Definitive Guide, 2nd Edition

Ethernet: The Definitive Guide, 2nd Edition

Charles E. Spurgeon, Joann Zimmerman

Publisher Resources

ISBN: 1565925726Supplemental ContentErrata Page