summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/misc.c')
-rw-r--r--crypto/openssh/misc.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/crypto/openssh/misc.c b/crypto/openssh/misc.c
index 4b9e930..fdefb95 100644
--- a/crypto/openssh/misc.c
+++ b/crypto/openssh/misc.c
@@ -1037,34 +1037,3 @@ sock_set_v6only(int s)
error("setsockopt IPV6_V6ONLY: %s", strerror(errno));
#endif
}
-
-void
-sock_get_rcvbuf(int *size, int rcvbuf)
-{
- int sock, socksize;
- socklen_t socksizelen = sizeof(socksize);
-
- /*
- * Create a socket but do not connect it. We use it
- * only to get the rcv socket size.
- */
- sock = socket(AF_INET6, SOCK_STREAM, 0);
- if (sock < 0)
- sock = socket(AF_INET, SOCK_STREAM, 0);
- if (sock < 0)
- return;
-
- /*
- * If the tcp_rcv_buf option is set and passed in, attempt to set the
- * buffer size to its value.
- */
- if (rcvbuf)
- setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void *)&rcvbuf,
- sizeof(rcvbuf));
-
- if (getsockopt(sock, SOL_SOCKET, SO_RCVBUF,
- &socksize, &socksizelen) == 0)
- if (size != NULL)
- *size = socksize;
- close(sock);
-}
OpenPOWER on IntegriCloud