summaryrefslogtreecommitdiffstats
path: root/sys/sys/protosw.h
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-07-14 09:44:28 +0000
committerrwatson <rwatson@FreeBSD.org>2006-07-14 09:44:28 +0000
commit058e95e8541bc492d9e99180551d99bb9123852a (patch)
treee303afc9921393f4900e40b0ef39d313a5d26258 /sys/sys/protosw.h
parentec8dc009b10228a9b8b31cf0182a461f7477d800 (diff)
downloadFreeBSD-src-058e95e8541bc492d9e99180551d99bb9123852a.zip
FreeBSD-src-058e95e8541bc492d9e99180551d99bb9123852a.tar.gz
Define prototype for pru_close, which in the future will notify the
protocol of a socket close event distinct from a detach event, which will (in a future commit) become aligned with pru_abort, which will also be a notification of close prior to detach. Add prurequests event for close, as well as patch up some existing missing ones.
Diffstat (limited to 'sys/sys/protosw.h')
-rw-r--r--sys/sys/protosw.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h
index a0bc968..2fe23c8 100644
--- a/sys/sys/protosw.h
+++ b/sys/sys/protosw.h
@@ -170,7 +170,9 @@ struct protosw {
#define PRU_PROTOSEND 21 /* send to below */
/* end for protocol's internal use */
#define PRU_SEND_EOF 22 /* send and close */
-#define PRU_NREQ 22
+#define PRU_SOSETLABEL 23 /* MAC label change */
+#define PRU_CLOSE 24 /* socket close */
+#define PRU_NREQ 24
#ifdef PRUREQUESTS
const char *prurequests[] = {
@@ -179,8 +181,8 @@ const char *prurequests[] = {
"RCVD", "SEND", "ABORT", "CONTROL",
"SENSE", "RCVOOB", "SENDOOB", "SOCKADDR",
"PEERADDR", "CONNECT2", "FASTTIMO", "SLOWTIMO",
- "PROTORCV", "PROTOSEND",
- "SEND_EOF",
+ "PROTORCV", "PROTOSEND", "SEND_EOF", "SOSETLABEL",
+ "CLOSE",
};
#endif
@@ -244,6 +246,7 @@ struct pr_usrreqs {
int (*pru_sopoll)(struct socket *so, int events,
struct ucred *cred, struct thread *td);
void (*pru_sosetlabel)(struct socket *so);
+ void (*pru_close)(struct socket *so);
};
/*
OpenPOWER on IntegriCloud