Bug 207866 - BPF(4) is out-of-date
Summary: BPF(4) is out-of-date
Status: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-10 03:47 UTC by guy
Modified: 2018-04-10 18:59 UTC (History)
1 user (show)

See Also:


Attachments
Patch to fix these issues (10.37 KB, patch)
2016-03-10 03:47 UTC, guy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description guy 2016-03-10 03:47:14 UTC
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.