9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim/*
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * CDDL HEADER START
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim *
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * The contents of this file are subject to the terms of the
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * Common Development and Distribution License (the "License").
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * You may not use this file except in compliance with the License.
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim *
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * or http://www.opensolaris.org/os/licensing.
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * See the License for the specific language governing permissions
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * and limitations under the License.
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim *
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * When distributing Covered Code, include this CDDL HEADER in each
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * If applicable, add the following below this CDDL HEADER, with the
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * fields enclosed by brackets "[]" replaced with your own identifying
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * information: Portions Copyright [yyyy] [name of copyright owner]
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim *
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * CDDL HEADER END
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim */
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim/*
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim * Use is subject to license terms.
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim */
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim#ifndef _PRINTATTRS_H
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim#define _PRINTATTRS_H
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim#ifdef __cplusplus
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimextern "C" {
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim#endif
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim#include <sasinfo.h>
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimtypedef enum {
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim PHY_STATE,
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim PHY_SPEED
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim} phystat_type;
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimtypedef struct state_string {
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim int key;
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim char *value;
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim} SAS_STATE;
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimextern SAS_STATE porttype_string[];
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimextern SAS_STATE portstate_string[];
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim#define MAXINDENT 64
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimchar *getHBAStatus(HBA_STATUS hbaStatus);
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimuint64_t wwnConversion(uchar_t *wwn);
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimvoid printHBAInfo(SMHBA_ADAPTERATTRIBUTES *attrs, int pflag, int numberOfPorts,
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim const char *adapterName);
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimvoid printHBAPortInfo(SMHBA_PORTATTRIBUTES *port,
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim SMHBA_ADAPTERATTRIBUTES *attrs, int pflag);
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimvoid printHBAPortPhyInfo(SMHBA_SAS_PHY *phyinfo);
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimvoid printHBAPortPhyStatistics(SMHBA_SASPHYSTATISTICS *phystat);
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimextern void
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon KimprintLogicalUnit(int pflag, SMHBA_TARGETMAPPING *map);
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimextern int
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon KimprintOSDeviceNameInfo(discoveredDevice *devListWalk, boolean_t verbose);
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimextern int
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon KimprintTargetPortInfo(targetPortList_t *TPListWalk, int pflag);
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimextern char *getStateString(HBA_UINT32 key, SAS_STATE *stat_string);
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimextern char *getIndentSpaces(int number);
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kimextern char *getDTypeString(uchar_t dType);
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim#ifdef __cplusplus
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim}
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim#endif
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim
9e86db79b7d1bbc5f2f04e99954cbd5eae0e22bbHyon Kim#endif /* _PRINTATTRS_H */