]> sjero.net Git - iperf/commit
DCCP support for iperf
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Tue, 24 Feb 2009 19:31:15 +0000 (20:31 +0100)
committerGerrit Renker <gerrit@erg.abdn.ac.uk>
Tue, 24 Feb 2009 19:31:15 +0000 (20:31 +0100)
commit90fc1e2c0c74319759b21d4a177c32691b88fdf3
tree4fdc01b04fcebf41f5ebc7df6e2fa3ea08feb854
parentfad82d47d76abc8f4ac6767e58b89859ad35a2ca
DCCP support for iperf

This adds DCCP support for iperf, based on a patch developed by Ian and
later much modified and extended by myself.
When applied, DCCP can be used as transport protocol via the `-d' option.

It knows two modes:

 (1) Bytestream Mode
     This is the default and works as in TCP. The application tries to
     stuff as many bytes into the socket as possible. This is good for
     performance tests with DCCP CCID2, but detrimental in combination
     with DCCP CCID3, since it invariably pushes the sending rate beyond
     controllable limits.

 (2) Packet-oriented mode
     This is enabled by setting the `-b' option in addition to `-d' and
     sets up, as before, a constant bitrate datagram stream. This option
     (also as before) understands the format specifiers `k' for kilobits/sec
     and `m' for megabits/sec. If the optional argument to `-b' is omitted,
     then a default of 1 megabit/sec is used.
     Note that when using this mode, it needs to be enabled both on the
     sender and the receiver.

The changes I added were:
 * made counting of packets work consistently across UDP and DCCP;
 * enabled UDP-like reporting of statistics also for DCCP;
 * rewrote the algorithm to compute the inter-packet-gap in CBR mode:
   - in DCCP it tried to stuff the pipe without accounting for the time
     it spent, thus producing more packets than specifie
   - in tests this was observed to cause overflow
   - the algorithm now measures the actual inter-packet gap of each packet
     and compares it to the target; adjusting for each send time
   - it is more accurate than the previous implementation, in particular
     so for DCCP
 * fixed a bug which resulted in disabling IPv6 (the order of statements
   in Client::Connect() is important; the local socket must be initialised
   first for IPv6 to work).
23 files changed:
compat/error.c
include/Client.hpp
include/Locale.h
include/PerfSocket.hpp
include/Reporter.h
include/Server.hpp
include/Settings.hpp
include/headers.h
include/util.h
include/version.h
src/Client.cpp
src/Extractor.c
src/Listener.cpp
src/Locale.c
src/PerfSocket.cpp
src/ReportDefault.c
src/Reporter.c
src/Server.cpp
src/Settings.cpp
src/main.cpp
src/sockets.c
src/stdio.c
src/tcp_window_size.c