osfmk/man/mach_port_set_attributes.html
Function - Set the target port's attributes.
**kern\_return\_t mach\_port\_set\_attributes**** (ipc\_space\_t **task,** mach\_port\_name\_t **name,** mach\_port\_flavor\_t **flavor,** mach\_port\_info\_t **port\_info,** mach\_msg\_type\_number\_t **port\_info\_count** );**
task[in task send right] The task holding a receive right to the port in question.
name[in scalar] task's name for the port.
flavor[in scalar] The type of attributes to be set. Valid values are:
MACH_PORT_LIMITS_INFO Sets resource limits (queue limits) for the port. The declaration of this data is found in structure mach_port_limits.
port_info[pointer to in structure] Attributes for the specified port.
port_info_count[in scalar] The size of the buffer (in natural-sized units).
The mach_port_set_attributes function sets attributes of type flavor.
This interface is machine word length specific because of the port name parameter.
KERN_INVALID_NAME name did not denote a right.
KERN_INVALID_RIGHT name denoted a right, but not a receive right.
Functions: mach_port_allocate, mach_port_allocate_name, mach_port_get_attributes.
Data Structures: mach_port_limits.