Back to Darwin Xnu

Device Write Inband

osfmk/man/device_write_inband.html

latest1.9 KB
Original Source

device_write_inband


Function - Write a sequence of bytes "inband" to a device object.

SYNOPSIS

**#include&ltdevice/device.h (device\_write\_inband)&gt****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&ltdevice/device\_request.h&gt ****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** );**

PARAMETERS

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.

DESCRIPTION

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.

RETURN VALUES

Only generic errors apply.

Functions: device_write, device_reply_server.