aboutsummaryrefslogtreecommitdiff
path: root/sys/net/pfil.h
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2009-10-18 22:43:28 +0000
committerRobert Watson <rwatson@FreeBSD.org>2009-10-18 22:43:28 +0000
commitc9ddf688b6dc4a34e8d3f69871a23ffca40a1e59 (patch)
tree0836a053047ab9ec40d85fba9e0f0aebd1f506d4 /sys/net/pfil.h
parent5fd658af94c82ae82be0bd6f86dc88780711e7cf (diff)
downloadsrc-c9ddf688b6dc4a34e8d3f69871a23ffca40a1e59.tar.gz
src-c9ddf688b6dc4a34e8d3f69871a23ffca40a1e59.zip
Sort function prototypes in pfil.h, clean up white space, and better
align fields for printing. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=198218
Diffstat (limited to 'sys/net/pfil.h')
-rw-r--r--sys/net/pfil.h12
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)