Fibre Channel SNIA HBA API Programmer's Guide
HBA_STATUS_ERROR_ILLEGAL_WWN
Returned when the WWN
given as input does not
match the WWN of any
discovered port.
HBA_STATUS_ERROR_MORE_DATA
Returned when any of the
allocated buffers is
insufficient.
HBA_STATUS_SCSI_CHECK_CONDITION
Returned when a SCSI check
condition occurs and there is
valid sense data in the
SenseBuffer.
Call order sequence: See Appendix A.
Example code:
memset (lun_buffer, 0, sizeof(lun_buffer));
memset (sense_buffer, 0, sizeof(sense_buffer));
if ((status = HBA_SendReportLUNs(adapter_handle, wwn,
lun_buffer, sizeof(lun_buffer),
sense_buffer, sizeof(sense_buffer)))
!= HBA_STATUS_OK)
{
printf ("HBA_SendReportLUNs error %d\n", status);
} else
{
printf ("HBA_SendReportLUNs succeeded\n");
}
HBA_SendReadCapacity
NOTE: This function is meant to be called only by an application having an effective user id
as that of the super user (that is, effective user id = 0).
Function:
HBA_STATUS HBA_SendReadCapacity(
HBA_HANDLE handle,
HBA_WWN port_wwn,
HBA_UINT64 fc_lun,
void *p_rsp_buffer,
HBA_UINT32 rsp_buffer_size,
void *p_sense_buffer,
HBA_UINT32 sense_buffer_size
);
Purpose:
Sends a SCSI READ CAPACITY command to a remote WWN.
Input Parameters: handle - Handle to an adapter already opened by call to
HBA_OpenAdapter().
port_wwn - Port WWN of a remote port.
fc_lun - Specific FC LUN to send read capacity to.
rsp_buffer_size - Size of buffer to receive the response.
sense_buffer_size - Size of buffer to receive sense data.
Output Parameters: p_rsp_buffer - Pointer to a buffer to receive response.
p_sense_buffer - Pointer to a buffer to receive sense data.
Return Values: Returned after a successful
execution of the call.
HBA_STATUS_OK
SCSI Informational Functions 33