From 6afbf203bd570424ecf3f9d9d9ced17f82c81adc Mon Sep 17 00:00:00 2001 From: wollman Date: Sun, 27 Apr 1997 20:01:29 +0000 Subject: The long-awaited mega-massive-network-code- cleanup. Part I. This commit includes the following changes: 1) Old-style (pr_usrreq()) protocols are no longer supported, the compatibility glue for them is deleted, and the kernel will panic on boot if any are compiled in. 2) Certain protocol entry points are modified to take a process structure, so they they can easily tell whether or not it is possible to sleep, and also to access credentials. 3) SS_PRIV is no more, and with it goes the SO_PRIVSTATE setsockopt() call. Protocols should use the process pointer they are now passed. 4) The PF_LOCAL and PF_ROUTE families have been updated to use the new style, as has the `raw' skeleton family. 5) PF_LOCAL sockets now obey the process's umask when creating a socket in the filesystem. As a result, LINT is now broken. I'm hoping that some enterprising hacker with a bit more time will either make the broken bits work (should be easy for netipx) or dike them out. --- sys/netinet/in_proto.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/netinet/in_proto.c') diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c index b07d8a5..eeaf2f4 100644 --- a/sys/netinet/in_proto.c +++ b/sys/netinet/in_proto.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in_proto.c 8.2 (Berkeley) 2/9/95 - * $Id$ + * $Id: in_proto.c,v 1.38 1997/02/18 20:46:22 wollman Exp $ */ #include @@ -96,12 +96,14 @@ void iplinit(); extern struct domain inetdomain; +static struct pr_usrreqs nousrreqs; struct protosw inetsw[] = { { 0, &inetdomain, 0, 0, 0, 0, 0, 0, 0, - ip_init, 0, ip_slowtimo, ip_drain + ip_init, 0, ip_slowtimo, ip_drain, + &nousrreqs }, { SOCK_DGRAM, &inetdomain, IPPROTO_UDP, PR_ATOMIC|PR_ADDR, udp_input, 0, udp_ctlinput, ip_ctloutput, -- cgit v1.1