summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-10-18 22:43:28 +0000
committerrwatson <rwatson@FreeBSD.org>2009-10-18 22:43:28 +0000
commitc564f117b3f972f8dec57033c778339b4e38444b (patch)
tree0836a053047ab9ec40d85fba9e0f0aebd1f506d4
parent655630ef8621ffefe420f1fa3692afda8d7953b0 (diff)
downloadFreeBSD-src-c564f117b3f972f8dec57033c778339b4e38444b.zip
FreeBSD-src-c564f117b3f972f8dec57033c778339b4e38444b.tar.gz
Sort function prototypes in pfil.h, clean up white space, and better
align fields for printing. MFC after: 3 days
-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 48b1db8..70b50d9 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)
OpenPOWER on IntegriCloud