xref: /illumos-gate/usr/src/man/man3proc/proc_fdinfo_misc.3proc (revision b69c34dad3717624ff6b4f32b71014ee05b6a678)
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 January 6, 2020
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 SYNOPSIS
21.Lb libproc
22.In libproc.h
23.Ft const void *
24.Fo proc_fdinfo_misc
25.Fa "const prfdinfo_t *info"
26.Fa "uint_t type"
27.Fa "size_t *len"
28.Fc
29.Sh DESCRIPTION
30The
31.Fn proc_fdinfo_misc
32function is a convenient way to retrieve a miscellaneous information item from
33a
34.Vt prfdinfo_t
35structure.
36.Pp
37If a miscellaneous item of type
38.Fa type
39is found, then this function returns a pointer to the data for that item and
40updates
41.Fa len
42with the item's size.
43.Pp
44In the case that there are multiple instances of the requested type in the
45structure, only the first is returned.
46To see all instances, use the
47.Xr proc_fdinfowalk 3PROC
48function.
49.Pp
50The definition of the
51.Vt prfdinfo_t
52structure may be found in the
53.Sx fdinfo
54section of
55.Xr proc 4 .
56.Sh RETURN VALUES
57Upon successful completion, the
58.Fn proc_fdinfo_misc
59function returns a pointer to the first instance of data with the requested
60type.
61Otherwise,
62.Sy NULL
63is returned to indicate that the item was not found.
64.Sh INTERFACE STABILITY
65.Sy Uncommitted
66.Sh MT-LEVEL
67.Sy MT-Safe
68.Sh SEE ALSO
69.Xr libproc 3LIB ,
70.Xr proc_fdinfowalk 3PROC ,
71.Xr proc 4
72