xref: /xnu-11215.61.5/osfmk/man/ledger_get_remote.html (revision 4f1223e81cd707a65cc109d0b8ad6653699da3c4)
1*4f1223e8SApple OSS Distributions<h2>ledger_get_remote</h2>
2*4f1223e8SApple OSS Distributions<hr>
3*4f1223e8SApple OSS Distributions<p>
4*4f1223e8SApple OSS Distributions<strong>Function</strong> - Return send right to specified host's remote ledger port.
5*4f1223e8SApple OSS Distributions<h3>SYNOPSIS</h3>
6*4f1223e8SApple OSS Distributions<pre>
7*4f1223e8SApple OSS Distributions<strong>kern_return_t   ledger_get_remote</strong>
8*4f1223e8SApple OSS Distributions                <strong>(ledger_port_t</strong>                           <var>ledger</var>,
9*4f1223e8SApple OSS Distributions                 <strong>host_t</strong>                               <var>host_name</var>,
10*4f1223e8SApple OSS Distributions                 <strong>ledger</strong>                            <var>service_port</var><strong>);</strong>
11*4f1223e8SApple OSS Distributions
12*4f1223e8SApple OSS Distributions
13*4f1223e8SApple OSS Distributions<strong>kern_return_t   ledger_return_remote</strong>
14*4f1223e8SApple OSS Distributions                <strong>(ledger_port_t</strong>                           <var>ledger</var>,
15*4f1223e8SApple OSS Distributions                 <strong>host_t</strong>                               <var>host_name</var>,
16*4f1223e8SApple OSS Distributions                 <strong>ledger</strong>                            <var>service_port</var><strong>);</strong>
17*4f1223e8SApple OSS Distributions</pre>
18*4f1223e8SApple OSS Distributions<h3>PARAMETERS</h3>
19*4f1223e8SApple OSS Distributions<dl>
20*4f1223e8SApple OSS Distributions<p>
21*4f1223e8SApple OSS Distributions<dt> <var>ledger</var>
22*4f1223e8SApple OSS Distributions<dd>
23*4f1223e8SApple OSS Distributions[in ledger send right]
24*4f1223e8SApple OSS DistributionsThe ledger whose service port is desired.
25*4f1223e8SApple OSS Distributions<p>
26*4f1223e8SApple OSS Distributions<dt> <var>host_name</var>
27*4f1223e8SApple OSS Distributions<dd>
28*4f1223e8SApple OSS Distributions[in host-name send right]
29*4f1223e8SApple OSS DistributionsThe name for the host requesting the service
30*4f1223e8SApple OSS Distributionsport.
31*4f1223e8SApple OSS Distributions<p>
32*4f1223e8SApple OSS Distributions<dt> <var>service_port</var>
33*4f1223e8SApple OSS Distributions<dd>
34*4f1223e8SApple OSS Distributions[out ledger-service send right]
35*4f1223e8SApple OSS DistributionsThe ledger service port.
36*4f1223e8SApple OSS Distributions</dl>
37*4f1223e8SApple OSS Distributions<h3>DESCRIPTION</h3>
38*4f1223e8SApple OSS Distributions<p>
39*4f1223e8SApple OSS DistributionsThe <strong>ledger_get_remote</strong> function returns the remote ledger
40*4f1223e8SApple OSS Distributionsservice port for the
41*4f1223e8SApple OSS Distributionsledger
42*4f1223e8SApple OSS Distributions<h3>NOTES</h3>
43*4f1223e8SApple OSS Distributions<p>
44*4f1223e8SApple OSS DistributionsThis interface is not implemented in OSF/1 R1.3.
45*4f1223e8SApple OSS Distributions<p>
46*4f1223e8SApple OSS DistributionsThis mechanism supports distributed resource ledgers in the following way:
47*4f1223e8SApple OSS Distributions<dl>
48*4f1223e8SApple OSS Distributions<dd>
49*4f1223e8SApple OSS DistributionsWith <strong>ledger_set_remote</strong>, a ledger is assigned a remote
50*4f1223e8SApple OSS Distributionsledger service port.
51*4f1223e8SApple OSS Distributions<dd>
52*4f1223e8SApple OSS DistributionsThis ledger is used as the ledger for a create operation.
53*4f1223e8SApple OSS DistributionsIf the ledger is local to the target kernel, all is fine.
54*4f1223e8SApple OSS Distributions<dd>
55*4f1223e8SApple OSS DistributionsFor a non-local creation, the target kernel sees that the supplied
56*4f1223e8SApple OSS Distributionsledger is not
57*4f1223e8SApple OSS Distributionsa local ledger.  The kernel sends a <strong>ledger_get_remote</strong> message to it,
58*4f1223e8SApple OSS Distributionsincluding the host name.
59*4f1223e8SApple OSS Distributions<dd>
60*4f1223e8SApple OSS DistributionsThe (remote) ledger receives this message, ignores the host name and returns
61*4f1223e8SApple OSS Distributionsthe remote ledger service port.
62*4f1223e8SApple OSS Distributions<dd>
63*4f1223e8SApple OSS DistributionsAssuming that the remote ledger service port is not a local ledger, the kernel
64*4f1223e8SApple OSS Distributionssends a <strong>ledger_get_remote</strong> message to this service port.
65*4f1223e8SApple OSS Distributions<dd>
66*4f1223e8SApple OSS DistributionsA server receives this request (with the <strong>ledger_return_remote</strong>
67*4f1223e8SApple OSS Distributionsserver interface)
68*4f1223e8SApple OSS Distributionsand uses the identity of the service port as well as the host name of the
69*4f1223e8SApple OSS Distributionstarget kernel to locate or create a suitable ledger on that kernel.
70*4f1223e8SApple OSS Distributions<dd>
71*4f1223e8SApple OSS DistributionsThe port for a ledger on the target kernel is sent to that kernel and used.
72*4f1223e8SApple OSS Distributions</dl>
73*4f1223e8SApple OSS Distributions<h3>RETURN VALUES</h3>
74*4f1223e8SApple OSS Distributions<p>
75*4f1223e8SApple OSS DistributionsOnly generic errors apply.
76*4f1223e8SApple OSS Distributions<h3>RELATED INFORMATION</h3>
77*4f1223e8SApple OSS Distributions<p>
78*4f1223e8SApple OSS DistributionsFunctions:
79*4f1223e8SApple OSS Distributions<a href="ledger_create.html"><strong>ledger_create</strong></a>,
80*4f1223e8SApple OSS Distributions<a href="ledger_set_remote.html"><strong>ledger_set_remote</strong></a>.
81