diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-10-26 21:07:23 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-10-26 21:07:23 +0000 |
commit | c3ec7559ddf5301cc2e4c3703b0d1b345c476545 (patch) | |
tree | c865963e7c2c794ef4b527e736ef32e92b310986 /sys/net/if_pflog.c | |
parent | e48f459eb4fa6a5833252c7423b1c8779ab812b3 (diff) |
Put union pf_headers and struct pf_pdesc into separate header file
pfvar_priv.h. The pf_headers had to be defined in multiple .c files
before. In pfvar.h it would have unknown storage size, this file
is included in too many places. The idea is to have a private pf
header that is only included in the pf part of the kernel. For now
it contains pf_pdesc and pf_headers, it may be extended later.
discussion, input and OK henning@ procter@ sashan@
Diffstat (limited to 'sys/net/if_pflog.c')
-rw-r--r-- | sys/net/if_pflog.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/net/if_pflog.c b/sys/net/if_pflog.c index fc3aa9ed802..d9daa9f195c 100644 --- a/sys/net/if_pflog.c +++ b/sys/net/if_pflog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflog.c,v 1.74 2016/04/29 08:55:03 krw Exp $ */ +/* $OpenBSD: if_pflog.c,v 1.75 2016/10/26 21:07:22 bluhm Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -52,9 +52,9 @@ #include <netinet/in.h> #include <netinet/ip.h> +#include <netinet/ip_icmp.h> #include <netinet/tcp.h> #include <netinet/udp.h> -#include <netinet/ip_icmp.h> #ifdef INET6 #include <netinet/ip6.h> @@ -62,6 +62,7 @@ #endif /* INET6 */ #include <net/pfvar.h> +#include <net/pfvar_priv.h> #include <net/if_pflog.h> #define PFLOGMTU (32768 + MHLEN + MLEN) @@ -297,16 +298,7 @@ pflog_bpfcopy(const void *src_arg, void *dst_arg, size_t len) u_int count; u_char *dst, *mdst; int afto, hlen, mlen, off; - union pf_headers { - struct tcphdr tcp; - struct udphdr udp; - struct icmp icmp; -#ifdef INET6 - struct icmp6_hdr icmp6; - struct mld_hdr mld; - struct nd_neighbor_solicit nd_ns; -#endif /* INET6 */ - } pdhdrs; + union pf_headers pdhdrs; struct pf_pdesc pd; struct pf_addr osaddr, odaddr; |