diff options
author | wollman <wollman@FreeBSD.org> | 1995-11-03 18:33:46 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1995-11-03 18:33:46 +0000 |
commit | cfbb3f260a6c68348be1421a29b296eb59896606 (patch) | |
tree | 9bcad223ed166dddfb10c012f5832a2ad4eb5c46 /sys/kern/uipc_socket2.c | |
parent | ef462b028ea95f68303bdd52aa38a6638945b105 (diff) | |
download | FreeBSD-src-cfbb3f260a6c68348be1421a29b296eb59896606.zip FreeBSD-src-cfbb3f260a6c68348be1421a29b296eb59896606.tar.gz |
Make somaxconn (maximum backlog in a listen(2) request) and sb_max
(maximum size of a socket buffer) tunable.
Permit callers of listen(2) to specify a negative backlog, which
is translated into somaxconn. Previously, a negative backlog was
silently translated into 0.
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r-- | sys/kern/uipc_socket2.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index 3f7d082..807caad 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -31,11 +31,12 @@ * SUCH DAMAGE. * * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93 - * $Id: uipc_socket2.c,v 1.4 1994/10/02 17:35:33 phk Exp $ + * $Id: uipc_socket2.c,v 1.5 1995/05/30 08:06:22 rgrimes Exp $ */ #include <sys/param.h> #include <sys/systm.h> +#include <sys/kernel.h> #include <sys/proc.h> #include <sys/file.h> #include <sys/buf.h> @@ -46,6 +47,7 @@ #include <sys/socket.h> #include <sys/socketvar.h> #include <sys/signalvar.h> +#include <sys/sysctl.h> /* * Primitive routines for operating on sockets and socket buffers @@ -56,7 +58,8 @@ char netio[] = "netio"; char netcon[] = "netcon"; char netcls[] = "netcls"; -u_long sb_max = SB_MAX; /* patchable */ +u_long sb_max = SB_MAX; /* XXX should be static */ +SYSCTL_INT(_kern, KERN_MAXSOCKBUF, maxsockbuf, CTLFLAG_RW, &sb_max, 0, "") /* * Procedures to manipulate state flags of socket |