| version 1.33, 1998/04/25 17:35:18 |
version 1.34, 1998/04/27 13:31:45 |
|
|
| |
|
| int |
int |
| soshutdown(so, how) |
soshutdown(so, how) |
| register struct socket *so; |
struct socket *so; |
| register int how; |
int how; |
| { |
{ |
| register struct protosw *pr = so->so_proto; |
struct protosw *pr = so->so_proto; |
| |
|
| |
if (!(how == SHUT_RD || how == SHUT_WR || how == SHUT_RDWR)) |
| |
return (EINVAL); |
| |
|
| how++; |
if (how == SHUT_RD || how == SHUT_RDWR) |
| if (how & FREAD) |
|
| sorflush(so); |
sorflush(so); |
| if (how & FWRITE) |
if (how == SHUT_WR || how == SHUT_RDWR) |
| return (*pr->pr_usrreq)(so, PRU_SHUTDOWN, (struct mbuf *)0, |
return (*pr->pr_usrreq)(so, PRU_SHUTDOWN, (struct mbuf *)0, |
| (struct mbuf *)0, (struct mbuf *)0, (struct proc *)0); |
(struct mbuf *)0, (struct mbuf *)0, (struct proc *)0); |
| return (0); |
return (0); |