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]
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
39 * @memo Singleton class that represents the entire list of HBAs
40 * known to the system.
42 * @doc This class and its single instance is used to track
43 * all the known HBAs on the system. This class
44 * will gracefully handle dynamic reconfiguration
45 * in accordance with the FC-HBA specification.
46 * HBA_MAX_PER_LIST represents the maximum number of
47 * adapters that are supported by this class.
49 class HBAList
: public Lockable
{
51 static HBAList
* instance();
53 static const int32_t HBA_MAX_PER_LIST
;
56 int getNumberofAdapters();
57 int getNumberofTgtAdapters();
58 std::string
getHBAName(int index
);
59 std::string
getTgtHBAName(int index
);
60 Handle
* openHBA(std::string name
);
61 Handle
* openTgtHBA(std::string name
);
62 Handle
* openHBA(uint64_t wwn
);
63 Handle
* openTgtHBA(uint64_t wwn
);
64 HBA_LIBRARYATTRIBUTES
getVSLAttributes();
67 HBAList(); // Singleton
71 using Lockable::unlock
;
74 static HBAList
* _instance
;
75 std::vector
<HBA
*> hbas
;
76 std::vector
<HBA
*> tgthbas
;
79 #endif /* _HBALIST_H */