Skip Navigation Links | |
Exit Print View | |
man pages section 3: Extended Library Functions, Volume 2 Oracle Solaris 11.1 Information Library |
Extended Library Functions, Volume 2
HBA_GetAdapterAttributes(3HBAAPI)
HBA_GetAdapterPortAttributes(3HBAAPI)
HBA_GetBindingCapability(3HBAAPI)
HBA_GetBindingSupport(3HBAAPI)
HBA_GetDiscoveredPortAttributes(3HBAAPI)
HBA_GetFcpPersistentBinding(3HBAAPI)
HBA_GetFcpTargetMapping(3HBAAPI)
HBA_GetFcpTargetMappingV2(3HBAAPI)
HBA_GetNumberOfAdapters(3HBAAPI)
HBA_GetPersistentBindingV2(3HBAAPI)
HBA_GetPortAttributesByWWN(3HBAAPI)
HBA_GetPortStatistics(3HBAAPI)
HBA_GetVendorLibraryAttributes(3HBAAPI)
HBA_GetWrapperLibraryAttributes(3HBAAPI)
HBA_RefreshAdapterConfiguration(3HBAAPI)
HBA_RefreshInformation(3HBAAPI)
HBA_RegisterForAdapterAddEvents(3HBAAPI)
HBA_RegisterForAdapterEvents(3HBAAPI)
HBA_RegisterForAdapterPortEvents(3HBAAPI)
HBA_RegisterForAdapterPortStatEvents(3HBAAPI)
HBA_RegisterForLinkEvents(3HBAAPI)
HBA_RegisterForTargetEvents(3HBAAPI)
HBA_RemoveAllPersistentBindings(3HBAAPI)
HBA_RemovePersistentBinding(3HBAAPI)
HBA_ScsiReadCapacityV2(3HBAAPI)
HBA_SetBindingSupport(3HBAAPI)
HBA_SetPersistentBindingV2(3HBAAPI)
lgrp_affinity_inherit_get(3LGRP)
lgrp_affinity_inherit_set(3LGRP)
MP_AssignLogicalUnitToTPG(3MPAPI)
MP_DeregisterForObjectPropertyChanges(3MPAPI)
MP_DeregisterForObjectVisibilityChanges(3MPAPI)
MP_DisableAutoFailback(3MPAPI)
MP_GetAssociatedPathOidList(3MPAPI)
MP_GetAssociatedPluginOid(3MPAPI)
MP_GetAssociatedTPGOidList(3MPAPI)
MP_GetDeviceProductOidList(3MPAPI)
MP_GetDeviceProductProperties(3MPAPI)
MP_GetInitiatorPortOidList(3MPAPI)
MP_GetInitiatorPortProperties(3MPAPI)
MP_GetLibraryProperties(3MPAPI)
MP_GetMPLogicalUnitProperties(3MPAPI)
MP_GetMPLuOidListFromTPG(3MPAPI)
MP_GetPathLogicalUnitProperties(3MPAPI)
MP_GetPluginProperties(3MPAPI)
MP_GetProprietaryLoadBalanceOidList(3MPAPI)
MP_GetProprietaryLoadBalanceProperties(3MPAPI)
MP_GetTargetPortGroupProperties(3MPAPI)
MP_GetTargetPortOidList(3MPAPI)
MP_GetTargetPortProperties(3MPAPI)
MP_RegisterForObjectPropertyChanges(3MPAPI)
MP_RegisterForObjectVisibilityChanges(3MPAPI)
MP_SetFailbackPollingRate(3MPAPI)
MP_SetLogicalUnitLoadBalanceType(3MPAPI)
MP_SetPluginLoadBalanceType(3MPAPI)
MP_SetProbingPollingRate(3MPAPI)
- retrieve the name of a specific HBA
cc [ flag… ] file… -lHBAAPI [ library… ] #include <hbaapi.h> HBA_STATUS HBA_GetAdapterName(HBA_UINT32 adapterindex, char *adaptername);
the index of the adapter, between 0 and one less than the value returned by HBA_GetNumberOfAdapters(3HBAAPI).
the buffer where the name of the adapter will be stored. The recommended size is 256 bytes.
The HBA_GetAdapterName() function stores the name of the adapter specified by adapterindex in the buffer pointed to by adaptername. The caller is responsible for allocating space for the name.
Upon successful completion, HBA_STATUS_OK is returned. Otherwise, an error value is returned and the content of adaptername is undefined.
See libhbaapi(3LIB) for general error status values.
Example 1 Return adapter name.
Given an hbacount >= 0 and < total number of adapters on the system, the following example returns the adaptername for that adapter.
if ((status = HBA_GetAdapterName(hbaCount, adaptername)) != HBA_STATUS_OK) { fprintf(stderr, "HBA %d name not available for " "reason %d\n", hbaCount, status); continue; }
See attributes(5) for descriptions of the following attributes:
|
HBA_GetNumberOfAdapters(3HBAAPI), libhbaapi(3LIB), attributes(5)
The HBA_GetAdapterName() function does not take a name length argument to define how large the buffer is, yet the specification does not indicate a maximum name length. Failure to pass in a large enough buffer will result in a buffer over-run, which may lead to segmentation faults or other failures. Callers should be sure to allocate a large buffer to ensure the Vendor library will not overrun during the copy.