]>
Commit | Line | Data |
---|---|---|
1 | <h2>mach_port_get_attributes</h2> | |
2 | <hr> | |
3 | <p> | |
4 | <strong>Function</strong> - Return information about target port as specified by the caller. | |
5 | <h3>SYNOPSIS</h3> | |
6 | <pre> | |
7 | <strong>kern_return_t mach_port_get_attributes</strong> | |
8 | <strong>(ipc_space_t</strong> <var>task</var>, | |
9 | <strong>mach_port_name_t</strong> <var>name</var>, | |
10 | <strong>mach_port_flavor_t</strong> <var>flavor</var>, | |
11 | <strong>mach_port_info_t</strong> <var>port_info</var>, | |
12 | <strong>mach_msg_type_number_t</strong> <var>*port_info_count</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 holding a receive right to the port in | |
21 | question. | |
22 | <p> | |
23 | <dt> <var>name</var> | |
24 | <dd> | |
25 | [in scalar] | |
26 | <var>task</var>'s name for the port. | |
27 | <p> | |
28 | <dt> <var>flavor</var> | |
29 | <dd> | |
30 | [in scalar] | |
31 | The type of information to be returned. Valid values are: | |
32 | <dl> | |
33 | <p> | |
34 | <dt> <strong>MACH_PORT_LIMITS_INFO</strong> | |
35 | <dd> | |
36 | Returns the resource limits for the port. The declaration of | |
37 | this data is found in structure <strong>mach_port_limits</strong>. | |
38 | <p> | |
39 | <dt> <strong>MACH_PORT_RECEIVE_STATUS</strong> | |
40 | <dd> | |
41 | Returns random information about the rights and messages | |
42 | associated with the port. The declaration of this data is found in | |
43 | structure <strong>mach_port_status</strong>. | |
44 | </dl> | |
45 | <p> | |
46 | <dt> <var>port_info</var> | |
47 | <dd> | |
48 | [out structure] | |
49 | Information about the specified port. | |
50 | <p> | |
51 | <dt> <var>port_info_count</var> | |
52 | <dd> | |
53 | [in/out scalar] | |
54 | On input, the maximum size of the buffer; on output, the | |
55 | size returned (in natural-sized units). | |
56 | </dl> | |
57 | <h3>DESCRIPTION</h3> | |
58 | <p> | |
59 | The <strong>mach_port_get_attributes</strong> function returns an information | |
60 | structure of type <var>flavor</var>. | |
61 | <h3>NOTES</h3> | |
62 | <p> | |
63 | This interface is machine word length specific because of the port name | |
64 | parameter in the <strong>MACH_PORT_RECEIVE_STATUS</strong> structure return. | |
65 | <h3>RETURN VALUES</h3> | |
66 | <dl> | |
67 | <p> | |
68 | <dt> <strong>KERN_INVALID_NAME</strong> | |
69 | <dd> | |
70 | <var>name</var> did not denote a right. | |
71 | <p> | |
72 | <dt> <strong>KERN_INVALID_RIGHT</strong> | |
73 | <dd> | |
74 | <var>name</var> denoted a right, but not a receive right. | |
75 | </dl> | |
76 | <h3>RELATED INFORMATION</h3> | |
77 | <p> | |
78 | Functions: | |
79 | <a href="mach_port_allocate.html"><strong>mach_port_allocate</strong></a>, | |
80 | <a href="mach_port_allocate_name.html"><strong>mach_port_allocate_name</strong></a>, | |
81 | <a href="mach_port_set_attributes.html"><strong>mach_port_set_attributes</strong></a>. | |
82 | <p> | |
83 | Data Structures: | |
84 | <a href="mach_port_limits.html"><strong>mach_port_limits</strong></a>, | |
85 | <a href="mach_port_status.html"><strong>mach_port_status</strong></a>. |