1 <h2>device_read_inband
</h2>
4 <strong>Function
</strong> - Read a sequence of bytes "inband" from a device object.
7 <strong>#include<device/device.h>
</strong>
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>
18 <strong>#include<device/device_request.h>
</strong>
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>
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>
37 <dt> <var>device
</var>
39 [in device send right]
40 A device port to the device to be read.
42 <dt> <var>reply_port
</var>
44 [in reply receive (to be converted to send-once) right]
46 which the reply message is to be sent.
51 I/O mode value. Meaningful options are:
54 <dt> <strong>D_NOWAIT
</strong>
56 Do not wait if data is unavailable.
59 <dt> <var>recnum
</var>
62 Record number to be read.
64 <dt> <var>bytes_wanted
</var>
67 Size of data transfer.
69 <dt> <var>return_code
</var>
72 The return status code from the read.
76 [out array of bytes, in for asynchronous form]
79 <dt> <var>data_count
</var>
81 [out scalar, in for asynchronous form]
82 Number of returned data bytes.
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>
94 Only generic errors apply.
95 <h3>RELATED INFORMATION
</h3>
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>.