3.1.4.9 Application Requests Execution of SCSI Command

The application provides:

  • A handle to the Open identifying a shared virtual disk file.

  • The ID of the initiator.

  • The length of the SCSI CDB buffer, in bytes.

  • SrbFlags that indicate options about the SCSI request, as specified in section 2.2.4.7<4>.

  • The SCSI CDB buffer.

  • The length of any additional data (optional).

  • Any additional data buffer (optional).

The client MUST construct an SVHDX_TUNNEL_SCSI_REQUEST structure, as specified in section 2.2.4.7 as follows:

The SVHDX_TUNNEL_OPERATION_HEADER MUST be initialized as follows:

  • The OperationCode field is set to RSVD_TUNNEL_SCSI_OPERATION.

  • The Status is set to zero.

  • The RequestId field MUST be set to RequestIdentifier.

The SVHDX_TUNNEL_SCSI_REQUEST is initialized as follows:

  • The Length field MUST be set to 36.

  • The Reserved1, Reserved2, and Reserved3 fields MUST be set to zero.

  • The CDBLength field MUST be set to the application-provided SCSI CDB length value.

  • The SenseInfoExLength field SHOULD be set to 20.

  • The SrbFlags field MUST be set to the application-provided SrbFlags.

  • If SrbFlags includes SRB_FLAGS_DATA_OUT, the Disposition field MUST be set to 0x00. If SrbFlags includes SRB_FLAGS_DATA_IN, the Disposition field SHOULD<5> be set to 0x01. If SrbFlags includes neither SRB_FLAGS_DATA_OUT nor SRB_FLAGS_DATA_IN, the Disposition field MUST be set to 0x02.

  • The DataTransferLength field MUST be set to the application-provided value for the Length of the additional value. If the application doesn't provide a data buffer length, the client MUST set this field to zero.

  • The CDBBuffer field MUST be set to the application-provided SCSI CDB buffer.

  • The DataBuffer field MUST be set to the application-provided additional data buffer. If the application doesn't provide the buffer, the client MUST set this field to empty.

The client MUST call the interface specified in [MS-SMB2] section 3.2.4.20.11, supplying the following input parameters:

  • Application-provided handle to identify the Open.

  • Control code: FSCTL_SVHDX_SYNC_TUNNEL_REQUEST.

  • SVHDX_TUNNEL_SCSI_REQUEST structure as payload.