bpf.9 (ea0e76a28d1b70b4dbc7d704f3a6e3ec70c22a16) bpf.9 (6c74ff0ea6eb5eb3a21d05486740c9488721a8b5)
1.\" Copyright (c) 2004 FreeBSD Inc.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
1.\" Copyright (c) 2004 FreeBSD Inc.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd December 13, 2006
27.Dd May 11, 2012
28.Dt BPF 9
29.Os
30.\"
31.Sh NAME
32.Nm bpf
33.Nd "Berkeley Packet Filter"
34.\"
35.Sh SYNOPSIS

--- 205 unchanged lines hidden (view full) ---

241if there is no filter.
242Otherwise, it returns the result of the filter program.
243.Pp
244The
245.Fn bpf_validate
246function
247returns 0 when the program is not a valid filter program.
248.\"
28.Dt BPF 9
29.Os
30.\"
31.Sh NAME
32.Nm bpf
33.Nd "Berkeley Packet Filter"
34.\"
35.Sh SYNOPSIS

--- 205 unchanged lines hidden (view full) ---

241if there is no filter.
242Otherwise, it returns the result of the filter program.
243.Pp
244The
245.Fn bpf_validate
246function
247returns 0 when the program is not a valid filter program.
248.\"
249.Sh EVENT HANDLERS
250.Nm
251invokes
252.Fa bpf_track
253.Xr EVENTHANDLER 9
254event each time listener attaches to or detaches from an interface.
255Pointer to
256.Pq Vt "struct ifnet *"
257is passed as the first argument, interface
258.Fa dlt
259follows. Last argument indicates listener is attached (1) or
260detached (0).
261Note that handler is invoked with
262.Nm
263global lock held, which implies restriction on sleeping and calling
264.Nm
265subsystem inside
266.Xr EVENTHANDLER 9
267dispatcher.
268Note that handler is not called for write-only listeners.
269.\"
249.Sh SEE ALSO
250.Xr tcpdump 1 ,
270.Sh SEE ALSO
271.Xr tcpdump 1 ,
251.Xr bpf 4
272.Xr bpf 4 ,
273.Xr EVENTHANDLER 9
252.\"
253.Sh HISTORY
254The Enet packet filter was created in 1980 by Mike Accetta and
255Rick Rashid at Carnegie-Mellon University.
256Jeffrey Mogul,
257at Stanford,
258ported the code to
259.Bx

--- 20 unchanged lines hidden ---
274.\"
275.Sh HISTORY
276The Enet packet filter was created in 1980 by Mike Accetta and
277Rick Rashid at Carnegie-Mellon University.
278Jeffrey Mogul,
279at Stanford,
280ported the code to
281.Bx

--- 20 unchanged lines hidden ---