File tree 1 file changed +28
-3
lines changed
1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change 1
- .\" $OpenBSD: bpf_mtap.9,v 1.18 2023/04/12 09:55:22 jsg Exp $
1
+ .\" $OpenBSD: bpf_mtap.9,v 1.19 2025/03/04 01:33:42 dlg Exp $
2
2
.\"
3
3
.\" Copyright (c) 2016 David Gwynne <dlg@openbsd.org>
4
4
.\"
14
14
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
15
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
16
.\"
17
- .Dd $Mdocdate : April 12 2023 $
17
+ .Dd $Mdocdate : March 4 2025 $
18
18
.Dt BPF_MTAP 9
19
19
.Os
20
20
.Sh NAME
21
21
.Nm bpfattach ,
22
+ .Nm bpfxattach ,
22
23
.Nm bpfdetach ,
23
24
.Nm bpfsattach ,
24
25
.Nm bpfsdetach ,
40
41
.Fa " u_int dlt"
41
42
.Fa " u_int hdrlen"
42
43
.Fc
44
+ .Ft void *
45
+ .Fo bpfxattach
46
+ .Fa " caddr_t *bpfp"
47
+ .Fa " const char *name"
48
+ .Fa " struct ifnet *ifp"
49
+ .Fa " u_int dlt"
50
+ .Fa " u_int hdrlen"
51
+ .Fc
43
52
.Ft void
44
53
.Fn bpfdetach " struct ifnet *ifp"
45
54
.Ft void *
@@ -113,6 +122,19 @@ provide different data link-layer types for filtering.
113
122
.Fa hdrlen
114
123
indicates the length of the link header for the data link-layer type.
115
124
.Pp
125
+ .Fn bpfxattach
126
+ allocates and configures a BPF interface for use with the network interface
127
+ .Fa ifp ,
128
+ but with a BPF interface name provided by the
129
+ .Fa name
130
+ argument instead of the name of the network interface.
131
+ The
132
+ .Fa bpfp ,
133
+ .Fa dlt ,
134
+ .Fa hdrlen
135
+ arguments work like those in
136
+ .Fn bpfattach .
137
+ .Pp
116
138
.Fn bpfdetach
117
139
removes and frees all the BPF interfaces that were configured for
118
140
the network interface
@@ -230,6 +252,7 @@ of length
230
252
will be prefixed to the buffer for filter evaluation.
231
253
.Sh CONTEXT
232
254
.Fn bpfattach ,
255
+ .Fn bpfxattach ,
233
256
.Fn bpfdetach ,
234
257
.Fn bpfsattach ,
235
258
and
@@ -252,7 +275,9 @@ can be called from process context, or from an interrupt context at or below
252
275
.Dv IPL_NET .
253
276
.Sh RETURN VALUES
254
277
.Fn bpfsattach
255
- returns a reference to the BPF interface it allocates.
278
+ and
279
+ .Fn bpfxattach
280
+ return a reference to the BPF interface they allocate.
256
281
.Pp
257
282
.Fn bpf_filter
258
283
and
You can’t perform that action at this time.
0 commit comments