BPFNULL(1)

NAME
bpfnull - tool for testing Berkeley Packet Filter (BPF)

SYNOPSIS
bpfnull [-IpPTwvz] [-b bufsize] [-c limit] [-f file] -i interface

DESCRIPTION
The bpfnull utility opens a bpf(4) device and captures packets from the interface specified by the interface argument to the -i flag. When bpfnull exits as a result of SIGINT, it displays statistics such as the cycles spent processing each packet, packets dropped by bpf(4) due to a failure to keep up with line rate, etc. The following flags may be used to specify additional behavior for bpfnull:

-b bufsize
    Specify the bpf(4) buffer size; the default is 32768.

-c limit
    Exit after a specified number of packets have been captured.

-f filename
    Specify the name of a file to dump packets to when using the -w flag; the default file is stdout.

-I  Set the IMMEDIATE flag on the bpf(4) device, causing the device to become readable whenever a packet is received, rather than when the buffer on the device files.

-p  Issue a prefetch instruction on the next packet in the buffer while processing the current packet.

-P  Place the network interface in promiscuous mode.

-T  Read each byte of each packet received via bpf(4), forcing it into the CPU cache, which might otherwise not occur for zero-copy BPF.

-w  Write packets received via bpf(4) to the file specified with the -f flag, or stdout if none is specified.

-v  Enable verbose debugging output.

EXIT STATUS

SEE ALSO
tcpdump(1), bpf(4)

AUTHORS
bpfnull was written by Christian S. J. Peron; this manual page was written by Robert N M Watson.