Created attachment 167947 [details]
Patch to fix these issues
The BPF(4) man page makes some claims that are no longer true (or never were true), and doesn't fully document some things that are true:
It says "A separate device file is required for each minor device.", talking about the old /dev/bpfN devices, even though it speaks of the cloning device earlier.
It speaks of particular link-layer types that are supported, mentioning only Ethernet, SLIP, and PPP, but that hasn't been true for quite a while.
It says "packet data is in network byte order", but that's only true of some protocols (*very important* protocols, but not *all* protocols).
It doesn't give as much detail about BIOCLOCK as the OpenBSD man page.
It claims that a read() that doesn't read the full buffer returns EIO rather than EINVAL.
It doesn't mention BIOCGDLTLIST, BIOCSDLT, BIOCGRSIG, BIOCSRSIG,
It doesn't note that promiscuous mode is on as long as at least one BPF file on which it was turned on is open.
It doesn't give the type of the argument to BIOCROTZBUF.
It doesn't document all the standard FIO ioctls.
It gives the wrong type for the k field in struct bpf_insn.
It claims that protocols with variable-length link-layer headers are not supported, which is not true, given that, for example, you can capture on an 802.11 device in monitor mode.
There are also some typos, inconsistent use of "set and get" rather than "sets and gets", and other things requiring copyediting.