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