I was groping around through the socket code today looking for more places to sprinkle mandatory access control magic, and noticed that in most parts of the system call and protocol-independent socket implementation, sosend() is never invoked directly: instead, pru_sosend() is invoked, and protocols have the option of implementing pru_sosend() using the central sosend(), or providing their own optimized implementation. However, the exception to this appears to be in the nfsclient code, where sosend is invoked directly on the socket:
bootp_subr.c- bootp_subr.c: error = sosend(so, (struct sockaddr *) &dst, bootp_subr.c- &auio, NULL, NULL, 0, td); bootp_subr.c- if (error != 0) { ... krpc_subr.c- } krpc_subr.c: error = sosend(so, (struct sockaddr *)sa, NULL, m, krpc_subr.c- NULL, 0, td); krpc_subr.c- if (error) { It strikes me that instead it should be calling: error = so->so_proto->pr_usrreqs->pru_sosend(...) So that protocols can implement sosend as they see fit. The NFS server code appears to do this fine. Is this interpretation correct? Robert N M Watson FreeBSD Core Team, TrustedBSD Projects [EMAIL PROTECTED] Network Associates Laboratories To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message