Specifications

4
Changing Shelf Settings Using HPI
58
TorunanyHPIapplicationthatlinkswiththeRadisysHPIclientlibrary,libhcl.so,considerthe
following:
•TheSaHpi.hheaderfileandtheHCLsupportHPIB.03.02andarebackwardcompatible
withHPIB.02.01andHPIB.01.01.RadisysrecommendsrecompilingyourHPIapplications
withthenewheaderfile.
•Ensurethe
runtimeenvironmentisproperlysetupsothatapplicationscanfindtheHPI
clientlibrary.Dothisbycompletingeitherofthefollowingtasks:
•BuildandinstalltheHPIclientlibrary,libhcl.so,andnotetheinstallationlocation.Build
instructionsareprovidedintheHPIclientlibraryandapplicationpackageincludedon
theRadisysFTPsite.
•SettheLD_LIBRARY_PATHenvironmentvariabletothelocationofthelibhcl.so.
YoumustconverttheIPv4addresstoabinaryformatbecausetheDomainIdisdefinedas
a32bitunsignedintegerandwouldnotbeabletoacceptanASCIIformattedIPv4
address.HPIapplicationscanusetheLinuxlibraryfunctioninet_addr()toconvertthe
IPv4basedShelfManagerAddresstoabinaryformat.
•ToopensessionstoaremoteHPIserverusingthedefaultDomainId
SAHPI_UNSPECIFIED_DOMAIN_ID,settheenvironmentvariable
SAHPI_UNSPECIFIED_DOMAIN_IDtotheIPaddressoftheShelfManager.Thisshould
normallybethededicatedShelfManagerIPaddressthatisboundtotheactiveShelf
Manager.Forexample,thefollowingBourneshellcommandcreat esandexportsthe
environmentvariableSAHPI_UNSPECIFIED_DOMAIN_IDtotheShelfManagerIPaddress
XX.XX.XX.XX
.
exportSAHPI_UNSPECIFIED_DOMAIN_ID=XX.XX.XX.XX
TheHCLsearchesforthisenvironmentvariablewhenarequesttoopenasessionusing
thedefaultdomainidentifierisreceived.Ifthisvariableisnotset,theHCLwilluse
127.0.0.1todeducetheDomainId.
IfnoHPIserverrespondsatthespecifiedIPaddress,saHpiSessionOpen()willreturnthe
error
code:SA_ERR_HPI_INVALID_DOMAIN.
•WhenrunningtheHPIapplicationremotely,itmightbenecessarytosetupanewroute
fortheShelfManagersIPaddresssothatcommunicationcanbeestablishedbetweenthe
remotemachinehostingtheHPIapplicationandtheHPIserver.