diff options
author | andre <andre@FreeBSD.org> | 2004-10-19 15:58:22 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2004-10-19 15:58:22 +0000 |
commit | cf99677e64444a97670e2d8b58ad1e1be678759c (patch) | |
tree | df14670a4371cdf0841648337b2fc44c484c0fee /sys/netinet/in_proto.c | |
parent | 00d43f4bd8218e12e456cef93e786e0a910ba560 (diff) | |
download | FreeBSD-src-cf99677e64444a97670e2d8b58ad1e1be678759c.zip FreeBSD-src-cf99677e64444a97670e2d8b58ad1e1be678759c.tar.gz |
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.
Diffstat (limited to 'sys/netinet/in_proto.c')
-rw-r--r-- | sys/netinet/in_proto.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c index 28fff4b..8e8279d 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, |