diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2018-01-24 00:33:46 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2018-01-24 00:33:46 +0000 |
commit | 8cdd79bddf092104bd7a408f77fa1f41ff222e63 (patch) | |
tree | dca5557f1641735774663b88ac770bca3becf3d6 /share/man/man9/bpf_mtap.9 | |
parent | ab656ab8b9e23bc3c7d18a299728d2a5ced72240 (diff) |
document bpfsattach and bpfsdetach
Diffstat (limited to 'share/man/man9/bpf_mtap.9')
-rw-r--r-- | share/man/man9/bpf_mtap.9 | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/share/man/man9/bpf_mtap.9 b/share/man/man9/bpf_mtap.9 index d5b11fafa3e..dc59355fa63 100644 --- a/share/man/man9/bpf_mtap.9 +++ b/share/man/man9/bpf_mtap.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bpf_mtap.9,v 1.11 2018/01/12 02:19:47 dlg Exp $ +.\" $OpenBSD: bpf_mtap.9,v 1.12 2018/01/24 00:33:45 dlg Exp $ .\" .\" Copyright (c) 2016 David Gwynne <dlg@openbsd.org> .\" @@ -14,12 +14,14 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 12 2018 $ +.Dd $Mdocdate: January 24 2018 $ .Dt BPF_MTAP 9 .Os .Sh NAME .Nm bpfattach , .Nm bpfdetach , +.Nm bpfsattach , +.Nm bpfsdetach , .Nm bpf_filter , .Nm bpf_mfilter , .Nm bpf_validate , @@ -39,6 +41,10 @@ .Fc .Ft void .Fn bpfdetach "struct ifnet *ifp" +.Ft void * +.Fn bpfsattach "caddr_t *bpfp" "const char *name" "u_int dlt" "u_int hdrlen" +.Ft void +.Fn bpfsdetach "void *bpfif" .Ft u_int .Fo bpf_filter .Fa "const struct bpf_insn *pc" @@ -103,6 +109,21 @@ removes and frees all the BPF interfaces that were configured for the network interface .Fa ifp . .Pp +.Fn bpfsattach +allocates and configures a BPF interface for use by the subsystem +identified by +.Fa name . +The +.Fa bpfp , +.Fa dlt , +.Fa hdrlen +arguments work like those in +.Fn bpfattach . +.Pp +.Fn bpfsdetach +removes and frees the BPF interface referenced by +.Fa bpfif . +.Pp .Fn bpf_filter executes the BPF program referenced by .Fa pc @@ -191,6 +212,13 @@ and m->m_pkthdr.pf.prio before matching occurs. .Sh CONTEXT +.Fn bpfattach , +.Fn bpfdetach , +.Fn bpfsattach , +and +.Fn bpfsdetach +can be called from process context. +.Pp .Fn bpf_filter , .Fn bpf_mfilter , and @@ -206,6 +234,9 @@ and can be called from process context, or from an interrupt context at or below .Dv IPL_NET . .Sh RETURN VALUES +.Fn bpfsattach +returns a reference to the BPF interface it allocates. +.Pp .Fn bpf_filter , and .Fn bpf_mfilter |