Back to Darwin Xnu

Mach Port Get Attributes

osfmk/man/mach_port_get_attributes.html

latest1.8 KB
Original Source

mach_port_get_attributes


Function - Return information about target port as specified by the caller.

SYNOPSIS

**kern\_return\_t mach\_port\_get\_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** );**

PARAMETERS

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 information to be returned. Valid values are:

MACH_PORT_LIMITS_INFO Returns the resource limits for the port. The declaration of this data is found in structure mach_port_limits.

MACH_PORT_RECEIVE_STATUS Returns random information about the rights and messages associated with the port. The declaration of this data is found in structure mach_port_status.

port_info[out structure] Information about the specified port.

port_info_count[in/out scalar] On input, the maximum size of the buffer; on output, the size returned (in natural-sized units).

DESCRIPTION

The mach_port_get_attributes function returns an information structure of type flavor.

NOTES

This interface is machine word length specific because of the port name parameter in the MACH_PORT_RECEIVE_STATUS structure return.

RETURN VALUES

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_set_attributes.

Data Structures: mach_port_limits, mach_port_status.