Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hbaapi_general_vendor_fns(3c) [hpux man page]

hbaapi_general_vendor_fns(3C)											     hbaapi_general_vendor_fns(3C)

NAME
hbaapi_general_vendor_fns: HBA_GetVersion(), HBA_LoadLibrary(), HBA_FreeLibrary(), HBA_GetNumberOfAdapters(), HBA_GetAdapterName(), HBA_OpenAdapter(), HBA_CloseAdapter() - Fibre Channel SNIA Host Bus Adapter general vendor-implemented functions SYNOPSIS
DESCRIPTION
This manpage covers Fibre Channel Storage Network Industry Association Host Bus Adapter vendor-implemented functions that are related to general adapter operations. This function returns the version of the FC SNIA API this library conforms to. This function loads the HBA libraries which have a valid entry in the file. This function must be called before calling any other HBA library functions. This function frees the HBA vendor libraries loaded during a call to The only function in the library that may be called once this has been called is This function returns the current number of HBAs supported by the library. This function is used to obtain the name of the adapter supported by the library whose index is adapter_index. The text string (pointed to by adapter_name) describes the adapter. This string is used to open the adapter within the library and is of the form: mfgdomain-model-adapter_index and is allocated by the application calling this function. The valid range of adapter_index is from 0 to "1 less than the value returned by ". This function opens a named adapter. By opening the adapter, an application is ensuring that all access to the (refer to between an open and a close is to the same adapter. A call to does not necessarily imply a driver "open" and this is vendor implementation dependent. adapter_name is a textual description of an adapter as retrieved from a call to This function closes an open adapter. handle is of type (refer to and is obtained for an adapter by calling WARNINGS
This implementation of the FC SNIA HBA API enforces a calling order as follows: 1. should be called only after all open adapters have been fully closed. 2. An adapter shall be deemed fully closed only when for every successful a has been called. 3. Every should be called only after a corresponding is called. 4. Between two calls to a call to must be made. 5. should be called only after has been called. 6. should be called for any adapter only after has been called at least once. 7. should be called for an adapter only after has been called at least once for the same adapter. RETURN VALUES
returns: 1 Which is the version of the API to which this library conforms to. No other return value is cur- rently valid. returns: The library has been loaded properly. The library is busy processing a call that cannot be executed concurrently with other calls and may be modifying internal data structures. There is a problem with loading. returns: The library was able to free all resources. The library is busy processing a call that cannot be executed concurrently with other calls and may be modifying internal data structures. There is a problem with freeing resources. If returns 0, the variable is set to one of the following listed values: When number of adapters in the system is 0 When the library is busy processing another call When there is an out of order call When there are too many open files When there is an internal error Any other return value gives the number of adapters identified by this library. returns: On success. The pointer passed to this function is NULL. The library is busy processing a call that cannot be executed concurrently with other calls and may be modifying internal data structures. The adapter_index passed is not valid. An internal error has occured. returns: Non-zero A valid handle to the adapter. 0 When there is a problem in opening the adapter. In this case the is set to one of the following listed values: An invalid argument is passed. The library is busy processing another call. There is an out of order call. An adapter is unavailable. There is a file open error. There is an internal error. EXAMPLES
HBA_GetVersion() HBA_UINT32 version; version = HBA_GetVersion(); printf("Running version %u of the HBA API library.", version); HBA_LoadLibrary() HBA_STATUS status; status = HBA_LoadLibrary(); if (status == HBA_STATUS_OK) { printf("Successfully loaded HBA library. "); } HBA_FreeLibrary() HBA_STATUS status; status = HBA_FreeLibrary(); if (status == HBA_STATUS_OK) { printf("Successfully freed HBA library. "); } HBA_GetNumberOfAdapters() HBA_UINT32 version; int i; HBA_STATUS status; char adapter_name[256]; number_of_adapters = HBA_GetNumberOfAdapters(); for (i = 0; i < number_of_adapters; i++) { status = HBA_GetAdapterName(i, adapter_name); if (status == HBA_STATUS_OK) { printf("Adapter %d is named %s ", i, adapter_name); } } HBA_GetAdapterName() HBA_UINT32 version; int i; HBA_STATUS status; char adapter_name[256]; number_of_adapters = HBA_GetNumberOfAdapters(); for (i = 0; i < number_of_adapters; i++) { status = HBA_GetAdapterName(i, &adapter_name); if (status == HBA_STATUS_OK) { printf("Adapter %d is named %s ", i, adapter_name); } } HBA_OpenAdapter() int i; HBA_STATUS status; HBA_HANDLE adapterhandle; char adapter_name[256]; number_of_adapters = HBA_GetNumberOfAdapters(); for (i = 0; i < number_of_adapters; i++) { status = HBA_GetAdapterName (i, &adapter_name); if (status == HBA_STATUS_OK) { adapterhandle = HBA_OpenAdapter(adapter_name); if (adapterhandle != 0) { printf("Successfully opened %s ", adapter_name); HBA_CloseAdapter(adapterhandle); } } } HBA_CloseAdapter() adapterhandle = HBA_OpenAdapter(adapter_name); if (adapterhandle != 0) { printf ("Successfully opened %s ", adapter_name); HBA_CloseAdapter(adapterhandle); } FILES
Contains the related data structures and definitons as in AUTHOR
These APIs were developed by Hewlett-Packard Company. SEE ALSO
HBAAPI(3C), HBA_GetAdapterAttributes(3C), HBA_GetAdapterPortAttributes(3C), HBA_GetPortStatistics(3C), HBA_GetDiscoveredPortAttributes(3C), HBA_GetPortAttributesByWWN(3C), HBA_SendCTPassThru(3C), HBA_GetEventBuffer(3C), HBA_SetRNIDMgmtInfo(3C), HBA_GetRNIDMgmtInfo(3C), HBA_SendRNID(3C), HBA_GetFcpTargetMapping(3C), HBA_GetFcpPersistentBinding(3C), HBA_SendScsiInquiry(3C), HBA_SendReportLUNs(3C), HBA_SendReadCapacity(3C), HBA_RefreshInformation(3C), HBA_ResetStatistics(3C). hbaapi_general_vendor_fns(3C)
Man Page