Move logging via BPF support into separate file.
authorae <ae@FreeBSD.org>
Sat, 13 Aug 2016 15:41:04 +0000 (15:41 +0000)
committerae <ae@FreeBSD.org>
Sat, 13 Aug 2016 15:41:04 +0000 (15:41 +0000)
commitc71d3d8eda0b64e39d6ab48ffb474edb5397f3b1
tree454bd10bae751002bee0139a2af80d0e2d6c1de4
parentf5438765d263fbd834b2a3c4fe1e284e40ece85b
Move logging via BPF support into separate file.

* make interface cloner VNET-aware;
* simplify cloner code and use if_clone_simple();
* migrate LOGIF_LOCK() to rmlock;
* add ipfw_bpf_mtap2() function to pass mbuf to BPF;
* introduce new additional ipfwlog0 pseudo interface. It differs from
  ipfw0 by DLT type used in bpfattach. This interface is intended to
  used by ipfw modules to dump packets with additional info attached.
  Currently pflog format is used. ipfw_bpf_mtap2() function uses second
  argument to determine which interface use for dumping. If dlen is equal
  to ETHER_HDR_LEN it uses old ipfw0 interface, if dlen is equal to
  PFLOG_HDRLEN - ipfwlog0 will be used.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC
sys/conf/files
sys/modules/ipfw/Makefile
sys/netpfil/ipfw/ip_fw2.c
sys/netpfil/ipfw/ip_fw_bpf.c [new file with mode: 0644]
sys/netpfil/ipfw/ip_fw_log.c
sys/netpfil/ipfw/ip_fw_private.h