| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this will be used so a bpf filter can make a decision based on a
random number, which in turn will be used so a filter can perform
random sampling of packets rather than capturing all packets. random
sampling means that we don't have to figure out how to make bpf
coordinate multiple concurrent calls to do counter based sampling.
BPF_RND is currently backed with arc4random.
discussed with many including jmatthew@, alex wilson, claudio@,
sthen@, deraadt@, and tb@
ok kn@ tb@ jmatthew@
i call this extended bpf... xBPF.
|
| |
|
|
|
|
|
|
|
|
| |
be used.
Also noted by dlg@.
ok phessler@ mpi@
|
| |
|
|
|
|
| |
Static is a nop in _KERNEL, but is static in userland and therefore libpcap
|
|
|
|
|
|
|
|
| |
other projects have already done this, and there's software (eg,
gopacket) which now expects it.
based on a discussion with jasper@ and canacar@
ok jasper@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
ok krw@ miod@
|
| |
|
|
|
|
| |
ok mpi@ henning@ krw@
|
|
|
|
| |
Noticed by robert at openbsd pap st, thanks.
|
| |
|
|
|
|
|
|
| |
leak previous kernel stack contents through a malicioius BPF filter.
Reported by Dan Rosenberg via Alistair Crooks. ok deraadt@, krw@,
claudio@
|
| |
|
|
|
|
| |
the comments. Based on diff from Guy Harris
|
|
|
|
| |
ok miod@ jmc@
|
|
|
|
| |
ok henning@ deraadt@ canacar@
|
|
|
|
| |
validation; from NetBSD; ok deraadt@
|
|
|
|
|
| |
Also change another cast, for the sake of consistency, as prompted by djm@
ok deraadt@ djm@ canacar@
|
|
|
|
|
|
| |
__STRICT_ALIGNMENT instead.
Help pedro@ deraadt@, ok deraadt@
|
|
|
|
|
|
|
|
| |
manual page.
- more strict bpf code validation, preventing arbitrary kernel memory
read and writes.
Some help from frantzen@ and canacar@; testing jmc@ markus@;
ok canacar@ henning@ franzen@
|
| |
|
| |
|
|
|
|
| |
ok tedu@
|
| |
|
|
|
|
| |
rescinded 22 July 1999. Proofed by myself and Theo.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
proper definitions for 'struct mbuf' and friends for in.h, bringing in
'sys/socket.h' and 'net/if.h' fixes this.
|
|
|