fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef _MPATHADM_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _MPATHADM_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern "C" {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LIST SUBCOMMAND(0)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SHOW SUBCOMMAND(1)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MODIFY SUBCOMMAND(2)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ENABLE SUBCOMMAND(3)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define DISABLE SUBCOMMAND(4)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FAILOVER SUBCOMMAND(5)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define OVERRIDE SUBCOMMAND(6)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ADD SUBCOMMAND(7)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define REMOVE SUBCOMMAND(8)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MPATH_SUPPORT OBJECT(0)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LOGICAL_UNIT OBJECT(1)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define INITIATOR_PORT OBJECT(2)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PATH OBJECT(3)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAX_PLUGINNAME_LEN 256
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ERROR_CLI_FAILED 99
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint listMpathSupport(int operandLen, char *operand[]);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint showMpathSupport(int operandLen, char *operand[]);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint modifyMpathSupport(int operandLen, char *operand[], cmdOptions_t *options);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint listLogicalUnit(int operandLen, char *operand[], cmdOptions_t *options);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint listIndividualLogicalUnit(MP_OID luOid,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte MP_MULTIPATH_LOGICAL_UNIT_PROPERTIES luProps);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint showLogicalUnit(int operandLen, char *operand[]);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint showIndividualLogicalUnit(MP_OID luOid,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte MP_MULTIPATH_LOGICAL_UNIT_PROPERTIES luProps, MP_PLUGIN_PROPERTIES);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint modifyLogicalUnit(int operandLen, char *operand[], cmdOptions_t *options);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint failoverLogicalUnit(char *operand[]);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t getLogicalUnitOid(MP_CHAR *luFileName, MP_OID *pluOid);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint listInitiatorPort(int operandLen, char *operand[]);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint listIndividualInitiatorPort(MP_INITIATOR_PORT_PROPERTIES initProps);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint showInitiatorPort(int operandLen, char *operand[]);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint showIndividualInitiatorPort(MP_INITIATOR_PORT_PROPERTIES initProps);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint enablePath(cmdOptions_t *options);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint disablePath(cmdOptions_t *options);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint overridePath(cmdOptions_t *options);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t getPathOid(cmdOptions_t *options, MP_OID *pPathOid);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMP_LOAD_BALANCE_TYPE getLbValueFromString(char *str);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortechar *getMpStatusStr(MP_STATUS mpstatus);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid displayArray(MP_CHAR *arrayToDisplay, int arraySize);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid displayWideArray(MP_WCHAR *arrayToDisplay, int arraySize);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortechar *getPathStateStr(MP_PATH_STATE pathState);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortechar *getAccessStateStr(MP_ACCESS_STATE_TYPE accessState);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMP_CHAR *getStringArray(MP_CHAR *arrayToDisplay, int arraySize);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteboolean_t compareLUName(MP_CHAR *cmpString, MP_CHAR *deviceFileName);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid displayLoadBalanceString(MP_LOAD_BALANCE_TYPE lbVal);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid displayLogicalUnitNameTypeString(MP_LOGICAL_UNIT_NAME_TYPE typeVal);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid displayTransportTypeString(MP_PORT_TRANSPORT_TYPE transportTypeVal);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _MPATHADM_H */