xref: /illumos-gate/usr/src/man/man3proc/proc_fdinfo_misc.3proc (revision a7d7cafedfa26f9e421bbcaf42b7387ef67c0a31)
1a02120c4SAndy Fiddaman.\"
2a02120c4SAndy Fiddaman.\" This file and its contents are supplied under the terms of the
3a02120c4SAndy Fiddaman.\" Common Development and Distribution License ("CDDL"), version 1.0.
4a02120c4SAndy Fiddaman.\" You may only use this file in accordance with the terms of version
5a02120c4SAndy Fiddaman.\" 1.0 of the CDDL.
6a02120c4SAndy Fiddaman.\"
7a02120c4SAndy Fiddaman.\" A full copy of the text of the CDDL should have accompanied this
8a02120c4SAndy Fiddaman.\" source.  A copy of the CDDL is also available via the Internet at
9a02120c4SAndy Fiddaman.\" http://www.illumos.org/license/CDDL.
10a02120c4SAndy Fiddaman.\"
11a02120c4SAndy Fiddaman.\"
12a02120c4SAndy Fiddaman.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
13a02120c4SAndy Fiddaman.\"
14*a7d7cafeSRobert Mustacchi.Dd November 27, 2023
15a02120c4SAndy Fiddaman.Dt PROC_FDINFO_MISC 3PROC
16a02120c4SAndy Fiddaman.Os
17a02120c4SAndy Fiddaman.Sh NAME
18a02120c4SAndy Fiddaman.Nm proc_fdinfo_misc
19a02120c4SAndy Fiddaman.Nd retrieve a miscellaneous information item from a prfdinfo_t structure
20*a7d7cafeSRobert Mustacchi.Sh LIBRARY
21a02120c4SAndy Fiddaman.Lb libproc
22*a7d7cafeSRobert Mustacchi.Sh SYNOPSIS
23a02120c4SAndy Fiddaman.In libproc.h
24a02120c4SAndy Fiddaman.Ft const void *
25a02120c4SAndy Fiddaman.Fo proc_fdinfo_misc
26a02120c4SAndy Fiddaman.Fa "const prfdinfo_t *info"
27a02120c4SAndy Fiddaman.Fa "uint_t type"
28a02120c4SAndy Fiddaman.Fa "size_t *len"
29a02120c4SAndy Fiddaman.Fc
30a02120c4SAndy Fiddaman.Sh DESCRIPTION
31a02120c4SAndy FiddamanThe
32a02120c4SAndy Fiddaman.Fn proc_fdinfo_misc
33a02120c4SAndy Fiddamanfunction is a convenient way to retrieve a miscellaneous information item from
34a02120c4SAndy Fiddamana
35a02120c4SAndy Fiddaman.Vt prfdinfo_t
36a02120c4SAndy Fiddamanstructure.
37a02120c4SAndy Fiddaman.Pp
38a02120c4SAndy FiddamanIf a miscellaneous item of type
39a02120c4SAndy Fiddaman.Fa type
40a02120c4SAndy Fiddamanis found, then this function returns a pointer to the data for that item and
41a02120c4SAndy Fiddamanupdates
42a02120c4SAndy Fiddaman.Fa len
43a02120c4SAndy Fiddamanwith the item's size.
44a02120c4SAndy Fiddaman.Pp
45a02120c4SAndy FiddamanIn the case that there are multiple instances of the requested type in the
46a02120c4SAndy Fiddamanstructure, only the first is returned.
47a02120c4SAndy FiddamanTo see all instances, use the
48a02120c4SAndy Fiddaman.Xr proc_fdinfowalk 3PROC
49a02120c4SAndy Fiddamanfunction.
50a02120c4SAndy Fiddaman.Pp
51a02120c4SAndy FiddamanThe definition of the
52a02120c4SAndy Fiddaman.Vt prfdinfo_t
53a02120c4SAndy Fiddamanstructure may be found in the
54a02120c4SAndy Fiddaman.Sx fdinfo
55a02120c4SAndy Fiddamansection of
56bbf21555SRichard Lowe.Xr proc 5 .
57a02120c4SAndy Fiddaman.Sh RETURN VALUES
58a02120c4SAndy FiddamanUpon successful completion, the
59a02120c4SAndy Fiddaman.Fn proc_fdinfo_misc
60a02120c4SAndy Fiddamanfunction returns a pointer to the first instance of data with the requested
61a02120c4SAndy Fiddamantype.
62a02120c4SAndy FiddamanOtherwise,
63a02120c4SAndy Fiddaman.Sy NULL
64a02120c4SAndy Fiddamanis returned to indicate that the item was not found.
65a02120c4SAndy Fiddaman.Sh INTERFACE STABILITY
66a02120c4SAndy Fiddaman.Sy Uncommitted
67a02120c4SAndy Fiddaman.Sh MT-LEVEL
68a02120c4SAndy Fiddaman.Sy MT-Safe
69a02120c4SAndy Fiddaman.Sh SEE ALSO
70a02120c4SAndy Fiddaman.Xr libproc 3LIB ,
71a02120c4SAndy Fiddaman.Xr proc_fdinfowalk 3PROC ,
72bbf21555SRichard Lowe.Xr proc 5
73