summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/getsockopt.217
-rw-r--r--lib/libc/sys/listen.233
2 files changed, 38 insertions, 12 deletions
diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2
index 46d3d8a..24ae2b8b 100644
--- a/lib/libc/sys/getsockopt.2
+++ b/lib/libc/sys/getsockopt.2
@@ -29,9 +29,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)getsockopt.2 8.3 (Berkeley) 4/19/94
+.\" @(#)getsockopt.2 8.3 (Berkeley) 4/19/94
+.\" $Id$
.\"
-.Dd April 19, 1994
+.Dd November 3, 1995
.Dt GETSOCKOPT 2
.Os BSD 4.3r
.Sh NAME
@@ -228,7 +229,11 @@ are options to adjust the normal
buffer sizes allocated for output and input buffers, respectively.
The buffer size may be increased for high-volume connections,
or may be decreased to limit the possible backlog of incoming data.
-The system places an absolute limit on these values.
+The system places an absolute maximum on these values, which is accessible
+through the
+.Xr sysctl 3
+MIB variable
+.Dq Li kern.maxsockbuf .
.Pp
.Dv SO_SNDLOWAT
is an option to set the minimum count for output operations.
@@ -261,7 +266,7 @@ wait until they have received the smaller of the low water mark value
or the requested amount.
Receive calls may still return less than the low water mark if an error
occurs, a signal is caught, or the type of data next in the receive queue
-is different than that returned.
+is different from that which was returned.
.Pp
.Dv SO_SNDTIMEO
is an option to set a timeout value for output operations.
@@ -334,9 +339,11 @@ this error may also be returned if
is not in a valid part of the process address space.
.El
.Sh SEE ALSO
+.Xr sysctl 1 ,
.Xr ioctl 2 ,
.Xr socket 2 ,
-.Xr getprotoent 3
+.Xr getprotoent 3 ,
+.Xr sysctl 3 ,
.Xr protocols 5
.Sh BUGS
Several of the socket options should be handled at lower levels of the system.
diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2
index 0ab28bc..eaa9522 100644
--- a/lib/libc/sys/listen.2
+++ b/lib/libc/sys/listen.2
@@ -29,9 +29,10 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)listen.2 8.2 (Berkeley) 12/11/93
+.\" From: @(#)listen.2 8.2 (Berkeley) 12/11/93
+.\" $Id$
.\"
-.Dd December 11, 1993
+.Dd November 3, 1995
.Dt LISTEN 2
.Os BSD 4.2
.Sh NAME
@@ -68,6 +69,19 @@ receive an error with an indication of
.Er ECONNREFUSED ,
or, if the underlying protocol supports retransmission,
the request may be ignored so that retries may succeed.
+.Pp
+The
+.Xr sysctl 3
+MIB variable
+.Dq Li kern.somaxconn
+specifies a hard limit on
+.Fa backlog ;
+if a value greater than
+.Li kern.somaxconn
+or less than zero is specified,
+.Fa backlog
+is silently forced to
+.Li kern.somaxconn .
.Sh RETURN VALUES
A 0 return value indicates success; -1 indicates an error.
.Sh ERRORS
@@ -87,15 +101,20 @@ The socket is not of a type that supports the operation
.Fn listen .
.El
.Sh SEE ALSO
+.Xr sysctl 1 ,
.Xr accept 2 ,
.Xr connect 2 ,
-.Xr socket 2
-.Sh BUGS
-The
-.Fa backlog
-is currently limited (silently) to 32.
+.Xr socket 2 ,
+.Xr sysctl 3
.Sh HISTORY
The
.Nm
function call appeared in
.Bx 4.2 .
+The ability to configure the maximum
+.Fa backlog
+at run-time, and to use a negative
+.Fa backlog
+to request the maximum allowable value, was introduced in
+.Tn FreeBSD
+2.2.
OpenPOWER on IntegriCloud