From dff3237ee54ea9eae34f45c7d4f16675b37b6c98 Mon Sep 17 00:00:00 2001 From: Andre Oppermann Date: Tue, 19 Oct 2004 15:58:22 +0000 Subject: [PATCH] Make use of the PROTO_SPACER functionality for dynamically loadable protocols in inetsw[] and define initially eight spacer slots. Remove conflicting declaration 'struct pr_usrreqs nousrreqs'. It is now declared and initialized in kern/uipc_domain.c. --- sys/netinet/in_proto.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c index 28fff4be230..8e8279d052c 100644 --- a/sys/netinet/in_proto.c +++ b/sys/netinet/in_proto.c @@ -93,7 +93,15 @@ #endif extern struct domain inetdomain; -static struct pr_usrreqs nousrreqs; + +/* Spacer for loadable protocols. */ +#define IPPROTOSPACER \ +{ 0, &inetdomain, PROTO_SPACER, 0, \ + NULL, NULL, NULL, NULL, \ + NULL, \ + NULL, NULL, NULL, NULL, \ + &nousrreqs \ +} struct protosw inetsw[] = { { 0, &inetdomain, 0, 0, @@ -239,7 +247,16 @@ struct protosw inetsw[] = { &rip_usrreqs }, #endif /* DEV_PFSYNC */ - /* raw wildcard */ +/* Spacer n-times for loadable protocols. */ +IPPROTOSPACER, +IPPROTOSPACER, +IPPROTOSPACER, +IPPROTOSPACER, +IPPROTOSPACER, +IPPROTOSPACER, +IPPROTOSPACER, +IPPROTOSPACER, +/* raw wildcard */ { SOCK_RAW, &inetdomain, 0, PR_ATOMIC|PR_ADDR, rip_input, 0, 0, rip_ctloutput, 0,