diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2009-10-20 18:54:51 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2009-10-20 18:54:51 +0000 |
commit | 752b1b697126c9f54845cd6c361ecc914ff7dcfa (patch) | |
tree | 36f7f17449f8b9a46d1556c0891ea0133e2bc3eb | |
parent | 6fb7173c2bfa70974081847a16e9c940fc3b7e1f (diff) | |
download | src-752b1b697126c9f54845cd6c361ecc914ff7dcfa.tar.gz src-752b1b697126c9f54845cd6c361ecc914ff7dcfa.zip |
Merge r198218 from head to stable/8:
Sort function prototypes in pfil.h, clean up white space, and better
align fields for printing.
Approved by: re (kensmith)
Notes
Notes:
svn path=/stable/8/; revision=198302
-rw-r--r-- | sys/net/pfil.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/net/pfil.h b/sys/net/pfil.h index 48b1db860b65..70b50d9adf2c 100644 --- a/sys/net/pfil.h +++ b/sys/net/pfil.h @@ -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_long); 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) |