EVENTHANDLER.9 (0bfd163f522701b486e066fa2e56624c02f5081a) EVENTHANDLER.9 (ad6c0150c0408a878e09c50e01995f20ec0c5e85)
1.\" Copyright (c) 2004 Joseph Koshy
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.

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

18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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.\" $FreeBSD$
25.\"
1.\" Copyright (c) 2004 Joseph Koshy
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.

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

18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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.\" $FreeBSD$
25.\"
26.Dd August 1, 2013
26.Dd April 19, 2014
27.Dt EVENTHANDLER 9
28.Os
29.Sh NAME
30.Nm EVENTHANDLER
31.Nd kernel event handling functions
32.Sh SYNOPSIS
33.In sys/eventhandler.h
34.Fn EVENTHANDLER_DECLARE name type

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

181.El
182.Ss Kernel Event Handlers
183The following event handlers are present in the kernel:
184.Bl -tag -width indent
185.It Vt acpi_sleep_event
186Callbacks invoked when the system is being sent to sleep.
187.It Vt acpi_wakeup_event
188Callbacks invoked when the system is being woken up.
27.Dt EVENTHANDLER 9
28.Os
29.Sh NAME
30.Nm EVENTHANDLER
31.Nd kernel event handling functions
32.Sh SYNOPSIS
33.In sys/eventhandler.h
34.Fn EVENTHANDLER_DECLARE name type

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

181.El
182.Ss Kernel Event Handlers
183The following event handlers are present in the kernel:
184.Bl -tag -width indent
185.It Vt acpi_sleep_event
186Callbacks invoked when the system is being sent to sleep.
187.It Vt acpi_wakeup_event
188Callbacks invoked when the system is being woken up.
189.It Vt app_coredump_start
190Callbacks invoked at start of application core dump.
191.It Vt app_coredump_progress
192Callbacks invoked during progress of application core dump.
193.It Vt app_coredump_finish
194Callbacks invoked at finish of application core dump.
195.It Vt app_coredump_error
196Callbacks invoked on error of application core dump.
197.It Vt bpf_track
198Callbacks invoked when a BPF listener attaches to/detaches from network interface.
199.It Vt cpufreq_levels_changed
200Callback invoked when cpu frequence levels have changed.
201.It Vt cpufreq_post_change
202Callback invoked after cpu frequence has changed.
203.It Vt cpufreq_pre_change
204Callback invoked before cpu frequence has changed
205.It Vt dcons_poll
206Callback invoked to poll for dcons changes.
189.It Vt dev_clone
190Callbacks invoked when a new entry is created under
191.Pa /dev .
207.It Vt dev_clone
208Callbacks invoked when a new entry is created under
209.Pa /dev .
210.It Vt group_attach_event
211Callback invoked when an interfance has been added to an interface group.
212.It Vt group_change_event
213Callback invoked when an change has been made to an interface group.
214.It Vt group_detach_event
215Callback invoked when an interfance has been removed from an interface group.
192.It Vt ifaddr_event
193Callbacks invoked when an address is set up on a network interface.
194.It Vt if_clone_event
195Callbacks invoked when an interface is cloned.
216.It Vt ifaddr_event
217Callbacks invoked when an address is set up on a network interface.
218.It Vt if_clone_event
219Callbacks invoked when an interface is cloned.
220.It Vt iflladdr_event
221Callback invoked when an if link layer address event has happened.
196.It Vt ifnet_arrival_event
197Callbacks invoked when a new network interface appears.
198.It Vt ifnet_departure_event
199Callbacks invoked when a network interface is taken down.
222.It Vt ifnet_arrival_event
223Callbacks invoked when a new network interface appears.
224.It Vt ifnet_departure_event
225Callbacks invoked when a network interface is taken down.
200.It Vt bpf_track
201Callbacks invoked when a BPF listener attaches to/detaches from network interface.
226.It Vt ifnet_link_event
227Callback invoked when an interfance link event has happened.
202.It Vt kld_load
203Callbacks invoked after a linker file has been loaded.
204.It Vt kld_unload
205Callbacks invoked after a linker file has been successfully unloaded.
206.It Vt kld_unload_try
207Callbacks invoked before a linker file is about to be unloaded.
208These callbacks may be used to return an error and prevent the unload from
209proceeding.
228.It Vt kld_load
229Callbacks invoked after a linker file has been loaded.
230.It Vt kld_unload
231Callbacks invoked after a linker file has been successfully unloaded.
232.It Vt kld_unload_try
233Callbacks invoked before a linker file is about to be unloaded.
234These callbacks may be used to return an error and prevent the unload from
235proceeding.
236.It Vt lle_event
237Callback invoked when an link layer event has happened.
238.It Vt nmbclusters_change
239Callback invoked when the number of mbuf clusters has changed.
240.It Vt nmbufs_change
241Callback invoked when the number of mbufs has changed.
242.It Vt maxsockets_change
243Callback invoked when the maximum number of sockets has changed.
244.It Vt mountroot
245Callback invoked when root has been mounted.
210.It Vt power_profile_change
211Callbacks invoked when the power profile of the system changes.
246.It Vt power_profile_change
247Callbacks invoked when the power profile of the system changes.
248.It Vt power_resume
249Callback invoked when the system has resumed.
250.It Vt power_suspend
251Callback invoked just before the system is suspended.
252.It Vt process_ctor
253Callback invoked when a process is created.
254.It Vt process_dtor
255Callback invoked when a process is destroyed.
212.It Vt process_exec
213Callbacks invoked when a process performs an
214.Fn exec
215operation.
216.It Vt process_exit
217Callbacks invoked when a process exits.
256.It Vt process_exec
257Callbacks invoked when a process performs an
258.Fn exec
259operation.
260.It Vt process_exit
261Callbacks invoked when a process exits.
262.It Vt process_fini
263Callback invoked when a process memory is destroyed.
264This is never called.
218.It Vt process_fork
219Callbacks invoked when a process forks a child.
265.It Vt process_fork
266Callbacks invoked when a process forks a child.
267.It Vt process_init
268Callback invoked when a process is initalized.
269.It Vt random_adaptor_attach
270Callback invoked when a new random module has been loaded.
271.It Vt register_framebuffer
272Callback invoked when a new frame buffer is registered.
273.It Vt route_redirect_event
274Callback invoked when a route gets redirected to a new location.
220.It Vt shutdown_pre_sync
221Callbacks invoked at shutdown time, before file systems are synchronized.
222.It Vt shutdown_post_sync
223Callbacks invoked at shutdown time, after all file systems are synchronized.
224.It Vt shutdown_final
225Callbacks invoked just before halting the system.
275.It Vt shutdown_pre_sync
276Callbacks invoked at shutdown time, before file systems are synchronized.
277.It Vt shutdown_post_sync
278Callbacks invoked at shutdown time, after all file systems are synchronized.
279.It Vt shutdown_final
280Callbacks invoked just before halting the system.
281.It Vt tcp_offload_listen_start
282Callback invoked for TCP Offload to start listening for new connections.
283.It Vt tcp_offload_listen_stop
284Callback invoked ror TCP Offload to stop listening for new connections.
285.It Vt thread_ctor
286Callback invoked when a thread object is created.
287.It Vt thread_dtor
288Callback invoked when a thread object is destroyed.
289.It Vt thread_init
290Callback invoked when a thread object is initalized.
291.It Vt thread_fini
292Callback invoked when a thread object is deinitalized.
293.It Vt usb_dev_configured
294Callback invoked when a USB device is configured
295.It Vt unregister_framebuffer
296Callback invoked when a frame buffer is deregistered.
297.It Vt vfs_mounted
298Callback invoked when a file system is mounted.
299.It Vt vfs_unmounted
300Callback invoked when a file system is unmounted.
301.It Vt vlan_config
302Callback invoked when the vlan configuration has changed.
303.It Vt vlan_unconfig
304Callback invoked when a vlan is destroyed.
226.It Vt vm_lowmem
227Callbacks invoked when virtual memory is low.
228.It Vt watchdog_list
229Callbacks invoked when the system watchdog timer is reinitialized.
230.El
231.Sh RETURN VALUES
232The macro
233.Fn EVENTHANDLER_REGISTER

--- 25 unchanged lines hidden ---
305.It Vt vm_lowmem
306Callbacks invoked when virtual memory is low.
307.It Vt watchdog_list
308Callbacks invoked when the system watchdog timer is reinitialized.
309.El
310.Sh RETURN VALUES
311The macro
312.Fn EVENTHANDLER_REGISTER

--- 25 unchanged lines hidden ---