1 <h2>mach_port_get_attributes
</h2>
4 <strong>Function
</strong> - Return information about target port as specified by the caller.
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>
20 The task holding a receive right to the port in
26 <var>task
</var>'s name for the port.
28 <dt> <var>flavor
</var>
31 The type of information to be returned. Valid values are:
34 <dt> <strong>MACH_PORT_LIMITS_INFO
</strong>
36 Returns the resource limits for the port. The declaration of
37 this data is found in structure
<strong>mach_port_limits
</strong>.
39 <dt> <strong>MACH_PORT_RECEIVE_STATUS
</strong>
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>.
46 <dt> <var>port_info
</var>
49 Information about the specified port.
51 <dt> <var>port_info_count
</var>
54 On input, the maximum size of the buffer; on output, the
55 size returned (in natural-sized units).
59 The
<strong>mach_port_get_attributes
</strong> function returns an information
60 structure of type
<var>flavor
</var>.
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>
68 <dt> <strong>KERN_INVALID_NAME
</strong>
70 <var>name
</var> did not denote a right.
72 <dt> <strong>KERN_INVALID_RIGHT
</strong>
74 <var>name
</var> denoted a right, but not a receive right.
76 <h3>RELATED INFORMATION
</h3>
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>.
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>.