summaryrefslogtreecommitdiffstats
path: root/sys/sys/protosw.h
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2009-01-06 11:02:17 +0000
committerbz <bz@FreeBSD.org>2009-01-06 11:02:17 +0000
commit2082ec2e29af339acc9439294667f5c262eaf24e (patch)
tree3a6072554e29d32905b4f7898e8ec4f61d51c002 /sys/sys/protosw.h
parenteb4d18898bf35a7ef8bbafb5e6eb7d6308de49c0 (diff)
downloadFreeBSD-src-2082ec2e29af339acc9439294667f5c262eaf24e.zip
FreeBSD-src-2082ec2e29af339acc9439294667f5c262eaf24e.tar.gz
Further cleanup protosw.h:
- Remove unused typedefs to avoid confusion and ease in merging ip6protosw with protosw. - Correct a few comments. - Remove most of a comment about usrreq. [1] - Use tabs instead of spaces for consistency. Submitted by: rwatson [1] Reviewed by: rwatson MFC after: 3 weeks
Diffstat (limited to 'sys/sys/protosw.h')
-rw-r--r--sys/sys/protosw.h26
1 files changed, 5 insertions, 21 deletions
diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h
index 88d3580..9f064c5 100644
--- a/sys/sys/protosw.h
+++ b/sys/sys/protosw.h
@@ -66,9 +66,7 @@ struct sockopt;
/* USE THESE FOR YOUR PROTOTYPES ! */
typedef void pr_input_t (struct mbuf *, int);
typedef int pr_input6_t (struct mbuf **, int*, int); /* XXX FIX THIS */
-typedef void pr_in_input_t (struct mbuf *, int, int); /* XXX FIX THIS */
typedef int pr_output_t (struct mbuf *, struct socket *);
-typedef int pr_in_output_t (struct mbuf *, struct socket *, struct sockaddr *);
typedef void pr_ctlinput_t (int, struct sockaddr *, void *);
typedef int pr_ctloutput_t (struct socket *, struct sockopt *);
typedef void pr_init_t (void);
@@ -76,9 +74,6 @@ typedef void pr_fasttimo_t (void);
typedef void pr_slowtimo_t (void);
typedef void pr_drain_t (void);
-typedef int pr_usrreq_t(struct socket *, int, struct mbuf *,
- struct mbuf *, struct mbuf *, struct thread *);
-
struct protosw {
short pr_type; /* socket type used for */
struct domain *pr_domain; /* domain protocol a member of */
@@ -95,7 +90,7 @@ struct protosw {
pr_slowtimo_t *pr_slowtimo; /* slow timeout (500ms) */
pr_drain_t *pr_drain; /* flush any excess space possible */
- struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */
+ struct pr_usrreqs *pr_usrreqs; /* user-protocol hook */
};
/*#endif*/
@@ -131,17 +126,6 @@ struct protosw {
* 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,
- * nam is an optional mbuf chain containing an address,
- * and opt is a pointer to a socketopt structure or nil.
- * The protocol is responsible for disposal of the mbuf chain m,
- * the caller is responsible for any space held by nam and opt.
- * A non-zero return from usrreq gives an
- * UNIX error number which should be passed to higher level software.
*/
#define PRU_ATTACH 0 /* attach protocol to up */
#define PRU_DETACH 1 /* detach protocol from up */
@@ -170,8 +154,8 @@ struct protosw {
#define PRU_SEND_EOF 22 /* send and close */
#define PRU_SOSETLABEL 23 /* MAC label change */
#define PRU_CLOSE 24 /* socket close */
-#define PRU_FLUSH 25 /* flush the socket */
-#define PRU_NREQ 25
+#define PRU_FLUSH 25 /* flush the socket */
+#define PRU_NREQ 25
#ifdef PRUREQUESTS
const char *prurequests[] = {
@@ -181,7 +165,7 @@ const char *prurequests[] = {
"SENSE", "RCVOOB", "SENDOOB", "SOCKADDR",
"PEERADDR", "CONNECT2", "FASTTIMO", "SLOWTIMO",
"PROTORCV", "PROTOSEND", "SEND_EOF", "SOSETLABEL",
- "CLOSE", "FLUSH",
+ "CLOSE", "FLUSH",
};
#endif
@@ -327,7 +311,7 @@ char *prcrequests[] = {
* The protocol is responsible for disposal of the mbuf chain *optval
* if supplied,
* the caller is responsible for any space held by *optval, when returned.
- * A non-zero return from usrreq gives an
+ * A non-zero return from ctloutput gives an
* UNIX error number which should be passed to higher level software.
*/
#define PRCO_GETOPT 0
OpenPOWER on IntegriCloud