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