aboutsummaryrefslogtreecommitdiffstats
path: root/apps/hiperf/src/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apps/hiperf/src/main.cc')
-rw-r--r--apps/hiperf/src/main.cc43
1 files changed, 24 insertions, 19 deletions
diff --git a/apps/hiperf/src/main.cc b/apps/hiperf/src/main.cc
index b69392de8..9c0f0a140 100644
--- a/apps/hiperf/src/main.cc
+++ b/apps/hiperf/src/main.cc
@@ -146,7 +146,7 @@ void usage() {
std::cerr << "-g\t<port>\t\t\t\t"
<< "Output stream to localhost at the specified port" << std::endl;
std::cerr << "-e\t<strategy>\t\t\t"
- << "Enance the network with a realiability strategy. Options 1:"
+ << "Enhance the network with a reliability strategy. Options 1:"
<< " unreliable, 2: rtx only, 3: fec only, "
<< "4: delay based, 5: low rate, 6: low rate and best path "
<< "7: low rate and replication, 8: low rate and best"
@@ -187,9 +187,10 @@ int main(int argc, char *argv[]) {
int opt;
#ifndef _WIN32
+ // Please keep in alphabetical order.
while ((opt = getopt(argc, argv,
- "DSCf:b:d:W:RM:c:vA:s:rm:lK:k:y:p:hi:xE:P:B:ItL:z:T:F:j:"
- "g:G:e:awHn:X:u:")) != -1) {
+ "A:B:CDE:F:G:HIK:L:M:P:RST:U:W:X:ab:c:d:e:f:g:hi:j:k:lm:"
+ "n:p:rs:tu:vwxy:z:")) != -1) {
switch (opt) {
// Common
case 'D': {
@@ -222,11 +223,10 @@ int main(int argc, char *argv[]) {
break;
}
#else
- while (
- (opt = getopt(
- argc, argv,
- "SCf:b:d:W:RM:c:vA:s:rm:lK:k:y:p:hi:xB:E:P:tL:z:F:j:e:awHn:X:u:")) !=
- -1) {
+ // Please keep in alphabetical order.
+ while ((opt = getopt(argc, argv,
+ "A:B:CE:F:HK:L:M:P:RSU:W:X:ab:c:d:e:f:hi:j:k:lm:n:p:rs:"
+ "tu:vwxy:z:")) != -1) {
switch (opt) {
#endif
case 'f': {
@@ -243,16 +243,16 @@ int main(int argc, char *argv[]) {
server_configuration.aggregated_data_ = true;
break;
}
- case 'X': {
- client_configuration.fec_type_ = std::string(optarg);
- server_configuration.fec_type_ = std::string(optarg);
- break;
- }
case 'w': {
client_configuration.packet_format_ = Packet::Format::HF_INET6_UDP;
server_configuration.packet_format_ = Packet::Format::HF_INET6_UDP;
break;
}
+ case 'k': {
+ server_configuration.passphrase = std::string(optarg);
+ client_configuration.passphrase = std::string(optarg);
+ break;
+ }
case 'z': {
config.name = optarg;
break;
@@ -271,11 +271,6 @@ int main(int argc, char *argv[]) {
role += 1;
break;
}
- case 'k': {
- server_configuration.passphrase = std::string(optarg);
- client_configuration.passphrase = std::string(optarg);
- break;
- }
// Client specifc
case 'b': {
@@ -324,7 +319,12 @@ int main(int argc, char *argv[]) {
break;
}
case 'u': {
- client_configuration.unverified_delay_ = std::stoul(optarg);
+ client_configuration.unverified_interval_ = std::stoul(optarg);
+ options = 1;
+ break;
+ }
+ case 'U': {
+ client_configuration.unverified_ratio_ = std::stod(optarg);
options = 1;
break;
}
@@ -419,6 +419,11 @@ int main(int argc, char *argv[]) {
options = 1;
break;
}
+ case 'X': {
+ server_configuration.fec_type_ = std::string(optarg);
+ options = -1;
+ break;
+ }
case 'h':
default:
usage();