[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

HBA_GetFcpTargetMapping Subroutine

Purpose

Gets mapping of OS identification to FCP indentification for each child of the specified HBA_HANDLE.

Library

Common Host Bus Adapter Library (libHBAAPI.a)

Syntax

#include <hbaapi.h>

void HBA_GetFcpTargetMapping (handle, mapping)
HBA_HANDLE handle;
PHBA_FCPTARGETMAPPING mapping;

Description

For the specified HBA_HANDLE, the HBA_GetFcpTargetMapping subroutine maps OS identification of all its SCSI logical units to their FCP indentification. Applications must allocate memory for the HBA_FCPTargetMapping 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 entire mapping, it will set the NumberOfEntries variable to the correct value and return an error.

Parameters

handle An HBA_HANDLE to an open adapter.
mapping A pointer to a structure containing a mapping of the handle's children. The HBA_FCPTARGETMAPPING structure has the following form:
struct HBA_FCPTargetMapping (
HBA_UINT32 NumberOfEntries;
HBA_FCPSCSIENTRY entry[1] /* Variable length array containing mappings */
);
The size of the structure is determined by the calling application, and is passed in by the NumberOfEntries variable.

Return Values

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

Error Codes

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

Related Information

Special Files in AIX 5L Version 5.2 Files Reference describes specific qualities of the files that define devices.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]