Merge branch 'merges' of git://repo.or.cz/unleashed into merges
[unleashed.git] / usr / src / lib / sun_fc / common / HBA_RegisterLibraryV2.cc
blob3b59ef52ad75079d7af25e125e372a3ae6a12f80
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
28 #include "sun_fc.h"
29 #include "Trace.h"
31 /**
32 * @memo Entry points for the V2 API
33 * @postcondition entrypoints contains the function pointers to this API
34 * @return HBA_STATUS_OK if entrypoints updated
35 * @param entrypoints The user-allocated buffer to store the API
38 HBA_STATUS HBA_RegisterLibraryV2(PHBA_ENTRYPOINTSV2 entrypoints) {
39 Trace log("HBA_RegisterLibrary");
40 entrypoints->GetVersionHandler = Sun_fcGetVersion;
41 entrypoints->LoadLibraryHandler = Sun_fcLoadLibrary;
42 entrypoints->FreeLibraryHandler = Sun_fcFreeLibrary;
43 entrypoints->GetNumberOfAdaptersHandler = Sun_fcGetNumberOfAdapters;
44 entrypoints->GetAdapterNameHandler = Sun_fcGetAdapterName;
45 entrypoints->OpenAdapterHandler = Sun_fcOpenAdapter;
46 entrypoints->CloseAdapterHandler = Sun_fcCloseAdapter;
47 entrypoints->GetAdapterAttributesHandler = Sun_fcGetAdapterAttributes;
48 entrypoints->GetAdapterPortAttributesHandler =
49 Sun_fcGetAdapterPortAttributes;
50 entrypoints->GetPortStatisticsHandler = Sun_fcGetPortStatistics;
51 entrypoints->GetDiscoveredPortAttributesHandler =
52 Sun_fcGetDiscoveredPortAttributes;
53 entrypoints->GetPortAttributesByWWNHandler = Sun_fcGetPortAttributesByWWN;
54 entrypoints->SendCTPassThruHandler = Sun_fcSendCTPassThru;
55 entrypoints->RefreshInformationHandler = Sun_fcRefreshInformation;
56 entrypoints->ResetStatisticsHandler = Sun_fcResetStatistics;
57 entrypoints->GetFcpTargetMappingHandler = Sun_fcGetFcpTargetMapping;
58 entrypoints->GetFcpPersistentBindingHandler = Sun_fcGetFcpPersistentBinding;
59 entrypoints->GetEventBufferHandler = Sun_fcGetEventBuffer;
60 entrypoints->SetRNIDMgmtInfoHandler = Sun_fcSetRNIDMgmtInfo;
61 entrypoints->GetRNIDMgmtInfoHandler = Sun_fcGetRNIDMgmtInfo;
62 entrypoints->SendRNIDHandler = Sun_fcSendRNID;
63 entrypoints->ScsiInquiryHandler = Sun_fcSendScsiInquiry;
64 entrypoints->ReportLUNsHandler = Sun_fcSendReportLUNs;
65 entrypoints->ReadCapacityHandler = Sun_fcSendReadCapacity;
66 entrypoints->OpenAdapterByWWNHandler = Sun_fcOpenAdapterByWWN;
67 entrypoints->GetFcpTargetMappingV2Handler = Sun_fcGetFcpTargetMappingV2;
68 entrypoints->SendCTPassThruV2Handler = Sun_fcSendCTPassThruV2;
69 entrypoints->RefreshAdapterConfigurationHandler =
70 Sun_fcRefreshAdapterConfiguration;
71 entrypoints->GetBindingCapabilityHandler = Sun_fcGetBindingCapability;
72 entrypoints->GetBindingSupportHandler = Sun_fcGetBindingSupport;
73 entrypoints->SetBindingSupportHandler = Sun_fcSetBindingSupport;
74 entrypoints->SetPersistentBindingV2Handler = Sun_fcSetPersistentBindingV2;
75 entrypoints->GetPersistentBindingV2Handler = Sun_fcGetPersistentBindingV2;
76 entrypoints->RemovePersistentBindingHandler = Sun_fcRemovePersistentBinding;
77 entrypoints->RemoveAllPersistentBindingsHandler =
78 Sun_fcRemoveAllPersistentBindings;
79 entrypoints->SendRNIDV2Handler = Sun_fcSendRNIDV2;
80 entrypoints->ScsiInquiryV2Handler = Sun_fcScsiInquiryV2;
81 entrypoints->ScsiReportLUNsV2Handler = Sun_fcScsiReportLUNsV2;
82 entrypoints->ScsiReadCapacityV2Handler = Sun_fcScsiReadCapacityV2;
83 entrypoints->GetVendorLibraryAttributesHandler =
84 Sun_fcGetVendorLibraryAttributes;
85 entrypoints->RemoveCallbackHandler = Sun_fcRemoveCallback;
86 entrypoints->RegisterForAdapterAddEventsHandler =
87 Sun_fcRegisterForAdapterAddEvents;
88 entrypoints->RegisterForAdapterEventsHandler =
89 Sun_fcRegisterForAdapterEvents;
90 entrypoints->RegisterForAdapterPortEventsHandler =
91 Sun_fcRegisterForAdapterPortEvents;
92 entrypoints->RegisterForAdapterPortStatEventsHandler =
93 Sun_fcRegisterForAdapterPortStatEvents;
94 entrypoints->RegisterForTargetEventsHandler = Sun_fcRegisterForTargetEvents;
95 entrypoints->RegisterForLinkEventsHandler = Sun_fcRegisterForLinkEvents;
96 entrypoints->SendRLSHandler = Sun_fcSendRLS;
97 entrypoints->SendRPLHandler = Sun_fcSendRPL;
98 entrypoints->SendRPSHandler = Sun_fcSendRPS;
99 entrypoints->SendSRLHandler = Sun_fcSendSRL;
100 entrypoints->SendLIRRHandler = Sun_fcSendLIRR;
101 entrypoints->GetFC4StatisticsHandler = Sun_fcGetFC4Statistics;
102 entrypoints->GetFCPStatisticsHandler = Sun_fcGetFCPStatistics;
103 return (HBA_STATUS_OK);