store.h revision 2
2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A#ifndef _STORE_H
2N/A#define _STORE_H
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <libnvpair.h>
2N/A
2N/A/*
2N/A * Error defines
2N/A */
2N/A#define STMF_PS_SUCCESS 0
2N/A#define STMF_PS_ERROR 1
2N/A#define STMF_PS_ERROR_MEMBER_NOT_FOUND 2
2N/A#define STMF_PS_ERROR_GROUP_NOT_FOUND 3
2N/A#define STMF_PS_ERROR_NOT_FOUND 4
2N/A#define STMF_PS_ERROR_EXISTS 5
2N/A#define STMF_PS_ERROR_NOMEM 6
2N/A#define STMF_PS_ERROR_RETRY 7
2N/A#define STMF_PS_ERROR_BUSY 8
2N/A#define STMF_PS_ERROR_SERVICE_NOT_FOUND 9
2N/A#define STMF_PS_ERROR_INVALID_ARG 10
2N/A#define STMF_PS_ERROR_VERSION_MISMATCH 11
2N/A#define STMF_PS_ERROR_PROV_DATA_STALE 12
2N/A
2N/Aint psAddHostGroupMember(char *groupName, char *memberName);
2N/Aint psAddTargetGroupMember(char *groupName, char *memberName);
2N/Aint psAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry);
2N/Aint psCreateHostGroup(char *groupName);
2N/Aint psDeleteHostGroup(char *groupName);
2N/Aint psCreateTargetGroup(char *groupName);
2N/Aint psDeleteTargetGroup(char *groupName);
2N/Aint psGetViewEntry(stmfGuid *lu, uint32_t viewEntryIndex, stmfViewEntry *ve);
2N/Aint psGetLogicalUnitList(stmfGuidList **guidList);
2N/Aint psRemoveHostGroupMember(char *groupName, char *memberName);
2N/Aint psRemoveTargetGroupMember(char *groupName, char *memberName);
2N/Aint psRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex);
2N/Aint psGetHostGroupList(stmfGroupList **groupList);
2N/Aint psGetTargetGroupList(stmfGroupList **groupList);
2N/Aint psGetHostGroupMemberList(char *groupName, stmfGroupProperties **groupList);
2N/Aint psGetTargetGroupMemberList(char *groupName,
2N/A stmfGroupProperties **groupList);
2N/Aint psGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList);
2N/Aint psCheckService();
2N/Aint psSetProviderData(char *providerName, nvlist_t *nvl, int providerType,
2N/A uint64_t *setHandle);
2N/Aint psGetProviderData(char *providerName, nvlist_t **nvl, int providerType,
2N/A uint64_t *setHandle);
2N/Aint psGetProviderDataList(stmfProviderList **providerList);
2N/Aint psClearProviderData(char *providerName, int providerType);
2N/Aint psSetServicePersist(uint8_t persistType);
2N/Aint psGetServicePersist(uint8_t *persistType);
2N/Aint psSetStmfProp(int propType, char *propVal);
2N/Aint psGetStmfProp(int propType, char *propVal);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _STORE_H */