summaryrefslogtreecommitdiff
path: root/usr.bin/tcpbench
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2018-05-10 14:19:04 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2018-05-10 14:19:04 +0000
commit0993f3a2efeeceeafefa8563a8c123d791779ac4 (patch)
treeefb31f497edcf82851beab1ed34dc69a73e6dc50 /usr.bin/tcpbench
parentc9186689e439e2c0e22d14dd70531f4503b5f7a4 (diff)
Do not mention TCP in tcpbench comments and error messages regarding
socket buffer sizes. They affect TCP, UDP, and UNIX. pointed out by Nan Xiao
Diffstat (limited to 'usr.bin/tcpbench')
-rw-r--r--usr.bin/tcpbench/tcpbench.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tcpbench/tcpbench.c b/usr.bin/tcpbench/tcpbench.c
index f5b11ccb810..2711e23fb23 100644
--- a/usr.bin/tcpbench/tcpbench.c
+++ b/usr.bin/tcpbench/tcpbench.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcpbench.c,v 1.53 2018/05/10 13:53:05 benno Exp $ */
+/* $OpenBSD: tcpbench.c,v 1.54 2018/05/10 14:19:03 bluhm Exp $ */
/*
* Copyright (c) 2008 Damien Miller <djm@mindrot.org>
@@ -63,7 +63,7 @@
/* Our tcpbench globals */
struct {
- int Sflag; /* Socket buffer size (tcp mode) */
+ int Sflag; /* Socket buffer size */
u_int rflag; /* Report rate (ms) */
int sflag; /* True if server */
int Tflag; /* ToS if != -1 */
@@ -783,7 +783,7 @@ server_init(struct addrinfo *aitop, struct statctx *udp_sc)
if (ptb->Sflag) {
if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF,
&ptb->Sflag, sizeof(ptb->Sflag)) == -1)
- warn("set receive buffer size");
+ warn("set receive socket buffer size");
}
if (TCP_MODE) {
if (listen(sock, 64) == -1) {
@@ -895,7 +895,7 @@ client_init(struct addrinfo *aitop, int nconn, struct statctx *udp_sc,
if (ptb->Sflag) {
if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF,
&ptb->Sflag, sizeof(ptb->Sflag)) == -1)
- warn("set TCP send buffer size");
+ warn("set send socket buffer size");
}
if (connect(sock, ai->ai_addr, ai->ai_addrlen) != 0) {
if (ai->ai_next == NULL)
@@ -1065,7 +1065,7 @@ main(int argc, char **argv)
ptb->Sflag = strtonum(optarg, 0, 1024*1024*1024,
&errstr);
if (errstr != NULL)
- errx(1, "receive space interval is %s: %s",
+ errx(1, "socket buffer size is %s: %s",
errstr, optarg);
break;
case 'B':