HBA_GetFcpPersistentBinding Subroutine

Purpose

Gets persistent binding information of SCSI LUNs.

Library

Common Host Bus Adapter Library (libHBAAPI.a)

Syntax

#include <sys/hbaapi.h>

HBA_STATUS HBA_GetFcpPersistentBinding (handle, binding)
HBA_HANDLE handle;
PHBA_FCPBinding binding;

Description

For the specified HBA_HANDLE, the HBA_GetFcpPersistentBinding subroutine returns the full binding information of local SCSI LUNs to FCP LUNs for each child of the specified HBA_HANDLE. Applications must allocate memory for the HBA_FCPBINDING structure, and also pass to the subroutine the number of entries allocated. If the subroutine determines that the structure is not large enough to represent the full binding information, it will set the NumberOfEntries variable to the correct value and return an error.

Parameters

Item Description
handle An HBA_HANDLE to an open adapter.
binding A pointer to a structure containing the binding information of the handle's children. The HBA_FCPBINDING structure has the following form:
struct HBA_FCPBinding {
    HBA_UINT32 NumberOfEntries;
    HBA_FCPBINDINGENTRY entry[1]; /* Variable length array */
  };
The size of the structure is determined by the calling application, and is passed in by the NumberOfEntries variable.

Return Values

Upon successful completion, HBA_STATUS_OK is returned, and the binding parameter points to the full binding structure. If the application has not allocated enough space for the full binding, HBA_STATUS_ERROR_MORE_DATA is returned and the NumberOfEntries field in the binding structure is set to the correct value.

Error Codes

If there is insufficient space allocated for the full binding. HBA_STATUS_ERROR_MORE_DATA is returned.