xref: /onnv-gate/usr/src/cmd/sasinfo/printAttrs.h (revision 10652:9d0aff74d6fd)
1*10652SHyon.Kim@Sun.COM /*
2*10652SHyon.Kim@Sun.COM  * CDDL HEADER START
3*10652SHyon.Kim@Sun.COM  *
4*10652SHyon.Kim@Sun.COM  * The contents of this file are subject to the terms of the
5*10652SHyon.Kim@Sun.COM  * Common Development and Distribution License (the "License").
6*10652SHyon.Kim@Sun.COM  * You may not use this file except in compliance with the License.
7*10652SHyon.Kim@Sun.COM  *
8*10652SHyon.Kim@Sun.COM  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*10652SHyon.Kim@Sun.COM  * or http://www.opensolaris.org/os/licensing.
10*10652SHyon.Kim@Sun.COM  * See the License for the specific language governing permissions
11*10652SHyon.Kim@Sun.COM  * and limitations under the License.
12*10652SHyon.Kim@Sun.COM  *
13*10652SHyon.Kim@Sun.COM  * When distributing Covered Code, include this CDDL HEADER in each
14*10652SHyon.Kim@Sun.COM  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*10652SHyon.Kim@Sun.COM  * If applicable, add the following below this CDDL HEADER, with the
16*10652SHyon.Kim@Sun.COM  * fields enclosed by brackets "[]" replaced with your own identifying
17*10652SHyon.Kim@Sun.COM  * information: Portions Copyright [yyyy] [name of copyright owner]
18*10652SHyon.Kim@Sun.COM  *
19*10652SHyon.Kim@Sun.COM  * CDDL HEADER END
20*10652SHyon.Kim@Sun.COM  */
21*10652SHyon.Kim@Sun.COM /*
22*10652SHyon.Kim@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23*10652SHyon.Kim@Sun.COM  * Use is subject to license terms.
24*10652SHyon.Kim@Sun.COM  */
25*10652SHyon.Kim@Sun.COM 
26*10652SHyon.Kim@Sun.COM #ifndef	_PRINTATTRS_H
27*10652SHyon.Kim@Sun.COM #define	_PRINTATTRS_H
28*10652SHyon.Kim@Sun.COM 
29*10652SHyon.Kim@Sun.COM #ifdef	__cplusplus
30*10652SHyon.Kim@Sun.COM extern "C" {
31*10652SHyon.Kim@Sun.COM #endif
32*10652SHyon.Kim@Sun.COM 
33*10652SHyon.Kim@Sun.COM #include <sasinfo.h>
34*10652SHyon.Kim@Sun.COM 
35*10652SHyon.Kim@Sun.COM typedef enum {
36*10652SHyon.Kim@Sun.COM 	PHY_STATE,
37*10652SHyon.Kim@Sun.COM 	PHY_SPEED
38*10652SHyon.Kim@Sun.COM } phystat_type;
39*10652SHyon.Kim@Sun.COM 
40*10652SHyon.Kim@Sun.COM typedef struct state_string {
41*10652SHyon.Kim@Sun.COM 	int	key;
42*10652SHyon.Kim@Sun.COM 	char	*value;
43*10652SHyon.Kim@Sun.COM } SAS_STATE;
44*10652SHyon.Kim@Sun.COM 
45*10652SHyon.Kim@Sun.COM extern SAS_STATE porttype_string[];
46*10652SHyon.Kim@Sun.COM extern SAS_STATE portstate_string[];
47*10652SHyon.Kim@Sun.COM 
48*10652SHyon.Kim@Sun.COM #define	MAXINDENT	64
49*10652SHyon.Kim@Sun.COM 
50*10652SHyon.Kim@Sun.COM char *getHBAStatus(HBA_STATUS hbaStatus);
51*10652SHyon.Kim@Sun.COM uint64_t wwnConversion(uchar_t *wwn);
52*10652SHyon.Kim@Sun.COM void printHBAInfo(SMHBA_ADAPTERATTRIBUTES *attrs, int pflag, int numberOfPorts,
53*10652SHyon.Kim@Sun.COM     const char *adapterName);
54*10652SHyon.Kim@Sun.COM void printHBAPortInfo(SMHBA_PORTATTRIBUTES *port,
55*10652SHyon.Kim@Sun.COM     SMHBA_ADAPTERATTRIBUTES *attrs, int pflag);
56*10652SHyon.Kim@Sun.COM void printHBAPortPhyInfo(SMHBA_SAS_PHY *phyinfo);
57*10652SHyon.Kim@Sun.COM void printHBAPortPhyStatistics(SMHBA_SASPHYSTATISTICS *phystat);
58*10652SHyon.Kim@Sun.COM extern void
59*10652SHyon.Kim@Sun.COM printLogicalUnit(int pflag, SMHBA_TARGETMAPPING *map);
60*10652SHyon.Kim@Sun.COM extern int
61*10652SHyon.Kim@Sun.COM printOSDeviceNameInfo(discoveredDevice *devListWalk, boolean_t verbose);
62*10652SHyon.Kim@Sun.COM extern int
63*10652SHyon.Kim@Sun.COM printTargetPortInfo(targetPortList_t *TPListWalk, int pflag);
64*10652SHyon.Kim@Sun.COM extern char *getStateString(HBA_UINT32 key, SAS_STATE *stat_string);
65*10652SHyon.Kim@Sun.COM extern char *getIndentSpaces(int number);
66*10652SHyon.Kim@Sun.COM extern char *getDTypeString(uchar_t dType);
67*10652SHyon.Kim@Sun.COM 
68*10652SHyon.Kim@Sun.COM #ifdef __cplusplus
69*10652SHyon.Kim@Sun.COM }
70*10652SHyon.Kim@Sun.COM #endif
71*10652SHyon.Kim@Sun.COM 
72*10652SHyon.Kim@Sun.COM #endif /* _PRINTATTRS_H */
73