17836SJohn.Forte@Sun.COM /* 27836SJohn.Forte@Sun.COM * CDDL HEADER START 37836SJohn.Forte@Sun.COM * 47836SJohn.Forte@Sun.COM * The contents of this file are subject to the terms of the 57836SJohn.Forte@Sun.COM * Common Development and Distribution License (the "License"). 67836SJohn.Forte@Sun.COM * You may not use this file except in compliance with the License. 77836SJohn.Forte@Sun.COM * 87836SJohn.Forte@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97836SJohn.Forte@Sun.COM * or http://www.opensolaris.org/os/licensing. 107836SJohn.Forte@Sun.COM * See the License for the specific language governing permissions 117836SJohn.Forte@Sun.COM * and limitations under the License. 127836SJohn.Forte@Sun.COM * 137836SJohn.Forte@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 147836SJohn.Forte@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157836SJohn.Forte@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 167836SJohn.Forte@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 177836SJohn.Forte@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 187836SJohn.Forte@Sun.COM * 197836SJohn.Forte@Sun.COM * CDDL HEADER END 207836SJohn.Forte@Sun.COM */ 217836SJohn.Forte@Sun.COM /* 22*12682SSrivijitha.Dugganapalli@Sun.COM * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 237836SJohn.Forte@Sun.COM */ 247836SJohn.Forte@Sun.COM #ifndef _STORE_H 257836SJohn.Forte@Sun.COM #define _STORE_H 267836SJohn.Forte@Sun.COM 277836SJohn.Forte@Sun.COM #ifdef __cplusplus 287836SJohn.Forte@Sun.COM extern "C" { 297836SJohn.Forte@Sun.COM #endif 307836SJohn.Forte@Sun.COM 317836SJohn.Forte@Sun.COM #include <libnvpair.h> 327836SJohn.Forte@Sun.COM 337836SJohn.Forte@Sun.COM /* 347836SJohn.Forte@Sun.COM * Error defines 357836SJohn.Forte@Sun.COM */ 367836SJohn.Forte@Sun.COM #define STMF_PS_SUCCESS 0 377836SJohn.Forte@Sun.COM #define STMF_PS_ERROR 1 387836SJohn.Forte@Sun.COM #define STMF_PS_ERROR_MEMBER_NOT_FOUND 2 397836SJohn.Forte@Sun.COM #define STMF_PS_ERROR_GROUP_NOT_FOUND 3 407836SJohn.Forte@Sun.COM #define STMF_PS_ERROR_NOT_FOUND 4 417836SJohn.Forte@Sun.COM #define STMF_PS_ERROR_EXISTS 5 427836SJohn.Forte@Sun.COM #define STMF_PS_ERROR_NOMEM 6 437836SJohn.Forte@Sun.COM #define STMF_PS_ERROR_RETRY 7 447836SJohn.Forte@Sun.COM #define STMF_PS_ERROR_BUSY 8 457836SJohn.Forte@Sun.COM #define STMF_PS_ERROR_SERVICE_NOT_FOUND 9 467836SJohn.Forte@Sun.COM #define STMF_PS_ERROR_INVALID_ARG 10 477836SJohn.Forte@Sun.COM #define STMF_PS_ERROR_VERSION_MISMATCH 11 487836SJohn.Forte@Sun.COM #define STMF_PS_ERROR_PROV_DATA_STALE 12 497836SJohn.Forte@Sun.COM 507836SJohn.Forte@Sun.COM int psAddHostGroupMember(char *groupName, char *memberName); 517836SJohn.Forte@Sun.COM int psAddTargetGroupMember(char *groupName, char *memberName); 527836SJohn.Forte@Sun.COM int psAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry); 537836SJohn.Forte@Sun.COM int psCreateHostGroup(char *groupName); 547836SJohn.Forte@Sun.COM int psDeleteHostGroup(char *groupName); 557836SJohn.Forte@Sun.COM int psCreateTargetGroup(char *groupName); 567836SJohn.Forte@Sun.COM int psDeleteTargetGroup(char *groupName); 577836SJohn.Forte@Sun.COM int psGetViewEntry(stmfGuid *lu, uint32_t viewEntryIndex, stmfViewEntry *ve); 587836SJohn.Forte@Sun.COM int psGetLogicalUnitList(stmfGuidList **guidList); 597836SJohn.Forte@Sun.COM int psRemoveHostGroupMember(char *groupName, char *memberName); 607836SJohn.Forte@Sun.COM int psRemoveTargetGroupMember(char *groupName, char *memberName); 617836SJohn.Forte@Sun.COM int psRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex); 627836SJohn.Forte@Sun.COM int psGetHostGroupList(stmfGroupList **groupList); 637836SJohn.Forte@Sun.COM int psGetTargetGroupList(stmfGroupList **groupList); 647836SJohn.Forte@Sun.COM int psGetHostGroupMemberList(char *groupName, stmfGroupProperties **groupList); 657836SJohn.Forte@Sun.COM int psGetTargetGroupMemberList(char *groupName, 667836SJohn.Forte@Sun.COM stmfGroupProperties **groupList); 677836SJohn.Forte@Sun.COM int psGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList); 687836SJohn.Forte@Sun.COM int psCheckService(); 697836SJohn.Forte@Sun.COM int psSetProviderData(char *providerName, nvlist_t *nvl, int providerType, 707836SJohn.Forte@Sun.COM uint64_t *setHandle); 717836SJohn.Forte@Sun.COM int psGetProviderData(char *providerName, nvlist_t **nvl, int providerType, 727836SJohn.Forte@Sun.COM uint64_t *setHandle); 737836SJohn.Forte@Sun.COM int psGetProviderDataList(stmfProviderList **providerList); 747836SJohn.Forte@Sun.COM int psClearProviderData(char *providerName, int providerType); 759585STim.Szeto@Sun.COM int psSetServicePersist(uint8_t persistType); 769585STim.Szeto@Sun.COM int psGetServicePersist(uint8_t *persistType); 77*12682SSrivijitha.Dugganapalli@Sun.COM int psSetStmfProp(int propType, char *propVal); 78*12682SSrivijitha.Dugganapalli@Sun.COM int psGetStmfProp(int propType, char *propVal); 797836SJohn.Forte@Sun.COM 807836SJohn.Forte@Sun.COM #ifdef __cplusplus 817836SJohn.Forte@Sun.COM } 827836SJohn.Forte@Sun.COM #endif 837836SJohn.Forte@Sun.COM 847836SJohn.Forte@Sun.COM #endif /* _STORE_H */ 85