summaryrefslogtreecommitdiffstats
path: root/sys/contrib/pf/net/if_pflog.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/pf/net/if_pflog.h')
-rw-r--r--sys/contrib/pf/net/if_pflog.h38
1 files changed, 26 insertions, 12 deletions
diff --git a/sys/contrib/pf/net/if_pflog.h b/sys/contrib/pf/net/if_pflog.h
index e9e0b01..4e160a7 100644
--- a/sys/contrib/pf/net/if_pflog.h
+++ b/sys/contrib/pf/net/if_pflog.h
@@ -1,4 +1,6 @@
-/* $OpenBSD: if_pflog.h,v 1.14 2006/10/25 11:27:01 henning Exp $ */
+/* $FreeBSD$ */
+/* $OpenBSD: if_pflog.h,v 1.11 2004/05/19 17:50:51 dhartmei Exp $ */
+
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -27,12 +29,13 @@
#ifndef _NET_IF_PFLOG_H_
#define _NET_IF_PFLOG_H_
-#define PFLOGIFS_MAX 16
-
struct pflog_softc {
- struct ifnet sc_if; /* the interface */
- int sc_unit;
- LIST_ENTRY(pflog_softc) sc_list;
+#ifdef __FreeBSD__
+ struct ifnet *sc_ifp; /* the interface */
+ LIST_ENTRY(pflog_softc) sc_next;
+#else
+ struct ifnet sc_if; /* the interface */
+#endif
};
#define PFLOG_RULESET_NAME_SIZE 16
@@ -46,10 +49,6 @@ struct pfloghdr {
char ruleset[PFLOG_RULESET_NAME_SIZE];
u_int32_t rulenr;
u_int32_t subrulenr;
- uid_t uid;
- pid_t pid;
- uid_t rule_uid;
- pid_t rule_pid;
u_int8_t dir;
u_int8_t pad[3];
};
@@ -71,10 +70,25 @@ struct old_pfloghdr {
#ifdef _KERNEL
+#ifdef __FreeBSD__
+struct pf_rule;
+struct pf_ruleset;
+struct pfi_kif;
+
+typedef int pflog_packet_t(struct pfi_kif *, struct mbuf *, sa_family_t,
+ u_int8_t, u_int8_t, struct pf_rule *, struct pf_rule *,
+ struct pf_ruleset *);
+extern pflog_packet_t *pflog_packet_ptr;
+#define PFLOG_PACKET(i,x,a,b,c,d,e,f,g) do { \
+ if (pflog_packet_ptr != NULL) \
+ pflog_packet_ptr(i,a,b,c,d,e,f,g); \
+} while (0)
+#else
#if NPFLOG > 0
-#define PFLOG_PACKET(i,x,a,b,c,d,e,f,g,h) pflog_packet(i,a,b,c,d,e,f,g,h)
+#define PFLOG_PACKET(i,x,a,b,c,d,e,f,g) pflog_packet(i,a,b,c,d,e,f,g)
#else
-#define PFLOG_PACKET(i,x,a,b,c,d,e,f,g,h) ((void)0)
+#define PFLOG_PACKET(i,x,a,b,c,d,e,f,g) ((void)0)
#endif /* NPFLOG > 0 */
+#endif /* __FreeBSD__ */
#endif /* _KERNEL */
#endif /* _NET_IF_PFLOG_H_ */
OpenPOWER on IntegriCloud