History log of /src/share/man/man4/bpf.4
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
# 1.73 11-Feb-2023 uwe

bpf(4): fix couple more nits


# 1.72 11-Feb-2023 uwe

bpf(4): fix couple of overlooked markup nits


# 1.71 11-Feb-2023 uwe

bpf(4): spaces around + in instruction tables

Makes them easier on the eyes.


# 1.70 11-Feb-2023 uwe

bpf(4): use nicer glyphs for some operations in PS output


# 1.69 11-Feb-2023 uwe

bpf(4): make all instruction tables align

Define string max-insn and use it in all tables for the width of the
first column (nroff has variables, shocking, I know). Define only the
width of the first column, the last column gets all the remaining width.


# 1.68 11-Feb-2023 uwe

bpf(4): use \[<-] instead of <-


# 1.67 11-Feb-2023 uwe

bpf(4): assorted markup tweaks

This is mostly non-controversial changes to the cargo-culted markup.
While here - add missing .It to BIOCLOCK so that it's not buried in
the text for the previous item and comment out a paragraph about an
ancient SunOS bug.


# 1.66 07-Feb-2023 gutteridge

bpf.4: fix a garbled item heading

Make the BIOCSDIRECTION & BIOCGDIRECTION entry like those around it.


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.65 30-Nov-2022 ozaki-r

man, bpf: support loopback interfaces for send


# 1.64 24-Oct-2021 gutteridge

bpf.4: amend caveat about what types of links can be written to

Try to be clearer about what's supported. A peripheral issue noted in
PR pkg/55446.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.63 12-Jun-2020 wiz

Use more markup.


# 1.62 11-Jun-2020 roy

bpf(4): Add ioctls BIOCSETWF and BIOCLOCK

Once BIOCLOCK is executed, the device becomes locked which prevents the
execution of ioctl(2) commands which can change the underlying parameters
of the bpf(4) device. An example might be the setting of bpf(4) filter
programs or attaching to different network interfaces.

BIOCSETWF can be used to set write filters for outgoing packets.
Currently if a bpf(4) consumer is compromised, the bpf(4) descriptor can
essentially be used as a raw socket, regardless of consumer's UID.
Write filters give users the ability to constrain which packets can be sent
through the bpf(4) descriptor.

Taken from OpenBSD.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base
# 1.61 26-Jun-2018 msaitoh

Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.


Revision tags: pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.60 13-Jan-2018 wiz

branches: 1.60.2;
Remove Tn. Fix some mandoc lint warnings.


# 1.59 13-Jan-2018 uwe

Fix another column width.


# 1.58 13-Jan-2018 uwe

Use .Fn when describing C macros


# 1.57 13-Jan-2018 uwe

Fix column width in postscript output.


Revision tags: perseant-stdc-iso10646-base
# 1.56 03-Jul-2017 wiz

Remove workaround for ancient HTML generation code.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-7-2-RELEASE netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE matt-nb8-mediatek-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.55 24-Jul-2014 wiz

branches: 1.55.16;
Sort SEE ALSO. Use .An. Bump date.


# 1.54 24-Jul-2014 alnsn

Use .Sy for 'Just-In-Time', add a reference to bpfjit(4).


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.53 29-Aug-2013 wiz

branches: 1.53.2;
New sentence, new line. Bump date for previous.


# 1.52 29-Aug-2013 rmind

Implement BPF_COP/BPF_COPX instructions in the misc category (BPF_MISC)
which add a capability to call external functions in a predetermined way.

It can be thought as a BPF "coprocessor" -- a generic mechanism to offload
more complex packet inspection operations. There is no default coprocessor
and this functionality is not targeted to the /dev/bpf. This is primarily
targeted to the kernel subsystems, therefore there is no way to set a custom
coprocessor at the userlevel.

Discussed on: tech-net@
OK: core@


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.51 28-Oct-2012 alnsn

Document net.bpf.jit sysctl.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.50 31-Dec-2011 riz

branches: 1.50.6;
Fix typos and style glitches. Remove outdated info about only
Ethernet, SLIP, and PPP being supported, and no network types with
variable-length headers (such as 802.11).
Document BIOCSRSIG and BIOCGRSIG.

From Guy Harris in PR#40703.


# 1.49 30-Dec-2011 alnsn

Document that overflow in P[X+k:n] terminates a filter program.
Based on a discussion with Christos on source-changes-d.


# 1.48 27-Dec-2011 wiz

Remove duplicate RCS Id. New sentence, new line.


# 1.47 27-Dec-2011 christos

PR/45750: Alexander Nasonov: Type of k in bpf_insn is bpf(9) is different
from sys/net/bpf.h


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 uebayasi-xip-base2
# 1.46 08-Jun-2010 jruoho

branches: 1.46.6;
Remove SIOCGIFADDR. Noted by Ross Patterson in PR kern/21513.


Revision tags: uebayasi-xip-base1
# 1.45 22-Mar-2010 joerg

branches: 1.45.2;
Use .In instead of .Aq Pa for header files.


# 1.44 14-Mar-2010 wiz

FreeBSD -> .Fx, add RCS Id.


# 1.43 13-Mar-2010 christos

Document BIOC{G,S}FEEDBACK; I forgot who sent me the patch, so whoever created
it, thanks!


# 1.42 16-Jan-2010 pooka

update type of bh_tstamp


Revision tags: matt-premerge-20091211
# 1.41 05-Jun-2009 jnemeth

grammar fix


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.40 10-Apr-2009 joerg

Fix markup.


Revision tags: netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base mjf-devfs2-base keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
# 1.39 04-Aug-2006 wiz

branches: 1.39.26; 1.39.28;
New sentence, new line. Use more markup.
Bump date for previous.


# 1.38 04-Aug-2006 martin

If user buffers do not match kernel buffers our kernel returns EINVAL,
not EIO.


Revision tags: chap-midi-nbase chap-midi-base
# 1.37 04-Feb-2006 rpaulo

There can be as many bpf clones as you want and the kernel doesn't
enforce any number.


# 1.36 26-Dec-2005 perry

u_intN_t -> uintN_t


# 1.35 14-Dec-2005 rpaulo

Remove BIOC[GS]RSIG and fix BIOC[GS]HDRCMPLT typo.


# 1.34 10-Sep-2005 wiz

Bump date for 1.32.
Use .Aq instead of \*[Lt]\*[Gt] and mark up paths with .Pa.


# 1.33 06-Sep-2005 rpaulo

Change 'headers' to 'network layer headers' as suggested by Tetsuya Isaki.


# 1.32 05-Sep-2005 rpaulo

PR misc/31139: bpf(4) does not describe some ioctls, by Tetsuya Isaki.
IOCTLs explained: BIO[GS]HDRCMPLT and IO[GS]SEESENT.


# 1.31 07-Aug-2005 wiz

Remove trailing whitespace.


# 1.30 04-Aug-2005 rpaulo

Added a new section called "SYSCTLS" explaining the purpose of
net.bpf.maxbufsize, net.bpf.stats and net.bpf.peers.
Bump the date.

Reviewed by: wiz@


# 1.29 30-Jul-2005 rpaulo

Since bpf is now a clonable device, remove references to /dev/bpfX.
Update the structs so that they match bpf.h and bpfdesc.h.
Bump date.

ok christos@


Revision tags: netbsd-3-base
# 1.28 04-Oct-2004 rumble

branches: 1.28.2;
Removed accidental repetitious words.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.27 27-Jun-2003 wiz

Add Ns.


# 1.26 26-Jun-2003 wiz

Fix some macro abuses.


# 1.25 30-Mar-2003 wiz

Uppercase ULTRIX. Igor Sobrado in PR 19678.


# 1.24 25-Feb-2003 wiz

.Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.


# 1.23 04-Feb-2003 perry

"Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".


Revision tags: fvdl_fs64_base
# 1.22 16-Oct-2002 wennmach

typo (be -> by)


# 1.21 29-Aug-2002 wiz

Fix typo in last.


# 1.20 29-Aug-2002 wiz

Mark up error values and NULL.


# 1.19 28-Aug-2002 onoe

Add 2 APIs to get a list of available DLTs and use one for them.
BIOCGDLTLIST (struct bpf_dltlist)
BIOCSDLT (u_int)


# 1.18 20-Aug-2002 wiz

Two major fixes for PS output; also cut down on Ns and No misuses.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.17 13-Feb-2002 ross

Generate <>& symbolically. I'm avoiding .../dist/... directories for now.


# 1.16 07-Feb-2002 ross

Edit -mdoc usage.

* There is no -indent option to .Bd or .Bl, although you would
never know that from its frequent use in this tree. There is a
"-offset indent" combination that makes sense, and you can certainly
say "-width indent".

* Also, you can't markup the -width option argument, tho you CAN
use a callable macro. So "-width Ar filename" doesn't make sense,
but either "-width Ar" or "-width filename" does, as might something
like "-width xxfilename" for a little extra space.

* There are a lot of needlessly complex hanging tag macros in man4 used
to create simple item lists. Those should be simplified one of these
days before someone copies and edits yet another man4 page.


# 1.15 11-Sep-2001 wiz

Whitespace, paragraph, punctuation, citation fixes. Sort sections.


# 1.14 19-May-2001 jdolecek

Use EAGAIN instead of EWOULDBLOCK. The actual numeric value is
same, but EAGAIN is the posixly correct name.
Addresses misc/12960.


# 1.13 05-Oct-2000 ad

insure -> ensure


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.12 27-May-2000 enami

Convert to use mdoc macros more. The pervious commit, which partially
converted to mdoc, just results malformed output.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.11 15-Dec-1999 abs

Misc small fixes to try to standardise the format to make it easier
to parse by an automated script (say one that just might want to
generate webpage summaries of available drivers :)


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 comdex-fall-1999-base netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.10 11-Jul-1997 mikel

branches: 1.10.8;
don't xref nonexistent filio(2)


# 1.9 22-Mar-1997 cjs

PR misc/3375, submitted by der Mouse <mouse@Rodents.Montreal.QC.CA>.
The if_name fields are really called ifr_name.


# 1.8 04-Dec-1996 mikel

misc. updates and fixes from LBL version (bpf-1.1).


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.7 27-Sep-1995 thorpej

Update from Stu Grossman <grossman@cygnus.com>, documenting his enhancements.


# 1.6 25-Jan-1995 jtc

fix tcpdump cross reference


# 1.5 30-Nov-1994 jtc

Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.4 14-Nov-1993 deraadt

cleared with mccanne: "the bug is in the bpf man page. SIOCGIFADDR
should go away. Link addresses should be looked up with SIOCGIFCONF."


# 1.3 02-Aug-1993 mycroft

Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.2 15-Jul-1993 deraadt

error found by hpeyerl, cleared by mccanne


Revision tags: netbsd-0-8 netbsd-alpha-1
# 1.1 09-Apr-1993 cgd

branches: 1.1.1;
fixed epsilon problem in tp man page, added bpf man page.