diff options
author | wollman <wollman@FreeBSD.org> | 1998-05-15 20:11:40 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1998-05-15 20:11:40 +0000 |
commit | bbc4497adab2d7702eab9a609897b2e5f672289e (patch) | |
tree | 10594c024ae545493609ccaa7de3d90faf27616a /sys/kern/uipc_proto.c | |
parent | be2e5ffcfc349cb4483b536bd57048eca466e0c9 (diff) | |
download | FreeBSD-src-bbc4497adab2d7702eab9a609897b2e5f672289e.zip FreeBSD-src-bbc4497adab2d7702eab9a609897b2e5f672289e.tar.gz |
Convert socket structures to be type-stable and add a version number.
Define a parameter which indicates the maximum number of sockets in a
system, and use this to size the zone allocators used for sockets and
for certain PCBs.
Convert PF_LOCAL PCB structures to be type-stable and add a version number.
Define an external format for infomation about socket structures and use
it in several places.
Define a mechanism to get all PF_LOCAL and PF_INET PCB lists through
sysctl(3) without blocking network interrupts for an unreasonable
length of time. This probably still has some bugs and/or race
conditions, but it seems to work well enough on my machines.
It is now possible for `netstat' to get almost all of its information
via the sysctl(3) interface rather than reading kmem (changes to follow).
Diffstat (limited to 'sys/kern/uipc_proto.c')
-rw-r--r-- | sys/kern/uipc_proto.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/uipc_proto.c b/sys/kern/uipc_proto.c index 6e2ef5d..ec2b9f0 100644 --- a/sys/kern/uipc_proto.c +++ b/sys/kern/uipc_proto.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_proto.c 8.1 (Berkeley) 6/10/93 - * $Id: uipc_proto.c,v 1.13 1997/08/02 14:31:42 bde Exp $ + * $Id: uipc_proto.c,v 1.14 1998/02/20 13:11:48 bde Exp $ */ #include <sys/param.h> @@ -41,6 +41,7 @@ #include <sys/socket.h> #include <sys/sysctl.h> #include <sys/un.h> +#include <sys/unpcb.h> #include <net/raw_cb.h> @@ -70,7 +71,7 @@ static struct protosw localsw[] = { }; struct domain localdomain = - { AF_LOCAL, "local", 0, unp_externalize, unp_dispose, + { AF_LOCAL, "local", unp_init, unp_externalize, unp_dispose, localsw, &localsw[sizeof(localsw)/sizeof(localsw[0])] }; SYSCTL_NODE(_net, PF_LOCAL, local, CTLFLAG_RW, 0, "Local domain"); |