]> sjero.net Git - iperf/commit
Bring DiffServ codepoint support up-to-date
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Tue, 24 Feb 2009 19:50:23 +0000 (20:50 +0100)
committerGerrit Renker <gerrit@erg.abdn.ac.uk>
Tue, 24 Feb 2009 19:50:23 +0000 (20:50 +0100)
commit4a61594d8e95e2d9662816ae595f8257b69012eb
tree70a14baa50d559d017ff2aa01f6714f0dd21ac10
parent45b167d420c535f754203fbce29a893b0ca0aae2
Bring DiffServ codepoint support up-to-date

The -S/--tos argument currently only supports IPv4 TOS, for IPv6 a different
socket option is used. Both uses are unified through the definition of the
DiffServ codepoint in RFC 2474 (the two unused bits are used for ECN marking
and can not normally be influenced via socket options).

This patch
 * adds (conditional) support for IPv4/v6 socket options to set the DSCP;
 * adds an extra type argument mSockAF to remember the address family
   of mSock (to allow address-family-dependent TOS);
 * fixes a ToDo to support base-2 numbers for the DSCP string;
 * validates the numeric argument;
 * replaces the older IPv4-based `--tos' option with `--dscp'
   and the environment variable `IPERF_TOS' with `IPERF_DSCP'.

The argument types that are now supported are
 # iperf -c server -S 0x1f # hex string
 # iperf -c server -S 017 # octal string (=0xf)
 # iperf -c server -S 42 # decimal string
 # iperf -c server -S 011011 # binary string (must be 6 digits)
src/Locale.c
src/PerfSocket.cpp
src/Settings.cpp