summaryrefslogtreecommitdiffstats
path: root/usr.bin/tcpbench/tcpbench.c
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2018-09-28 19:01:52 +0000
committerbluhm <bluhm@openbsd.org>2018-09-28 19:01:52 +0000
commit711342560b5987dd768b5fbbd5a79557d8b68ad4 (patch)
treec7ba8297289f1cedbf3a531ff449ae98d6472100 /usr.bin/tcpbench/tcpbench.c
parentAlways try to build packet reflector on remote machine. It may be (diff)
downloadwireguard-openbsd-711342560b5987dd768b5fbbd5a79557d8b68ad4.tar.xz
wireguard-openbsd-711342560b5987dd768b5fbbd5a79557d8b68ad4.zip
If tpcbench(8) is startet with -r0 it does not print statistics.
But there was still the header line. Make -r0 really quiet and document the feature. OK deraadt@
Diffstat (limited to 'usr.bin/tcpbench/tcpbench.c')
-rw-r--r--usr.bin/tcpbench/tcpbench.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tcpbench/tcpbench.c b/usr.bin/tcpbench/tcpbench.c
index 0f7ce15e49d..ac79861e0af 100644
--- a/usr.bin/tcpbench/tcpbench.c
+++ b/usr.bin/tcpbench/tcpbench.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcpbench.c,v 1.58 2018/09/28 18:21:26 bluhm Exp $ */
+/* $OpenBSD: tcpbench.c,v 1.59 2018/09/28 19:01:52 bluhm Exp $ */
/*
* Copyright (c) 2008 Damien Miller <djm@mindrot.org>
@@ -281,6 +281,9 @@ print_tcp_header(void)
{
char **kv;
+ if (ptb->rflag == 0)
+ return;
+
printf("%12s %14s %12s %8s ", "elapsed_ms", "bytes", "mbps",
"bwidth");
for (kv = ptb->kvars; ptb->kvars != NULL && *kv != NULL; kv++)