DaemonLogger: Simple packet logging & soft tap daemon. Version 1.2.1 Copyright (C) 2013-2021 Cisco Systems, Inc. Copyright (C) 2006-2013 Sourcefire Inc. Author: Martin Roesch This is a libpcap-based program. It has two runtime modes: 1) It sniffs packets and spools them straight to the disk and can daemonize itself for background packet logging. By default the file rolls over when 1 GB of data is logged. 2) It sniffs packets and rewrites them to a second interface, essentially acting as a soft tap. It can also do this in daemon mode. These two runtime modes are mutually exclusive, if the program is placed in tap mode (using the -o switch) then logging to disk is disabled. License: GPL v2. Make SURE you read the included COPYING file so that you understand how this file is licensed by Cisco, even though it's under the GPL v2 there are some clarifications that we have made regarding the licensing of this program. Requirements: * A recent version of libpcap. * A recent version of libdnet. Usage: daemonlogger [switches] [bpf filter] Switches: -B Set packet capture buffer size -c Capture packets and exit. -d Daemonize at startup. -f Load BPF filter from . -F Make disk output "packet-buffered". As each packet is saved, it will be written to the output file rather than being written only when the output buffer fills. -g Set group ID to . -h Print usage message. -i Sniff packets from . -l Specify a to write the pcap logfiles into. -m Write log files and exit. If using Ringbufer mode then write files and delete the oldest file in the set when you exceed log files written. The program will not exit when in this mode. -M Used in concert with the -r ringbuffer switch this option will write log files to the disk until it is at utilization and then roll over and delete the oldest log file. For example, "-M 90" would write files to the disk until it is 90% utilized and then roll over and delete the oldest file in the logging directory. If the -s "size" switch is not set then the default log file size is 2GB. -n Set output filename prefix to . Default is "daemonlogger.pcap". -o Disable packet logging and write packets received on on . Activates tap mode. Example: daemonlogger -i en0 -o gre0 -p Set an explicit filename. Default is daemonlogger.pid. -P Set an explicit directory. Default is /var/run. -r Activate ringbuffer mode. -s Rollover the log file if it reaches bytes. -S Set the number of bytes to grab per packet to . -t