Bug 131918 - [patch] Fixes for the BPF(4) man page
Summary: [patch] Fixes for the BPF(4) man page
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-02-20 23:40 UTC by guy
Modified: 2018-08-05 06:53 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (11.40 KB, patch)
2009-02-20 23:40 UTC, guy
no flags Details | Diff
patch2.txt (11.64 KB, text/plain; x-unix-mode=0644)
2009-02-21 03:31 UTC, guy
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description guy 2009-02-20 23:40:00 UTC
The BPF(4) man page:

    still implies that you have separate /dev/bpfN devices in one place;

    still says only Ethernet, SLIP, and PPP are supported, and that no network types with variable-length headers (such as 802.11) are supported;

    says that EIO, not EINVAL, is returned if you do a read() with a buffer size other than the one specified with BIOCSBLEN;

    has some stylistic glitches;

    doesn't document BIOCGDLTLIST, BIOCSDLT, BIOCSRSIG or BIOCGRSIG;

    doesn't document the standard ioctls that apply to a BPF device;

    says the bf_len field of a "struct bpf_program" and the "k" field of a BPF instruction are signed;

    says the "k" field of a BPF instruction, and the bh_caplen and bh_datalen fields of the BPF per-packet header, are u_long, rather than bpf_u_int32.

Fix: Patch attached with submission follows:
Comment 1 guy 2009-02-21 03:31:03 UTC
While we're at it, we might as well remove

	Since packet data is in network byte order, applications should use  
the byteorder(3) macros to extract multi-byte values.

because, in fact, not all packet data *is* in network byte order (SMB  
fields, for example, are little-endian).

I've attached an updated patch.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:27 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped