2 * Copyright (c) 2002-2003 MontaVista Software, Inc.
6 * Author: Steven Dake (sdake@mvista.com)
8 * This software licensed under BSD license, the text of which follows:
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are met:
13 * - Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
15 * - Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 * - Neither the name of the MontaVista Software, Inc. nor the names of its
19 * contributors may be used to endorse or promote products derived from this
20 * software without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32 * THE POSSIBILITY OF SUCH DAMAGE.
35 #ifndef AIS_AMF_H_DEFINED
36 #define AIS_AMF_H_DEFINED
40 typedef SaUint64T SaAmfHandleT
;
42 #define SA_AMF_PM_ZERO_EXIT 0x1
43 #define SA_AMF_PM_NON_ZERO_EXIT 0x2
44 #define SA_AMF_PM_ABNORMAL_END 0x4
45 #define SA_AMF_PM_ALL_ERRORS (SA_AMF_PM_ZERO_EXIT | SA_AMF_PM_NON_ZERO_EXIT | SA_AMF_PM_ABNORMAL_END)
47 typedef SaUint32T SaAmfPmErrorsT
;
51 SA_AMF_PM_PROC_AND_DESCENDENTS
= 2,
52 SA_AMF_PM_ALL_PROCESSES
=3
53 } SaAmfPmStopQualifierT
;
56 SA_AMF_HEALTHCHECK_AMF_INVOKED
= 1,
57 SA_AMF_HEALTHCHECK_COMPONENT_INVOKED
=2
58 } SaAmfHealthcheckInvocationT
;
60 #define SA_AMF_HEALTHCHECK_KEY_MAX 32
62 SaUint8T key
[SA_AMF_HEALTHCHECK_KEY_MAX
];
64 } SaAmfHealthcheckKeyT
;
68 SA_AMF_HA_STANDBY
= 2,
69 SA_AMF_HA_QUIESCED
= 3,
70 SA_AMF_HA_QUIESCING
= 4
74 SA_AMF_READINESS_OUT_OF_SERVICE
= 1,
75 SA_AMF_READINESS_IN_SERVICE
= 2,
76 SA_AMF_READINESS_STOPPING
= 3
77 } SaAmfReadinessStateT
;
80 SA_AMF_PRESENCE_UNINSTANTIATED
= 1,
81 SA_AMF_PRESENCE_INSTANTIATING
= 2,
82 SA_AMF_PRESENCE_INSTANTIATED
= 3,
83 SA_AMF_PRESENCE_TERMINATING
= 4,
84 SA_AMF_PRESENCE_RESTARTING
= 5,
85 SA_AMF_PRESENCE_INSTANTIATION_FAILED
= 6,
86 SA_AMF_PRESENCE_TERMINATION_FAILED
= 7
87 } SaAmfPresenceStateT
;
90 SA_AMF_OPERATIONAL_ENABLED
= 1,
91 SA_AMF_OPERATIONAL_DISABLED
= 2
92 } SaAmfOperationalStateT
;
95 SA_AMF_ADMIN_UNLOCKED
= 1,
96 SA_AMF_ADMIN_LOCKED
= 2,
97 SA_AMF_ADMIN_LOCKED_INSTANTIATION
= 3,
98 SA_AMF_ADMIN_SHUTTING_DOWN
= 4
102 SA_AMF_ASSIGNMENT_UNASSIGNED
= 1,
103 SA_AMF_ASSIGNMENT_FULLY_ASSIGNED
= 2,
104 SA_AMF_ASSIGNMENT_PARTIALLY_ASSIGNED
= 3
105 } SaAmfAssignmentStateT
;
108 SA_AMF_PROXY_STATUS_UNPROXIED
= 1,
109 SA_AMF_PROXY_STATUS_PROXIED
= 2
113 SA_AMF_READINESS_STATE
= 1,
115 SA_AMF_PRESENCE_STATE
= 3,
117 SA_AMF_ADMIN_STATE
= 5,
118 SA_AMF_ASSIGNMENT_STATE
= 6,
119 SA_AMF_PROXY_STATUS
= 7
122 #define SA_AMF_CSI_ADD_ONE 0x1
123 #define SA_AMF_CSI_TARGET_ONE 0x2
124 #define SA_AMF_CSI_TARGET_ALL 0x4
126 typedef SaUint32T SaAmfCSIFlagsT
;
130 SA_AMF_CSI_NEW_ASSIGN
= 1,
131 SA_AMF_CSI_QUIESCED
= 2,
132 SA_AMF_CSI_NOT_QUIESCED
= 3,
133 SA_AMF_CSI_STILL_ACTIVE
= 4,
134 } SaAmfCSITransitionDescriptorT
;
137 SaAmfCSITransitionDescriptorT transitionDescriptor
;
138 SaNameT activeCompName
;
139 } SaAmfCSIActiveDescriptorT
;
142 SaNameT activeCompName
;
143 SaUint32T standbyRank
;
144 } SaAmfCSIStandbyDescriptorT
;
147 SaAmfCSIActiveDescriptorT activeDescriptor
;
148 SaAmfCSIStandbyDescriptorT standbyDescriptor
;
149 } SaAmfCSIStateDescriptorT
;
155 } SaAmfCSIAttributeT
;
158 SaAmfCSIAttributeT
*attr
;
160 } SaAmfCSIAttributeListT
;
163 SaAmfCSIFlagsT csiFlags
;
165 SaAmfCSIStateDescriptorT csiStateDescriptor
;
166 SaAmfCSIAttributeListT csiAttr
;
167 } SaAmfCSIDescriptorT
;
171 SaAmfHAStateT haState
;
173 } SaAmfProtectionGroupMemberT
;
177 SA_AMF_PROTECTION_GROUP_NO_CHANGE
= 1,
178 SA_AMF_PROTECTION_GROUP_ADDED
= 2,
179 SA_AMF_PROTECTION_GROUP_REMOVED
= 3,
180 SA_AMF_PROTECTION_GROUP_STATE_CHANGE
= 4
181 } SaAmfProtectionGroupChangesT
;
185 SaAmfProtectionGroupMemberT member
;
186 SaAmfProtectionGroupChangesT change
;
187 } SaAmfProtectionGroupNotificationT
;
190 SaUint32T numberOfItems
;
191 SaAmfProtectionGroupNotificationT
*notification
;
192 } SaAmfProtectionGroupNotificationBufferT
;
195 SA_AMF_NO_RECOMMENDATION
= 1,
196 SA_AMF_COMPONENT_RESTART
= 2,
197 SA_AMF_COMPONENT_FAILOVER
= 3,
198 SA_AMF_NODE_SWITCHOVER
= 4,
199 SA_AMF_NODE_FAILOVER
= 5,
200 SA_AMF_NODE_FAILFAST
= 6,
201 SA_AMF_CLUSTER_RESET
= 7,
202 SA_AMF_APPLICATION_RESTART
= 8
203 } SaAmfRecommendedRecoveryT
;
205 #define SA_AMF_COMP_SA_AWARE 0x0001
206 #define SA_AMF_COMP_PROXY 0x0002
207 #define SA_AMF_COMP_PROXIED 0x0004
208 #define SA_AMF_COMP_LOCAL 0x0008
209 typedef SaUint32T saAmfCompCategoryT
;
212 SA_AMF_2N_REDUNDANCY_MODEL
= 1,
213 SA_AMF_NPM_REDUNDANCY_MODEL
= 2,
214 SA_AMF_N_WAY_REDUNDANCY_MODEL
= 3,
215 SA_AMF_N_WAY_ACTIVE_REDUNDACY_MODEL
= 4,
216 SA_AMF_NO_REDUNDANCY_MODEL
= 5
217 } saAmfRedundancyModelT
;
220 SA_AMF_COMP_X_ACTIVE_AND_Y_STANDBY
= 1,
221 SA_AMF_COMP_X_ACTIVE_OR_Y_STANDBY
= 2,
222 SA_AMF_COMP_ONE_ACTIVE_OR_Y_STANDBY
= 3,
223 SA_AMF_COMP_ONE_ACTIVE_OR_ONE_STANDBY
= 4,
224 SA_AMF_COMP_X_ACTIVE
= 5,
225 SA_AMF_COMP_1_ACTIVE
= 6,
226 SA_AMF_COMP_NON_PRE_INSTANTIABLE
= 7
227 } saAmfCompCapabilityModelT
;
230 SA_AMF_NODE_NAME
= 1,
232 } SaAmfAdditionalInfoIdT
;
234 typedef void (*SaAmfHealthcheckCallbackT
) (
235 SaInvocationT invocation
,
236 const SaNameT
*compName
,
237 SaAmfHealthcheckKeyT
*healthcheckKey
);
239 typedef void (*SaAmfComponentTerminateCallbackT
) (
240 SaInvocationT invocation
,
241 const SaNameT
*compName
);
243 typedef void (*SaAmfCSISetCallbackT
) (
244 SaInvocationT invocation
,
245 const SaNameT
*compName
,
246 SaAmfHAStateT haState
,
247 SaAmfCSIDescriptorT
*csiDescriptor
);
249 typedef void (*SaAmfCSIRemoveCallbackT
) (
250 SaInvocationT invocation
,
251 const SaNameT
*compName
,
252 const SaNameT
*csiName
,
253 SaAmfCSIFlagsT csiFlags
);
255 typedef void (*SaAmfExternalComponentInstantiateCallbackT
) (
256 SaInvocationT invocation
,
257 const SaNameT
*proxiedCompName
);
259 typedef void (*SaAmfExternalComponentCleanupCallbackT
) (
260 SaInvocationT invocation
,
261 const SaNameT
*proxiedCompName
);
263 typedef void (*SaAmfProtectionGroupTrackCallbackT
) (
264 const SaNameT
*csiName
,
265 SaAmfProtectionGroupNotificationBufferT
*notificationBuffer
,
266 SaUint32T numberOfMembers
,
270 SaAmfHealthcheckCallbackT
271 saAmfHealthcheckCallback
;
272 SaAmfComponentTerminateCallbackT
273 saAmfComponentTerminateCallback
;
276 SaAmfCSIRemoveCallbackT
277 saAmfCSIRemoveCallback
;
278 SaAmfProtectionGroupTrackCallbackT
279 saAmfProtectionGroupTrackCallback
;
280 SaAmfExternalComponentInstantiateCallbackT
281 saAmfExternalComponentInstantiateCallback
;
282 SaAmfExternalComponentCleanupCallbackT
283 saAmfExternalComponentCleanupCallback
;
295 SaAmfHandleT
*amfHandle
,
296 const SaAmfCallbacksT
*amfCallbacks
,
297 SaVersionT
*version
);
300 saAmfSelectionObjectGet (
301 SaAmfHandleT amfHandle
,
302 SaSelectionObjectT
*selectionObject
);
306 SaAmfHandleT amfHandle
,
307 SaDispatchFlagsT dispatchFlags
);
311 SaAmfHandleT amfHandle
);
314 saAmfComponentRegister (
315 SaAmfHandleT amfHandle
,
316 const SaNameT
*compName
,
317 const SaNameT
*proxyCompName
);
320 saAmfComponentUnregister (
321 SaAmfHandleT amfHandle
,
322 const SaNameT
*compName
,
323 const SaNameT
*proxyCompName
);
326 saAmfComponentNameGet (
327 SaAmfHandleT amfHandle
,
332 SaAmfHandleT amfHandle
,
333 const SaNameT
*compName
,
335 SaInt32T descendentsTreeDepth
,
336 SaAmfPmErrorsT pmErrors
,
337 SaAmfRecommendedRecoveryT recommendedRecovery
);
341 SaAmfHandleT amfHandle
,
342 const SaNameT
*compName
,
343 SaAmfPmStopQualifierT stopQualifier
,
345 SaAmfPmErrorsT pmErrors
);
348 saAmfHealthcheckStart (
349 SaAmfHandleT amfHandle
,
350 const SaNameT
*compName
,
351 const SaAmfHealthcheckKeyT
*healthcheckKey
,
352 SaAmfHealthcheckInvocationT invocationType
,
353 SaAmfRecommendedRecoveryT recommendedRecovery
);
356 saAmfHealthcheckConfirm (
357 SaAmfHandleT amfHandle
,
358 const SaNameT
*compName
,
359 const SaAmfHealthcheckKeyT
*healthcheckKey
,
360 SaAisErrorT healthcheckResult
);
363 saAmfHealthcheckStop (
364 SaAmfHandleT amfHandle
,
365 const SaNameT
*compName
,
366 const SaAmfHealthcheckKeyT
*healthcheckKey
);
370 SaAmfHandleT amfHandle
,
371 const SaNameT
*compName
,
372 const SaNameT
*csiName
,
373 SaAmfHAStateT
*haState
);
377 saAmfCSIQuiescingComplete(
378 SaAmfHandleT amfHandle
,
379 SaInvocationT invocation
,
383 saAmfProtectionGroupTrack (
384 SaAmfHandleT amfHandle
,
385 const SaNameT
*csiName
,
387 SaAmfProtectionGroupNotificationBufferT
*notificationBuffer
);
390 saAmfProtectionGroupTrackStop (
391 SaAmfHandleT amfHandle
,
392 const SaNameT
*csiName
);
395 saAmfComponentErrorReport (
396 SaAmfHandleT amfHandle
,
397 const SaNameT
*erroneousComponent
,
398 SaTimeT errorDetectionTime
,
399 SaAmfRecommendedRecoveryT recommendedRecovery
,
400 SaNtfIdentifierT ntfIdentifier
);
403 saAmfComponentErrorClear (
404 SaAmfHandleT amfHandle
,
405 const SaNameT
*compName
,
406 SaNtfIdentifierT ntfIdentifier
);
411 SaAmfHandleT amfHandle
,
412 SaInvocationT invocation
,
419 #endif /* AIS_AMF_H_DEFINED */