1*a325d9c4SApple OSS Distributions<h2>task_get_special_port</h2> 2*a325d9c4SApple OSS Distributions<hr> 3*a325d9c4SApple OSS Distributions<p> 4*a325d9c4SApple OSS Distributions<strong>Function</strong> - Return a send write to the indicated special port. 5*a325d9c4SApple OSS Distributions<h3>SYNOPSIS</h3> 6*a325d9c4SApple OSS Distributions<pre> 7*a325d9c4SApple OSS Distributions<strong>kern_return_t task_get_special_port</strong> 8*a325d9c4SApple OSS Distributions <strong>(task_t</strong> <var>task</var>, 9*a325d9c4SApple OSS Distributions <strong>int</strong> <var>which_port</var>, 10*a325d9c4SApple OSS Distributions <strong>task</strong> <var>special_port</var><strong>);</strong> 11*a325d9c4SApple OSS Distributions 12*a325d9c4SApple OSS Distributions 13*a325d9c4SApple OSS Distributions<strong>Macro Forms:</strong> 14*a325d9c4SApple OSS Distributions 15*a325d9c4SApple OSS Distributions 16*a325d9c4SApple OSS Distributions<strong>kern_return_t task_get_bootstrap_port</strong> 17*a325d9c4SApple OSS Distributions <strong>(task_t</strong> <var>task</var>, 18*a325d9c4SApple OSS Distributions <strong>task</strong> <var>special_port</var><strong>);</strong> 19*a325d9c4SApple OSS Distributions 20*a325d9c4SApple OSS Distributions 21*a325d9c4SApple OSS Distributions<strong>kern_return_t task_get_kernel_port</strong> 22*a325d9c4SApple OSS Distributions <strong>(task_t</strong> <var>task</var>, 23*a325d9c4SApple OSS Distributions <strong>task</strong> <var>special_port</var><strong>);</strong> 24*a325d9c4SApple OSS Distributions 25*a325d9c4SApple OSS Distributions 26*a325d9c4SApple OSS Distributions<strong>kern_return_t task_get_host_name_port</strong> 27*a325d9c4SApple OSS Distributions <strong>(task_t</strong> <var>task</var>, 28*a325d9c4SApple OSS Distributions <strong>task</strong> <var>special_port</var><strong>);</strong> 29*a325d9c4SApple OSS Distributions</pre> 30*a325d9c4SApple OSS Distributions<h3>PARAMETERS</h3> 31*a325d9c4SApple OSS Distributions<dl> 32*a325d9c4SApple OSS Distributions<p> 33*a325d9c4SApple OSS Distributions<dt> <var>task</var> 34*a325d9c4SApple OSS Distributions<dd> 35*a325d9c4SApple OSS Distributions[in task send right] 36*a325d9c4SApple OSS DistributionsThe port for the task for which to return the port's 37*a325d9c4SApple OSS Distributionssend right. 38*a325d9c4SApple OSS Distributions<p> 39*a325d9c4SApple OSS Distributions<dt> <var>which_port</var> 40*a325d9c4SApple OSS Distributions<dd> 41*a325d9c4SApple OSS Distributions[in scalar] 42*a325d9c4SApple OSS DistributionsThe special port for which the send right is requested. Valid 43*a325d9c4SApple OSS Distributionsvalues are: 44*a325d9c4SApple OSS Distributions<dl> 45*a325d9c4SApple OSS Distributions<p> 46*a325d9c4SApple OSS Distributions<dt> <strong>TASK_KERNEL_PORT</strong> 47*a325d9c4SApple OSS Distributions<dd> 48*a325d9c4SApple OSS Distributions[task-self send right] The port used to control this task. Used 49*a325d9c4SApple OSS Distributionsto send messages that affect the task. This is the movable task port and 50*a325d9c4SApple OSS Distributionsdifferent from the one returned by <strong>mach_task_self</strong> (immovable). 51*a325d9c4SApple OSS Distributions<p> 52*a325d9c4SApple OSS Distributions<dt> <strong>TASK_BOOTSTRAP_PORT</strong> 53*a325d9c4SApple OSS Distributions<dd> 54*a325d9c4SApple OSS Distributions[bootstrap send right] The task's bootstrap port. Used to send 55*a325d9c4SApple OSS Distributionsmessages requesting return of other system service ports. 56*a325d9c4SApple OSS Distributions<p> 57*a325d9c4SApple OSS Distributions<dt> <strong>TASK_HOST_NAME_PORT</strong> 58*a325d9c4SApple OSS Distributions<dd> 59*a325d9c4SApple OSS Distributions[host-self send right] The port used to request information of 60*a325d9c4SApple OSS Distributionsthe containing host. This is the port returned by 61*a325d9c4SApple OSS Distributions<strong>mach_host_self</strong>. 62*a325d9c4SApple OSS Distributions<p> 63*a325d9c4SApple OSS Distributions<dt> <strong>TASK_WIRED_LEDGER_PORT</strong> 64*a325d9c4SApple OSS Distributions<dd> 65*a325d9c4SApple OSS Distributions[ledger send right] The port naming the source from which 66*a325d9c4SApple OSS Distributionsthis task draws its wired kernel memory. 67*a325d9c4SApple OSS Distributions<p> 68*a325d9c4SApple OSS Distributions<dt> <strong>TASK_PAGED_LEDGER_PORT</strong> 69*a325d9c4SApple OSS Distributions<dd> 70*a325d9c4SApple OSS Distributions[ledger send right] The port naming the source from which 71*a325d9c4SApple OSS Distributionsthis task draws its default memory managed memory. 72*a325d9c4SApple OSS Distributions</dl> 73*a325d9c4SApple OSS Distributions<p> 74*a325d9c4SApple OSS Distributions<dt> <var>special_port</var> 75*a325d9c4SApple OSS Distributions<dd> 76*a325d9c4SApple OSS Distributions[out task-special send right] 77*a325d9c4SApple OSS DistributionsThe returned value for the port. 78*a325d9c4SApple OSS Distributions</dl> 79*a325d9c4SApple OSS Distributions<h3>DESCRIPTION</h3> 80*a325d9c4SApple OSS Distributions<p> 81*a325d9c4SApple OSS DistributionsThe <strong>task_get_special_port</strong> function returns a send right 82*a325d9c4SApple OSS Distributionsfor a special port belonging to <var>task</var>. 83*a325d9c4SApple OSS Distributions<p> 84*a325d9c4SApple OSS DistributionsIf one task has a send right for the kernel port of another task, it can use 85*a325d9c4SApple OSS Distributionsthe port to perform kernel operations for the other task. Send rights for a 86*a325d9c4SApple OSS Distributionskernel port normally are held only by the task to which the port belongs, 87*a325d9c4SApple OSS Distributionsor by the task's parent task. Using the <strong>mach_msg</strong> function, however, 88*a325d9c4SApple OSS Distributionsany task can pass a send right for its kernel port to another task. 89*a325d9c4SApple OSS Distributions<h3>NOTES</h3> 90*a325d9c4SApple OSS Distributions<p> 91*a325d9c4SApple OSS DistributionsThe current implementation does not support the <strong>TASK_HOST_NAME_PORT</strong> 92*a325d9c4SApple OSS Distributionsfeatures associated with this interface. 93*a325d9c4SApple OSS Distributions<h3>RETURN VALUES</h3> 94*a325d9c4SApple OSS Distributions<p> 95*a325d9c4SApple OSS DistributionsOnly generic errors apply. 96*a325d9c4SApple OSS Distributions<h3>RELATED INFORMATION</h3> 97*a325d9c4SApple OSS Distributions<p> 98*a325d9c4SApple OSS DistributionsFunctions: 99*a325d9c4SApple OSS Distributions<a href="mach_task_self.html"><strong>mach_task_self</strong></a>, 100*a325d9c4SApple OSS Distributions<a href="task_create.html"><strong>task_create</strong></a>, 101*a325d9c4SApple OSS Distributions<a href="task_set_special_port.html"><strong>task_set_special_port</strong></a>, 102*a325d9c4SApple OSS Distributions<a href="thread_get_special_port.html"><strong>thread_get_special_port</strong></a>, 103*a325d9c4SApple OSS Distributions<a href="thread_set_special_port.html"><strong>thread_set_special_port</strong></a>, 104*a325d9c4SApple OSS Distributions<a href="mach_host_self.html"><strong>mach_host_self</strong></a>. 105