#
5bc4e2d4 |
| 20-Jun-2022 |
yamaguchi <yamaguchi@NetBSD.org> |
bpf(4): added support for VLAN hardware offloading of ethernet devices
|
#
6dc5e775 |
| 09-Jun-2021 |
martin <martin@NetBSD.org> |
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 e
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.
show more ...
|
#
34d535fd |
| 09-Jun-2021 |
martin <martin@NetBSD.org> |
Add a (FreeBSD compatible) bpf_peers_present() predicate to allow testing for active listeners on a tap.
|
#
8a225bb0 |
| 11-Jun-2020 |
roy <roy@NetBSD.org> |
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
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.
show more ...
|
#
a219a2d3 |
| 26-Feb-2019 |
msaitoh <msaitoh@NetBSD.org> |
Whitespace change.
|
#
323d79f3 |
| 03-Sep-2018 |
christos <christos@NetBSD.org> |
Add definitions from libpcap-1.9.0
|
#
8517c9d1 |
| 26-Jun-2018 |
msaitoh <msaitoh@NetBSD.org> |
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 th
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.
show more ...
|
#
2e52ff7e |
| 25-Jun-2018 |
msaitoh <msaitoh@NetBSD.org> |
Removal of bpf_tap().
|
#
bd4e68b7 |
| 19-Apr-2018 |
christos <christos@NetBSD.org> |
s/static inline/static __inline/g for consistency.
|
#
dcc2050d |
| 25-Jan-2017 |
ozaki-r <ozaki-r@NetBSD.org> |
Use bpf_ops for bpf_mtap_softint
By doing so we don't need to care whether a kernel enables bpfilter or not.
|
#
f24990e8 |
| 24-Jan-2017 |
ozaki-r <ozaki-r@NetBSD.org> |
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_p
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
show more ...
|
#
64d83817 |
| 05-Sep-2015 |
dholland <dholland@NetBSD.org> |
Uses _IOR/_IOW/etc. and thus needs sys/ioccom.h. PR 41200
|
#
bb58c376 |
| 19-Nov-2014 |
christos <christos@NetBSD.org> |
Add BPF_MOD/BPF_XOR, sync DLT entries and document unused bpf instructions. From libpcap-1.6.2
|
#
df1b253a |
| 24-Jun-2014 |
rmind <rmind@NetBSD.org> |
- Improve the comments in bpf.h and KNF a little. - Rename bpf_ctx_t member noinit to preinited (reflects the meaning better).
|
#
da19ca0c |
| 24-Jun-2014 |
alnsn <alnsn@NetBSD.org> |
Implement copfuncs and external memory in bpfjit.
|
#
cd89282e |
| 15-Nov-2013 |
rmind <rmind@NetBSD.org> |
- 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.
|
#
8d58f940 |
| 18-Sep-2013 |
rmind <rmind@NetBSD.org> |
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.
|
#
3af3a88f |
| 30-Aug-2013 |
rmind <rmind@NetBSD.org> |
bpf_filter: add a custom argument which can be passed to coprocessor routine.
|
#
77fa8a93 |
| 29-Aug-2013 |
rmind <rmind@NetBSD.org> |
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 generi
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@
show more ...
|
#
323fa483 |
| 15-Mar-2012 |
christos <christos@NetBSD.org> |
add {__BEGIN,__END}_DECLS
|
#
23c35c52 |
| 30-Aug-2011 |
bouyer <bouyer@NetBSD.org> |
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
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.
show more ...
|
#
3b9dfe39 |
| 05-Dec-2010 |
christos <christos@NetBSD.org> |
make bpf_validate available in userland.
|
#
d639454c |
| 05-Dec-2010 |
christos <christos@NetBSD.org> |
constify
|
#
58e86755 |
| 05-Apr-2010 |
joerg <joerg@NetBSD.org> |
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.
|
#
8bc59737 |
| 13-Mar-2010 |
christos <christos@NetBSD.org> |
add BIOC{G,S}FEEDBACK which allows one to receive injected outgoing packets via bpf.
|