1fcf3ce44SJohn Forte /* 2fcf3ce44SJohn Forte * CDDL HEADER START 3fcf3ce44SJohn Forte * 4fcf3ce44SJohn Forte * The contents of this file are subject to the terms of the 5fcf3ce44SJohn Forte * Common Development and Distribution License (the "License"). 6fcf3ce44SJohn Forte * You may not use this file except in compliance with the License. 7fcf3ce44SJohn Forte * 8fcf3ce44SJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9fcf3ce44SJohn Forte * or http://www.opensolaris.org/os/licensing. 10fcf3ce44SJohn Forte * See the License for the specific language governing permissions 11fcf3ce44SJohn Forte * and limitations under the License. 12fcf3ce44SJohn Forte * 13fcf3ce44SJohn Forte * When distributing Covered Code, include this CDDL HEADER in each 14fcf3ce44SJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15fcf3ce44SJohn Forte * If applicable, add the following below this CDDL HEADER, with the 16fcf3ce44SJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying 17fcf3ce44SJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner] 18fcf3ce44SJohn Forte * 19fcf3ce44SJohn Forte * CDDL HEADER END 20fcf3ce44SJohn Forte */ 21fcf3ce44SJohn Forte /* 22*4b31676fSsrivijitha dugganapalli * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 23fcf3ce44SJohn Forte */ 24fcf3ce44SJohn Forte #ifndef _STORE_H 25fcf3ce44SJohn Forte #define _STORE_H 26fcf3ce44SJohn Forte 27fcf3ce44SJohn Forte #ifdef __cplusplus 28fcf3ce44SJohn Forte extern "C" { 29fcf3ce44SJohn Forte #endif 30fcf3ce44SJohn Forte 31fcf3ce44SJohn Forte #include <libnvpair.h> 32fcf3ce44SJohn Forte 33fcf3ce44SJohn Forte /* 34fcf3ce44SJohn Forte * Error defines 35fcf3ce44SJohn Forte */ 36fcf3ce44SJohn Forte #define STMF_PS_SUCCESS 0 37fcf3ce44SJohn Forte #define STMF_PS_ERROR 1 38fcf3ce44SJohn Forte #define STMF_PS_ERROR_MEMBER_NOT_FOUND 2 39fcf3ce44SJohn Forte #define STMF_PS_ERROR_GROUP_NOT_FOUND 3 40fcf3ce44SJohn Forte #define STMF_PS_ERROR_NOT_FOUND 4 41fcf3ce44SJohn Forte #define STMF_PS_ERROR_EXISTS 5 42fcf3ce44SJohn Forte #define STMF_PS_ERROR_NOMEM 6 43fcf3ce44SJohn Forte #define STMF_PS_ERROR_RETRY 7 44fcf3ce44SJohn Forte #define STMF_PS_ERROR_BUSY 8 45fcf3ce44SJohn Forte #define STMF_PS_ERROR_SERVICE_NOT_FOUND 9 46fcf3ce44SJohn Forte #define STMF_PS_ERROR_INVALID_ARG 10 47fcf3ce44SJohn Forte #define STMF_PS_ERROR_VERSION_MISMATCH 11 48fcf3ce44SJohn Forte #define STMF_PS_ERROR_PROV_DATA_STALE 12 49fcf3ce44SJohn Forte 50fcf3ce44SJohn Forte int psAddHostGroupMember(char *groupName, char *memberName); 51fcf3ce44SJohn Forte int psAddTargetGroupMember(char *groupName, char *memberName); 52fcf3ce44SJohn Forte int psAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry); 53fcf3ce44SJohn Forte int psCreateHostGroup(char *groupName); 54fcf3ce44SJohn Forte int psDeleteHostGroup(char *groupName); 55fcf3ce44SJohn Forte int psCreateTargetGroup(char *groupName); 56fcf3ce44SJohn Forte int psDeleteTargetGroup(char *groupName); 57fcf3ce44SJohn Forte int psGetViewEntry(stmfGuid *lu, uint32_t viewEntryIndex, stmfViewEntry *ve); 58fcf3ce44SJohn Forte int psGetLogicalUnitList(stmfGuidList **guidList); 59fcf3ce44SJohn Forte int psRemoveHostGroupMember(char *groupName, char *memberName); 60fcf3ce44SJohn Forte int psRemoveTargetGroupMember(char *groupName, char *memberName); 61fcf3ce44SJohn Forte int psRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex); 62fcf3ce44SJohn Forte int psGetHostGroupList(stmfGroupList **groupList); 63fcf3ce44SJohn Forte int psGetTargetGroupList(stmfGroupList **groupList); 64fcf3ce44SJohn Forte int psGetHostGroupMemberList(char *groupName, stmfGroupProperties **groupList); 65fcf3ce44SJohn Forte int psGetTargetGroupMemberList(char *groupName, 66fcf3ce44SJohn Forte stmfGroupProperties **groupList); 67fcf3ce44SJohn Forte int psGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList); 68fcf3ce44SJohn Forte int psCheckService(); 69fcf3ce44SJohn Forte int psSetProviderData(char *providerName, nvlist_t *nvl, int providerType, 70fcf3ce44SJohn Forte uint64_t *setHandle); 71fcf3ce44SJohn Forte int psGetProviderData(char *providerName, nvlist_t **nvl, int providerType, 72fcf3ce44SJohn Forte uint64_t *setHandle); 73fcf3ce44SJohn Forte int psGetProviderDataList(stmfProviderList **providerList); 74fcf3ce44SJohn Forte int psClearProviderData(char *providerName, int providerType); 758fe96085Stim szeto int psSetServicePersist(uint8_t persistType); 768fe96085Stim szeto int psGetServicePersist(uint8_t *persistType); 77*4b31676fSsrivijitha dugganapalli int psSetStmfProp(int propType, char *propVal); 78*4b31676fSsrivijitha dugganapalli int psGetStmfProp(int propType, char *propVal); 79fcf3ce44SJohn Forte 80fcf3ce44SJohn Forte #ifdef __cplusplus 81fcf3ce44SJohn Forte } 82fcf3ce44SJohn Forte #endif 83fcf3ce44SJohn Forte 84fcf3ce44SJohn Forte #endif /* _STORE_H */ 85