Minor follow-ups to #508.
Change the internal command-line option code for --dscp from the literal '5' to a constant defined as OPT_DSCP. Add manpage text for --dscp option. Tweak help text for --dscp (while here, fix problem in --tos text).
Этот коммит содержится в:
родитель
a68712c7a8
Коммит
05600c201a
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user