]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/mach_port_names.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / mach_port_names.html
CommitLineData
13fec989
A
1<h2>mach_port_names</h2>
2<hr>
3<p>
4<strong>Function</strong> - Return information about a task's port name space.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t mach_port_names</strong>
8 <strong>(ipc_space_t</strong> <var>task</var>,
9 <strong>mach_port_name_array_t</strong> <var>*names</var>,
10 <strong>mach_msg_type_number_t</strong> <var>*namesCnt</var>,
11 <strong>mach_port_type_array_</strong> <var>*types</var>,
12 <strong>mach_msg_type_number_t</strong> <var>*typesCnt</var><strong>);</strong>
13</pre>
14<h3>PARAMETERS</h3>
15<dl>
16<p>
17<dt> <var>task</var>
18<dd>
19[in task send right]
20The task whose port name space is queried.
21<p>
22<dt> <var>names</var>
23<dd>
24[out pointer to dynamic array of <var>mach_port_name_t</var>]
25The names of the
26ports, port sets, and dead names in the task's port name space, in no
27particular order.
28<p>
29<dt> <var>namesCnt</var>
30<dd>
31[out scalar]
32The number of names returned.
33<p>
34<dt> <var>types</var>
35<dd>
36[out pointer to dynamic array of <var>mach_port_type_t</var>]
37The type of each
38corresponding name. Indicates what kind of rights the task holds with
39that name.
40<p>
41<dt> <var>typesCnt</var>
42<dd>
43[out scalar]
44The number of types returned.
45</dl>
46<h3>DESCRIPTION</h3>
47<p>
48The <strong>mach_port_names</strong> returns information about <var>task</var>'s
49port name space. It
50returns task's currently active names, which represent some port,
51port set, or dead
52name right. For each name, it also returns what type of rights
53<var>task</var> holds (the
54same information returned by <strong>mach_port_type</strong>).
55<p>
56Note that when a call to <strong>mach_port_names</strong> returns, the
57number of entries in the two output arrays (<var>names</var> and <var>types</var>)
58are equal (<var>namesCnt</var> equals <var>typesCnt</var>). The fact that this
59interface returns two separate counts is an artifact of the Mach Interface Generator.
60<h3>NOTES</h3>
61<p>
62This interface is machine word length specific because of the port name
63parameter and the returned port names.
64<h3>RETURN VALUES</h3>
65<p>
66Only generic errors apply.
67<h3>RELATED INFORMATION</h3>
68<p>
69Functions:
70<a href="mach_port_type.html"><strong>mach_port_type</strong></a>.