diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2016-04-02 08:49:50 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2016-04-02 08:49:50 +0000 |
commit | e5a0d0d70b99ccd066229eef52ecb6861bdc7f8e (patch) | |
tree | 467c8ba025beabaae6fe3b4d2c4c3eed8c4a3523 /sys/net/route.c | |
parent | 1205b031a9ad9ffbd73b76f455e3bcf03051352d (diff) |
refactor bpf_filter a bit.
the code was confusing around how it dealt with packets in mbufs
vs plain memory buffers with a lenght.
this renames bpf_filter to _bpf_filter, and changes it so the packet
memory is referred to by an opaque pointer, and callers have to
provide a set of operations to extra values from that opaque pointer.
bpf_filter is now provided as a wrapper around _bpf_filter. it
provides a set of operators that work on a straight buffer with a
lenght.
this also adds a bpf_mfilter function which takes an mbuf instead
of a buffer, and it provides explicit operations for extracting
values from mbufs.
if we want to use bpf filters against other data structures (usb
or scsi packets maybe?) we are able to provide functions for
extracting payloads from them and use _bpf_filter as is.
ok canacar@
Diffstat (limited to 'sys/net/route.c')
0 files changed, 0 insertions, 0 deletions