<commit_before>.\"
.\" Copyright (c) 2002 <NAME>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. The name of the author may not be used to endorse or promote products
.\"    derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd February 11, 2003
.Dt DEVCTL 4
.Os
.Sh NAME
.Nm devctl
.Nd "device event reporting and device control interface"
.Sh DESCRIPTION
The
.Nm
device is used to report device events from the kernel.
Future versions will allow for some device control as well.
.Sh IMPLEMENTATION NOTES
This design allows only one reader for
.Pa /dev/devctl .
This is not desirable
in the long run, but will get a lot of hair out of this implementation.
Maybe we should make this device a clonable device.
.Pp
Also note: we specifically do not attach a device to the
.Vt device_t
tree
to avoid potential chicken and egg problems.
One could argue that all of this belongs to the root node.
One could also further argue that the
.Xr sysctl 3
interface that we have now might more properly be an
.Xr ioctl 2
interface.
.Pp
.Dv SIGIO
support is included in the driver.
However, the author is not sure that the
.Dv SIGIO
support is done correctly.
It was copied from a driver that had
.Dv SIGIO
support that likely has not been
tested since
.Fx 3.4
or
.Fx 2.2.8 !
.Pp
The read channel for this device is used to report changes to
userland in realtime.
We return one record at a time.
If you try to read this device a character at a time, you will loose
the rest of the data.
Listening programs are expected to cope.
.Pp
The sysctl and boot parameter
.Va hw.bus.devctl_disable
is used to disable
.Nm
when no
.Xr devd 8
is running.
.Sh PROTOCOL
The
.Nm
device
uses an
.Tn ASCII
protocol.
The driver returns one record at a time to its readers.
Each record is terminated with a newline.
The first character of the record is the event type.
.Pp
.Bl -column -compact "Type" "Description"
.Em "Type	Description"
+	Device node in tree attached.
-	Device node in tree detached.
?	Unknown device detected.
.El<commit_msg>Add nofification events to the list of event types.<commit_after>.\"
.\" Copyright (c) 2002 <NAME>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. The name of the author may not be used to endorse or promote products
.\"    derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd February 11, 2003
.Dt DEVCTL 4
.Os
.Sh NAME
.Nm devctl
.Nd "device event reporting and device control interface"
.Sh DESCRIPTION
The
.Nm
device is used to report device events from the kernel.
Future versions will allow for some device control as well.
.Sh IMPLEMENTATION NOTES
This design allows only one reader for
.Pa /dev/devctl .
This is not desirable
in the long run, but will get a lot of hair out of this implementation.
Maybe we should make this device a clonable device.
.Pp
Also note: we specifically do not attach a device to the
.Vt device_t
tree
to avoid potential chicken and egg problems.
One could argue that all of this belongs to the root node.
One could also further argue that the
.Xr sysctl 3
interface that we have now might more properly be an
.Xr ioctl 2
interface.
.Pp
.Dv SIGIO
support is included in the driver.
However, the author is not sure that the
.Dv SIGIO
support is done correctly.
It was copied from a driver that had
.Dv SIGIO
support that likely has not been
tested since
.Fx 3.4
or
.Fx 2.2.8 !
.Pp
The read channel for this device is used to report changes to
userland in realtime.
We return one record at a time.
If you try to read this device a character at a time, you will loose
the rest of the data.
Listening programs are expected to cope.
.Pp
The sysctl and boot parameter
.Va hw.bus.devctl_disable
is used to disable
.Nm
when no
.Xr devd 8
is running.
.Sh PROTOCOL
The
.Nm
device
uses an
.Tn ASCII
protocol.
The driver returns one record at a time to its readers.
Each record is terminated with a newline.
The first character of the record is the event type.
.Pp
.Bl -column -compact "Type" "Description"
.Em "Type	Description"
!	A notify event, such as a link state change.
+	Device node in tree attached.
-	Device node in tree detached.
?	Unknown device detected.
.El
{'fraction_non_alphanumeric': 0.06513833992094861, 'fraction_numerical': 0.0066403162055335965, 'mean_word_length': 3.6893995552260934, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4003088', 'n_tokens_mistral': 1899, 'n_tokens_neox': 1690, 'n_words': 1026}