mach_port_names


Function - Return information about a task's port name space.

SYNOPSIS

kern_return_t   mach_port_names
                (ipc_space_t                               task,
                 mach_port_name_array_t                  *names,
                 mach_msg_type_number_t               *namesCnt,
                 mach_port_type_array_                   *types,
                 mach_msg_type_number_t               *typesCnt);

PARAMETERS

task
[in task send right] The task whose port name space is queried.

names
[out pointer to dynamic array of mach_port_name_t] The names of the ports, port sets, and dead names in the task's port name space, in no particular order.

namesCnt
[out scalar] The number of names returned.

types
[out pointer to dynamic array of mach_port_type_t] The type of each corresponding name. Indicates what kind of rights the task holds with that name.

typesCnt
[out scalar] The number of types returned.

DESCRIPTION

The mach_port_names returns information about task's port name space. It returns task's currently active names, which represent some port, port set, or dead name right. For each name, it also returns what type of rights task holds (the same information returned by mach_port_type).

Note that when a call to mach_port_names returns, the number of entries in the two output arrays (names and types) are equal (namesCnt equals typesCnt). The fact that this interface returns two separate counts is an artifact of the Mach Interface Generator.

NOTES

This interface is machine word length specific because of the port name parameter and the returned port names.

RETURN VALUES

Only generic errors apply.

RELATED INFORMATION

Functions: mach_port_type.