]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/device_read_inband.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / device_read_inband.html
1 <h2>device_read_inband</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Read a sequence of bytes "inband" from a device object.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>#include&ltdevice/device.h&gt</strong>
8
9 <strong>kern_return_t device_read_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_len_t</strong> <var>bytes_wanted</var>,
14 <strong>io_buf_ptr_inband_t</strong> <var>data</var>,
15 <strong>mach_msg_type_number_t</strong> <var>*data_count</var><strong>);</strong>
16
17
18 <strong>#include&ltdevice/device_request.h&gt</strong>
19
20 <strong>kern_return_t device_read_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_len_t</strong> <var>bytes_wanted</var><strong>);</strong>
26
27
28 <strong>kern_return_t ds_device_read_reply_inband</strong>
29 <strong>(mach_port_t</strong> <var>reply_port</var>,
30 <strong>kern_return_t</strong> <var>return_code</var>,
31 <strong>io_buf_ptr_inband_t</strong> <var>data</var>,
32 <strong>mach_msg_type_number_t</strong> <var>data_count</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]
40 A device port to the device to be read.
41 <p>
42 <dt> <var>reply_port</var>
43 <dd>
44 [in reply receive (to be converted to send-once) right]
45 The port to
46 which the reply message is to be sent.
47 <p>
48 <dt> <var>mode</var>
49 <dd>
50 [in scalar]
51 I/O mode value. Meaningful options are:
52 <dl>
53 <p>
54 <dt> <strong>D_NOWAIT</strong>
55 <dd>
56 Do not wait if data is unavailable.
57 </dl>
58 <p>
59 <dt> <var>recnum</var>
60 <dd>
61 [in scalar]
62 Record number to be read.
63 <p>
64 <dt> <var>bytes_wanted</var>
65 <dd>
66 [in scalar]
67 Size of data transfer.
68 <p>
69 <dt> <var>return_code</var>
70 <dd>
71 [in scalar]
72 The return status code from the read.
73 <p>
74 <dt> <var>data</var>
75 <dd>
76 [out array of bytes, in for asynchronous form]
77 Returned data bytes.
78 <p>
79 <dt> <var>data_count</var>
80 <dd>
81 [out scalar, in for asynchronous form]
82 Number of returned data bytes.
83 </dl>
84 <h3>DESCRIPTION</h3>
85 <p>
86 The <strong>device_read_inband</strong> function reads a sequence of bytes
87 from a device object. The
88 meaning of <var>recnum</var> as well as the specific operation performed is device
89 dependent. This call differs from <strong>device_read</strong> in that
90 the returned bytes are returned
91 "inband" in the reply IPC message.
92 <h3>RETURN VALUES</h3>
93 <p>
94 Only generic errors apply.
95 <h3>RELATED INFORMATION</h3>
96 <p>
97 Functions:
98 <a href="device_read.html"><strong>device_read</strong></a>,
99 <a href="device_read_overwrite.html"><strong>device_read_overwrite</strong></a>,
100 <a href="device_reply_server.html"><strong>device_reply_server</strong></a>.