Go to the first, previous, next, last section, table of contents.
mach_port_names
returns information about
task's port name space. For each name, it also returns what type
of rights task holds. (The same information returned by
mach_port_type
.) names and types are arrays that are
automatically allocated when the reply message is received. The user
should vm_deallocate
them when the data is no longer needed.
mach_port_names
will return in names the names of the
ports, port sets, and dead names in the task's port name space, in no
particular order and in ncount the number of names returned. It
will return in types the type of each corresponding name, which
indicates what kind of rights the task holds with that name.
tcount should be the same as ncount.
The function returns KERN_SUCCESS
if the call succeeded,
KERN_INVALID_TASK
if task was invalid,
KERN_RESOURCE_SHORTAGE
if the kernel ran out of memory.
The mach_port_names
call is actually an RPC to
task, normally a send right for a task port, but potentially any
send right. In addition to the normal diagnostic return codes from the
call's server (normally the kernel), the call may return mach_msg
return codes.
mach_port_type
returns information about
task's rights for a specific name in its port name space. The
returned ptype is a bitmask indicating what rights task
holds for the port, port set or dead name. The bitmask is composed of
the following bits:
MACH_PORT_TYPE_SEND
MACH_PORT_TYPE_RECEIVE
MACH_PORT_TYPE_SEND_ONCE
MACH_PORT_TYPE_PORT_SET
MACH_PORT_TYPE_DEAD_NAME
MACH_PORT_TYPE_DNREQUEST
MACH_PORT_TYPE_MAREQUEST
MACH_PORT_TYPE_COMPAT
The function returns KERN_SUCCESS
if the call succeeded,
KERN_INVALID_TASK
if task was invalid and
KERN_INVALID_NAME
if name did not denote a right.
The mach_port_type
call is actually an RPC to task,
normally a send right for a task port, but potentially any send right.
In addition to the normal diagnostic return codes from the call's server
(normally the kernel), the call may return mach_msg
return codes.
mach_port_rename
changes the name by which a port,
port set, or dead name is known to task. old_name is the
original name and new_name the new name for the port right.
new_name must not already be in use, and it can't be the
distinguished values MACH_PORT_NULL
and MACH_PORT_DEAD
.
The function returns KERN_SUCCESS
if the call succeeded,
KERN_INVALID_TASK
if task was invalid,
KERN_INVALID_NAME
if old_name did not denote a right,
KERN_INVALID_VALUE
if new_name was MACH_PORT_NULL
or
MACH_PORT_DEAD
, KERN_NAME_EXISTS
if new_name
already denoted a right and KERN_RESOURCE_SHORTAGE
if the kernel
ran out of memory.
The mach_port_rename
call is actually an RPC to task,
normally a send right for a task port, but potentially any send right.
In addition to the normal diagnostic return codes from the call's server
(normally the kernel), the call may return mach_msg
return codes.
Go to the first, previous, next, last section, table of contents.