]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libsysdecode/sysdecode_kevent.3
MFV: r329072
[FreeBSD/FreeBSD.git] / lib / libsysdecode / sysdecode_kevent.3
1 .\"
2 .\" Copyright (c) 2017 John Baldwin <jhb@FreeBSD.org>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd November 24, 2017
29 .Dt sysdecode_kevent 3
30 .Os
31 .Sh NAME
32 .Nm sysdecode_kevent ,
33 .Nm sysdecode_kevent_fflags ,
34 .Nm sysdecode_kevent_filter ,
35 .Nm sysdecode_kevent_flags
36 .Nd output description of kevent structure fields
37 .Sh LIBRARY
38 .Lb libsysdecode
39 .Sh SYNOPSIS
40 .In sys/types.h
41 .In stdbool.h
42 .In stdio.h
43 .In sysdecode.h
44 .Ft void
45 .Fn sysdecode_kevent_fflags "FILE *fp" "short filter" "int fflags" "int base"
46 .Ft bool
47 .Fn sysdecode_kevent_flags "FILE *fp" "int flags" "int *rem"
48 .Ft const char *
49 .Fn sysdecode_kevent_filter "int filter"
50 .Sh DESCRIPTION
51 These functions provide text descriptions of
52 .Vt struct kevent
53 fields.
54 .Pp
55 The
56 .Fn sysdecode_kevent_fflags
57 function outputs a text description of the
58 .Fa fflags
59 member of a
60 .Vt struct kevent
61 to the stream
62 .Fa fp .
63 For the
64 .Dv EVFILT_READ ,
65 .Dv EVFILT_WRITE ,
66 .Dv EVFILT_VNODE ,
67 .Dv EVFILT_PROC ,
68 .Dv EVFILT_PROCDESC ,
69 .Dv EVFILT_TIMER ,
70 and
71 .Dv EVFILT_USER
72 filters,
73 .Fn sysdecode_kevent_fflags
74 outputs a bitmask of filter-specific
75 .Dv NOTE_*
76 flags as documented in
77 .Xr kevent 2 .
78 For other values of
79 .Fa filter ,
80 the value of
81 .Fa fflags
82 is output in the indicated
83 .Fa base
84 .Pq one of 8, 10, or 16 .
85 .Pp
86 The
87 .Fn sysdecode_kevent_filter
88 function returns a text description of the
89 .Fa filter
90 member of a
91 .Vt struct kevent .
92 .Dv NULL
93 is returned if the
94 .Fa filter
95 value is unknown.
96 .Pp
97 The
98 .Fn sysdecode_kevent_flags
99 function outputs a text description of the
100 .Fa flags
101 member of a
102 .Vt struct kevent
103 to the stream
104 .Fa fp .
105 This function uses the same calling convention and formatting as the other
106 functions described in
107 .Xr sysdecode_mask 3 .
108 .Sh RETURN VALUES
109 The
110 .Nm sysdecode_kevent_filter
111 function returns the name of a filter or
112 .Dv NULL if the filter value is unknown.
113 .Pp
114 The
115 .Nm sysdecode_kevent_flags
116 function returns
117 .Dv true
118 if any flags in the
119 .Fa flags
120 field were decoded and
121 .Dv false
122 if no flags were decoded.
123 .Sh SEE ALSO
124 .Xr sysdecode 3 ,
125 .Xr sysdecode_enum 3 ,
126 .Xr sysdecode_mask 3