xref: /titanic_41/usr/src/lib/sun_fc/common/HBA_RegisterLibrary.cc (revision b509e89b2befbaa42939abad9da1d7f5a8c6aaae)
1 /*
2  * CDDL HEADER START
3  *
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.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 
27 
28 #include    "sun_fc.h"
29 #include    "Trace.h"
30 
31 /**
32  * @memo	    Set up entry points for V1 API
33  * @return	    HBA_STATUS_OK if the entry points were filled in
34  * @param	    entrypoints user allocated buffer to store entry points
35  *
36  */
37 HBA_STATUS HBA_RegisterLibrary(PHBA_ENTRYPOINTS entrypoints) {
38     Trace log("HBA_RegisterLibrary");
39     entrypoints->GetVersionHandler = Sun_fcGetVersion;
40     entrypoints->LoadLibraryHandler = Sun_fcLoadLibrary;
41     entrypoints->FreeLibraryHandler = Sun_fcFreeLibrary;
42     entrypoints->GetNumberOfAdaptersHandler = Sun_fcGetNumberOfAdapters;
43     entrypoints->GetAdapterNameHandler = Sun_fcGetAdapterName;
44     entrypoints->OpenAdapterHandler = Sun_fcOpenAdapter;
45     entrypoints->CloseAdapterHandler = Sun_fcCloseAdapter;
46     entrypoints->GetAdapterAttributesHandler = Sun_fcGetAdapterAttributes;
47     entrypoints->GetAdapterPortAttributesHandler =
48 	    Sun_fcGetAdapterPortAttributes;
49     entrypoints->GetPortStatisticsHandler = Sun_fcGetPortStatistics;
50     entrypoints->GetDiscoveredPortAttributesHandler =
51 	    Sun_fcGetDiscoveredPortAttributes;
52     entrypoints->GetPortAttributesByWWNHandler = Sun_fcGetPortAttributesByWWN;
53     entrypoints->SendCTPassThruHandler = Sun_fcSendCTPassThru;
54     entrypoints->RefreshInformationHandler = Sun_fcRefreshInformation;
55     entrypoints->ResetStatisticsHandler = Sun_fcResetStatistics;
56     entrypoints->GetFcpTargetMappingHandler = Sun_fcGetFcpTargetMapping;
57     entrypoints->GetFcpPersistentBindingHandler = Sun_fcGetFcpPersistentBinding;
58     entrypoints->GetEventBufferHandler = Sun_fcGetEventBuffer;
59     entrypoints->SetRNIDMgmtInfoHandler = Sun_fcSetRNIDMgmtInfo;
60     entrypoints->GetRNIDMgmtInfoHandler = Sun_fcGetRNIDMgmtInfo;
61     entrypoints->SendRNIDHandler = Sun_fcSendRNID;
62     entrypoints->ScsiInquiryHandler = Sun_fcSendScsiInquiry;
63     entrypoints->ReportLUNsHandler = Sun_fcSendReportLUNs;
64     entrypoints->ReadCapacityHandler = Sun_fcSendReadCapacity;
65     return (HBA_STATUS_OK);
66 }
67