From f61355e3e161e236a68c88ffa521ceb6718ed11e Mon Sep 17 00:00:00 2001 From: Tobias Klausmann Date: Thu, 16 Nov 2017 18:18:40 +0100 Subject: [PATCH] Make help and manpage a bit clearer about TOS and DSCP values (#670) Since iperf3 uses strtol() to parse these values, the user can specify them with 0 prefix for octals and 0x for hex values. --- src/iperf3.1 | 6 ++++-- src/iperf_locale.c | 9 +++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/iperf3.1 b/src/iperf3.1 index 487b858..b3e5af6 100644 --- a/src/iperf3.1 +++ b/src/iperf3.1 @@ -294,10 +294,12 @@ only use IPv4 only use IPv6 .TP .BR -S ", " --tos " \fIn\fR" -set the IP type of service +set the IP type of service. The usual prefixes for octal and hex can be used, +i.e. 52, 064 and 0x34 all specify the same value. .TP .BR "--dscp " \fIdscp\fR -set the IP DSCP bits. Both numeric and symbolic values are accepted. +set the IP DSCP bits. Both numeric and symbolic values are accepted. Numeric +values can be specified in decimal, octal and hex (see --tos above). .TP .BR -L ", " --flowlabel " \fIn\fR" set the IPv6 flow label (currently only supported on Linux) diff --git a/src/iperf_locale.c b/src/iperf_locale.c index 690ad72..19ba343 100644 --- a/src/iperf_locale.c +++ b/src/iperf_locale.c @@ -156,8 +156,13 @@ const char usage_longstr[] = "Usage: iperf3 [-s|-c host] [options]\n" " -N, --no-delay set TCP/SCTP no delay, disabling Nagle's Algorithm\n" " -4, --version4 only use IPv4\n" " -6, --version6 only use IPv6\n" - " -S, --tos N set the IP type of service, 0-255\n" - " --dscp N or --dscp val set the IP dscp value, either 0-63 or symbolic\n" + " -S, --tos N set the IP type of service, 0-255.\n" + " The usual prefixes for octal and hex can be used,\n" + " i.e. 52, 064 and 0x34 all specify the same value.\n" + + " --dscp N or --dscp val set the IP dscp value, either 0-63 or symbolic.\n" + " Numeric values can be specified in decimal,\n" + " octal and hex (see --tos above).\n" #if defined(HAVE_FLOWLABEL) " -L, --flowlabel N set the IPv6 flow label (only supported on Linux)\n" #endif /* HAVE_FLOWLABEL */