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 47These functions provide text descriptions of 48.Vt struct kevent 49fields. 50.Pp 51The 52.Fn sysdecode_kevent_fflags 53function outputs a text description of the 54.Fa fflags 55member of a 56.Vt struct kevent 57to the stream 58.Fa fp . 59For 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 , 66and 67.Dv EVFILT_USER 68filters, 69.Fn sysdecode_kevent_fflags 70outputs a bitmask of filter-specific 71.Dv NOTE_* 72flags as documented in 73.Xr kevent 2 . 74For other values of 75.Fa filter , 76the value of 77.Fa fflags 78is output in the indicated 79.Fa base 80.Pq one of 8, 10, or 16 . 81.Pp 82The 83.Fn sysdecode_kevent_filter 84function returns a text description of the 85.Fa filter 86member of a 87.Vt struct kevent . 88.Dv NULL 89is returned if the 90.Fa filter 91value is unknown. 92.Pp 93The 94.Fn sysdecode_kevent_flags 95function outputs a text description of the 96.Fa flags 97member of a 98.Vt struct kevent 99to the stream 100.Fa fp . 101This function uses the same calling convention and formatting as the other 102functions described in 103.Xr sysdecode_mask 3 . 104.Sh RETURN VALUES 105The 106.Nm sysdecode_kevent_filter 107function returns the name of a filter or 108.Dv NULL if the filter value is unknown. 109.Pp 110The 111.Nm sysdecode_kevent_flags 112function returns 113.Dv true 114if any flags in the 115.Fa flags 116field were decoded and 117.Dv false 118if no flags were decoded. 119.Sh SEE ALSO 120.Xr sysdecode 3 , 121.Xr sysdecode_enum 3 , 122.Xr sysdecode_mask 3 123