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