xref: /xnu-10002.41.9/osfmk/man/device_reply_server.html (revision 699cd48037512bf4380799317ca44ca453c82f57)
1*699cd480SApple OSS Distributions<h2>device_reply_server</h2>
2*699cd480SApple OSS Distributions<hr>
3*699cd480SApple OSS Distributions<p>
4*699cd480SApple OSS Distributions<strong>Function</strong> - Handle incoming data from kernel device driver.
5*699cd480SApple OSS Distributions<h3>SYNOPSIS</h3>
6*699cd480SApple OSS Distributions<pre>
7*699cd480SApple OSS Distributions<strong>boolean_t	device_reply_server</strong>
8*699cd480SApple OSS Distributions		<strong>(mach_msg_header_t</strong>	<var>request_msg</var>,
9*699cd480SApple OSS Distributions		<strong>mach_msg_header_t</strong>	<var>reply_msg</var><strong>);</strong>
10*699cd480SApple OSS Distributions</pre>
11*699cd480SApple OSS Distributions<h3>PARAMETERS</h3>
12*699cd480SApple OSS Distributions<dl>
13*699cd480SApple OSS Distributions<p>
14*699cd480SApple OSS Distributions<dt> <var>request_msg</var>
15*699cd480SApple OSS Distributions<dd>
16*699cd480SApple OSS Distributions[pointer to in structure]
17*699cd480SApple OSS DistributionsThe device driver message received from the
18*699cd480SApple OSS Distributionskernel.
19*699cd480SApple OSS Distributions<p>
20*699cd480SApple OSS Distributions<dt> <var>reply_msg</var>
21*699cd480SApple OSS Distributions<dd>
22*699cd480SApple OSS Distributions[out structure]
23*699cd480SApple OSS DistributionsA reply message.  No messages from a device driver
24*699cd480SApple OSS Distributionsexpect a direct reply, so this field is not used.
25*699cd480SApple OSS Distributions</dl>
26*699cd480SApple OSS Distributions<h3>DESCRIPTION</h3>
27*699cd480SApple OSS Distributions<p>
28*699cd480SApple OSS DistributionsThe <strong>device_reply_server</strong> function is the MIG generated server handling
29*699cd480SApple OSS Distributionsfunction to handle messages from kernel device drivers.  Such
30*699cd480SApple OSS Distributionsmessages were sent in response to the various
31*699cd480SApple OSS Distributions<strong>device_</strong>...<strong>_request</strong>...
32*699cd480SApple OSS Distributionscalls.  It is assumed when using
33*699cd480SApple OSS Distributionsthose calls that some task is listening for reply messages on the port named as a
34*699cd480SApple OSS Distributionsreply port to those calls.  The <strong>device_reply_server</strong>
35*699cd480SApple OSS Distributionsfunction performs all
36*699cd480SApple OSS Distributionsnecessary argument handling for a kernel message and calls one
37*699cd480SApple OSS Distributionsof the device server functions to interpret the message.
38*699cd480SApple OSS Distributions<h3>RETURN VALUES</h3>
39*699cd480SApple OSS Distributions<dl>
40*699cd480SApple OSS Distributions<p>
41*699cd480SApple OSS Distributions<dt> <strong>TRUE</strong>
42*699cd480SApple OSS Distributions<dd>
43*699cd480SApple OSS DistributionsThe message was handled and the appropriate function was called.
44*699cd480SApple OSS Distributions<p>
45*699cd480SApple OSS Distributions<dt> <strong>FALSE</strong>
46*699cd480SApple OSS Distributions<dd>
47*699cd480SApple OSS DistributionsThe message did not apply to this device handler interface and no other
48*699cd480SApple OSS Distributionsaction was taken.
49*699cd480SApple OSS Distributions</dl>
50*699cd480SApple OSS Distributions<h3>RELATED INFORMATION</h3>
51*699cd480SApple OSS Distributions<p>
52*699cd480SApple OSS DistributionsFunctions:
53*699cd480SApple OSS Distributions<a href="device_open.html"><strong>ds_device_open_reply<strong></a>,
54*699cd480SApple OSS Distributions<a href="device_write.html"><strong>ds_device_write_reply<strong></a>,
55*699cd480SApple OSS Distributions<a href="device_write_inband.html"><strong>ds_device_write_reply_inband<strong></a>,
56*699cd480SApple OSS Distributions<a href="device_read.html"><strong>ds_device_read_reply<strong></a>,
57*699cd480SApple OSS Distributions<a href="device_read_inband.html"><strong>ds_device_read_reply_inband<strong></a>,
58*699cd480SApple OSS Distributions<a href="device_read_overwrite.html"><strong>ds_device_read_reply_overwrite<strong></a>.
59