]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/mach_ports_lookup.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / mach_ports_lookup.html
1 <h2>mach_ports_lookup</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Provide caller with an array of the target task's well-known ports.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t mach_ports_lookup</strong>
8 <strong>(task_t</strong> <var>target_task</var>,
9 <strong>mach_port_array_t</strong> <var>init_port_set</var>,
10 <strong>mach_msg_type_number_t</strong> <var>init_port_count</var><strong>);</strong>
11 </pre>
12 <h3>PARAMETERS</h3>
13 <dl>
14 <p>
15 <dt> <var>target_task</var>
16 <dd>
17 [in task send right]
18 The task whose currently registered ports are to be
19 returned.
20 <p>
21 <dt> <var>init_port_set</var>
22 <dd>
23 [out pointer to dynamic array of registered send rights]
24 The returned
25 array of ports.
26 <p>
27 <dt> <var>init_port_count</var>
28 <dd>
29 [out scalar]
30 The number of returned port rights.
31 </dl>
32 <h3>DESCRIPTION</h3>
33 <p>
34 The <strong>mach_ports_lookup</strong> function returns an array of
35 the well-known system
36 ports that are currently registered for the specified task.
37 Note that the task holds
38 only send rights for the ports.
39 <p>
40 Registered ports are those ports that are used by the run-time
41 system to initialize a task. To register system ports for a task,
42 use the <strong>mach_ports_register</strong> function.
43 <h3>RETURN VALUES</h3>
44 <p>
45 Only generic errors apply.
46 <h3>RELATED INFORMATION</h3>
47 <p>
48 Functions:
49 <a href="mach_ports_register.html"><strong>mach_ports_register</strong></a>.