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)