aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/iperf3.15
-rwxr-xr-xsrc/iperf_api.c4
-rwxr-xr-xsrc/iperf_api.h1
-rw-r--r--src/iperf_locale.c6
4 files changed, 10 insertions, 6 deletions
diff --git a/src/iperf3.1 b/src/iperf3.1
index 9d362a5..2d89f11 100644
--- a/src/iperf3.1
+++ b/src/iperf3.1
@@ -171,7 +171,10 @@ only use IPv4
only use IPv6
.TP
.BR -S ", " --tos " \fIn\fR"
-set the IP 'type of service'
+set the IP type of service
+.TP
+.BR "--dscp " \fIdscp\fR
+set the IP DSCP bits. Both numeric and symbolic values are accepted.
.TP
.BR -L ", " --flowlabel " \fIn\fR"
set the IPv6 flow label (currently only supported on Linux)
diff --git a/src/iperf_api.c b/src/iperf_api.c
index 1f08937..73b8e5a 100755
--- a/src/iperf_api.c
+++ b/src/iperf_api.c
@@ -645,7 +645,7 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv)
{"version4", no_argument, NULL, '4'},
{"version6", no_argument, NULL, '6'},
{"tos", required_argument, NULL, 'S'},
- {"dscp", required_argument, NULL, '5'},
+ {"dscp", required_argument, NULL, OPT_DSCP},
#if defined(HAVE_FLOWLABEL)
{"flowlabel", required_argument, NULL, 'L'},
#endif /* HAVE_FLOWLABEL */
@@ -852,7 +852,7 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv)
}
client_flag = 1;
break;
- case '5':
+ case OPT_DSCP:
test->settings->tos = parse_qos(optarg);
if(test->settings->tos < 0) {
i_errno = IEBADTOS;
diff --git a/src/iperf_api.h b/src/iperf_api.h
index b75a181..80e169c 100755
--- a/src/iperf_api.h
+++ b/src/iperf_api.h
@@ -53,6 +53,7 @@ struct iperf_stream;
#define OPT_FORCEFLUSH 7
#define OPT_NO_FQ_SOCKET_PACING 9 /* UNUSED */
#define OPT_FQ_RATE 10
+#define OPT_DSCP 11
/* states */
#define TEST_START 1
diff --git a/src/iperf_locale.c b/src/iperf_locale.c
index b054adb..6277808 100644
--- a/src/iperf_locale.c
+++ b/src/iperf_locale.c
@@ -1,5 +1,5 @@
/*---------------------------------------------------------------
- * iperf, Copyright (c) 2014, 2016, The Regents of the University of
+ * iperf, Copyright (c) 2014, 2016, 2017, The Regents of the University of
* California, through Lawrence Berkeley National Laboratory (subject
* to receipt of any required approvals from the U.S. Dept. of
* Energy). All rights reserved.
@@ -148,8 +148,8 @@ 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"
+ " --dscp N or --dscp val set the IP dscp value, either 0-63 or symbolic\n"
#if defined(HAVE_FLOWLABEL)
" -L, --flowlabel N set the IPv6 flow label (only supported on Linux)\n"
#endif /* HAVE_FLOWLABEL */