osfmk/man/device_write_inband.html
Function - Write a sequence of bytes "inband" to a device object.
**#include<device/device.h (device\_write\_inband)>****kern\_return\_t device\_write\_inband****(mach\_port\_t**device, **dev\_mode\_t** mode, **recnum\_t** recnum, **io\_buf\_ptr\_inband\_t** data, **mach\_msg\_type\_number\_t** data\_count, **io\_buf\_len\_t** io\_buf\_len\_t**);****#include<device/device\_request.h> ****kern\_return\_t device\_write\_request\_inband**** (mach\_port\_t **device,** mach\_port\_t **reply\_port,** dev\_mode\_t **mode,** recnum\_t **recnum,** io\_buf\_ptr\_inband\_t **data,** mach\_msg\_type\_number\_t **data\_count** ); ****kern\_return\_t ds\_device\_write\_reply\_inband**** (mach\_port\_t **reply\_port,** kern\_return\_t **return\_code,** io\_buf\_len\_t **bytes\_writte** );**
device[in device send right] A device port to the device to be written.
reply_port[in reply receive (to be converted to send-once) right] The port to which the reply message is to be sent.
mode[in scalar] I/O mode value. Meaningful options are:
D_NOWAIT Do not wait for I/O completion.
recnum[in scalar] Record number to be written.
data[pointer to in array of bytes] Data bytes to be written.
data_count[in scalar] Number of data bytes to be written.
return_code[in scalar] The return status code from the write.
bytes_written[out scalar, in for asynchronous form] Size of data transfer.
The device_write_inband function writes a sequence of bytes to a device object. The meaning of recnum as well as the specific operation performed is device dependent. This call differs from device_write in that the bytes to be written are sent "inband" in the request IPC message.
Only generic errors apply.
Functions: device_write, device_reply_server.