The NetBSD Project

CVS log for src/sys/net/bpf.h

[BACK] Up to [cvs.NetBSD.org] / src / sys / net

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.78.4.1 / (download) - annotate - [select for diffs], Wed Sep 13 09:50:50 2023 UTC (7 months ago) by martin
Branch: netbsd-10
CVS Tags: 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
Changes since 1.78: +5 -2 lines
Diff to previous 1.78 (colored) next main 1.79 (colored)

Pull up following revision(s) (requested by rin in ticket #373):

	sys/net/bpf.h: revision 1.82

bpf: Fix SIZEOF_BPF_HDR (for LP64 userland) on mips64

It cannot fit within 18 bytes, of course ;)

As we had never provided working bpf(4) implementation for LP64
userland on mips, just use natural structure size here.

Revision 1.82 / (download) - annotate - [select for diffs], Wed Aug 23 13:21:17 2023 UTC (7 months, 3 weeks ago) by rin
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.81: +5 -2 lines
Diff to previous 1.81 (colored)

bpf: Fix SIZEOF_BPF_HDR (for LP64 userland) on mips64

It cannot fit within 18 bytes, of course ;)

As we had never provided working bpf(4) implementation for LP64
userland on mips, just use natural structure size here.

Revision 1.81 / (download) - annotate - [select for diffs], Thu Aug 17 22:10:37 2023 UTC (7 months, 3 weeks ago) by christos
Branch: MAIN
Changes since 1.80: +3 -1 lines
Diff to previous 1.80 (colored)

add new for libpcap.

Revision 1.80 / (download) - annotate - [select for diffs], Mon Jul 31 23:53:38 2023 UTC (8 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.79: +6 -1 lines
Diff to previous 1.79 (colored)

put back compat names, should be removed from the sanitizers

Revision 1.79 / (download) - annotate - [select for diffs], Mon Jul 31 17:41:18 2023 UTC (8 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.78: +4 -4 lines
Diff to previous 1.78 (colored)

Don't call versioned stuff "old". Follow the naming convention for versioning
and name them after the last version of the OS they appeared on.

Revision 1.78 / (download) - annotate - [select for diffs], Mon Jun 20 08:20:09 2022 UTC (21 months, 3 weeks ago) by yamaguchi
Branch: MAIN
CVS Tags: netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Changes since 1.77: +8 -3 lines
Diff to previous 1.77 (colored)

 bpf(4): added support for VLAN hardware offloading of ethernet devices

Revision 1.75.6.1 / (download) - annotate - [select for diffs], Thu Jun 17 04:46:34 2021 UTC (2 years, 9 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.75: +40 -1 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

Sync w/ HEAD.

Revision 1.77 / (download) - annotate - [select for diffs], Wed Jun 9 15:44:15 2021 UTC (2 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.76: +29 -0 lines
Diff to previous 1.76 (colored)

Add a bpf_register_track_event() function (and deregister equivalent)
that allows a driver to track listeners attaching/detaching from tap
points.

This is usefull for drivers that would have to do extra work for some
taps and can not easily decide (at the driver level) if the work would
be needed further up the stack.

An example is providing radiotap headers for IEEE 802.11 frames.

Revision 1.76 / (download) - annotate - [select for diffs], Wed Jun 9 15:38:39 2021 UTC (2 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.75: +11 -1 lines
Diff to previous 1.75 (colored)

Add a (FreeBSD compatible) bpf_peers_present() predicate to allow
testing for active listeners on a tap.

Revision 1.75 / (download) - annotate - [select for diffs], Thu Jun 11 13:36:20 2020 UTC (3 years, 10 months ago) by roy
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.74: +3 -1 lines
Diff to previous 1.74 (colored)

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 1.72.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:45 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.72: +40 -27 lines
Diff to previous 1.72 (colored) next main 1.73 (colored)

Sync with HEAD

Revision 1.74 / (download) - annotate - [select for diffs], Tue Feb 26 10:30:28 2019 UTC (5 years, 1 month ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.73: +27 -27 lines
Diff to previous 1.73 (colored)

 Whitespace change.

Revision 1.69.12.4 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:44 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.69.12.3: +14 -1 lines
Diff to previous 1.69.12.3 (colored) to branchpoint 1.69 (colored) next main 1.70 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.73 / (download) - annotate - [select for diffs], Mon Sep 3 15:16:11 2018 UTC (5 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.72: +14 -1 lines
Diff to previous 1.72 (colored)

Add definitions from libpcap-1.9.0

Revision 1.69.12.3 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:09 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.69.12.2: +29 -14 lines
Diff to previous 1.69.12.2 (colored) to branchpoint 1.69 (colored)

Sync with HEAD

Revision 1.72 / (download) - annotate - [select for diffs], Tue Jun 26 06:48:02 2018 UTC (5 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0728
Branch point for: phil-wifi
Changes since 1.71: +29 -14 lines
Diff to previous 1.71 (colored)

 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 1.69.12.2 / (download) - annotate - [select for diffs], Mon Jun 25 07:26:06 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.69.12.1: +1 -9 lines
Diff to previous 1.69.12.1 (colored) to branchpoint 1.69 (colored)

Sync with HEAD

Revision 1.71 / (download) - annotate - [select for diffs], Mon Jun 25 03:22:14 2018 UTC (5 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0625
Changes since 1.70: +1 -9 lines
Diff to previous 1.70 (colored)

 Removal of bpf_tap().

Revision 1.69.12.1 / (download) - annotate - [select for diffs], Sun Apr 22 07:20:27 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.69: +14 -14 lines
Diff to previous 1.69 (colored)

Sync with HEAD

Revision 1.70 / (download) - annotate - [select for diffs], Thu Apr 19 21:20:43 2018 UTC (5 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422
Changes since 1.69: +14 -14 lines
Diff to previous 1.69 (colored)

s/static inline/static __inline/g for consistency.

Revision 1.59.2.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:02 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.59.2.1: +68 -1 lines
Diff to previous 1.59.2.1 (colored) to branchpoint 1.59 (colored) next main 1.60 (colored)

update from HEAD

Revision 1.67.4.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:05 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.67: +18 -1 lines
Diff to previous 1.67 (colored) next main 1.68 (colored)

Sync with HEAD

Revision 1.67.2.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:49 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.67: +18 -1 lines
Diff to previous 1.67 (colored) next main 1.68 (colored)

Sync with HEAD

Revision 1.66.2.2 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:58 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.66.2.1: +18 -1 lines
Diff to previous 1.66.2.1 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored)

Sync with HEAD

Revision 1.69 / (download) - annotate - [select for diffs], Wed Jan 25 01:04:23 2017 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-compat-base, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: pgoyette-compat
Changes since 1.68: +18 -4 lines
Diff to previous 1.68 (colored)

Use bpf_ops for bpf_mtap_softint

By doing so we don't need to care whether a kernel enables bpfilter or not.

Revision 1.68 / (download) - annotate - [select for diffs], Tue Jan 24 09:05:28 2017 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.67: +4 -1 lines
Diff to previous 1.67 (colored)

Defer bpf_mtap in Rx interrupt context to softint

bpf_mtap of some drivers is still called in hardware interrupt context.
We want to run them in softint as well as bpf_mtap of most drivers
(see if_percpuq_softint and if_input).

To this end, bpf_mtap_softint mechanism is implemented; it defers
bpf_mtap processing to a dedicated softint for a target driver.
By using the machanism, we can move bpf_mtap processing to softint
without changing target drivers much while it adds some overhead
on CPU and memory. Once target drivers are changed to softint-based,
we should return to normal bpf_mtap.

Proposed on tech-kern and tech-net

Revision 1.66.2.1 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:10 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.66: +2 -1 lines
Diff to previous 1.66 (colored)

Sync with HEAD

Revision 1.67 / (download) - annotate - [select for diffs], Sat Sep 5 20:01:21 2015 UTC (8 years, 7 months ago) by dholland
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.66: +2 -1 lines
Diff to previous 1.66 (colored)

Uses _IOR/_IOW/etc. and thus needs sys/ioccom.h. PR 41200

Revision 1.66 / (download) - annotate - [select for diffs], Wed Nov 19 19:35:21 2014 UTC (9 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.65: +51 -2 lines
Diff to previous 1.65 (colored)

Add BPF_MOD/BPF_XOR, sync DLT entries and document unused bpf instructions.
From libpcap-1.6.2

Revision 1.59.2.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:34 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.59: +96 -12 lines
Diff to previous 1.59 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.63.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:56:15 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.63: +65 -19 lines
Diff to previous 1.63 (colored) next main 1.64 (colored)

Rebase.

Revision 1.65 / (download) - annotate - [select for diffs], Tue Jun 24 22:19:36 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Changes since 1.64: +32 -30 lines
Diff to previous 1.64 (colored)

- Improve the comments in bpf.h and KNF a little.
- Rename bpf_ctx_t member noinit to preinited (reflects the meaning better).

Revision 1.64 / (download) - annotate - [select for diffs], Tue Jun 24 10:53:30 2014 UTC (9 years, 9 months ago) by alnsn
Branch: MAIN
Changes since 1.63: +57 -13 lines
Diff to previous 1.63 (colored)

Implement copfuncs and external memory in bpfjit.

Revision 1.58.2.2 / (download) - annotate - [select for diffs], Thu May 22 11:41:08 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.58.2.1: +46 -8 lines
Diff to previous 1.58.2.1 (colored) to branchpoint 1.58 (colored) next main 1.59 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.59.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:12 2014 UTC (9 years, 10 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.59: +46 -8 lines
Diff to previous 1.59 (colored) next main 1.60 (colored)

sync with head

Revision 1.63 / (download) - annotate - [select for diffs], Fri Nov 15 00:12:44 2013 UTC (10 years, 5 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.62: +36 -13 lines
Diff to previous 1.62 (colored)

- Add bpf_args_t and convert bpf_filter_ext() to use it.  This allows the
  caller to initialise (and re-use) the memory store.
- Add bpf_jit_generate() and bpf_jit_freecode() wrappers.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Sep 18 23:34:55 2013 UTC (10 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.61: +4 -7 lines
Diff to previous 1.61 (colored)

Add bpf_filter_ext() to use with BPF COP, restore bpf_filter() as it was
originally to preserve compatibility.  Similarly, add bpf_validate_ext()
which takes bpf_ctx_t.

Revision 1.61 / (download) - annotate - [select for diffs], Fri Aug 30 15:00:08 2013 UTC (10 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.60: +4 -3 lines
Diff to previous 1.60 (colored)

bpf_filter: add a custom argument which can be passed to coprocessor routine.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Aug 29 14:25:41 2013 UTC (10 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.59: +21 -4 lines
Diff to previous 1.59 (colored)

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 1.58.8.1 / (download) - annotate - [select for diffs], Tue Jun 12 18:25:10 2012 UTC (11 years, 10 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.58: +5 -1 lines
Diff to previous 1.58 (colored) next main 1.59 (colored)

Pull up following revision(s) (requested by abs in ticket #312):
	sys/net/bpf.h: revision 1.59
add {__BEGIN,__END}_DECLS

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:37 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.58: +5 -1 lines
Diff to previous 1.58 (colored)

sync with head

Revision 1.58.6.1 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:43 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.58: +5 -1 lines
Diff to previous 1.58 (colored) next main 1.59 (colored)

sync to latest -current.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Mar 15 00:57:56 2012 UTC (12 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet
Changes since 1.58: +5 -1 lines
Diff to previous 1.58 (colored)

add {__BEGIN,__END}_DECLS

Revision 1.58 / (download) - annotate - [select for diffs], Tue Aug 30 14:22:22 2011 UTC (12 years, 7 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, netbsd-6, jmcneill-usbmp
Changes since 1.57: +19 -1 lines
Diff to previous 1.57 (colored)

Provide netbsd32 compat for bpf. Beside the ioctls, the structure
returned to userland by read(2) also needs to be converted.
For this, the bpf descriptor is flagged as compat32 (or not) in the
open and ioctl functions (where the user process's pid is also updated
in the descriptor). When the bpf buffer is filled in, the 32bits or native
header is used depending on the information stored in the descriptor.

This won't work if a 64bit binary does the open and ioctls, and then
exec a 32bit program which will do the read. But this is very
unlikely to happen in real life ...

Tested on i386 and loongson; with these changes my loongson can run
dhclient and tcpdump with a n32 userland.

Revision 1.54.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:51 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.54.2.1: +3 -3 lines
Diff to previous 1.54.2.1 (colored) next main 1.55 (colored)

sync with head

Revision 1.57 / (download) - annotate - [select for diffs], Sun Dec 5 02:40:40 2010 UTC (13 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

make bpf_validate available in userland.

Revision 1.56 / (download) - annotate - [select for diffs], Sun Dec 5 00:34:21 2010 UTC (13 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

constify

Revision 1.48.76.3 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:53 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.48.76.2: +79 -2 lines
Diff to previous 1.48.76.2 (colored) to branchpoint 1.48 (colored) next main 1.49 (colored)

sync with head.

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Sun May 30 05:18:01 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.54: +76 -2 lines
Diff to previous 1.54 (colored)

sync with head

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:18 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.53: +79 -2 lines
Diff to previous 1.53 (colored) next main 1.54 (colored)

Sync with HEAD.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Apr 5 07:22:22 2010 UTC (14 years ago) by joerg
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1
Changes since 1.54: +76 -2 lines
Diff to previous 1.54 (colored)

Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.

Revision 1.54 / (download) - annotate - [select for diffs], Sat Mar 13 20:38:48 2010 UTC (14 years, 1 month ago) by christos
Branch: MAIN
Branch point for: rmind-uvmplock
Changes since 1.53: +4 -1 lines
Diff to previous 1.53 (colored)

add BIOC{G,S}FEEDBACK which allows one to receive injected outgoing packets
via bpf.

Revision 1.48.76.2 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:26 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.48.76.1: +24 -13 lines
Diff to previous 1.48.76.1 (colored) to branchpoint 1.48 (colored)

sync with head

Revision 1.53 / (download) - annotate - [select for diffs], Mon Jan 25 22:18:17 2010 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.52: +4 -1 lines
Diff to previous 1.52 (colored)

Make bpf dynamically loadable.

Revision 1.52 / (download) - annotate - [select for diffs], Tue Jan 19 22:08:00 2010 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.51: +18 -12 lines
Diff to previous 1.51 (colored)

Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.

Revision 1.51 / (download) - annotate - [select for diffs], Sun Jan 17 19:45:06 2010 UTC (14 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.50: +11 -9 lines
Diff to previous 1.50 (colored)

Forward declare struct bpf_if and use that as the type for bpf_if
instead of "void *".  Buys us oo times the type-safety for 0 times
the price.
(no functional change)

Revision 1.48.76.1 / (download) - annotate - [select for diffs], Mon May 4 08:14:14 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.48: +16 -5 lines
Diff to previous 1.48 (colored)

sync with head.

Revision 1.48.86.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:20:11 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.48: +16 -5 lines
Diff to previous 1.48 (colored) next main 1.49 (colored)

Sync with HEAD.

Revision 1.48.70.1 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:30 2009 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.48: +16 -5 lines
Diff to previous 1.48 (colored) next main 1.49 (colored)

Sync with HEAD.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Jan 13 19:10:52 2009 UTC (15 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Changes since 1.49: +7 -6 lines
Diff to previous 1.49 (colored)

restore binary compatibility on 64 bit systems.

Revision 1.49 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:54 2009 UTC (15 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.48: +15 -5 lines
Diff to previous 1.48 (colored)

merge christos-time_t

Revision 1.48.72.3 / (download) - annotate - [select for diffs], Tue Dec 30 19:31:22 2008 UTC (15 years, 3 months ago) by christos
Branch: christos-time_t
Changes since 1.48.72.2: +3 -3 lines
Diff to previous 1.48.72.2 (colored) to branchpoint 1.48 (colored) next main 1.49 (colored)

need to burn more numbers since sizeof(timeval50) == sizeof(timeval) on 64
bit archs.

Revision 1.48.72.2 / (download) - annotate - [select for diffs], Sun Dec 28 20:53:44 2008 UTC (15 years, 3 months ago) by christos
Branch: christos-time_t
Changes since 1.48.72.1: +2 -2 lines
Diff to previous 1.48.72.1 (colored) to branchpoint 1.48 (colored)

back to usecs now for source compatibility

Revision 1.48.72.1 / (download) - annotate - [select for diffs], Sat Mar 29 20:47:01 2008 UTC (16 years ago) by christos
Branch: christos-time_t
Changes since 1.48: +13 -3 lines
Diff to previous 1.48 (colored)

Welcome to the time_t=long long dev_t=uint64_t branch.

Revision 1.42.4.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:10:26 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.42: +17 -17 lines
Diff to previous 1.42 (colored) next main 1.43 (colored)

sync with head.

Revision 1.31.6.7 / (download) - annotate - [select for diffs], Sun Dec 11 10:29:19 2005 UTC (18 years, 4 months ago) by christos
Branch: ktrace-lwp
Changes since 1.31.6.6: +16 -16 lines
Diff to previous 1.31.6.6 (colored) to branchpoint 1.31 (colored) next main 1.32 (colored)

Sync with head.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Dec 10 23:21:38 2005 UTC (18 years, 4 months ago) by elad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, yamt-nfs-mp-base2, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, yamt-idlelwp-base8, yamt-idlelwp, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, vmlocking-base, vmlocking, thorpej-atomic-base, thorpej-atomic, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, rpaulo-netinet-merge-pcb-base, rpaulo-netinet-merge-pcb, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, reinoud-bufcleanup, post-newlock2-merge, peter-altq-base, peter-altq, nick-net80211-sync-base, nick-net80211-sync, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, newlock2-nbase, newlock2-base, newlock2, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, mjf-ufs-trans-base, mjf-ufs-trans, mjf-devfs-base, mjf-devfs, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-nb4-arm-base, matt-nb4-arm, matt-mips64-base2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, ktrace-lwp-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, jmcneill-pm-base, jmcneill-pm, jmcneill-base, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, elad-kernelauth, cube-autoconf-base, cube-autoconf, christos-time_t-nbase, christos-time_t-base, chap-midi-nbase, chap-midi-base, chap-midi, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64, ad-socklock-base1, ad-audiomp2-base, ad-audiomp2, ad-audiomp-base, ad-audiomp, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-nfs-mp, nick-hppapmap, mjf-devfs2, christos-time_t
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

Multiple inclusion protection, as suggested by christos@ on tech-kern@
few days ago.

Revision 1.47 / (download) - annotate - [select for diffs], Mon Dec 5 21:46:00 2005 UTC (18 years, 4 months ago) by rpaulo
Branch: MAIN
Changes since 1.46: +1 -4 lines
Diff to previous 1.46 (colored)

Make the bpf_maxbufsize a constant when bpfilter pseudo-device is not
present in the kernel config, thus fixing the build. Problem reported
by Havard Eidnes. Solution proposed by Christos, thanks.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Nov 30 23:14:38 2005 UTC (18 years, 4 months ago) by rpaulo
Branch: MAIN
Changes since 1.45: +5 -2 lines
Diff to previous 1.45 (colored)

PR 32198: bpf_validate() needs to do more checks, from Otto Moerbeek/OpenBSD
via Guy Harris.
Problems like out-of-bounds read/write in filter machine operations
were fixed.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Nov 30 16:47:58 2005 UTC (18 years, 4 months ago) by rpaulo
Branch: MAIN
Changes since 1.44: +13 -13 lines
Diff to previous 1.44 (colored)

Replace u_intXX_t by their C99 counterparts.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Nov 30 12:54:42 2005 UTC (18 years, 4 months ago) by rpaulo
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

Fix typo in comment found by Guy Harris (PR 32198).

Revision 1.31.6.6 / (download) - annotate - [select for diffs], Thu Nov 10 14:10:32 2005 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.31.6.5: +2 -2 lines
Diff to previous 1.31.6.5 (colored) to branchpoint 1.31 (colored)

Sync with HEAD. Here we go again...

Revision 1.43 / (download) - annotate - [select for diffs], Thu Aug 4 19:30:47 2005 UTC (18 years, 8 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Implemented the kernel part of BPF statistics and BPF peers, net.bpf.stats
and net.bpf.peers sysctls respectively.

A new structure was added to describe the external (user viewable)
representation of a BPF file; a new entry was added to the bpf_d
structure to store the PID of the calling process; a simple_lock was added
to protect the insert/removal from the net.bpf.peers sysctl handler.

This idea came from FreeBSD (Christian S.J. Peron) but while it is
implemented with sysctl's it differs a bit.

Reviewed by: christos@ and atatat@ (who gave me the tip for the net.bpf.peers
sysctl helper function).

Revision 1.41.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:31 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.41: +6 -6 lines
Diff to previous 1.41 (colored) next main 1.42 (colored)

sync with -current

Revision 1.41.6.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:31 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.41: +6 -6 lines
Diff to previous 1.41 (colored) next main 1.42 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.31.6.5 / (download) - annotate - [select for diffs], Fri Mar 4 16:52:56 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.31.6.4: +6 -6 lines
Diff to previous 1.31.6.4 (colored) to branchpoint 1.31 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.42 / (download) - annotate - [select for diffs], Sat Feb 26 22:45:09 2005 UTC (19 years, 1 month ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, kent-audio2-base
Branch point for: yamt-lazymbuf
Changes since 1.41: +6 -6 lines
Diff to previous 1.41 (colored)

nuke trailing whitespace

Revision 1.31.6.4 / (download) - annotate - [select for diffs], Tue Sep 21 13:36:35 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.31.6.3: +1 -1 lines
Diff to previous 1.31.6.3 (colored) to branchpoint 1.31 (colored)

Fix the sync with head I botched.

Revision 1.31.6.3 / (download) - annotate - [select for diffs], Sat Sep 18 14:54:15 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.31.6.2: +1 -1 lines
Diff to previous 1.31.6.2 (colored) to branchpoint 1.31 (colored)

Sync with HEAD.

Revision 1.31.6.2 / (download) - annotate - [select for diffs], Wed Aug 25 06:58:58 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.31.6.1: +15 -11 lines
Diff to previous 1.31.6.1 (colored) to branchpoint 1.31 (colored)

Sync with HEAD.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Aug 19 20:58:23 2004 UTC (19 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.40: +5 -1 lines
Diff to previous 1.40 (colored)

Factor out the hand-crafting of mbufs from the interface files. Reviewed by
gimpy. XXX: I could have used bpf_mtap2 on some of the new functions, but I
chose not to, because I just wanted to do what amounts to a code move.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Aug 19 18:33:24 2004 UTC (19 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.39: +11 -11 lines
Diff to previous 1.39 (colored)

- ansify
- remove unnecessary casts
- change caddr_t to void *
- no functional change.

Revision 1.31.6.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:54:11 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.31: +27 -16 lines
Diff to previous 1.31 (colored)

Sync with HEAD

Revision 1.39 / (download) - annotate - [select for diffs], Sat May 29 14:18:33 2004 UTC (19 years, 10 months ago) by darrenr
Branch: MAIN
Changes since 1.38: +0 -15 lines
Diff to previous 1.38 (colored)

back out previous change - these diffs aren't what I'd tested.

Revision 1.38 / (download) - annotate - [select for diffs], Sat May 29 08:56:19 2004 UTC (19 years, 10 months ago) by darrenr
Branch: MAIN
Changes since 1.37: +16 -1 lines
Diff to previous 1.37 (colored)

add mmap(2) interface to bpf(4) devices, along with BIOCMMAPINFO ioctl call
for applications to interact with the bpf device for the purpose of using
mmap to examinen captured data.

Revision 1.37 / (download) - annotate - [select for diffs], Fri Apr 30 22:07:21 2004 UTC (19 years, 11 months ago) by dyoung
Branch: MAIN
Changes since 1.36: +2 -1 lines
Diff to previous 1.36 (colored)

Add bpf_mtap2, which taps a packet whose head is in a void *buffer
and whose tail is in an mbuf chain.

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Wed Apr 21 03:56:17 2004 UTC (19 years, 11 months ago) by jmc
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, 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-1, 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-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Changes since 1.33: +23 -10 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

Pullup rev 1.34-1.36 (requested by darrenr in ticket #167)

Reduce bpf buffer to 32k from 1M to reduce kernel memory usage from userland
binaries.
Fix bpf so that select will return for a timeout.
Fix the behaviour of BIOCIMMEDIATE.
In bpf_mtap(), optimise the calling of bpf_filter() and catchpacket()
based on whether or not the entire packet is in one mbuf.
Various other bpf fixes, including PR#8674, PR#12170

Revision 1.36 / (download) - annotate - [select for diffs], Thu Apr 15 15:17:11 2004 UTC (20 years ago) by darrenr
Branch: MAIN
Changes since 1.35: +5 -5 lines
Diff to previous 1.35 (colored)

don't use u_long in an ioctl, rather, u_int64_t so there are no long 32/64
bit compatibility problems.  bump kernel version like it should have been.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Apr 15 14:56:57 2004 UTC (20 years ago) by darrenr
Branch: MAIN
Changes since 1.34: +12 -1 lines
Diff to previous 1.34 (colored)

Add a count of the number of packets that match the bpf filter applied to a
particule device.  In doing this, make a new the bpf_stat structure with
members that are u_long rather than u_int, matching the counters in the bpf_d.
the original bpf_stat is now bpf_stat_old and so to the original ioctl
is preserved as BIOCGSTATSOLD.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Apr 10 23:31:52 2004 UTC (20 years ago) by darrenr
Branch: MAIN
Changes since 1.33: +12 -10 lines
Diff to previous 1.33 (colored)

Fix bpf so that select will return for a timeout (from FreeBSD.)

Fix the behaviour of BIOCIMMEDIATE (fix from LBL BPF code via FreeBSD.)

In bpf_mtap(), optimise the calling of bpf_filter() and catchpacket()
based on whether or not the entire packet is in one mbuf (based on
similar change FreeBSD but fixes BIOC*SEESENT issue with that.)

Copy the implementation of BIOCSSEESENT, BIOCGSEESENT by FreeBSD.

Review Assistance: Guy Harris

PRs: kern/8674, kern/12170

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jan 22 00:32:41 2004 UTC (20 years, 2 months ago) by jonathan
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.32: +3 -2 lines
Diff to previous 1.32 (colored)

Make bpf_maxbufsize writable via sysctl, as written by Andrew Brown.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Aug 7 16:32:47 2003 UTC (20 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.31: +2 -6 lines
Diff to previous 1.31 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.28.2.3 / (download) - annotate - [select for diffs], Fri Oct 18 02:45:09 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.28.2.2: +17 -39 lines
Diff to previous 1.28.2.2 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored)

Catch up to -current.

Revision 1.28.4.3 / (download) - annotate - [select for diffs], Thu Oct 10 18:43:39 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.28.4.2: +18 -40 lines
Diff to previous 1.28.4.2 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.31 / (download) - annotate - [select for diffs], Sat Sep 21 17:02:46 2002 UTC (21 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: ktrace-lwp
Changes since 1.30: +18 -40 lines
Diff to previous 1.30 (colored)

Nuke the old SunOS-style ioctl defns.

Revision 1.28.2.2 / (download) - annotate - [select for diffs], Tue Sep 17 21:22:45 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.28.2.1: +14 -1 lines
Diff to previous 1.28.2.1 (colored) to branchpoint 1.28 (colored)

Catch up to -current.

Revision 1.28.4.2 / (download) - annotate - [select for diffs], Fri Sep 6 08:48:47 2002 UTC (21 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.28.4.1: +14 -1 lines
Diff to previous 1.28.4.1 (colored) to branchpoint 1.28 (colored)

sync kqueue branch with HEAD

Revision 1.29.8.1 / (download) - annotate - [select for diffs], Thu Aug 29 00:56:40 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.29: +14 -1 lines
Diff to previous 1.29 (colored) next main 1.30 (colored)

catch up with -current.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Aug 28 09:34:58 2002 UTC (21 years, 7 months ago) by onoe
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.29: +14 -1 lines
Diff to previous 1.29 (colored)

Define new kernel interface bpfattach2() to register another data link
type for the driver, which will be used for 802.11 drivers.
Also add 2 APIs to get a list of available DLTs and use one for them.
	BIOCGDLTLIST (struct bpf_dltlist)
	BIOCSDLT (u_int)

Revision 1.28.4.1 / (download) - annotate - [select for diffs], Thu Jan 10 20:01:57 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

Sync kqueue branch with -current.

Revision 1.28.2.1 / (download) - annotate - [select for diffs], Tue Jan 8 00:33:50 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

Catch up to -current.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Dec 14 23:30:02 2001 UTC (22 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

Use __sh__ instead of __sh3__.

Revision 1.24.2.3 / (download) - annotate - [select for diffs], Wed Dec 13 15:50:27 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.24.2.2: +4 -26 lines
Diff to previous 1.24.2.2 (colored) to branchpoint 1.24 (colored) next main 1.25 (colored)

Sync with HEAD (for UBC fixes).

Revision 1.28 / (download) - annotate - [select for diffs], Tue Dec 12 17:55:21 2000 UTC (23 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: nathanw_sa, kqueue
Changes since 1.27: +5 -27 lines
Diff to previous 1.27 (colored)

Use <net/dlt.h> to get the DLT_* constants.  Also change bpfattach()
and bpf_change_type() to take just a pointer to the ifnet, rather than
a pointer to the ifnet and a pointer to a member of the ifnet (the bpf
pointer).

We'll let this ride on the Dec 12 1.5N version bump.

Revision 1.24.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:05:49 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.24.2.1: +5 -3 lines
Diff to previous 1.24.2.1 (colored) to branchpoint 1.24 (colored)

Sync with HEAD.

Revision 1.24.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:09:56 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.27 / (download) - annotate - [select for diffs], Sat Nov 11 00:11:04 2000 UTC (23 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.26: +3 -1 lines
Diff to previous 1.26 (colored)

Pull in <sys/time.h>, since we use timevals here.

Revision 1.25.4.1 / (download) - annotate - [select for diffs], Fri Nov 3 19:24:08 2000 UTC (23 years, 5 months ago) by tv
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored) next main 1.26 (colored)

Pullup 1.26 [eeh]:
Fix sparc64 LP64 issues.

Revision 1.26 / (download) - annotate - [select for diffs], Thu Nov 2 16:14:05 2000 UTC (23 years, 5 months ago) by eeh
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Fix sparc64 LP64 issues.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Jan 31 23:06:12 2000 UTC (24 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl, chs-ubc2-newbase
Branch point for: netbsd-1-5
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)

Implement bpfdetach().

Revision 1.24 / (download) - annotate - [select for diffs], Mon Sep 13 10:31:43 1999 UTC (24 years, 7 months ago) by itojun
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: thorpej_scsipi
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

Merge in NetBSD/sh3 from cvs.kame.net repository.

Tree structure:
- sys/arch/sh3: sh3 generic code
	As commented, in-chip device drivers are put into sys/arch/sh3/dev.
- sys/arch/evbsh3: sh3 evaluation boards (pure sh3 CPU, no fancy external HW)
- sys/arch/mmeye: Brains mmEye, www.brains.co.jp
MI source code includes couple of #ifdef for sh3-coff support.
(sh3 uses coff or elf)

Needs some more improvements, especialy in sys/arch/sh3/conf/files.sh3,
to compile the tree (due to last minute tree structure change).

Revision 1.22.10.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:27:32 1999 UTC (24 years, 9 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.22: +6 -1 lines
Diff to previous 1.22 (colored) next main 1.23 (colored)

Sync w/ -current.

Revision 1.23 / (download) - annotate - [select for diffs], Tue May 11 02:11:08 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.22: +6 -1 lines
Diff to previous 1.22 (colored)

* Add the ability to change the data link type on the fly.
* Define two more data link types: NetBSD PPP-over-serial and NetBSD
PPP-over-Ethernet.  (Different PPP encaps have different header formats!)

Revision 1.22 / (download) - annotate - [select for diffs], Sat Jul 25 11:31:18 1998 UTC (25 years, 8 months ago) by explorer
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kenh-if-detach-base, kenh-if-detach, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame, eeh-paddr_t-base, eeh-paddr_t, chs-ubc-base, chs-ubc
Branch point for: chs-ubc2
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored)

define DLT_HDLC

Revision 1.21 / (download) - annotate - [select for diffs], Thu May 14 00:04:58 1998 UTC (25 years, 11 months ago) by kml
Branch: MAIN
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

Driver for Essential Communications' RoadRunner HIPPI (800 Mb/sec network)
card.  With some modification, this could probably also work for their
Gigabit Ethernet card based on the same chipset...

Revision 1.20 / (download) - annotate - [select for diffs], Thu Apr 30 00:08:19 1998 UTC (25 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.19: +5 -1 lines
Diff to previous 1.19 (colored)

Implement two new BPF ioctls: BPFGHDRCMPLT and BPFSHDRCMPLT, to get/set
the "header already complete" flag.  This allows BPF writers to spoof
layer 2 source addresses (providing the layer 2 in use supports it) in
applications where this is necessary.  From Greg Smith <greg@nas.nasa.gov>.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Mar 1 02:25:04 1998 UTC (26 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

Merge with Lite2 + local changes

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:13:22 1998 UTC (26 years, 1 month ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +2 -2 lines
Diff to previous 1.1.1.2 (colored)

Import 4.4BSD-Lite2

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:10:05 1998 UTC (26 years, 1 month ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1.1.1: +47 -14 lines
Diff to previous 1.1.1.1 (colored)

Import 4.4BSD-Lite for reference

Revision 1.15.10.1 / (download) - annotate - [select for diffs], Tue Oct 14 10:28:56 1997 UTC (26 years, 6 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.15: +17 -6 lines
Diff to previous 1.15 (colored) next main 1.16 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Oct 10 14:15:32 1997 UTC (26 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-base
Changes since 1.17: +4 -1 lines
Diff to previous 1.17 (colored)

Add definitions for bpf_int and bpf_u_int; these are not used in the kernel,
but libpcap expects them if we advertize our current BPF_VERSION.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Oct 9 18:18:37 1997 UTC (26 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.16: +9 -5 lines
Diff to previous 1.16 (colored)

sync with bpf-1.2a1
	- fix whitespace
	- add rcsid
	- add BPF_RELEASE define
	- add BIOCSTCPF BIOCSUDPF

Revision 1.16 / (download) - annotate - [select for diffs], Fri Oct 3 16:24:18 1997 UTC (26 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.15: +6 -2 lines
Diff to previous 1.15 (colored)

- Add some new data link types from libpcap-0.4a3
- bpf_filter() does exist in userland

Revision 1.15 / (download) - annotate - [select for diffs], Fri Dec 13 07:57:33 1996 UTC (27 years, 4 months ago) by mikel
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, thorpej-setroot, mrg-vm-swap, marc-pcmcia-bp, is-newarp-before-merge, is-newarp-base, is-newarp, bouyer-scsipi
Branch point for: marc-pcmcia
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored)

add ATM data-link type; reqd. for libpcap.

Revision 1.14 / (download) - annotate - [select for diffs], Thu May 2 00:57:28 1996 UTC (27 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Changes since 1.13: +10 -1 lines
Diff to previous 1.13 (colored)

On new architectures and on the alpha, define SIZEOF_BPF_HDR to be
sizeof(struct bpf_hdr).  On machines that we currently support that
can use the old definition (which just covers the size of the data in
struct bpf_hdr), use it even though it's a hack.  (This was changed
for the 'new architectures' case so as to be fail-safe; BPF may
waste a few bytes of space per captured packet on new architectures,
but now at least it's more likely to work.)

Revision 1.13 / (download) - annotate - [select for diffs], Tue Feb 13 21:59:58 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.12: +1 -7 lines
Diff to previous 1.12 (colored)

Net prototypes

Revision 1.12 / (download) - annotate - [select for diffs], Wed Sep 27 18:30:40 1995 UTC (28 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.11: +5 -1 lines
Diff to previous 1.11 (colored)

Enhancements to the bpf from Stu Grossman <grossman@cygnus.com>:
	* grok FIONBIO, FIOASYNC, and TIOC{G,S}PGRP
	* add BIOC{G,S}RSIG; get/set the signal to be delivered
	  to the process or process group upon packet reception.
	  Defaults to SIGIO.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Apr 22 13:26:32 1995 UTC (28 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.10: +8 -8 lines
Diff to previous 1.10 (colored)

copy routines should take size_t lengths for prototype consistency.
don't assume that tick is >= 1000; loses badly on alpha (div. by zero)
only try unaligned copies if NetBSD's UNALIGNED_ACCESS symbol is defined.
various misc type size cleanups, mostly short -> int16_t.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Mar 26 20:30:06 1995 UTC (29 years ago) by jtc
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

KERNEL -> _KERNEL

Revision 1.9 / (download) - annotate - [select for diffs], Mon Mar 6 10:56:06 1995 UTC (29 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.8: +5 -6 lines
Diff to previous 1.8 (colored)

Make this more type-safe for the Alpha.  From the libpcap 0.0 distribution.
(Needs more work.)

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jan 13 00:34:09 1995 UTC (29 years, 3 months ago) by jtc
Branch: MAIN
Changes since 1.7: +5 -1 lines
Diff to previous 1.7 (colored)

Protect from multiple inclusion with _NET_BPF_H_, for PR #679.

Revision 1.7 / (download) - annotate - [select for diffs], Sun Oct 30 21:48:44 1994 UTC (29 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

be more careful with types, also pull in headers where necessary.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jun 29 06:35:54 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.5: +3 -2 lines
Diff to previous 1.5 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.5 / (download) - annotate - [select for diffs], Fri May 13 06:02:19 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +20 -16 lines
Diff to previous 1.4 (colored)

Update to 4.4-Lite networking code, with a few local changes.

Revision 1.4 / (download) - annotate - [select for diffs], Thu May 20 03:05:50 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, magnum-base, magnum
Changes since 1.3: +2 -3 lines
Diff to previous 1.3 (colored)

add rcs ids to everything, and clean up headers

Revision 1.3 / (download) - annotate - [select for diffs], Mon Apr 19 03:47:42 1993 UTC (31 years ago) by mycroft
Branch: MAIN
Changes since 1.2: +5 -1 lines
Diff to previous 1.2 (colored)

Add consistent multiple-inclusion protection.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Mar 25 00:27:52 1993 UTC (31 years ago) by cgd
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-8
Changes since 1.1: +35 -10 lines
Diff to previous 1.1 (colored)

added BPF support, as provided by David Greenman (davidg@implode.rain.com)

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>