Lines Matching defs:lib_infop

261 #define	FUNCTABLE(lib_infop) \
262 ((lib_infop->version == SMHBA) ? \
263 lib_infop->ftable.smhbafunctionTable : \
264 lib_infop->ftable.functionTable);
270 #define FUNCCOMMON(lib_infop, func) \
271 ((lib_infop->version == SMHBA) ? \
272 lib_infop->ftable.smhbafunctionTable.func : \
273 lib_infop->ftable.functionTable.func)
279 #define FUNCHBAAPIV2(lib_infop, func) \
280 lib_infop->ftable.functionTable.func
286 #define FUNCSMHBA(lib_infop, func) \
287 lib_infop->ftable.smhbafunctionTable.func
433 HBA_LIBRARY_INFO *lib_infop;
441 for (lib_infop = _hbaapi_librarylist;
442 lib_infop != NULL;
443 lib_infop = lib_infop->next) {
444 if (lib_infop->index == libraryIndex) {
445 if (lib_infop->status != HBA_LIBRARY_LOADED) {
448 *lib_infopp = lib_infop;
457 status = HBA_CheckLibrary(handle, &lib_infop, &vendorHandle);\
463 status = HBA_CheckLibrary(handle, &lib_infop, &vendorHandle); \
467 if (ver != lib_infop->version) { \
689 HBA_LIBRARY_INFO *lib_infop;
742 lib_infop = (HBA_LIBRARY_INFO *)calloc(1, sizeof (HBA_LIBRARY_INFO));
743 if (lib_infop == NULL) {
749 lib_infop->status = HBA_LIBRARY_NOT_LOADED;
750 lib_infop->next = _hbaapi_librarylist;
751 lib_infop->index = _hbaapi_total_library_count;
753 _hbaapi_librarylist = lib_infop;
756 lib_infop->hLibrary = LoadLibrary(byFileName);
757 if (lib_infop->hLibrary == NULL) {
762 lib_infop->LibraryPath = strdup(byFileName);
766 GetProcAddress(lib_infop->hLibrary, "SMHBA_RegisterLibrary");
769 (&lib_infop->ftable.smhbafunctionTable));
775 lib_infop->version = SMHBA;
780 lib_infop->hLibrary, "HBA_RegisterLibraryV2");
787 (HBA_ENTRYPOINTSV2 *)(&lib_infop->ftable.functionTable));
793 lib_infop->version = HBAAPIV2;
798 GetProcAddress(lib_infop->hLibrary, "HBA_RegisterLibrary");
808 (HBA_ENTRYPOINTS *)(&lib_infop->ftable.functionTable)));
814 lib_infop->version = HBAAPI;
824 GetVersionFunc = FUNCCOMMON(lib_infop, GetVersionHandler);
826 if (lib_infop->version == SMHBA) {
849 LoadLibraryFunc = FUNCCOMMON(lib_infop, LoadLibraryHandler);
863 lib_infop->status = HBA_LIBRARY_LOADED;
877 HBA_LIBRARY_INFO *lib_infop;
945 lib_infop = (HBA_LIBRARY_INFO *)calloc(1, sizeof (HBA_LIBRARY_INFO));
946 if (lib_infop == NULL) {
951 lib_infop->status = HBA_LIBRARY_NOT_LOADED;
952 lib_infop->LibraryName = strdup(libraryname);
953 lib_infop->LibraryPath = strdup(librarypath);
954 lib_infop->numOfAdapters = 0;
955 lib_infop->version = UNKNOWN;
956 lib_infop->index = _hbaapi_total_library_count;
958 lib_infop->next = _hbaapi_librarylist;
959 _hbaapi_librarylist = lib_infop;
962 if ((lib_infop->hLibrary = dlopen(librarypath, RTLD_LAZY)) == NULL) {
968 dlsym(lib_infop->hLibrary, "SMHBA_RegisterLibrary");
975 (&lib_infop->ftable.smhbafunctionTable));
980 lib_infop->version = SMHBA;
984 dlsym(lib_infop->hLibrary, "HBA_RegisterLibraryV2");
991 (&lib_infop->ftable.functionTable)));
996 lib_infop->version = HBAAPIV2;
1001 dlsym(lib_infop->hLibrary, "HBA_RegisterLibrary");
1017 ((HBA_ENTRYPOINTS *)(&lib_infop->ftable.functionTable)));
1030 lib_infop->version = HBAAPI;
1040 if ((GetVersionFunc = FUNCCOMMON(lib_infop, GetVersionHandler))
1044 if (lib_infop->version == SMHBA) {
1065 LoadLibraryFunc = FUNCCOMMON(lib_infop, LoadLibraryHandler);
1086 lib_infop->status = HBA_LIBRARY_LOADED;
1161 HBA_LIBRARY_INFO *lib_infop;
1177 for (lib_infop = _hbaapi_librarylist; lib_infop != NULL;
1178 lib_infop = lib_next) {
1179 lib_next = lib_infop->next;
1180 if (lib_infop->status == HBA_LIBRARY_LOADED) {
1181 FreeLibraryFunc = FUNCCOMMON(lib_infop, FreeLibraryHandler);
1188 FreeLibrary(lib_infop->hLibrary); /* Unload DLL from memory */
1190 (void) dlclose(lib_infop->hLibrary); /* Unload DLL from memory */
1194 free(lib_infop->LibraryName);
1196 free(lib_infop->LibraryPath);
1197 free(lib_infop);
1295 HBA_LIBRARY_INFO *lib_infop;
1311 for (lib_infop = _hbaapi_librarylist;
1312 lib_infop != NULL;
1313 lib_infop = lib_infop->next) {
1315 if (lib_infop->status != HBA_LIBRARY_LOADED) {
1320 FUNCCOMMON(lib_infop, GetNumberOfAdaptersHandler);
1327 lib_infop->LibraryName, num_adapters, 0);
1330 lib_infop->LibraryPath, num_adapters, 0);
1334 GetAdapterNameFunc = FUNCCOMMON(lib_infop, GetAdapterNameHandler);
1381 lib_infop->LibraryPath, _hbaapi_total_adapter_count);
1385 lib_infop->numOfAdapters++;
1386 adapt_infop->library = lib_infop;
1445 HBA_LIBRARY_INFO *lib_infop;
1465 lib_infop = adapt_infop->library;
1466 OpenAdapterFunc = FUNCCOMMON(lib_infop, OpenAdapterHandler);
1473 handle = HBA_HANDLE_FROM_LOCAL(lib_infop->index, handle);
1487 HBA_LIBRARY_INFO *lib_infop;
1500 for (lib_infop = _hbaapi_librarylist;
1501 lib_infop != NULL;
1502 lib_infop = lib_infop->next) {
1506 if (lib_infop->status != HBA_LIBRARY_LOADED) {
1511 if (lib_infop->version != HBAAPIV2) {
1516 FUNCCOMMON(lib_infop, GetNumberOfAdaptersHandler);
1525 lib_infop->ftable.functionTable.OpenAdapterByWWNHandler;
1537 *phandle = HBA_HANDLE_FROM_LOCAL(lib_infop->index, handle);
1685 HBA_LIBRARY_INFO *lib_infop;
1725 for (lib_infop = _hbaapi_librarylist;
1726 lib_infop != NULL;
1727 lib_infop = lib_infop->next) {
1730 if ((lib_infop->version != HBAAPIV2)) {
1737 lib_infop->ftable.functionTable.RegisterForAdapterAddEventsHandler;
1767 lib_infop->LibraryPath, status, 0);
1771 lib_infop->LibraryPath, status);
1779 vcbp->lib_info = lib_infop;
1868 HBA_LIBRARY_INFO *lib_infop;
1878 lib_infop->ftable.functionTable.RegisterForAdapterEventsHandler;
1901 acbp->lib_info = lib_infop;
1959 HBA_LIBRARY_INFO *lib_infop;
1969 lib_infop->ftable.functionTable.RegisterForAdapterPortEventsHandler;
1994 acbp->lib_info = lib_infop;
2053 HBA_LIBRARY_INFO *lib_infop;
2063 lib_infop->ftable.functionTable.RegisterForAdapterPortStatEventsHandler;
2087 acbp->lib_info = lib_infop;
2153 HBA_LIBRARY_INFO *lib_infop;
2163 lib_infop->ftable.functionTable.RegisterForTargetEventsHandler;
2186 acbp->lib_info = lib_infop;
2250 HBA_LIBRARY_INFO *lib_infop;
2258 registeredfunc = FUNCCOMMON(lib_infop, RegisterForLinkEventsHandler);
2282 acbp->lib_info = lib_infop;
2311 HBA_LIBRARY_INFO *lib_infop;
2317 status = HBA_CheckLibrary(handle, &lib_infop, &vendorHandle);
2319 CloseAdapterFunc = FUNCCOMMON(lib_infop, CloseAdapterHandler);
2334 HBA_LIBRARY_INFO *lib_infop;
2342 if (lib_infop->version == SMHBA) {
2347 lib_infop->ftable.functionTable.GetAdapterAttributesHandler;
2363 HBA_LIBRARY_INFO *lib_infop;
2371 if (lib_infop->version == SMHBA) {
2376 lib_infop->ftable.functionTable.GetAdapterPortAttributesHandler;
2393 HBA_LIBRARY_INFO *lib_infop;
2401 if (lib_infop->version == SMHBA) {
2406 lib_infop->ftable.functionTable.GetPortStatisticsHandler;
2424 HBA_LIBRARY_INFO *lib_infop;
2432 if (lib_infop->version == SMHBA) {
2437 lib_infop->ftable.functionTable.GetDiscoveredPortAttributesHandler;
2455 HBA_LIBRARY_INFO *lib_infop;
2463 if (lib_infop->version == SMHBA) {
2468 lib_infop->ftable.functionTable.GetPortAttributesByWWNHandler;
2487 HBA_LIBRARY_INFO *lib_infop;
2495 if (lib_infop->version == SMHBA) {
2500 lib_infop->ftable.functionTable.SendCTPassThruHandler;
2522 HBA_LIBRARY_INFO *lib_infop;
2531 registeredfunc = FUNCCOMMON(lib_infop, SendCTPassThruV2Handler);
2550 HBA_LIBRARY_INFO *lib_infop;
2558 if (lib_infop->version == SMHBA) {
2563 lib_infop->ftable.functionTable.GetEventBufferHandler;
2576 HBA_LIBRARY_INFO *lib_infop;
2584 SetRNIDMgmtInfoFunc = FUNCCOMMON(lib_infop, SetRNIDMgmtInfoHandler);
2596 HBA_LIBRARY_INFO *lib_infop;
2604 GetRNIDMgmtInfoFunc = FUNCCOMMON(lib_infop, GetRNIDMgmtInfoHandler);
2622 HBA_LIBRARY_INFO *lib_infop;
2629 if (lib_infop->version == SMHBA) {
2633 SendRNIDFunc = lib_infop->ftable.functionTable.SendRNIDHandler;
2654 HBA_LIBRARY_INFO *lib_infop;
2661 registeredfunc = FUNCCOMMON(lib_infop, SendRNIDV2Handler);
2675 HBA_LIBRARY_INFO *lib_infop;
2682 status = HBA_CheckLibrary(handle, &lib_infop, &vendorHandle);
2685 FUNCCOMMON(lib_infop, RefreshInformationHandler);
2696 HBA_LIBRARY_INFO *lib_infop;
2703 status = HBA_CheckLibrary(handle, &lib_infop, &vendorHandle);
2705 if (lib_infop->version == SMHBA) {
2710 lib_infop->ftable.functionTable.ResetStatisticsHandler;
2721 HBA_LIBRARY_INFO *lib_infop;
2728 if (lib_infop->version == SMHBA) {
2733 lib_infop->ftable.functionTable.GetFcpTargetMappingHandler;
2749 HBA_LIBRARY_INFO *lib_infop;
2759 lib_infop->ftable.functionTable.GetFcpTargetMappingV2Handler;
2771 HBA_LIBRARY_INFO *lib_infop;
2779 if (lib_infop->version == SMHBA) {
2784 lib_infop->ftable.functionTable.GetFcpPersistentBindingHandler;
2808 HBA_LIBRARY_INFO *lib_infop;
2818 lib_infop->ftable.functionTable.ScsiInquiryV2Handler;
2843 HBA_LIBRARY_INFO *lib_infop;
2851 if (lib_infop->version == SMHBA) {
2856 lib_infop->ftable.functionTable.ScsiInquiryHandler;
2879 HBA_LIBRARY_INFO *lib_infop;
2889 lib_infop->ftable.functionTable.ScsiReportLUNsV2Handler;
2912 HBA_LIBRARY_INFO *lib_infop;
2919 if (lib_infop->version == SMHBA) {
2923 SendReportLUNsFunc = lib_infop->ftable.functionTable.ReportLUNsHandler;
2947 HBA_LIBRARY_INFO *lib_infop;
2957 lib_infop->ftable.functionTable.ScsiReadCapacityV2Handler;
2981 HBA_LIBRARY_INFO *lib_infop;
2989 if (lib_infop->version == SMHBA) {
2994 lib_infop->ftable.functionTable.ReadCapacityHandler;
3016 HBA_LIBRARY_INFO *lib_infop;
3024 registeredfunc = FUNCCOMMON(lib_infop, SendRPLHandler);
3047 HBA_LIBRARY_INFO *lib_infop;
3055 registeredfunc = FUNCCOMMON(lib_infop, SendRPSHandler);
3077 HBA_LIBRARY_INFO *lib_infop;
3084 registeredfunc = FUNCCOMMON(lib_infop, SendSRLHandler);
3103 HBA_LIBRARY_INFO *lib_infop;
3111 registeredfunc = FUNCCOMMON(lib_infop, SendRLSHandler);
3133 HBA_LIBRARY_INFO *lib_infop;
3140 registeredfunc = FUNCCOMMON(lib_infop, SendLIRRHandler);
3158 HBA_LIBRARY_INFO *lib_infop;
3168 lib_infop->ftable.functionTable.GetBindingCapabilityHandler;
3184 HBA_LIBRARY_INFO *lib_infop;
3194 lib_infop->ftable.functionTable.GetBindingSupportHandler;
3210 HBA_LIBRARY_INFO *lib_infop;
3220 lib_infop->ftable.functionTable.SetBindingSupportHandler;
3236 HBA_LIBRARY_INFO *lib_infop;
3247 lib_infop->ftable.functionTable.SetPersistentBindingV2Handler;
3263 HBA_LIBRARY_INFO *lib_infop;
3274 lib_infop->ftable.functionTable.GetPersistentBindingV2Handler;
3291 HBA_LIBRARY_INFO *lib_infop;
3301 lib_infop->ftable.functionTable.RemovePersistentBindingHandler;
3316 HBA_LIBRARY_INFO *lib_infop;
3326 lib_infop->ftable.functionTable.RemoveAllPersistentBindingsHandler;
3343 HBA_LIBRARY_INFO *lib_infop;
3353 lib_infop->ftable.functionTable.GetFC4StatisticsHandler;
3370 HBA_LIBRARY_INFO *lib_infop;
3380 lib_infop->ftable.functionTable.GetFCPStatisticsHandler;
3603 HBA_LIBRARY_INFO *lib_infop;
3612 lib_infop->ftable.smhbafunctionTable.GetAdapterAttributesHandler;
3627 HBA_LIBRARY_INFO *lib_infop;
3636 lib_infop->ftable.smhbafunctionTable.GetNumberOfPortsHandler;
3652 HBA_LIBRARY_INFO *lib_infop;
3661 lib_infop->ftable.smhbafunctionTable.GetPortTypeHandler;
3677 HBA_LIBRARY_INFO *lib_infop;
3687 lib_infop->ftable.smhbafunctionTable.\
3706 HBA_LIBRARY_INFO *lib_infop;
3716 lib_infop->ftable.smhbafunctionTable.\
3736 HBA_LIBRARY_INFO *lib_infop;
3746 lib_infop->ftable.smhbafunctionTable.GetPortAttributesByWWNHandler;
3764 HBA_LIBRARY_INFO *lib_infop;
3773 lib_infop->ftable.smhbafunctionTable.GetFCPhyAttributesHandler;
3791 HBA_LIBRARY_INFO *lib_infop;
3800 lib_infop->ftable.smhbafunctionTable.GetSASPhyAttributesHandler;
3818 HBA_LIBRARY_INFO *lib_infop;
3829 lib_infop->ftable.smhbafunctionTable.GetProtocolStatisticsHandler;
3847 HBA_LIBRARY_INFO *lib_infop;
3858 lib_infop->ftable.smhbafunctionTable.GetPhyStatisticsHandler;
3876 HBA_LIBRARY_INFO *lib_infop;
3885 lib_infop->ftable.smhbafunctionTable.GetBindingCapabilityHandler;
3903 HBA_LIBRARY_INFO *lib_infop;
3914 lib_infop->ftable.smhbafunctionTable.GetBindingSupportHandler;
3932 HBA_LIBRARY_INFO *lib_infop;
3943 lib_infop->ftable.smhbafunctionTable.SetBindingSupportHandler;
3961 HBA_LIBRARY_INFO *lib_infop;
3971 lib_infop->ftable.smhbafunctionTable.GetTargetMappingHandler;
3989 HBA_LIBRARY_INFO *lib_infop;
4000 lib_infop->ftable.smhbafunctionTable.GetPersistentBindingHandler;
4018 HBA_LIBRARY_INFO *lib_infop;
4029 lib_infop->ftable.smhbafunctionTable.SetPersistentBindingHandler;
4047 HBA_LIBRARY_INFO *lib_infop;
4058 lib_infop->ftable.smhbafunctionTable.RemovePersistentBindingHandler;
4075 HBA_LIBRARY_INFO *lib_infop;
4086 lib_infop->ftable.smhbafunctionTable.\
4104 HBA_LIBRARY_INFO *lib_infop;
4113 lib_infop->ftable.smhbafunctionTable.GetLUNStatisticsHandler;
4138 HBA_LIBRARY_INFO *lib_infop;
4148 lib_infop->ftable.smhbafunctionTable.ScsiInquiryHandler;
4173 HBA_LIBRARY_INFO *lib_infop;
4183 lib_infop->ftable.smhbafunctionTable.ScsiReportLUNsHandler;
4209 HBA_LIBRARY_INFO *lib_infop;
4219 lib_infop->ftable.smhbafunctionTable.ScsiReadCapacityHandler;
4241 HBA_LIBRARY_INFO *lib_infop;
4251 SendTESTFunc = lib_infop->ftable.smhbafunctionTable.SendTESTHandler;
4274 HBA_LIBRARY_INFO *lib_infop;
4283 SendECHOFunc = lib_infop->ftable.smhbafunctionTable.SendECHOHandler;
4306 HBA_LIBRARY_INFO *lib_infop;
4315 SendSMPPassThruFunc = lib_infop->ftable.\
4385 HBA_LIBRARY_INFO *lib_infop;
4422 for (lib_infop = _hbaapi_librarylist;
4423 lib_infop != NULL;
4424 lib_infop = lib_infop->next) {
4427 if (lib_infop->version != SMHBA) {
4434 lib_infop->ftable.smhbafunctionTable.\
4459 lib_infop->LibraryPath, status, 0);
4466 vcbp->lib_info = lib_infop;
4558 HBA_LIBRARY_INFO *lib_infop;
4567 registeredfunc = lib_infop->ftable.smhbafunctionTable.\
4586 acbp->lib_info = lib_infop;
4648 HBA_LIBRARY_INFO *lib_infop;
4658 lib_infop->ftable.smhbafunctionTable.\
4677 acbp->lib_info = lib_infop;
4743 HBA_LIBRARY_INFO *lib_infop;
4753 lib_infop->ftable.smhbafunctionTable.\
4772 acbp->lib_info = lib_infop;
4839 HBA_LIBRARY_INFO *lib_infop;
4849 lib_infop->ftable.smhbafunctionTable.\
4868 acbp->lib_info = lib_infop;
4937 HBA_LIBRARY_INFO *lib_infop;
4947 registeredfunc = lib_infop->ftable.smhbafunctionTable.\
4967 acbp->lib_info = lib_infop;