From ba8cd2c528a672cde63321d8d27e255c65e1b6d3 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sat, 5 Jul 2008 19:12:55 +0000 Subject: [PATCH] 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 --- sys/net/raw_cb.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/sys/net/raw_cb.h b/sys/net/raw_cb.h index 32f35ed88f4..9f96bf15167 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