]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/mach_port_type.html
5d7ee4d5b33fcd74be9de5350d99ffaa5d328ea2
[apple/xnu.git] / osfmk / man / mach_port_type.html
1 <h2>mach_port_type</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Return the characteristics of the target port name.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t mach_port_type</strong>
8 <strong>(ipc_space_t</strong> <var>task</var>,
9 <strong>mach_port_name_t</strong> <var>name</var>,
10 <strong>mach_port_type_t</strong> <var>ptype</var><strong>);</strong>
11 </pre>
12 <h3>PARAMETERS</h3>
13 <dl>
14 <p>
15 <dt> <var>task</var>
16 <dd>
17 [in task send right]
18 The task whose port name space is queried.
19 <p>
20 <dt> <var>name</var>
21 <dd>
22 [in scalar]
23 The name being queried.
24 <p>
25 <dt> <var>ptype</var>
26 <dd>
27 [out scalar]
28 The type of the name. Indicates what kind of right the task
29 holds for the port, port set, or dead name.
30 </dl>
31 <h3>DESCRIPTION</h3>
32 <p>
33 The <strong>mach_port_type</strong> function returns information about <var>task</var>'s
34 rights for a specific name in its port name space. The returned
35 <var>ptype</var> is a bit-mask indicating what rights <var>task</var>
36 holds with this name.
37 The bit-mask is composed of the following bits:
38 <dl>
39 <dt> <strong>MACH_PORT_TYPE_SEND</strong>
40 <dd>
41 The name denotes send rights.
42 <p>
43 <dt> <strong>MACH_PORT_TYPE_RECEIVE</strong>
44 <dd>
45 The name denotes a receive right.
46 <p>
47 <dt> <strong>MACH_PORT_TYPE_SEND_ONCE</strong>
48 <dd>
49 The name denotes a send-once right.
50 <p>
51 <dt> <strong>MACH_PORT_TYPE_PORT_SET</strong>
52 <dd>
53 The name denotes a port set.
54 <p>
55 <dt> <strong>MACH_PORT_TYPE_DEAD_NAME</strong>
56 <dd>
57 The name is a dead name.
58 <p>
59 <dt> <strong>MACH_PORT_TYPE_DNREQUEST</strong>
60 <dd>
61 A dead-name request has been registered for the right.
62 </dl>
63 <h3>NOTES</h3>
64 <p>
65 This interface is machine word length specific because of the port name
66 parameter.
67 <h3>RETURN VALUES</h3>
68 <dl>
69 <p>
70 <dt> <strong>KERN_INVALID_NAME</strong>
71 <dd>
72 <var>name</var> did not denote a right.
73 </dl>
74 <h3>RELATED INFORMATION</h3>
75 <p>
76 Functions:
77 <a href="mach_port_names.html"><strong>mach_port_names</strong></a>,
78 <a href="mach_port_get_attributes.html"><strong>mach_port_get_attributes</strong></a>,
79 <a href="mach_port_get_set_status.html"><strong>mach_port_get_set_status</strong></a>.