diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-06-07 13:09:04 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-06-07 13:09:04 +0000 |
commit | 5ad729eac67157fcbb5c74903389c9cf34a9d44f (patch) | |
tree | a9507f036880e106796c7051c0125b5b66df8dee /sys/sys/protosw.h | |
parent | e091fdc169106db4a26d45d02c2f30fe9c708556 (diff) | |
download | FreeBSD-src-5ad729eac67157fcbb5c74903389c9cf34a9d44f.zip FreeBSD-src-5ad729eac67157fcbb5c74903389c9cf34a9d44f.tar.gz |
Update comments in struct protosw to reflect changing times:
- Between 1996 and 1997, wollman eliminated pr_usrreq() and replaced it
with direct function pointers. Update comment to reflect these changes.
- In 2003, I added pru_sosetlabel(). Update comment to reflect this
change.
MFC after: 1 week
Diffstat (limited to 'sys/sys/protosw.h')
-rw-r--r-- | sys/sys/protosw.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index 760aa7e..fbc7e04 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -128,7 +128,13 @@ struct protosw { #define PR_LASTHDR 0x40 /* enforce ipsec policy; last header */ /* - * The arguments to usrreq are: + * In earlier BSD network stacks, a single pr_usrreq() function pointer was + * invoked with an operation number indicating what operation was desired. + * We now provide individual function pointers which protocols can implement, + * which offers a number of benefits (such as type checking for arguments). + * These older constants are still present in order to support TCP debugging. + * + * The arguments to usrreq were: * (*protosw[].pr_usrreq)(up, req, m, nam, opt); * where up is a (struct socket *), req is one of these requests, * m is an optional mbuf chain containing a message, @@ -186,10 +192,8 @@ struct ucred; struct uio; /* - * If the ordering here looks odd, that's because it's alphabetical. - * Having this structure separated out from the main protoswitch is allegedly - * a big (12 cycles per call) lose on high-end CPUs. We will eventually - * migrate this stuff back into the main structure. + * If the ordering here looks odd, that's because it's alphabetical. These + * should eventually be merged back into struct protosw. * * Some fields initialized to defaults if they are NULL. * See uipc_domain.c:net_init_domain() @@ -224,7 +228,7 @@ struct pr_usrreqs { int (*pru_sockaddr)(struct socket *so, struct sockaddr **nam); /* - * These three added later, so they are out of order. They are used + * These four added later, so they are out of order. They are used * for shortcutting (fast path input/output) in some protocols. * XXX - that's a lie, they are not implemented yet * Rather than calling sosend() etc. directly, calls are made |