Fibre Channel SNIA HBA API Programmer's Guide
if ((status = HBA_SendRNID(adapter_handle, wwn,
wwn_type, resp_buffer,
sizeof(resp_buffer))) ==
HBA_STATUS_OK)
{
printf("Success in HBA_SendRNID\n");
} else
{
printf("Error in HBA_SendRNID\n");
}
FCP Information Functions
Call the following functions to obtain FCP information for SCSI devices behind Fibre Channel
interfaces:
HBA_GetFcpTargetMapping
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_GetFcpTargetMapping(
HBA_HANDLE handle,
PHBA_FCPTARGETMAPPING mapping;
);
Purpose: Retrieves the mapping between FCP targets and OS SCSI
information.
Input Parameters: handle - Handle to an adapter already opened by a call to
HBA_OpenAdapter().
mapping - Pointer to an HBA_FCPTARGETMAPPING structure.
The size of this structure is dependent on the NumberOfEntries
value within the structure and may be an arbitrary size. To
accommodate the entire mapping structure, an upper level
application can either allocate a sufficiently large buffer and
check this value after a read, or do a read of the
NumberOfEntries value separately and allocate a new buffer
given the size and repeat the call.
Output Parameters:
mapping - Pointer to an HBA_FCPTARGETMAPPING structure.
Return Values: Returned after a
successful execution of the
call.
HBA_STATUS_OK
HBA_STATUS_ERROR
Returned when an
internal library or system
error is detected.
HBA_STATUS_ERROR_BUSY
Returned when the library
is busy and cannot
currently process this call.
HBA_STATUS_ERROR_INVALID_HANDLE
Returned when the handle
passed to this function is
invalid.
HBA_STATUS_ERROR_ARG
Returned when the
pointer passed to this
function is NULL.
FCP Information Functions 27