From bbc4497adab2d7702eab9a609897b2e5f672289e Mon Sep 17 00:00:00 2001 From: wollman Date: Fri, 15 May 1998 20:11:40 +0000 Subject: 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). --- sys/kern/uipc_proto.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/kern/uipc_proto.c') 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 @@ -41,6 +41,7 @@ #include #include #include +#include #include @@ -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"); -- cgit v1.1