Not even close. Obviously never event tried in v2.1.
Attached are enough fixes to get past compilation.
Below is the header, attached is the .c
/*
* Description
* hbasample.h - Header file for sample HBA API
compliant vendor library
*
* License:
* The contents of this file are subject to the
SNIA Public License
* Version 1.0 (the "License"); you may not use
this file except in
* compliance with the License. You may
obtain a copy of the License at
*
*
/http://www.snia.org/English/Resources/Code/
OpenSource.html
*
* Software distributed under the License is
distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY
KIND, either express or implied. See
* the License for the specific language
governing rights and limitations
* under the License.
*
* The Original Code is Header file for
* SNIA HBA API Sample Vendor Specific
Library
*
* The Initial Developer of the Original Code is:
* Benjamin F. Kuo, Troika Networks, Inc.
(benk@troikanetworks.com)
*
* Contributor(s):
*
******************************************************************
*********
*/
#ifdef WIN32
#ifdef HBASAMPLE_EXPORTS
#define HBASAMPLE_API __declspec(dllexport)
#else
#define HBASAMPLE_API __declspec(dllimport)
#endif
#else
#define HBASAMPLE_API
#endif
HBASAMPLE_API HBA_STATUS HBA_RegisterLibrary(
PHBA_ENTRYPOINTS entrypoints );
HBASAMPLE_API HBA_STATUS
HBA_RegisterLibraryV2(HBA_ENTRYPOINTSV2
*entrypoints);
HBA_STATUS Sample_LoadLibrary();
HBA_STATUS Sample_FreeLibrary();
HBA_UINT32 Sample_GetVersion();
HBA_UINT32 Sample_GetNumberOfAdapters();
HBA_STATUS Sample_GetAdapterName(HBA_UINT32
adapterindex, char *adaptername);
HBA_HANDLE
Sample_OpenAdapter(char* adaptername );
void Sample_CloseAdapter(HBA_HANDLE handle);
HBA_STATUS Sample_GetAdapterAttributes(
HBA_HANDLE handle,
PHBA_ADAPTERATTRIBUTES hbaattributes
\);
HBA_STATUS Sample_GetAdapterPortAttributes(
HBA_HANDLE handle,
HBA_UINT32 portindex,
HBA_PORTATTRIBUTES *portattributes
);
HBA_STATUS Sample_GetPortStatistics(
HBA_HANDLE
handle,
HBA_UINT32
portindex,
HBA_PORTSTATISTICS
*portstatistics
);
HBA_STATUS Sample_GetDiscoveredPortAttributes(
HBA_HANDLE handle,
HBA_UINT32 portindex,
HBA_UINT32 discoveredportindex,
HBA_PORTATTRIBUTES *portattributes
);
HBA_STATUS Sample_GetPortAttributesByWWN(
HBA_HANDLE handle,
HBA_WWN PortWWN,
HBA_PORTATTRIBUTES *portattributes
);
void Sample_RefreshInformation(HBA_HANDLE handle);
typedef void (*callback_t)(void*, HBA_WWN,
HBA_UINT32);
HBA_STATUS Sample_RegisterForAdapterEvents(
callback_t callback,
void *userData,
HBA_HANDLE handle,
HBA_CALLBACKHANDLE *callbackHandle);
HBA_STATUS Sample_HBAOpenAdapterByWWN
(HBA_HANDLE *phandle, HBA_WWN wwn);
HBA_STATUS Sample_HBA_GetFcpTargetMapping(
HBA_HANDLE handle,
HBA_FCPTARGETMAPPING
*pmapping
);
HBA_STATUS Sample_SendCTPassThruV2
(HBA_HANDLE, HBA_WWN, void *, HBA_UINT32, void
*, HBA_UINT32 *);