]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libsysdecode/sysdecode_kevent.3
Merge llvm-project release/14.x llvmorg-14.0.0-rc2-12-g09546e1b5103
[FreeBSD/FreeBSD.git] / lib / libsysdecode / sysdecode_kevent.3
1 .\"
2 .\" Copyright (c) 2017 John Baldwin <jhb@FreeBSD.org>
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 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
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 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd November 24, 2017
28 .Dt sysdecode_kevent 3
29 .Os
30 .Sh NAME
31 .Nm sysdecode_kevent ,
32 .Nm sysdecode_kevent_fflags ,
33 .Nm sysdecode_kevent_filter ,
34 .Nm sysdecode_kevent_flags
35 .Nd output description of kevent structure fields
36 .Sh LIBRARY
37 .Lb libsysdecode
38 .Sh SYNOPSIS
39 .In sysdecode.h
40 .Ft void
41 .Fn sysdecode_kevent_fflags "FILE *fp" "short filter" "int fflags" "int base"
42 .Ft bool
43 .Fn sysdecode_kevent_flags "FILE *fp" "int flags" "int *rem"
44 .Ft const char *
45 .Fn sysdecode_kevent_filter "int filter"
46 .Sh DESCRIPTION
47 These functions provide text descriptions of
48 .Vt struct kevent
49 fields.
50 .Pp
51 The
52 .Fn sysdecode_kevent_fflags
53 function outputs a text description of the
54 .Fa fflags
55 member of a
56 .Vt struct kevent
57 to the stream
58 .Fa fp .
59 For the
60 .Dv EVFILT_READ ,
61 .Dv EVFILT_WRITE ,
62 .Dv EVFILT_VNODE ,
63 .Dv EVFILT_PROC ,
64 .Dv EVFILT_PROCDESC ,
65 .Dv EVFILT_TIMER ,
66 and
67 .Dv EVFILT_USER
68 filters,
69 .Fn sysdecode_kevent_fflags
70 outputs a bitmask of filter-specific
71 .Dv NOTE_*
72 flags as documented in
73 .Xr kevent 2 .
74 For other values of
75 .Fa filter ,
76 the value of
77 .Fa fflags
78 is output in the indicated
79 .Fa base
80 .Pq one of 8, 10, or 16 .
81 .Pp
82 The
83 .Fn sysdecode_kevent_filter
84 function returns a text description of the
85 .Fa filter
86 member of a
87 .Vt struct kevent .
88 .Dv NULL
89 is returned if the
90 .Fa filter
91 value is unknown.
92 .Pp
93 The
94 .Fn sysdecode_kevent_flags
95 function outputs a text description of the
96 .Fa flags
97 member of a
98 .Vt struct kevent
99 to the stream
100 .Fa fp .
101 This function uses the same calling convention and formatting as the other
102 functions described in
103 .Xr sysdecode_mask 3 .
104 .Sh RETURN VALUES
105 The
106 .Nm sysdecode_kevent_filter
107 function returns the name of a filter or
108 .Dv NULL if the filter value is unknown.
109 .Pp
110 The
111 .Nm sysdecode_kevent_flags
112 function returns
113 .Dv true
114 if any flags in the
115 .Fa flags
116 field were decoded and
117 .Dv false
118 if no flags were decoded.
119 .Sh SEE ALSO
120 .Xr sysdecode 3 ,
121 .Xr sysdecode_enum 3 ,
122 .Xr sysdecode_mask 3