Date: Sun, 18 Oct 2009 22:43:28 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r198218 - head/sys/net Message-ID: <200910182243.n9IMhSTc080720@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rwatson Date: Sun Oct 18 22:43:28 2009 New Revision: 198218 URL: http://svn.freebsd.org/changeset/base/198218 Log: Sort function prototypes in pfil.h, clean up white space, and better align fields for printing. MFC after: 3 days Modified: head/sys/net/pfil.h Modified: head/sys/net/pfil.h ============================================================================== --- head/sys/net/pfil.h Sun Oct 18 20:33:24 2009 (r198217) +++ head/sys/net/pfil.h Sun Oct 18 22:43:28 2009 (r198218) @@ -50,7 +50,7 @@ struct inpcb; struct packet_filter_hook { TAILQ_ENTRY(packet_filter_hook) pfil_link; int (*pfil_func)(void *, struct mbuf **, struct ifnet *, int, - struct inpcb *); + struct inpcb *); void *pfil_arg; int pfil_flags; }; @@ -80,14 +80,13 @@ struct pfil_head { LIST_ENTRY(pfil_head) ph_list; }; +int pfil_add_hook(int (*func)(void *, struct mbuf **, struct ifnet *, + int, struct inpcb *), void *, int, struct pfil_head *); +int pfil_remove_hook(int (*func)(void *, struct mbuf **, struct ifnet *, + int, struct inpcb *), void *, int, struct pfil_head *); int pfil_run_hooks(struct pfil_head *, struct mbuf **, struct ifnet *, int, struct inpcb *inp); -int pfil_add_hook(int (*func)(void *, struct mbuf **, - struct ifnet *, int, struct inpcb *), void *, int, struct pfil_head *); -int pfil_remove_hook(int (*func)(void *, struct mbuf **, - struct ifnet *, int, struct inpcb *), void *, int, struct pfil_head *); - int pfil_head_register(struct pfil_head *); int pfil_head_unregister(struct pfil_head *); @@ -107,6 +106,7 @@ struct pfil_head *pfil_head_get(int, u_l static __inline struct packet_filter_hook * pfil_hook_get(int dir, struct pfil_head *ph) { + if (dir == PFIL_IN) return (TAILQ_FIRST(&ph->ph_in)); else if (dir == PFIL_OUT)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910182243.n9IMhSTc080720>