ZFCP HBA API Library 1
|
Functions | |
HBA_UINT32 | HBA_GetVersion (void) |
Return the version of the HBA API specification with which this library is compliant. | |
HBA_STATUS | HBA_LoadLibrary (void) |
Perform initialization of library. | |
HBA_STATUS | HBA_FreeLibrary (void) |
Free system resources that library has used. | |
HBA_UINT32 | HBA_GetWrapperLibraryAttributes (HBA_LIBRARYATTRIBUTES *attributes) |
Return attributes of the OS specific HBA API library. | |
HBA_UINT32 | HBA_GetVendorLibraryAttributes (HBA_UINT32 adapter_index, HBA_LIBRARYATTRIBUTES *attributes) |
Return attributes of the vendor specific HBA API library. | |
HBA_UINT32 | HBA_GetNumberOfAdapters (void) |
Return number of adapters. | |
void | HBA_RefreshInformation (HBA_HANDLE handle) |
Refresh information of an adapter. | |
void | HBA_RefreshAdapterConfiguration (void) |
Refresh information about configured adapters. | |
void | HBA_ResetStatistics (HBA_HANDLE handle, HBA_UINT32 portindex) |
According to FC-HBA this function is obsolete. | |
HBA_STATUS | HBA_GetAdapterName (HBA_UINT32 adapterindex, char *pAdaptername) |
Return name that identifies an adapter. | |
HBA_HANDLE | HBA_OpenAdapter (char *pAdaptername) |
Open an adapter. | |
void | HBA_CloseAdapter (HBA_HANDLE handle) |
Close an open adapter. | |
HBA_STATUS | HBA_GetAdapterAttributes (HBA_HANDLE handle, HBA_ADAPTERATTRIBUTES *pAdapterattributes) |
Return attributes for an adapter. | |
HBA_STATUS | HBA_GetAdapterPortAttributes (HBA_HANDLE handle, HBA_UINT32 portindex, HBA_PORTATTRIBUTES *pPortattributes) |
Return attributes for an adapter port. | |
HBA_STATUS | HBA_GetDiscoveredPortAttributes (HBA_HANDLE handle, HBA_UINT32 portindex, HBA_UINT32 discoveredportindex, HBA_PORTATTRIBUTES *pPortattributes) |
Return attributes of an discovered port. | |
HBA_STATUS | HBA_GetPortStatistics (HBA_HANDLE handle, HBA_UINT32 portindex, HBA_PORTSTATISTICS *pPortstatistics) |
Return statistics of an adapter port. | |
HBA_STATUS | HBA_GetFcpTargetMapping (HBA_HANDLE handle, HBA_FCPTARGETMAPPING *pMapping) |
Retrieve mappings between OS SCSI targets/units and FCP targets/units. | |
HBA_STATUS | HBA_GetFcpTargetMappingV2 (HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_FCPTARGETMAPPINGV2 *pMappingV2) |
Retrieve mappings between OS SCSI targets/units and FCP targets/units. | |
HBA_STATUS | HBA_SendScsiInquiry (HBA_HANDLE handle, HBA_WWN PortWWN, HBA_UINT64 fcLUN, HBA_UINT8 EVPD, HBA_UINT32 PageCode, void *pRspBuffer, HBA_UINT32 RspBufferSize, void *pSenseBuffer, HBA_UINT32 SenseBufferSize) |
Send a SCSI INQUIRY command to a FCP LUN. | |
HBA_STATUS | HBA_ScsiInquiryV2 (HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_WWN discoveredPortWWN, HBA_UINT64 fcLUN, HBA_UINT8 CDB_Byte1, HBA_UINT8 CDB_Byte2, void *pRspBuffer, HBA_UINT32 *pRspBufferSize, HBA_UINT8 *pScsiStatus, void *pSenseBuffer, HBA_UINT32 *pSenseBufferSize) |
Send a SCSI INQUIRY command to a FCP LUN. | |
HBA_STATUS | HBA_SendReportLUNs (HBA_HANDLE handle, HBA_WWN portWWN, void *pRspBuffer, HBA_UINT32 RspBufferSize, void *pSenseBuffer, HBA_UINT32 SenseBufferSize) |
Send a SCSI REPORT LUNS command to a target. | |
HBA_STATUS | HBA_ScsiReportLUNsV2 (HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_WWN discoveredPortWWN, void *pRspBuffer, HBA_UINT32 *pRspBufferSize, HBA_UINT8 *pScsiStatus, void *pSenseBuffer, HBA_UINT32 *pSenseBufferSize) |
Send a SCSI REPORT LUNS command to a target. | |
HBA_STATUS | HBA_SendReadCapacity (HBA_HANDLE handle, HBA_WWN portWWN, HBA_UINT64 fcLUN, void *pRspBuffer, HBA_UINT32 RspBufferSize, void *pSenseBuffer, HBA_UINT32 SenseBufferSize) |
Send a SCSI READ CAPACITY command to a FCP LUN. | |
HBA_STATUS | HBA_ScsiReadCapacityV2 (HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_WWN discoveredPortWWN, HBA_UINT64 fcLUN, void *pRspBuffer, HBA_UINT32 *pRspBufferSize, HBA_UINT8 *pScsiStatus, void *pSenseBuffer, HBA_UINT32 *pSenseBufferSize) |
Send a SCSI READ CAPACITY command to a FCP LUN. | |
HBA_STATUS | HBA_SendCTPassThru (HBA_HANDLE handle, void *pReqBuffer, HBA_UINT32 ReqBufferSize, void *pRspBuffer, HBA_UINT32 RspBufferSize) |
Send a CT pass thru - a CT frame constructed in userspace directly to the HBA / SAN. | |
HBA_STATUS | HBA_SendCTPassThruV2 (HBA_HANDLE handle, HBA_WWN hbaPortWWN, void *pReqBuffer, HBA_UINT32 ReqBufferSize, void *pRspBuffer, HBA_UINT32 *pRspBufferSize) |
Send a CT pass thru - a CT frame constructed in userspace directly to the HBA / SAN. | |
HBA_STATUS | HBA_SendRNID (HBA_HANDLE handle, HBA_WWN wwn, HBA_WWNTYPE wwntype, void *pRspBuffer, HBA_UINT32 *pRspBufferSize) |
Send a RNID ELS to a port. | |
HBA_STATUS | HBA_SendRNIDV2 (HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_WWN destWWN, HBA_UINT32 destFCID, HBA_UINT32 NodeIdDataFormat, void *pRspBuffer, HBA_UINT32 *pRspBufferSize) |
Send a RNID ELS to a port. | |
HBA_STATUS | HBA_GetEventBuffer (HBA_HANDLE handle, HBA_EVENTINFO *pEventBuffer, HBA_UINT32 *pEventCount) |
Return events for an adapter from the event queue. |
void HBA_CloseAdapter | ( | HBA_HANDLE | handle | ) |
Close an open adapter.
handle | of adapter to be closed |
The adapter handle is invalidated and the information about the ports and units of this adapter is deleted.
References doCloseAdapter(), getAdapterByHandle(), vlib_adapter::handle, vlib_data::mutex, VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
HBA_STATUS HBA_FreeLibrary | ( | void | ) |
Free system resources that library has used.
References closeAllAdapters(), vlib_data::id, vlib_data::isLoaded, vlib_data::mutex, vlib_data::unloading, VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
HBA_STATUS HBA_GetAdapterAttributes | ( | HBA_HANDLE | handle, |
HBA_ADAPTERATTRIBUTES * | pAdapterattributes ) |
Return attributes for an adapter.
handle | of an opened adapter |
pAdapterattributes | pointer to return atributes |
References getAdapterByHandle(), vlib_adapter::handle, vlib_data::mutex, revalidateRepository(), sysfs_getAdapterAttributes(), VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
HBA_STATUS HBA_GetAdapterName | ( | HBA_UINT32 | adapterindex, |
char * | pAdaptername ) |
Return name that identifies an adapter.
adapterindex | index of the HBA |
pAdaptername | used to return the ASCII string |
References getAdapterByIndex(), vlib_adapter::isInvalid, vlib_data::mutex, revalidateRepository(), VLIB_ADAPTERNAME_LEN, VLIB_ADAPTERNAME_PREFIX, VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
HBA_STATUS HBA_GetAdapterPortAttributes | ( | HBA_HANDLE | handle, |
HBA_UINT32 | portindex, | ||
HBA_PORTATTRIBUTES * | pPortattributes ) |
Return attributes for an adapter port.
handle | to an opened adapter |
portindex | index of adapter port |
pPortattributes | pointer to return atributes |
References getAdapterByHandle(), vlib_adapter::handle, vlib_data::mutex, revalidatePorts(), revalidateRepository(), sysfs_getAdapterPortAttributes(), VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
HBA_STATUS HBA_GetDiscoveredPortAttributes | ( | HBA_HANDLE | handle, |
HBA_UINT32 | portindex, | ||
HBA_UINT32 | discoveredportindex, | ||
HBA_PORTATTRIBUTES * | pPortattributes ) |
Return attributes of an discovered port.
handle | to an opened adapter |
portindex | index of adapter port |
discoveredportindex | index of adapter port |
pPortattributes | pointer to return atributes |
References getAdapterByHandle(), getPortByIndex(), vlib_port::isInvalid, vlib_data::mutex, revalidateRepository(), sysfs_getDiscoveredPortAttributes(), VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
HBA_STATUS HBA_GetEventBuffer | ( | HBA_HANDLE | handle, |
HBA_EVENTINFO * | pEventBuffer, | ||
HBA_UINT32 * | pEventCount ) |
Return events for an adapter from the event queue.
handle | to an opened adapter |
*pEventBuffer | pointer to return events |
*pEventCount | pointer to size of event buffer (in event records) |
References getAdapterByHandle(), vlib_data::mutex, revalidateRepository(), VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
HBA_STATUS HBA_GetFcpTargetMapping | ( | HBA_HANDLE | handle, |
HBA_FCPTARGETMAPPING * | pMapping ) |
Retrieve mappings between OS SCSI targets/units and FCP targets/units.
handle | to an opened adapter |
*pMapping | pointer to return target mappings |
References vlib_unit::channel, vlib_port::did, vlib_unit::fcLun, getAdapterByHandle(), getPortByIndex(), getUnitByIndex(), vlib_adapter_ident::host, vlib_adapter::ident, vlib_port::isInvalid, vlib_unit::isInvalid, vlib_unit::lun, vlib_data::mutex, vlib_adapter::ports, revalidatePorts(), revalidateRepository(), revalidateUnits(), vlib_unit::target, vlib_port::units, block::used, vlib_FCID_to_hbaFCID(), VLIB_MUTEX_LOCK, VLIB_MUTEX_UNLOCK, vlib_wwn_to_HBA_WWN(), vlib_port::wwnn, and vlib_port::wwpn.
Referenced by HBA_GetFcpTargetMappingV2().
HBA_STATUS HBA_GetFcpTargetMappingV2 | ( | HBA_HANDLE | handle, |
HBA_WWN | hbaPortWWN, | ||
HBA_FCPTARGETMAPPINGV2 * | pMappingV2 ) |
Retrieve mappings between OS SCSI targets/units and FCP targets/units.
handle | to an opened adapter |
*pMapping | pointer to return target mappings |
*hbaPortWWN | wwpn to identify the port on the adapter |
References getAdapterByHandle(), vlib_adapter::handle, HBA_GetFcpTargetMapping(), vlib_adapter::ident, vlib_data::mutex, vlib_HBA_WWN_to_wwn(), VLIB_MUTEX_LOCK, VLIB_MUTEX_UNLOCK, and vlib_adapter_ident::wwpn.
HBA_UINT32 HBA_GetNumberOfAdapters | ( | void | ) |
Return number of adapters.
References vlib_data::adapters, vlib_data::mutex, revalidateRepository(), block::used, VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
HBA_STATUS HBA_GetPortStatistics | ( | HBA_HANDLE | handle, |
HBA_UINT32 | portindex, | ||
HBA_PORTSTATISTICS * | pPortstatistics ) |
Return statistics of an adapter port.
handle | to an opened adapter |
portindex | index of adapter port |
pPortstatistics | pointer to return statistics |
References getAdapterByHandle(), vlib_adapter::handle, vlib_data::mutex, revalidateRepository(), sysfs_getPortStatistics(), VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
HBA_UINT32 HBA_GetVendorLibraryAttributes | ( | HBA_UINT32 | adapter_index, |
HBA_LIBRARYATTRIBUTES * | attributes ) |
Return attributes of the vendor specific HBA API library.
adapter_index | not used |
attributes | used to return library attributes |
References _GetVendorLibraryAttributes().
HBA_UINT32 HBA_GetVersion | ( | void | ) |
Return the version of the HBA API specification with which this library is compliant.
References HBAAPI_LIBRARY_VERSION.
HBA_UINT32 HBA_GetWrapperLibraryAttributes | ( | HBA_LIBRARYATTRIBUTES * | attributes | ) |
Return attributes of the OS specific HBA API library.
attributes | used to return library attributes |
References _GetVendorLibraryAttributes().
HBA_STATUS HBA_LoadLibrary | ( | void | ) |
Perform initialization of library.
References vlib_data::isLoaded, vlib_data::mutex, sysfs_createAndReadConfigAdapter(), VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
HBA_HANDLE HBA_OpenAdapter | ( | char * | pAdaptername | ) |
Open an adapter.
pAdaptername | name of adapter to be opened (name was obtained by previous call to HBA_GetAdapterName()) |
References findIndexByName(), vlib_adapter::handle, vlib_data::mutex, openAdapterByIndex(), revalidateRepository(), VLIB_INVALID_HANDLE, VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
void HBA_RefreshAdapterConfiguration | ( | void | ) |
Refresh information about configured adapters.
References vlib_data::mutex, revalidateRepository(), VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
void HBA_RefreshInformation | ( | HBA_HANDLE | handle | ) |
Refresh information of an adapter.
handle | of the adapter for which information should be refreshed. |
References getAdapterByHandle(), vlib_adapter::handle, vlib_data::mutex, updateAdapter(), VLIB_LOG, VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
void HBA_ResetStatistics | ( | HBA_HANDLE | handle, |
HBA_UINT32 | portindex ) |
According to FC-HBA this function is obsolete.
This function has no effect.
HBA_STATUS HBA_ScsiInquiryV2 | ( | HBA_HANDLE | handle, |
HBA_WWN | hbaPortWWN, | ||
HBA_WWN | discoveredPortWWN, | ||
HBA_UINT64 | fcLUN, | ||
HBA_UINT8 | CDB_Byte1, | ||
HBA_UINT8 | CDB_Byte2, | ||
void * | pRspBuffer, | ||
HBA_UINT32 * | pRspBufferSize, | ||
HBA_UINT8 * | pScsiStatus, | ||
void * | pSenseBuffer, | ||
HBA_UINT32 * | pSenseBufferSize ) |
Send a SCSI INQUIRY command to a FCP LUN.
handle | to an opened adapter |
hbaPortWWN | WWPN of the local adapter port |
discoveredPortWWN | WWPN of the target port |
fcLUN | FCP LUN of the unit |
EVPD | Enhanced Vital Product Data |
PageCode | Vital Product Data page code if EVPD is set |
*pRspBuffer | pointer to return response data |
RspBufferSize | size of the response buffer |
*pSenseBuffer | pointer to return sense data on SCSI CHECK_CONDITION |
SenseBufferSize | size of the sense buffer |
References _HBA_SendScsiInquiry().
HBA_STATUS HBA_ScsiReadCapacityV2 | ( | HBA_HANDLE | handle, |
HBA_WWN | hbaPortWWN, | ||
HBA_WWN | discoveredPortWWN, | ||
HBA_UINT64 | fcLUN, | ||
void * | pRspBuffer, | ||
HBA_UINT32 * | pRspBufferSize, | ||
HBA_UINT8 * | pScsiStatus, | ||
void * | pSenseBuffer, | ||
HBA_UINT32 * | pSenseBufferSize ) |
Send a SCSI READ CAPACITY command to a FCP LUN.
handle | to an opened adapter |
portWWN | WWPN of the target port |
fcLUN | FCP LUN of the unit |
*pRspBuffer | pointer to return response data |
RspBufferSize | size of the response buffer |
*pSenseBuffer | pointer to return sense data on SCSI CHECK_CONDITION |
SenseBufferSize | size of the sense buffer |
References _HBA_SendReadCapacity().
HBA_STATUS HBA_ScsiReportLUNsV2 | ( | HBA_HANDLE | handle, |
HBA_WWN | hbaPortWWN, | ||
HBA_WWN | discoveredPortWWN, | ||
void * | pRspBuffer, | ||
HBA_UINT32 * | pRspBufferSize, | ||
HBA_UINT8 * | pScsiStatus, | ||
void * | pSenseBuffer, | ||
HBA_UINT32 * | pSenseBufferSize ) |
Send a SCSI REPORT LUNS command to a target.
handle | to an opened adapter |
portWWN | WWPN of the local port |
discoveredPortWWN | WWPN of the target port |
*pRspBuffer | pointer to return response data |
*RspBufferSize | pointer to size of the response buffer |
*pSenseBuffer | pointer to return sense data on SCSI CHECK_CONDITION |
*SenseBufferSize | pointer to size of the sense buffer |
References _HBA_SendReportLUNs().
HBA_STATUS HBA_SendCTPassThru | ( | HBA_HANDLE | handle, |
void * | pReqBuffer, | ||
HBA_UINT32 | ReqBufferSize, | ||
void * | pRspBuffer, | ||
HBA_UINT32 | RspBufferSize ) |
Send a CT pass thru - a CT frame constructed in userspace directly to the HBA / SAN.
handle | to an opened adapter |
*pReqBuffer | pointer to CT frame |
ReqBufferSize | size of the request buffer |
*pRspBuffer | pointer to return response data |
RspBufferSize | size of the response buffer |
References getAdapterByHandle(), vlib_adapter::handle, vlib_data::mutex, revalidateRepository(), VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
Referenced by HBA_SendCTPassThruV2().
HBA_STATUS HBA_SendCTPassThruV2 | ( | HBA_HANDLE | handle, |
HBA_WWN | hbaPortWWN, | ||
void * | pReqBuffer, | ||
HBA_UINT32 | ReqBufferSize, | ||
void * | pRspBuffer, | ||
HBA_UINT32 * | pRspBufferSize ) |
Send a CT pass thru - a CT frame constructed in userspace directly to the HBA / SAN.
handle | to an opened adapter |
hbaPortWWN | local port of adapter - not necessary in our case |
*pReqBuffer | pointer to CT frame |
ReqBufferSize | size of the request buffer |
*pRspBuffer | pointer to return response data |
RspBufferSize | size of the response buffer |
References vlib_adapter::handle, and HBA_SendCTPassThru().
HBA_STATUS HBA_SendReadCapacity | ( | HBA_HANDLE | handle, |
HBA_WWN | portWWN, | ||
HBA_UINT64 | fcLUN, | ||
void * | pRspBuffer, | ||
HBA_UINT32 | RspBufferSize, | ||
void * | pSenseBuffer, | ||
HBA_UINT32 | SenseBufferSize ) |
Send a SCSI READ CAPACITY command to a FCP LUN.
handle | to an opened adapter |
portWWN | WWPN of the target port |
fcLUN | FCP LUN of the unit |
*pRspBuffer | pointer to return response data |
RspBufferSize | size of the response buffer |
*pSenseBuffer | pointer to return sense data on SCSI CHECK_CONDITION |
SenseBufferSize | size of the sense buffer |
References _HBA_SendReadCapacity().
HBA_STATUS HBA_SendReportLUNs | ( | HBA_HANDLE | handle, |
HBA_WWN | portWWN, | ||
void * | pRspBuffer, | ||
HBA_UINT32 | RspBufferSize, | ||
void * | pSenseBuffer, | ||
HBA_UINT32 | SenseBufferSize ) |
Send a SCSI REPORT LUNS command to a target.
handle | to an opened adapter |
portWWN | WWPN of the target port |
*pRspBuffer | pointer to return response data |
RspBufferSize | size of the response buffer |
*pSenseBuffer | pointer to return sense data on SCSI CHECK_CONDITION |
SenseBufferSize | size of the sense buffer |
References _HBA_SendReportLUNs().
HBA_STATUS HBA_SendRNID | ( | HBA_HANDLE | handle, |
HBA_WWN | wwn, | ||
HBA_WWNTYPE | wwntype, | ||
void * | pRspBuffer, | ||
HBA_UINT32 * | pRspBufferSize ) |
Send a RNID ELS to a port.
handle | to an opened adapter |
wwn | of port to which to send RNID ELS |
wwntype | deprecated |
*pRspBuffer | pointer to return response data |
*pRspBufferSize | pointer to size of response buffer |
References getAdapterByHandle(), vlib_data::mutex, revalidateRepository(), vlib_HBA_WWN_to_wwn(), VLIB_MUTEX_LOCK, and VLIB_MUTEX_UNLOCK.
Referenced by HBA_SendRNIDV2().
HBA_STATUS HBA_SendRNIDV2 | ( | HBA_HANDLE | handle, |
HBA_WWN | hbaPortWWN, | ||
HBA_WWN | destWWN, | ||
HBA_UINT32 | destFCID, | ||
HBA_UINT32 | NodeIdDataFormat, | ||
void * | pRspBuffer, | ||
HBA_UINT32 * | pRspBufferSize ) |
Send a RNID ELS to a port.
handle | to an opened adapter |
hbaPortWWN | local port of adapter - not necessary in our case |
wwn | of port to which to send RNID ELS |
wwntype | deprecated |
*pRspBuffer | pointer to return response data |
*pRspBufferSize | pointer to size of response buffer |
References HBA_SendRNID().
HBA_STATUS HBA_SendScsiInquiry | ( | HBA_HANDLE | handle, |
HBA_WWN | PortWWN, | ||
HBA_UINT64 | fcLUN, | ||
HBA_UINT8 | EVPD, | ||
HBA_UINT32 | PageCode, | ||
void * | pRspBuffer, | ||
HBA_UINT32 | RspBufferSize, | ||
void * | pSenseBuffer, | ||
HBA_UINT32 | SenseBufferSize ) |
Send a SCSI INQUIRY command to a FCP LUN.
handle | to an opened adapter |
PortWWN | WWPN of the target port |
fcLUN | FCP LUN of the unit |
EVPD | Enhanced Vital Product Data |
PageCode | Vital Product Data page code if EVPD is set |
*pRspBuffer | pointer to return response data |
RspBufferSize | size of the response buffer |
*pSenseBuffer | pointer to return sense data on SCSI CHECK_CONDITION |
SenseBufferSize | size of the sense buffer |
References _HBA_SendScsiInquiry().