typedef void (*gdCompletionFunction)( IOService *target, void *param, UInt64 actualByteCount, IOReturn result);
Type and arguments of callout C function that is used to complete an asynchronous IO operation.
Name Description target The target C function to be called. param A parameter passed to the target C function. It is not validated or changed. actualByteCount The actual byte count transferred in the operation. result The kIOReturn value from the operation
struct cdbParams { UInt32 cdbLength; UInt8 cdb[16]; UInt32 senseLength; UInt32 actualSenseLength; IOMemoryDescriptor * senseBuffer; UInt32 timeoutSeconds; UInt32 dataLength; UInt32 actualDataLength; IOMemoryDescriptor * dataBuffer; UInt8 status; };
Data provided by a client to an executeCDB operation.
Name Description cdbLength The length of the command bytes (cdb), in bytes. cdb The actual command bytes to be sent to the device. These are not checked by the driver. senseLength The requested maximum sense length, in bytes. actualSenseLength The actual number of sense bytes transferred. If the driver does not support autosense, this field will always return zero. senseBuffer The buffer for the sense data. This buffer must have already been prepared for IO by the caller. The buffer must contain the data direction. timeoutSeconds The timeout for the command, in seconds. dataLength The requested number of data bytes to transfer with the command, or zero if no data is to be transferred. actualDataLength The actual number of data bytes transferred. dataBuffer The buffer for the data. This buffer must have already been prepared for IO by the caller. The buffer must contain the data direction. status The status reported by the device at command completion. The contents of thisfield will depend on the type of transport (e.g. SCSI, ATAPI, etc). Some drivers may not support the return of status information and will zero this field.
© 2000 Apple Computer, Inc. (Last Updated 2/23/2000)