HBA_GetFcpTargetMappingV2 routine
The HBA_GetFcpTargetMappingV2 routine retrieves the mappings between operating system and fibre channel protocol (FCP) identifiers for a set of targets that the HBA can enumerate on the indicated port.
Syntax
HBA_STATUS HBA_API HBA_GetFcpTargetMappingV2(
_In_ HBA_HANDLE HbaHandle,
_In_ HBA_WWN HbaPortWWN,
_Inout_ HBA_FCPTARGETMAPPINGV2 *Mapping
);
Parameters
HbaHandle [in]
Contains a value returned by the routine HBA_OpenAdapter that identifies the HBA to query for the target mappings. The HBA returns mappings for the targets that it can enumerate on the port specified by HbaPortWWN.HbaPortWWN [in]
Contains a 64-bit worldwide name (WWN) that uniquely identifies the fibre channel port on which the targets are enumerated. For a discussion of worldwide names, see the T11 committee's Fibre Channel HBA API specification.Mapping [in, out]
Pointer to a structure of type HBA_FCPTargetMappingV2 that contains an array of bindings between operating system and FCP identifiers for a set of target devices. These mappings are maintained by the HBA referenced by HbaHandle. On input, the NumberOfEntries member of HBA_FCPTargetMappingV2 should contain a number of mappings that fit in the output buffer. On output, the NumberOfEntries contains the number of mappings requested, or the full set of mappings, whichever is smaller. The value in NumberOfEntries contains the number of mappings returned even when an error occurred due to insufficient buffer space.
Return value
The HBA_GetFcpTargetMappingV2 routine returns a value of type HBA_STATUS that indicates the status of the HBA. In particular, HBA_GetFcpTargetMappingV2 returns one of the following qualifiers.
Return code | Description |
---|---|
HBA_STATUS_OK | Returned if all mapping were successfully retrieved. |
HBA_STATUS_ERROR_MORE_DATA | Returned if the buffer space is insufficient to hold all of the mapping information. |
HBA_STATUS_ERROR_ILLEGAL_WWN | Returned if the HBA referenced by HbaHandle does not contain a port with a name of HbaPortWWN. |
HBA_STATUS_ERROR_NOT_SUPPORTED | Returned if the HBA referenced by HbaHandle does not support target mapping. |
HBA_STATUS_ERROR | Returned if an unspecified error occurred that prevented the retrieval of the mapping information. |
Remarks
The difference between the HBA_GetFcpTargetMappingV2 routine and the HBA_GetFcpTargetMapping routine is that the mappings returned by HBA_GetFcpTargetMappingV2 include a logical unit ID descriptor (LUID) for each logical unit. If the vital product data for a logical unit provides more than one LUID, then the LUID that HBA_GetFcpTargetMappingV2 returns depends on the types of LUIDs provided. For a complete explanation of how the LUID is chosen when more than one LUID is available, see the T11 committee's Fibre Channel HBA API specification.
Requirements
Target platform |
Desktop |
Header |
Hbaapi.h (include Hbaapi.h) |
Library |
Hbaapi.lib |
DLL |
Hbaapi.dll |
See also