Recent from talks
Nothing was collected or created yet.
Datagram Congestion Control Protocol
View on Wikipedia| Communication protocol | |
| Abbreviation | DCCP |
|---|---|
| Introduction | |
| OSI layer | Transport layer (4) |
| RFC(s) | 4340, 4336 |
| Internet protocol suite |
|---|
| Application layer |
| Transport layer |
| Internet layer |
| Link layer |
In computer networking, the Datagram Congestion Control Protocol (DCCP) is a message-oriented transport layer protocol. DCCP implements reliable connection setup, teardown, Explicit Congestion Notification (ECN), congestion control, and feature negotiation. The IETF published DCCP as RFC 4340, a proposed standard, in March 2006. RFC 4336 provides an introduction.
Operation
[edit]DCCP provides a way to gain access to congestion-control mechanisms without having to implement them at the application layer. It allows for flow-based semantics like in Transmission Control Protocol (TCP) but does not provide reliable in-order delivery. Sequenced delivery within multiple streams, as in the Stream Control Transmission Protocol (SCTP), is not available in DCCP. A DCCP connection contains acknowledgment traffic as well as data traffic. Acknowledgments inform a sender whether its packets have arrived, and whether they were marked by Explicit Congestion Notification (ECN). Acknowledgements are transmitted as reliably as the congestion control mechanism in use requires, possibly completely reliably.
DCCP has the option for very long (48-bit) sequence numbers corresponding to a packet ID, rather than a byte ID as in TCP. The long length of the sequence numbers aims to guard against "some blind attacks, such as the injection of DCCP-Resets into the connection".[1]
Applications
[edit]DCCP is useful for applications with timing constraints on the delivery of data. Such applications include streaming media, multiplayer online games and Internet telephony. In such applications, old messages quickly become useless, so that getting new messages is preferred to resending lost messages. As of 2017[update] such applications have often either settled for TCP or used User Datagram Protocol (UDP) and implemented their own congestion-control mechanisms, or have no congestion control at all. While being useful for these applications, DCCP can also serve as a general congestion-control mechanism for UDP-based applications, by adding, as needed, mechanisms for reliable or in-order delivery on top of UDP/DCCP. In this context, DCCP allows the use of different, but generally TCP-friendly, congestion-control mechanisms.
Implementations
[edit]The following operating systems implement DCCP:
- FreeBSD, version 5.1 [2] as patch
- Linux since version 2.6.14,[3] but marked deprecated since version 6.4 due to lack of maintenance and scheduled for removal in 2025.[4] Linux 6.16 drops DCCP.[5]
- DCCP was removed from Linux 6.16.[6]
Userspace library:
- DCCP-TP Archived 2008-07-23 at the Wayback Machine implementation is optimized for portability, but has had no changes since June 2008.[7]
- GoDCCP purpose of this implementation is to provide a standardized, portable NAT-friendly framework for peer-to-peer communications with flexible congestion control, depending on application.
Packet structure
[edit]The DCCP generic header takes different forms depending on the value of X, the Extended Sequence Numbers bit. If X is one, the Sequence Number field is 48 bits long, and the generic header takes 16 bytes, as follows.
| Offset | Octet | 0 | 1 | 2 | 3 | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Octet | Bit | 0 | 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 |
| 0 | 0 | Source Port | Destination Port | ||||||||||||||||||||||||||||||
| 4 | 32 | Data Offset | CCVal | CsCov | Checksum | ||||||||||||||||||||||||||||
| 8 | 64 | Res | Type | X | Reserved | Sequence Number (high bits)↴ | |||||||||||||||||||||||||||
| 12 | 96 | ↪Sequence Number | |||||||||||||||||||||||||||||||
If X is zero, only the low 24 bits of the Sequence Number are transmitted, and the generic header is 12 bytes long.
| Offset | Octet | 0 | 1 | 2 | 3 | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Octet | Bit | 0 | 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 |
| 0 | 0 | Source Port | Destination Port | ||||||||||||||||||||||||||||||
| 4 | 32 | Data Offset | CCVal | CsCov | Checksum | ||||||||||||||||||||||||||||
| 8 | 64 | Res | Type | X | Sequence Number | ||||||||||||||||||||||||||||
- Source Port: 16 bits
- Identifies the sending port.
- Destination Port: 16 bits
- Identifies the receiving port.
- Data Offset: 8 bits
- The offset from the start of the packet's DCCP header to the start of its application data area, in 32-bit words.
- CCVal: 4 bits
- Used by the HC-Sender CCID.
- Checksum Coverage (CsCov): 4 bits
- Checksum Coverage determines the parts of the packet that are covered by the Checksum field.
- Checksum: 16 bits
- The Internet checksum of the packet's DCCP header (including options), a network-layer pseudoheader, and, depending on Checksum Coverage, all, some, or none of the application data.
- Reserved (Res): 3 bits; Res == 0
- Senders MUST set this field to all zeroes on generated packets, and receivers MUST ignore its value.
- Type: 4 bits
- The Type field specifies the type of the packet.
- Extended Sequence Numbers (X): 1 bit
- Set to one to indicate the use of an extended generic header with 48-bit Sequence and Acknowledgement Numbers.
- Sequence Number: 48 or 24 bits
- Identifies the packet uniquely in the sequence of all packets the source sent on this connection.
Current development
[edit]Similarly to the extension of TCP protocol adding multipath capability (MPTCP), a multipath extension of DCCP is under discussion at the IETF,[8] correspondingly denoted as MP-DCCP. First implementations have already been developed, tested, and presented in a collaborative approach between operators and academia[9] and are available as an open source solution.
See also
[edit]References
[edit]- ^ RFC 4340 section 7.6
- ^ "[dccp] FreeBSD implementation". www.ietf.org. Retrieved 18 April 2018.
- ^ "Linux gets DCCP [LWN.net]". lwn.net. Retrieved 18 April 2018.
- ^ "dccp: Print deprecation notice". kernel.org.
- ^ "Linux 6.16 Expected To Remove Datagram Congestion Control Protocol "DCCP" Networking". www.phoronix.com. Retrieved 15 April 2025.
- ^ "Linux 6.16 Expected To Remove Datagram Congestion Control Protocol "DCCP" Networking". www.phoronix.com. Retrieved 29 May 2025.
- ^ "Change log for the dccp-tp wiki, retrieved June 13, 2011". Archived from the original on October 4, 2011. Retrieved June 13, 2011.
- ^ Amend, Markus; Brunstrom, Anna; Kassler, Aneas; Rakocevic, Veselin; Johnson, Stephen (9 November 2021). "DCCP Extensions for Multipath Operation with Multiple Addresses".
- ^ "Multipath extension for DCCP".
External links
[edit]Protocol specifications
[edit]- RFC 4340 — Datagram Congestion Control Protocol
- RFC 5595 — The Datagram Congestion Control Protocol (DCCP) Service Codes
- RFC 5596 — DCCP Simultaneous-Open Technique to Facilitate NAT/Middlebox Traversal
- RFC 5762 — RTP and the DCCP
- RFC 5238 — Datagram Transport Layer Security (DTLS) over DCCP
- RFC 5634 — Quick-Start for DCCP
- RFC 6773 — A Datagram Congestion Control Protocol UDP Encapsulation for NAT Traversal
Congestion control IDs
[edit]- RFC 4341 — Profile for DCCP Congestion Control ID 2: TCP-like Congestion Control
- RFC 4342 — Profile for DCCP Congestion Control ID 3: TCP-Friendly Rate Control (TFRC)
- RFC 5622 — Profile for DCCP Congestion Control ID 4: TCP-Friendly Rate Control for Small Packets (TFRC-SP)
Other information
[edit]- RFC 4336 — Problem Statement for the Datagram Congestion Control Protocol (DCCP)
- DCCP page from one of DCCP authors
- DCCP support in Linux
- Datagram Congestion Control Protocol (DCCP)
Datagram Congestion Control Protocol
View on GrokipediaOverview
Design Goals
The Datagram Congestion Control Protocol (DCCP) was developed to address the limitations of existing transport protocols for applications requiring unreliable datagram delivery with integrated congestion control. User Datagram Protocol (UDP) provides lightweight, unreliable transport but lacks built-in mechanisms to prevent network congestion, which can lead to widespread Internet instability, particularly for real-time applications such as streaming media, Voice over IP (VoIP), and online gaming.[7] In contrast, Transmission Control Protocol (TCP) enforces reliability through retransmissions and ordered delivery, introducing delays that are unnecessary and detrimental for these time-sensitive flows.[7] The protocol's design thus fills this gap by enabling datagram-based applications to participate in congestion avoidance without the overhead of reliability guarantees.[7] Central to DCCP's objectives is the provision of minimal mechanisms focused solely on congestion control, avoiding features like retransmissions or in-order delivery to maintain efficiency and scalability.[8] It supports variable-rate flows, such as those in multimedia streaming, by incorporating congestion control profiles like TCP-like (CCID 2) for bursty traffic and TCP-Friendly Rate Control (TFRC, CCID 3) for smoother, rate-based transmission.[9] Additionally, DCCP emphasizes flexibility through reliable feature negotiation, allowing endpoints to agree on options like congestion control methods and packet loss tolerance during connection setup.[10] These goals ensure that DCCP can adapt to diverse application needs while promoting fair resource sharing on the Internet.[7] The motivations for DCCP arose from persistent Internet congestion problems documented since the 1980s, exacerbated in the 1990s and early 2000s by the growth of bandwidth-intensive datagram traffic.[9] Early incidents, such as those analyzed in Van Jacobson's seminal work on congestion avoidance, highlighted the need for end-to-end controls to prevent router overload and packet drops.[9] This led to IETF efforts to create UDP-like protocols with "TCP-friendly" congestion control, as outlined in specifications like RFC 2581 for TCP congestion and RFC 3168 for Explicit Congestion Notification (ECN).[9][11] DCCP's core design principles reinforce these objectives through unreliable delivery, where datagrams are sent without guarantees of arrival or order, prioritizing timely transmission over completeness.[7] It integrates ECN to allow routers to signal incipient congestion via marked packets, enabling proactive rate reduction without packet loss.[12] Furthermore, the protocol handles half-open connections—common in unidirectional or interrupted flows—using synchronization packets and sequence numbers to resynchronize endpoints robustly, ensuring graceful recovery from disruptions.[13] These principles collectively aim to foster a stable, efficient Internet for emerging datagram applications.[7]Key Features
The Datagram Congestion Control Protocol (DCCP) provides support for unreliable, congestion-controlled datagram delivery over IP networks, enabling bidirectional unicast connections that incorporate congestion avoidance mechanisms while preserving the datagram-oriented nature of UDP.[14] This design fills a gap between UDP, which lacks any congestion control, and TCP, which enforces reliability through byte-stream delivery, by offering a lightweight protocol suitable for applications like streaming media or telephony that prioritize timeliness over perfect reliability.[7] DCCP mandates the use of congestion control through pluggable profiles known as Congestion Control IDs (CCIDs), allowing endpoints to select mechanisms such as the TCP-like CCID 2 for aggressive throughput or the TCP-friendly rate-based CCID 3 for smoother rate adjustments in variable-bandwidth scenarios.[9] These profiles are negotiated independently for each direction of the connection, ensuring flexibility and adherence to network fairness principles without imposing a one-size-fits-all approach.[15] During connection establishment, DCCP facilitates feature negotiation using Change and Confirm options, which enable reliable agreement on parameters such as Explicit Congestion Notification (ECN) capability and acknowledgment frequency, with safeguards against reordering through sequence number validation.[10] This mechanism supports half-connection states, where each unidirectional data flow operates semi-independently to accommodate firewalls and Network Address Translation (NAT) devices, while providing distinct acknowledgment modes—ranging from per-packet feedback to cumulative summaries—for efficient sender-side loss detection and congestion response.[16][12] DCCP integrates seamlessly with ECN, allowing routers to signal incipient congestion via marked packets rather than drops, thereby enabling proactive rate adjustments and reducing latency in loss-sensitive applications.[17] Unlike TCP's byte-stream model, DCCP treats packets as self-contained datagrams, each bearing 48-bit sequence numbers that increment per packet for ordering, loss detection, and security against replay attacks, thus maintaining packet boundaries and supporting variable-sized payloads without fragmentation concerns at the transport layer.[18]History and Standardization
Development
The development of the Datagram Congestion Control Protocol (DCCP) originated in the early 2000s within the IETF Transport Area, driven by the need to provide congestion control for unreliable datagram flows in multimedia applications such as streaming media and voice over IP, where timeliness is prioritized over delivery guarantees.[19] These applications often relied on UDP, which lacked built-in congestion avoidance, leading to potential network congestion collapse as Internet traffic grew.[19] The effort built on prior research into equation-based congestion control mechanisms, aiming to enable UDP-like simplicity while incorporating TCP-friendly rate control to coexist fairly with existing traffic.[20] Key contributors to DCCP's design included Eddie Kohler of UCLA, Mark Handley of University College London, and Sally Floyd of the ICSI Center for Internet Research, who collaborated under National Science Foundation support to produce the initial protocol specification.[21] The first Internet Draft outlining the core protocol, draft-kohler-dcp-00, was published in July 2001, introducing concepts like modular congestion control profiles and explicit connection setup for unreliable transport.[22] This early work addressed limitations in UDP by integrating feedback mechanisms for loss detection and rate adjustment, without the overhead of TCP's reliability features. The IETF formalized the project by chartering the DCCP Working Group in June 2002, tasking it with standardizing a minimal transport protocol for bidirectional, congestion-controlled datagrams suitable for real-time applications.[23] During development, DCCP maintained experimental status through multiple iterations of drafts, allowing for iterative testing and refinement from 2001 to 2006.[24] A primary motivation was mitigating UDP's congestion issues while avoiding the delays inherent in TCP's retransmissions, drawing from earlier explorations of congestion control for non-reliable flows.[19] The protocol's designers emphasized modularity, enabling pluggable congestion control IDs (CCIDs) based on established IETF mechanisms like TCP-like or TFRC profiles.[21] Significant challenges arose in balancing DCCP's minimalist design—limited to essential features like connection management and acknowledgments—with robustness against sequence number attacks, synchronization issues, and varying network conditions.[21] Extensive simulations and implementations were conducted to verify TCP-friendliness, ensuring DCCP flows did not unfairly consume bandwidth relative to TCP under the same conditions, as required by IETF guidelines.[25] For instance, testing focused on representative scenarios like bulk transfers and variable-bitrate streaming to validate low-latency performance without exacerbating congestion.[26] The DCCP Working Group achieved a major milestone with the publication of RFC 4340 in March 2006, which advanced the protocol to Proposed Standard status and detailed its core operations, including packet types and feature negotiation.[26] Accompanying RFCs, such as 4341 for TCP-like congestion control and 4342 for TFRC, completed the initial suite. Following these releases, the group shifted to maintenance tasks, including errata resolution and minor extensions, with active milestones completed by mid-2008. The WG was formally concluded in November 2012, signifying the protocol's maturity after over a decade of collaborative evolution.[27]RFCs and Specifications
The primary specification for the Datagram Congestion Control Protocol (DCCP) is RFC 4340, published in March 2006, which defines the core protocol including connection management, packet types, feature negotiation, and the framework for congestion control via pluggable Congestion Control IDs (CCIDs).[26] This document establishes DCCP as a transport-layer protocol offering unreliable, congestion-controlled delivery for applications like streaming media.[26] Supporting RFCs detail specific aspects and profiles. RFC 4341, also from March 2006, specifies CCID 2 for TCP-like congestion control, emulating TCP's congestion window and loss-based adjustments to provide familiarity for developers while adapting to datagram semantics.[28] RFC 4342, published concurrently, defines CCID 3 using TCP-Friendly Rate Control (TFRC), a rate-based mechanism that aims for smooth throughput and fairness with TCP over varying loss rates, particularly beneficial for real-time applications. Error detection in DCCP, including partial checksum coverage to allow discarding only corrupted portions of packets, is integrated into the core specification in RFC 4340.[26] Subsequent RFCs extend the protocol's capabilities. RFC 5622, issued in August 2009, introduces CCID 4 as a small-packet variant of TFRC (TFRC-SP), optimized for scenarios with frequent small datagrams like voice-over-IP by adjusting loss event detection for shorter feedback intervals.[29] RFC 4336 from March 2006 outlines the problem statement motivating DCCP's design, highlighting needs for congestion control in unreliable datagram flows without TCP's reliability overhead. Ack Vectors, which enable efficient acknowledgment of non-contiguous packet reception using run-length encoding, are specified in RFC 4340.[26] RFC 5595 (September 2009) and RFC 5596 (September 2009) specify DCCP service codes and handling of slow receivers, respectively, to improve multimedia flow support and interoperability.[30][31] RFC 6335 (August 2011) updates IANA procedures for managing service names and transport protocol port numbers, including for DCCP.[32] RFC 6773 (November 2012) defines a UDP encapsulation (DCCP-UDP) to facilitate NAT traversal.[33] The DCCP specifications have remained stable since 2012, with no major overhauls but ongoing minor clarifications through errata; for instance, RFC 4342 was updated by RFC 5348 in 2008 for CCID 3 parameter refinements. These documents emerged from the IETF DCCP Working Group efforts in the mid-2000s to address gaps in UDP and TCP for multimedia transport.Protocol Operation
Connection Setup and Teardown
The Datagram Congestion Control Protocol (DCCP) establishes connections through a multi-packet handshake that ensures synchronization and security without requiring full state allocation on the server until confirmation. The process begins with the client sending a DCCP-Request packet, which includes a 32-bit Service Code identifying the application-level service and a random 48-bit initial sequence number (with the header X bit set to 1 indicating full 48-bit length) to initiate ordering and provide security through unpredictability.[34][35] The server responds with a DCCP-Response packet acknowledging the client's sequence number via the Global Sequence Number (GSR) and echoing the Service Code, thereby partially confirming the request while optionally including an Init Cookie for added security.[34][36] To complete the handshake, the client sends a DCCP-Ack packet acknowledging the server's sequence number and, if present, echoing the Init Cookie back to the server. This step transitions the connection from unconfirmed states—such as REQUEST on the client side after sending DCCP-Request or RESPOND on the server after DCCP-Response—to active states like OPEN or ESTABLISHED, often via a transitional PARTOPEN state.[37][38] The Init Cookie mechanism serves as a security feature against denial-of-service attacks like SYN floods by delaying server resource allocation until the client demonstrates commitment through this echo, without significantly impacting legitimate connections.[39] Sequence numbers play a critical role throughout, incrementing per packet to detect losses, prevent replay attacks, and verify endpoint validity during these initial exchanges.[40] Half-open connections arise during setup if the server sends a DCCP-Response without allocating full connection state, awaiting the client's DCCP-Ack for final confirmation; this design minimizes vulnerability to resource exhaustion. Feature negotiation, including selection of congestion control profiles, occurs reliably within these handshake packets using Change and Confirm options.[41][42] Connection teardown in DCCP follows a structured process to ensure graceful closure or abrupt termination as needed. Due to the client-server asymmetry, normal closure differs based on which endpoint initiates. If the server initiates, it sends a DCCP-CloseReq packet to request closure, prompting the client to respond with a DCCP-Close packet; the server then sends a DCCP-Reset packet with Reset Code 1 ("Closed") to finalize the teardown. If the client initiates, it sends a DCCP-Close packet directly, and the server responds with a DCCP-Reset packet with Code 1 ("Closed").[43][44] In both cases, the receiver of the Reset enters the TIMEWAIT state for 2*MSL (typically 4 minutes) to handle stray packets, while the sender transitions to CLOSED. For abrupt termination, such as in error conditions, a DCCP-Reset with codes like 2 ("Aborted") or 3 ("No Connection") can be sent unilaterally without prior exchanges.[45] The overall state machine governs these transitions, starting from unconfirmed initiation states and progressing to active data-ready states upon handshake completion, then to closure upon teardown signals, ensuring reliable endpoint synchronization throughout.[46]Data Transfer
In DCCP, data transfer occurs once a connection is established, relying on specific packet types to exchange application datagrams without the reliability guarantees of TCP. The primary packets used are DCCP-Data for transmitting application data without acknowledgment, DCCP-DataAck for combining data with piggybacked acknowledgments, and DCCP-Ack for standalone acknowledgments when no data is sent. DCCP-Sync packets assist in resynchronizing sequence numbers after potential losses, ensuring alignment for ongoing data flow. These packets enable unreliable, congestion-controlled datagram delivery suitable for applications like streaming media or telephony.[37][47] Sequence numbers in DCCP increment by one for each sent packet, rather than per byte, facilitating loss detection within defined windows without requiring retransmissions. A sequence validity window, bounded by Sequence Window Low (SWL) and Sequence Window High (SWH) values, determines whether incoming packets are valid; the default window size is 100, with a minimum of 32 and a maximum of 2^46 - 1. Receivers use an Ack Vector—a run-length encoded structure—to report loss history based on these windows, allowing senders to detect gaps in sequence numbers indicative of dropped packets. This approach prioritizes forward progress over recovery, distinguishing DCCP from retransmission-based protocols. Out-of-order or duplicate packets are handled through sequence validity checks: valid duplicates are typically ignored unless explicitly marked as lost in prior acknowledgments, while invalid packets (outside the SWL-SWH window) trigger a Sync exchange to realign sequences.[18][48][49][50] Acknowledgment modes in DCCP provide flexibility to balance feedback overhead and reverse-path congestion. In Send Ack mode, the receiver acknowledges every valid packet immediately upon processing its header, using DCCP-SyncAck or full Ack Vectors for cumulative feedback, which is negotiated via feature options. Alternatively, Ack Ratio mode allows the sender to control acknowledgment frequency—defaulting to 1 acknowledgment per 2 data packets—to reduce load on the return path, mimicking TCP-like behavior while adapting to congestion signals. The Ack Vector enhances both modes by encoding detailed loss intervals, such as runs of received or lost packets, enabling precise feedback without excessive bandwidth use.[51][52][53] Application payloads integrate directly into DCCP without segmentation or reassembly at the transport layer; datagrams are passed as-is from the application to the protocol, encapsulated in Data or DataAck packets for transmission. This preserves the datagram-oriented nature of UDP while adding congestion control, ensuring payloads arrive intact or are discarded entirely based on network conditions. During transfer, rate limiting is imposed through congestion signals, such as ECN markings or Data Dropped options conveyed via acknowledgments, which adjust sending rates in coordination with the selected congestion control profile.[47][54]Packet Format
Header Structure
The Datagram Congestion Control Protocol (DCCP) employs a generic packet header that forms the core of every DCCP packet, consisting of a fixed 12-byte structure when using 24-bit sequence numbers or an extended 16-byte structure when using 48-bit sequence numbers.[55] This header includes essential fields for addressing, integrity, and basic protocol control, but excludes congestion control identifiers (CCIDs) and negotiable options, which are handled separately.[56] The header begins with 16-bit source and destination ports to identify endpoints, followed by an 8-bit data offset field indicating the header length in 32-bit words (typically 3 for the basic header, up to 15 including options).[56] Next are a 4-bit CCVal field for congestion control-specific values and a 4-bit CsCov field specifying checksum coverage (0 for full coverage of header, options, and data; 1-15 for partial coverage excluding some data bytes).[56] A 16-bit checksum follows, computed over the covered portions using the TCP/IP checksum algorithm.[57] The header then includes 3 reserved bits (set to 0), a 4-bit Type field defining the packet type (values 0-15), and a 1-bit X flag indicating extended sequence numbers.[56] The sequence number field occupies 24 bits when X=0 or 48 bits when X=1, with the latter split into low 24 bits in the basic header and high 24 bits in an additional 32-bit word (padded if needed).[58] DCCP defines 16 packet types via the Type field, enabling distinct functions such as connection initiation and data acknowledgment; for example, type 0 (DCCP-Request) starts a connection, type 2 (DCCP-Data) carries application data, type 3 (DCCP-Ack) provides acknowledgments, and types 10-15 are reserved.[34] These types determine additional variable-length fields immediately following the generic header; notably, a 32-bit service code appears in DCCP-Request and DCCP-Response packets to identify the requested application service.[59] The CsCov field further influences variable coverage for the checksum, allowing senders to exclude trailing data bytes for performance in lossy networks.[60] Sequence numbers are 48-bit values when extended mode is used, generated by incrementing a counter by 1 for each outgoing packet and applying circular arithmetic modulo 2^48 to ensure long-term uniqueness across connections.[61] The initial sequence number is chosen randomly or based on a timestamp to avoid predictability, supporting loss detection without byte-stream semantics.[61] No options are part of the generic header itself; instead, they are appended after type-specific fields in a variable-length section for extensibility.[56] The layout of the basic 12-byte generic header (X=0) can be represented as follows:0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port | Destination Port |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data Offset | CCVal | CsCov | [Checksum](/page/Checksum) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved (3) | Type (4) |X| Sequence Number (24) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port | Destination Port |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data Offset | CCVal | CsCov | [Checksum](/page/Checksum) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved (3) | Type (4) |X| Sequence Number (24) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Options and Features
DCCP employs a flexible options mechanism to negotiate and extend protocol behavior, allowing endpoints to customize aspects of the connection such as congestion notification and acknowledgment frequency. Each option follows a standardized format: an 8-bit Kind field identifies the option type (ranging from 0 to 255), followed by an optional 8-bit Length field (present if Kind > 31) that specifies the total option size in bytes (minimum 2), and a variable-length Value field containing the specific data.[63] Options are placed in the variable-length Options section following the fixed header in DCCP packets.[63] Negotiation distinguishes between mandatory and changeable options; mandatory options, prefixed with the Mandatory option (Kind 1), require compliance, while changeable options support dynamic adjustment.[64] The negotiation process uses Offer/Change options to propose values during connection handshakes or ongoing communication, with Confirm options in responses to acknowledge agreements.[41] For changeable features, endpoints initiate changes via Change L (left-to-right, Kind 32) or Change R (right-to-left, Kind 34) options, which are retransmitted until confirmed, and responses use Confirm L (Kind 33) or Confirm R (Kind 35).[41] Conflicts in negotiation are resolved through reconciliation rules for changeable options, but unnegotiable mandatory options trigger a connection reset with Reset Code 6 (Unnegotiable Mandatory).[65] Invalid options, such as those with incorrect lengths, may result in an empty Confirm or a reset with Reset Code 5 (Option Error).[66] Key features negotiated via options include Explicit Congestion Notification (ECN) capability, which enables receivers to report congestion using the Ack Vector option (Kinds 38 or 39) without relying on packet loss; the initial value is 0 (not capable), but it can be set to 1 (capable) during negotiation.[50] The ACK Ratio feature (feature number 5) controls how often acknowledgments are sent, defaulting to 2 (one ACK per two data packets), and supports values from 1 to 65535 to balance feedback overhead.[52] The Sequence Window (feature number 3) defines the range for packet ordering and duplicate detection, initialized to 100 and adjustable from 32 to 2^46-1.[48] Loss tolerance is addressed through the Data Dropped option (Kind 40), which reports dropped packets with codes indicating reasons like protocol constraints (code 0) or buffer overflow (code 1).[54] Specific options enhance reliability and security; the Slow Receiver option (Kind 2) signals receiver overload, prompting the sender to maintain its current rate for approximately one round-trip time to avoid overwhelming slow starts.[67] The Init Cookie option (Kind 36) provides denial-of-service protection by including a server-generated cookie in the DCCP-Response packet, verifying the client's legitimacy during connection setup.[39] Standard options defined in RFC 4340 are categorized by Kind values, with global options (0-127) applicable universally, feature-specific options (128-191) for negotiation like ECN or ACK Ratio, and receiver options (192-255) for endpoint-specific extensions.[68] The following table lists key standard options:| Kind | Name | Length (Bytes) | Description |
|---|---|---|---|
| 0 | Padding | Variable | Pads packets for alignment. |
| 1 | Mandatory | Variable | Prefixes mandatory options. |
| 2 | Slow Receiver | 1 | Indicates receiver pacing needs. |
| 32 | Change L | Variable | Proposes left-to-right feature change. |
| 33 | Confirm L | Variable | Acknowledges left-to-right change. |
| 34 | Change R | Variable | Proposes right-to-left feature change. |
| 35 | Confirm R | Variable | Acknowledges right-to-left change. |
| 36 | Init Cookie | Variable | Cookie for setup validation. |
| 37 | NDP Count | 3-8 | Counts non-data packets for diversity. |
| 38/39 | Ack Vector | Variable | Encodes acknowledgments and ECN feedback. |
| 40 | Data Dropped | Variable | Reports dropped data with codes. |
| 128-191 | Feature | Variable | Negotiates protocol features (e.g., ECN=4). |
