]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/device_write_inband.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / device_write_inband.html
CommitLineData
13fec989
A
1<h2>device_write_inband</h2>
2<hr>
3<p>
4<strong>Function</strong> - Write a sequence of bytes "inband" to a device object.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>#include&ltdevice/device.h (device_write_inband)&gt</strong>
8
9<strong>kern_return_t device_write_inband</strong>
10 <strong>(mach_port_t</strong> <var>device</var>,
11 <strong>dev_mode_t</strong> <var>mode</var>,
12 <strong>recnum_t</strong> <var>recnum</var>,
13 <strong>io_buf_ptr_inband_t</strong> <var>data</var>,
14 <strong>mach_msg_type_number_t</strong> <var>data_count</var>,
15 <strong>io_buf_len_t</strong> <var>io_buf_len_t</var><strong>);</strong>
16
17
18<strong>#include&ltdevice/device_request.h&gt</strong>
19
20<strong>kern_return_t device_write_request_inband</strong>
21 <strong>(mach_port_t</strong> <var>device</var>,
22 <strong>mach_port_t</strong> <var>reply_port</var>,
23 <strong>dev_mode_t</strong> <var>mode</var>,
24 <strong>recnum_t</strong> <var>recnum</var>,
25 <strong>io_buf_ptr_inband_t</strong> <var>data</var>,
26 <strong>mach_msg_type_number_t</strong> <var>data_count</var><strong>);</strong>
27
28
29<strong>kern_return_t ds_device_write_reply_inband</strong>
30 <strong>(mach_port_t</strong> <var>reply_port</var>,
31 <strong>kern_return_t</strong> <var>return_code</var>,
32 <strong>io_buf_len_t</strong> <var>bytes_writte</var><strong>);</strong>
33</pre>
34<h3>PARAMETERS</h3>
35<dl>
36<p>
37<dt> <var>device</var>
38<dd>
39[in device send right]
40A device port to the device to be written.
41<p>
42<dt> <var>reply_port</var>
43<dd>
44[in reply receive (to be converted to send-once) right]
45The port to
46which the reply message is to be sent.
47<p>
48<dt> <var>mode</var>
49<dd>
50[in scalar]
51I/O mode value. Meaningful options are:
52<dl>
53<p>
54<dt> <strong>D_NOWAIT</strong>
55<dd>
56Do not wait for I/O completion.
57</dl>
58<p>
59<dt> <var>recnum</var>
60<dd>
61[in scalar]
62Record number to be written.
63<p>
64<dt> <var>data</var>
65<dd>
66[pointer to in array of bytes]
67Data bytes to be written.
68<p>
69<dt> <var>data_count</var>
70<dd>
71[in scalar]
72Number of data bytes to be written.
73<p>
74<dt> <var>return_code</var>
75<dd>
76[in scalar]
77The return status code from the write.
78<p>
79<dt> <var>bytes_written</var>
80<dd>
81[out scalar, in for asynchronous form]
82Size of data transfer.
83</dl>
84<h3>DESCRIPTION</h3>
85<p>
86The <strong>device_write_inband</strong> function writes a sequence of bytes to a device
87object. The meaning of <var>recnum</var> as well as the specific operation
88performed is device dependent. This call differs from <strong>device_write</strong>
89in that the bytes to be written are sent "inband" in the request IPC message.
90<h3>RETURN VALUES</h3>
91<p>
92Only generic errors apply.
93<h3>RELATED INFORMATION</h3>
94<p>
95Functions:
96<a href="device_write.html"><strong>device_write</strong></a>,
97<a href="device_reply_server.html"><strong>device_reply_server</strong></a>.