summaryrefslogtreecommitdiffstats
path: root/sys/net/raw_cb.h
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-07-05 19:12:55 +0000
committerrwatson <rwatson@FreeBSD.org>2008-07-05 19:12:55 +0000
commit757fac8d408789ff62c320b455937cc74544575d (patch)
tree8db12fc0cff76d3ea5a72c8f23cc58addd5a24c4 /sys/net/raw_cb.h
parent6f9bd693c043146c687ca1cf2ff37767f302bc96 (diff)
downloadFreeBSD-src-757fac8d408789ff62c320b455937cc74544575d.zip
FreeBSD-src-757fac8d408789ff62c320b455937cc74544575d.tar.gz
Clarify comments and prototypes in raw_cb.h:
- the protosw entries are used directly - the usrreq functions are library routines, generally wrapped by consumers rather than being used directly - the usrreq structure entries are likewise typically wrapped Remove the rather incorrect #if 0'd pr_input_t prototype for raw_input. MFC after: 3 days
Diffstat (limited to 'sys/net/raw_cb.h')
-rw-r--r--sys/net/raw_cb.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/sys/net/raw_cb.h b/sys/net/raw_cb.h
index 32f35ed..9f96bf1 100644
--- a/sys/net/raw_cb.h
+++ b/sys/net/raw_cb.h
@@ -60,22 +60,26 @@ struct rawcb {
extern LIST_HEAD(rawcb_list_head, rawcb) rawcb_list;
extern struct mtx rawcb_mtx;
-/* protosw entries */
+/*
+ * Generic protosw entries for raw socket protocols.
+ */
pr_ctlinput_t raw_ctlinput;
pr_init_t raw_init;
-/* usrreq entries */
+/*
+ * Library routines for raw socket usrreq functions; will always be wrapped
+ * so that protocol-specific functions can be handled.
+ */
int raw_attach(struct socket *, int);
void raw_detach(struct rawcb *);
void raw_disconnect(struct rawcb *);
+void raw_input(struct mbuf *, struct sockproto *, struct sockaddr *,
+ struct sockaddr *);
-#if 0 /* what the ??? */
-pr_input_t raw_input;
-#else
-void raw_input(struct mbuf *,
- struct sockproto *, struct sockaddr *, struct sockaddr *);
-#endif
-
+/*
+ * Generic pr_usrreqs entries for raw socket protocols, usually wrapped so
+ * that protocol-specific functions can be handled.
+ */
extern struct pr_usrreqs raw_usrreqs;
#endif
OpenPOWER on IntegriCloud