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)
- gather SCSI information from discovered ports
cc [ flag… ] file… -lHBAAPI [ library… ] #include <hbaapi.h> 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);
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);
HBA_STATUS HBA_SendReportLUNs(HBA_HANDLE handle, HBA_WWN PortWWN, void *pRspBuffer, HBA_UINT32 RspBufferSize, void *pSenseBuffer, HBA_UINT32 SenseBufferSize);
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);
HBA_STATUS HBA_SendReadCapacity(HBA_HANDLE handle, HBA_WWN PortWWN, HBA_UINT64 fcLUN, void *pRspBuffer, HBA_UINT32 RspBufferSize, void *pSenseBuffer, HBA_UINT32 SenseBufferSize);
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);
an open handle returned from HBA_OpenAdapter(3HBAAPI)
the port WWN of the discovered remote device to which the command is sent
the Port WWN of the local HBA through which the SCSI INQUIRY command is issued
the Port WWN of the local HBA through which the SCSI REPORT LUNS command is issued
the Port WWN of a local HBA through which the SCSI READ CAPACITY command is issued
the Remote Port WWN to which the SCSI INQUIRY command is being sent
the Remote Port WWN to which the SCSI REPORT LUNS command is sent
the Remote Port WWN to which the SCSI READ CAPACITY command is sent
the FCP LUN as defined in the T10 specification SAM-2 to which the command is sent
If set to 0, indicates a Standard Inquiry should be returned. If set to 1, indicates Vital Product Data should be returned.
If EVPD is set to 1, PageCode indicates which Vital Product Data page should be returned.
the second byte of the CDB for the SCSI INQUIRY command
the third byte of the CDB for the SCSI INQUIRY command
a buffer in which to store the response payload
the size of the response buffer
a pointer to the size of the response buffer
a buffer to receive SCSI sense data
a buffer in which to store any SCSI sense data
the size of the sense buffer
a pointer to the size of the sense buffer
The HBA_SendScsiInquiry() and HBA_SendScsiInquiryV2() functions send a SCSI Inquiry command as defined in the T10 specification SPC-2 to a remote FCP port.
The HBA_SendReportLUNs() and HBA_SendReportLUNsV2() functions send a SCSI Report LUNs command as defined in the T10 specification SPC-2 to a remote FCP port.
The HBA_SendReadCapacity() and HBA_SendReadCapacityV2() functions end a SCSI Read Capacity command as defined in the T10 specification SBC-2 to a remote FCP port.
The HBA_SendScsiInquiry() function returns the following value:
The command has completed. Success or failure should be determined by verifying that the sense data does not contain a check-condition. If a check-condition is present, the content of pRspBuffer is undefined.
The HBA_ScsiInquiryV2() function returns the following values:
The command has completed. The complete payload of the SCSI INQUIRY command is returned in pRspBuffer.
The port WWN hbaPortWWN is not a WWN contained by the HBA specified by handle.
The identified remote Port does not have SCSI Target functionality.
The command cannot be sent due to a SCSI overlapped command condition.
An error occurred.
The HBA_SendReportLUNs() function returns the following values:
The command has completed. Success or failure should be determined by verifying the sense data does not contain a check-condition. If a check-condition is present, the content of pRspBuffer is undefined.
The HBA detected a check-condition state. Details are present in the pSenseBuffer payload. The content of pRspBuffer is undefined. Not all VSLs support this error condition.
Other error values indicate the content of pRspBuffer is undefined. In some cases, the pSenseBuffer can contain sense data.
The HBA_SendReportLUNsV2() function returns the following values:
The command has completed. Sense data must be verified to ensure that it does not contain a check-condition to determine success. If a check-condition is present, the content of pRspBuffer is undefined.
The port WWN hbaPortWWN is not a WWN contained by the HBA specified by handle.
The identified remote Port does not have SCSI Target functionality.
The command cannot be sent due to a SCSI overlapped command condition.
An error occurred.
The HBA_SendReadCapacity() function returns the following values:
The command has completed. Success or failure should be determined by verifying that the sense data does not contain a check-condition. If a check-condition is present, the content of pRspBuffer is undefined.
The HBA detected a check-condition state. Details are present in the pSenseBuffer payload. The content of pRspBuffer is undefined. Not all VSLs support this error condition.
Other error values indicate the content of pRspBuffer is undefined. In some cases, the pSenseBuffer can contain sense data.
The HBA_ScsiReadCapacityV2() function returns the following values:
The command has completed. Sense data must be verified to ensure that it does not contain a check-condition to determine success. If a check-condition is present, the content of pRspBuffer is undefined.
The port WWN hbaPortWWN is not a WWN contained by the HBA specified by handle.
The identified remote Port does not have SCSI Target functionality.
The command cannot be sent due to a SCSI overlapped command condition.
An error occurred.
Other error values indicate the content of pRspBuffer is undefined. In some cases, the pSenseBuffer can contain sense data.
See libhbaapi(3LIB) for general error status values.
Example 1 Send a SCSI inquiry to the given discovered Target port WWN.
The following example sends a SCSI inquiry to the given discovered Target port WWN.
memset(&inq, 0, sizeof (inq)); memset(&sense, 0, sizeof (sense)); if ((status = HBA_SendScsiInquiry(handle, discPortAttrs.PortWWN, 0, 0, 0, &inq, sizeof (inq), &sense, sizeof (sense))) != HBA_STATUS_OK) { fprintf(stderr, "Unable to send SCSI " "inquiry, reason %d\n", status); continue; } printf(" Vendor: %.*s\n", 8, inq.inq_vid); printf(" Model: %.*s\n", 16, inq.inq_pid);
See attributes(5) for descriptions of the following attributes:
|
HBA_OpenAdapter(3HBAAPI), libhbaapi(3LIB), attributes(5)
The HBA_SendScsiInquiry(), HBA_SendReportLUNs(), and HBA_SendReadCapacity() functions do not take a portindex to define through which port of a multi-ported HBA the command should be sent. The behavior on multi-ported HBAs is vendor-specific and can result in the command being sent through the first HBA port, the first HBA port the given PortWWN is connected to, or other vendor-specific behavior. SNIA version 2 defines HBA_ScsiInquiryV2(), HBA_ScsiReportLUNs(), and HBA_ScsiReadCapacity() to take a Port WWN as an argument. This fixes the bug with multi-ported HBAs in HBA_ScsiInquiry(), HBA_SendReportLUNs(), and HBA_SendReadCapacity().