Back to Darwin Xnu

Mach Ports Lookup

osfmk/man/mach_ports_lookup.html

latest1.1 KB
Original Source

mach_ports_lookup


Function - Provide caller with an array of the target task's well-known ports.

SYNOPSIS

**kern\_return\_t mach\_ports\_lookup**** (task\_t **target\_task,** mach\_port\_array\_t **init\_port\_set,** mach\_msg\_type\_number\_t **init\_port\_count** );**

PARAMETERS

target_task[in task send right] The task whose currently registered ports are to be returned.

init_port_set[out pointer to dynamic array of registered send rights] The returned array of ports.

init_port_count[out scalar] The number of returned port rights.

DESCRIPTION

The mach_ports_lookup function returns an array of the well-known system ports that are currently registered for the specified task. Note that the task holds only send rights for the ports.

Registered ports are those ports that are used by the run-time system to initialize a task. To register system ports for a task, use the mach_ports_register function.

RETURN VALUES

Only generic errors apply.

Functions: mach_ports_register.