]>
Commit | Line | Data |
---|---|---|
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] | |
20 | The 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>] | |
25 | The names of the | |
26 | ports, port sets, and dead names in the task's port name space, in no | |
27 | particular order. | |
28 | <p> | |
29 | <dt> <var>namesCnt</var> | |
30 | <dd> | |
31 | [out scalar] | |
32 | The 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>] | |
37 | The type of each | |
38 | corresponding name. Indicates what kind of rights the task holds with | |
39 | that name. | |
40 | <p> | |
41 | <dt> <var>typesCnt</var> | |
42 | <dd> | |
43 | [out scalar] | |
44 | The number of types returned. | |
45 | </dl> | |
46 | <h3>DESCRIPTION</h3> | |
47 | <p> | |
48 | The <strong>mach_port_names</strong> returns information about <var>task</var>'s | |
49 | port name space. It | |
50 | returns task's currently active names, which represent some port, | |
51 | port set, or dead | |
52 | name right. For each name, it also returns what type of rights | |
53 | <var>task</var> holds (the | |
54 | same information returned by <strong>mach_port_type</strong>). | |
55 | <p> | |
56 | Note that when a call to <strong>mach_port_names</strong> returns, the | |
57 | number of entries in the two output arrays (<var>names</var> and <var>types</var>) | |
58 | are equal (<var>namesCnt</var> equals <var>typesCnt</var>). The fact that this | |
59 | interface returns two separate counts is an artifact of the Mach Interface Generator. | |
60 | <h3>NOTES</h3> | |
61 | <p> | |
62 | This interface is machine word length specific because of the port name | |
63 | parameter and the returned port names. | |
64 | <h3>RETURN VALUES</h3> | |
65 | <p> | |
66 | Only generic errors apply. | |
67 | <h3>RELATED INFORMATION</h3> | |
68 | <p> | |
69 | Functions: | |
70 | <a href="mach_port_type.html"><strong>mach_port_type</strong></a>. |