summaryrefslogtreecommitdiff
path: root/usr/src/lib/libstmf/common/store.h
blob: 48eb54779a33b3a3a4a60e0109a69e25c982f513 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */
/*
 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
 */
#ifndef	_STORE_H
#define	_STORE_H

#ifdef	__cplusplus
extern "C" {
#endif

#include <libnvpair.h>

/*
 * Error defines
 */
#define	STMF_PS_SUCCESS			0
#define	STMF_PS_ERROR			1
#define	STMF_PS_ERROR_MEMBER_NOT_FOUND	2
#define	STMF_PS_ERROR_GROUP_NOT_FOUND	3
#define	STMF_PS_ERROR_NOT_FOUND		4
#define	STMF_PS_ERROR_EXISTS		5
#define	STMF_PS_ERROR_NOMEM		6
#define	STMF_PS_ERROR_RETRY		7
#define	STMF_PS_ERROR_BUSY		8
#define	STMF_PS_ERROR_SERVICE_NOT_FOUND 9
#define	STMF_PS_ERROR_INVALID_ARG	10
#define	STMF_PS_ERROR_VERSION_MISMATCH	11
#define	STMF_PS_ERROR_PROV_DATA_STALE	12

int psAddHostGroupMember(char *groupName, char *memberName);
int psAddTargetGroupMember(char *groupName, char *memberName);
int psAddViewEntry(stmfGuid *lu, stmfViewEntry *viewEntry);
int psCreateHostGroup(char *groupName);
int psDeleteHostGroup(char *groupName);
int psCreateTargetGroup(char *groupName);
int psDeleteTargetGroup(char *groupName);
int psGetViewEntry(stmfGuid *lu, uint32_t viewEntryIndex, stmfViewEntry *ve);
int psGetLogicalUnitList(stmfGuidList **guidList);
int psRemoveHostGroupMember(char *groupName, char *memberName);
int psRemoveTargetGroupMember(char *groupName, char *memberName);
int psRemoveViewEntry(stmfGuid *lu, uint32_t viewEntryIndex);
int psGetHostGroupList(stmfGroupList **groupList);
int psGetTargetGroupList(stmfGroupList **groupList);
int psGetHostGroupMemberList(char *groupName, stmfGroupProperties **groupList);
int psGetTargetGroupMemberList(char *groupName,
    stmfGroupProperties **groupList);
int psGetViewEntryList(stmfGuid *lu, stmfViewEntryList **viewEntryList);
int psCheckService();
int psSetProviderData(char *providerName, nvlist_t *nvl, int providerType,
    uint64_t *setHandle);
int psGetProviderData(char *providerName, nvlist_t **nvl, int providerType,
    uint64_t *setHandle);
int psGetProviderDataList(stmfProviderList **providerList);
int psClearProviderData(char *providerName, int providerType);
int psSetServicePersist(uint8_t persistType);
int psGetServicePersist(uint8_t *persistType);
int psSetStmfProp(int propType, char *propVal);
int psGetStmfProp(int propType, char *propVal);

#ifdef	__cplusplus
}
#endif

#endif	/* _STORE_H */