1MP_SetTPGAccess(3MCPoAmPmIo)n Multipath Management Library FunMcPt_iSoentsTPGAccess(3MPAPI)
2
3
4
6 MP_SetTPGAccess - set a target port group access state
7
9 cc [ flag... ] file... -lMPAPI [ library... ]
10 #include <mpapi.h>
11
12 MP_STATUS MP_SetTPGAccess(MP_OID luOid, MP_UINT32 count,
13 MP_TPG_STATE_PAIR *pTpgStateList);
14
15
17 luOid An object ID that has type MP_MULTIPATH_LOGICAL_UNIT.
18
19
20 count The number of valid items in the pTpgStateList.
21
22
23 pTpgStateList A pointer to an array of data structure
24 MP_TPG_STATE_PAIR. This array must contain the same
25 number of elements as count.
26
27
29 The MP_SetTPGAccess() function sets the access state for a list of tar‐
30 get port groups. This allows a client to force a failover or failback
31 to a desired set of target port groups. This is only valid for devices
32 that support explicit access state manipulation (i.e., the field
33 explicitFailover of data structure MP_TARGET_PORT_GROUP_PROPERTIES must
34 be true).
35
36
37 This API provides the information needed to set up a SCSI SET TARGET
38 PORT GROUPS command.
39
40
41 The plugin should not implement this API by directly calling the SCSI
42 SET TARGET PORT GROUPS command. The plugin should use the MP drivers
43 API (for example, ioctl) if available.
44
45
46 There are two reasons why this API is restricted to devices supporting
47 explicit failover commands. Without an explicit command, the behavior
48 of failback tends to be device-specific.
49
50
51 When the caller is finished using the list it must free the memory used
52 by the list by calling MP_FreeOidList.
53
55 MP_STATUS_ACCESS_STATE_INVALID
56
57 The target device returns a status indicating the caller is
58 attempting to establish an illegal combination of access states.
59
60
61 MP_STATUS_FAILED
62
63 The underlying interface failed the command for some reason other
64 than MP_STATUS_ACCESS_STATE_INVALID.
65
66
67 MP_STATUS_INVALID_OBJECT_TYPE
68
69 The luOid does not specify any valid object type. This is most
70 likely to happen if an uninitialized object ID is passed to the
71 API.
72
73
74 MP_STATUS_OBJECT_NOT_FOUND
75
76 The luOid owner ID or object sequence number is invalid.
77
78
79 MP_STATUS_INVALID_PARAMETER
80
81 The pTpgStateList is null, or when one of the TPGs referenced in
82 the list is not associated with the specified MP logical unit, or
83 the luOid has a type subfield other than MP_OBJECT_TYPE_MULTI‐
84 PATH_LU.
85
86
87 MP_STATUS_SUCCESS
88
89 The operation is successful.
90
91
92 MP_STATUS_UNSUPPORTED
93
94 The API is not supported.
95
96
98 See attributes(5) for descriptions of the following attributes:
99
100
101
102
103 ┌─────────────────────────────┬─────────────────────────────┐
104 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
105 ├─────────────────────────────┼─────────────────────────────┤
106 │Interface Stability │Standard: ANSI INCITS 412 │
107 │ │Multipath Management API │
108 ├─────────────────────────────┼─────────────────────────────┤
109 │MT-Level │Safe │
110 └─────────────────────────────┴─────────────────────────────┘
111
113 libMPAPI(3LIB), attributes(5)
114
115
116 Multipath Management API Version 1.0
117
118
119
120SunOS 5.11 15 Feb 2006 MP_SetTPGAccess(3MPAPI)