xref: /freebsd/sys/sys/devctl.h (revision f40cd16b)
1 /*-
2  * Copyright 2020 M. Warner Losh <imp@FreeBSD.org>
3  *
4  * SPDX-License-Identifier: BSD-2-Clause
5  */
6 
7 #ifndef _SYS_DEVCTL_H_
8 #define _SYS_DEVCTL_H_
9 
10 #ifdef _KERNEL
11 /**
12  * devctl hooks.  Typically one should use the devctl_notify
13  * hook to send the message.
14  */
15 
16 bool devctl_process_running(void);
17 void devctl_notify(const char *__system, const char *__subsystem,
18     const char *__type, const char *__data);
19 struct sbuf;
20 void devctl_safe_quote_sb(struct sbuf *__sb, const char *__src);
21 typedef void send_event_f(const char *system, const char *subsystem,
22     const char *type, const char *data);
23 void devctl_set_notify_hook(send_event_f *hook);
24 void devctl_unset_notify_hook(void);
25 #endif
26 
27 #endif /* _SYS_DEVCTL_H_ */
28