Penguin
Note: You are viewing an old revision of this page. View the current version.

Acronym for Datagram Congestion Control Protocol.

DCCP is a transport level protocol (like TCP and UDP) which aims to solve many different congestion issues. This is useful for applications that don't need the data reliability/re-transmission of TCP, but want a session and want congestion control unlike UDP.

DCCP is currently at draft RFC status.

The main reference page on the web for DCCP is here: http://www.icir.org/kohler/dcp/

There is also a writeup at LWN.

DCCP stack for Linux

Much of this page is shifting to http://linux-net.osdl.org/index.php/DCCP - that page is considered the definitive reference for the DCCP implementation for Linux.

There is a GPL version of DCCP being produced at present for the LinuxKernel. This is being maintained by ArnaldoMelo at present. The history of this is that it draws from the code of Patrick McManus, Lulea and the WAND group that IanMcDonald is part of. The status of this is that it has been accepted by LinusTorvalds into his 2.6.14 tree.

The core DCCP stack was written by ArnaldoMelo using the Linux TCP implementation as a model, with DCCP being used as a way to identify code in the TCP implementation that could be made generic and shared with other INET transport level implementations. This resulted in the generalisation of code related to the minisockets representing both TCP_SYN_RECV/DCCP_RESPOND and TCP_TIME_WAIT/DCCP_TIME_WAIT status, code related to established/timewait/listen sockets (inet_lookup, inet_lookup_established, etc), the interface to get sock information (tcp_diag), and many other functions and data structures, with more expected to be generalised and eventually used by SCTP and any other INET transport protocols that may be introduced in the future.

The CCID3 code was, as IanMcDonald mentioned, drawn from the WAND group, that in turn got it initially from the Lulea FreeBSD codebase and made it work in the core DCCP stack written by Patrick McManus. It was modified by ArnaldoMelo to fit Linux standards wrt list handling and several other aspects.

The CCID modular infrastructure was written to fit the CCID3 existing interface, but will probably be changed in the near future in the effort to have a generic CA (Congestion Avoidance) infrastructure shared with TCP (and others, who knows), continuing work on the existing TCP CA infrastructure put in place by Stephen Hemminger.

To have a look at the theoretical performance of CCID3 see http://wand.net.nz/iam4/dccp/xcalc.sxc - the codebase currently assumes s=256, unless you override with an option.

TcpDump support

TcpDump now has DCCP support in the tree. There is TcpDump support available at http://wand.cs.waikato.ac.nz/iam4/dccp/tcpdump8.diff for older versions. This applies to many versions and at least the weekly build from CVS of tcpdump dated 22nd August 2005. Remember to run tcpdump(8) with a -s0 parameter to capture all data (or some other value) as the default size gets the base DCCP header, but not the options, in many cases.

Ethereal support and FreeBSD support (with sample programs)

See http://www.jp.nishida.org/dccp/

TIMEWAIT sockets

Arnaldo writes: TIMEWAIT sockets are finally implemented and we have initial support for iproute2, so just enable INET_DIAG and if enabled as a module make sure it is load prior to using the iproute2 utilities, like ss.

The latest iproute2 version, available at: http://developer.osdl.org/dev/iproute2/download/iproute2-ss050901.tar.bz2 now includes DCCP support directly.

Then use it:

[root@qemu ~]# ./ss -dane
State       Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN      0      0                  *:5001             *:*      ino:730 sk:cfd503a0
ESTAB       0      0          127.0.0.1:5001     127.0.0.1:32770  ino:731 sk:cfd51480
ESTAB       0      0          127.0.0.1:32770    127.0.0.1:5001   ino:741 sk:cfd517e0
[root@qemu ~]#
[root@qemu ~]# ./ss -dane
State       Recv-Q Send-Q Local Address:Port Peer Address:Port
TIME-WAIT   0      0          127.0.0.1:32770   127.0.0.1:5001    timer:(timewait,59sec,0)
                                                                  ino:0 sk:cf12a620

The above listing was with the ttcp test.

Netcat support

A patch for NetCat is available at http://oops.ghostprotocols.net:81/dccp/netcat-0.7.1.dccp.patch or http://wand.net.nz/iam4/dccp/netcat-0.7.1.dccp.patch . The version of NetCat that this is used against is 0.71 from http://netcat.sf.net and was used on 8th September for, what we believe to be, the first public transmission of DCCP over the InterNet.

Mailing List Archives

http://www1.ietf.org/mail-archive/web/dccp/current/index.html - A discussion of the DCCP protocol by the IETF

http://www.mail-archive.com/dccp@vger.kernel.org/ - a discussion of the Linux implementation of DCCP

To do & testing

There is a Todo list also which tracks the issues needing working on.

There is a DCCPTesting? page which also talks about the status of testing in DCCP.

There is sample code at http://wand.net.nz/iam4/dccp/sample/ that uses the mmap interface for the 2.4 kernel. Don't try using it on Linux 2.6!!

There is a simple client server application written using DCCP at http://wand.net.nz/iam4/dccp/dccp-cs-0.01.tar.bz2

There are a couple of ttcp implementations for DCCP available for the 2.6 LinuxKernel:

gcc ttcp_acme.c -o ttcp_acme -I ~/linuxsrc/dccpwork/include/

change is:

-#include <netinet/tfrc.h>
+// #include <netinet/tfrc.h>
+#include <linux/tfrc.h>

Iperf

There is an Iperf patch available here

FAQ

Q: Why do I get an errno 13 (EACCES) or permission denied?
A: You are running SELinux which does not yet have DCCP support. Disable SELinux.

Q: Why do I get an errno 71 (EPROTO) or Protocol error?
A: It might be because you haven't set the service option which is compulsory. Sample code below:

#define SOL_DCCP 269
#define DCCP_SOCKOPT_SERVICE 2

void SetDCCPSocketOptions( thread_Settings *inSettings ) {
        char *dummy_svc = "junk";
        Socklen_t len = sizeof(dummy_svc);
        int rc;

        rc = setsockopt( inSettings->mSock, SOL_DCCP, DCCP_SOCKOPT_SERVICE,
                                 (char*) &dummy_svc, len );
}

For more details, ask IanMcDonald from the WandGroup.

See also:


CategoryProtocols