1 LIBSMHBAAPI(3LIB)             Interface Libraries            LIBSMHBAAPI(3LIB)
   2 
   3 
   4 
   5 NAME
   6        libSMHBAAPI, libsmhbaapi, SMHBA_GetAdapterAttributes,
   7        SMHBA_GetAdapterPortAttributes, SMHBA_GetBindingCapability,
   8        SMHBA_GetBindingSupport, SMHBA_GetDiscoveredPortAttributes,
   9        SMHBA_GetFCPhyAttributes, SMHBA_GetLUNStatistics,
  10        SMHBA_GetNumberofPorts, SMHBA_GetPersistentBinding,
  11        SMHBA_GetPhyStatistics, SMHBA_GetPortAttributesByWWN,
  12        SMHBA_GetPortType, SMHBA_GetProtocolStatistics,
  13        SMHBA_GetSASPhyAttributes, SMHBA_GetTargetMapping,
  14        SMHBA_GetVendorLibraryAttributes, SMHBA_GetVersion,
  15        SMHBA_GetWrapperLibraryAttributes, SMHBA_RegisterForAdapterAddEvents,
  16        SMHBA_RegisterForAdapterEvents, SMHBA_RegisterForAdapterPhyStatEvents,
  17        SMHBA_RegisterForAdapterPortEvents,
  18        SMHBA_RegisterForAdapterPortStatEvents, SMHBA_RegisterForTargetEvents,
  19        SMHBA_RegisterLibrary, SMHBA_RemoveAllPersistentBindings,
  20        SMHBA_RemovePersistentBinding, SMHBA_ScsiInquiry,
  21        SMHBA_ScsiReadCapacity, SMHBA_ScsiReportLuns, SMHBA_SendECHO,
  22        SMHBA_SendSMPPassThru, SMHBA_SendTEST, SMHBA_SetBindingSupport,
  23        SMHBA_SetPersistentBinding - Common Storage Management HBA information
  24        library
  25 
  26 SYNOPSIS
  27        cc [ flag... ] file... -lSMHBAAPI [ library... ]
  28        #include <smhbaapi.h>
  29 
  30 
  31 DESCRIPTION
  32        The functions in this library access Fibre Channel and/or Serial
  33        Attached SCSI HBA data depending on vendor provided implementation
  34        underneath.
  35 
  36 
  37        HBA information is provided through a standard interface in a vendor
  38        independent manner. This common interface provides access to the
  39        following information:
  40 
  41            o      Local HBA attributes
  42 
  43            o      Local HBA port attributes and statistics
  44 
  45            o      Mapping between discovered devices and operating system SCSI
  46                   information
  47 
  48            o      Discovered devices port attributes
  49 
  50            o      SCSI commands for discovered devices (Report LUNS, Read
  51                   Capacity, and Inquiry)
  52 
  53            o      Storage Management Protocol commands to discover Serial
  54                   Attached SCSI configuration details
  55 
  56            o      Common Transport commands to discover Fibre Channel Fabric
  57                   details
  58 
  59 INTERFACES
  60        The shared object libSMHBAAPI.so.1 provides the public interfaces
  61        defined below. See Intro(3) for additional information on shared object
  62        interfaces.
  63 
  64 
  65 
  66 
  67        HBA_CloseAdapter                     HBA_FreeLibrary
  68        HBA_GetAdapterName                   HBA_GetNumberOfAdapters
  69        HBA_GetRNIDMgmtInfo                  HBA_LoadLibrary
  70        HBA_OpenAdapter                      HBA_RefreshAdapterConfiguration
  71        HBA_RefreshInformation               HBA_RegisterForLinkEvents
  72        HBA_RemoveCallback                   HBA_SendCTPassThruV2
  73        HBA_SendLIRR                         HBA_SendRLS
  74        HBA_SendRNIDV2                       HBA_SendRPL
  75        HBA_SendRPS                          HBA_SendSRL
  76        HBA_SetRNIDMgmtInfo                  SMHBA_GetAdapterAttributes
  77        SMHBA_GetAdapterPortAttributes       SMHBA_GetBindingCapability
  78        SMHBA_GetBindingSupport              SMHBA_GetDiscoveredPortAttributes
  79        SMHBA_GetFCPhyAttributes             SMHBA_GetLUNStatistics
  80        SMHBA_GetNumberofPorts               SMHBA_GetPersistentBinding
  81        SMHBA_GetPhyStatistics               SMHBA_GetPortAttributesByWWN
  82        SMHBA_GetPortType                    SMHBA_GetProtocolStatistics
  83        SMHBA_GetSASPhyAttributes            SMHBA_GetTargetMapping
  84        SMHBA_GetVendorLibraryAttributes     SMHBA_GetVersion
  85        SMHBA_GetWrapperLibraryAttributes    SMHBA_RegisterForAdapterAddEvents
  86        SMHBA_RegisterForAdapterEvents       SMHBA_RegisterForAdapterPhyStatEvents
  87        SMHBA_RegisterForAdapterPortEvents   SMHBA_RegisterForAdapterPortStatEvents
  88        SMHBA_RegisterForTargetEvents        SMHBA_RegisterLibrary
  89        SMHBA_RemoveAllPersistentBindings    SMHBA_RemovePersistentBinding
  90        SMHBA_ScsiInquiry                    SMHBA_ScsiReadCapacity
  91        SMHBA_ScsiReportLuns                 SMHBA_SendECHO
  92        SMHBA_SendSMPPassThru                SMHBA_SendTEST
  93        SMHBA_SetBindingSupport              SMHBA_SetPersistentBinding
  94 
  95 
  96 USAGE
  97        Client applications link with the Common Library (using -lSMHBAAPI) to
  98        access the interfaces. The Common Library dynamically loads individual
  99        Vendor-Specific Libraries (VSL) listed in /etc/smhba.conf and described
 100        on smhba.conf(4).
 101 
 102 
 103        Using the libSMHBAAPI involves the following steps:
 104 
 105            1.     Optionally determining the version of the library by calling
 106                   SMHBA_GetVersion().
 107 
 108            2.     Initializing the Common Library by calling
 109                   HBA_LoadLibrary().
 110 
 111            3.     Determine the number of HBAs known to the common library by
 112                   calling HBA_GetNumberOfAdapters().
 113 
 114            4.     Determine each HBA name in turn by calling
 115                   HBA_GetAdapterName().
 116 
 117            5.     Open each HBA in turn by calling HBA_OpenAdapter().
 118 
 119            6.     Operate on a given HBA by calling the following:
 120 
 121                o      SMHBA_GetAdapterAttributes()
 122 
 123                o      SMHBA_GetAdapterPortAttributes()
 124 
 125                o      SMHBA_GetDiscoveredPortAttributes()
 126 
 127                o      SMHBA_GetPortAttributesByWWN()
 128 
 129                o      SMHBA_GetNumberofPorts()
 130 
 131                o      SMHBA_GetPortType()
 132 
 133                o      SMHBA_GetProtocolStatistics()
 134 
 135                o      SMHBA_GetPhyStatistics()
 136 
 137                o      SMHBA_GetBindingCapability()
 138 
 139                o      SMHBA_GetBindingSupport()
 140 
 141                o      SMHBA_SetBindingSupport()
 142 
 143                o      SMHBA_GetTargetMapping()
 144 
 145                o      SMHBA_GetPersistentBinding()
 146 
 147                o      SMHBA_SetPersistentBinding()
 148 
 149                o      SMHBA_RemoveAllPersistentBindings()
 150 
 151                o      SMHBA_GetLUNStatistics()
 152 
 153                o      SMHBA_SendScsiInquiry()
 154 
 155                o      SMHBA_SendReportLuns()
 156 
 157                o      SMHBA_SendReadCapacity()
 158 
 159                o      SMHBA_RegisterForAdapterAddEvents()
 160 
 161                o      SMHBA_RegisterForAdapterEvents()
 162 
 163                o      SMHBA_RegisterForAdapterPortEvents()
 164 
 165                o      SMHBA_RegisterForAdapterPortStatEvents()
 166 
 167                o      SMHBA_RegisterForAdapterPhyStatEvents()
 168 
 169                o      SMHBA_RegisterForTargetEvents()
 170 
 171                o      HBA_RegisterForLinkEvents()
 172 
 173                o      HBA_RemoveCallback()
 174            For Serial Attached HBA
 175 
 176                o      SMHBA_GetSASPhyAttributes()
 177 
 178                o      SMHBA_SendSMPPassThru()
 179            For Fibre Channel HBA
 180 
 181                o      SMHBA_GetFCPhyAttributes()
 182 
 183                o      HBA_SendCTPassThruV2()
 184 
 185                o      HBA_SetRNIDMgmtInfo()
 186 
 187                o      HBA_GetRNIDMgmtInfo()
 188 
 189                o      HBA_SendRNIDV2()
 190 
 191                o      HBA_SendRPL()
 192 
 193                o      HBA_SendRPS()
 194 
 195                o      HBA_SendSRL()
 196 
 197                o      HBA_SendLIRR()
 198 
 199                o      HBA_SendRLS()
 200 
 201                o      HBA_SendTEST()
 202 
 203                o      HBA_SendECHO()
 204 
 205            7.     Close open HBAs by calling HBA_CloseAdapter().
 206 
 207            8.     Unload the library by calling HBA_FreeLibrary().
 208 
 209 ATTRIBUTES
 210        See attributes(5) for descriptions of the following attributes:
 211 
 212 
 213 
 214 
 215        +--------------------+-------------------------+
 216        |  ATTRIBUTE TYPE    |     ATTRIBUTE VALUE     |
 217        +--------------------+-------------------------+
 218        |Interface Stability | Committed               |
 219        +--------------------+-------------------------+
 220        |MT-Level            | MT-Safe                 |
 221        +--------------------+-------------------------+
 222        |Standard            | ANSI INCITS 428         |
 223        |                    | Storage Management Host |
 224        |                    | Bus Adapter Application |
 225        |                    | Programming Interface   |
 226        |                    | (SM-HBA)                |
 227        +--------------------+-------------------------+
 228 
 229 SEE ALSO
 230        smhba.conf(4), attributes(5)
 231 
 232 
 233 
 234                                 August 19, 2019              LIBSMHBAAPI(3LIB)