Allow libconfdb to run standalone (without aisexec)
[openais.git] / include / ipc_amf.h
blob3ee9089ffce3f6a678cfc4e18dad989f2abad8c8
1 /*
2 * Copyright (c) 2002-2005 MontaVista Software, Inc.
4 * All rights reserved.
6 * Author: Steven Dake (sdake@mvista.com)
8 * This software licensed under BSD license, the text of which follows:
9 *
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.
34 #ifndef AIS_IPC_AMF_H_DEFINED
35 #define AIS_IPC_AMF_H_DEFINED
37 #include <netinet/in.h>
38 #include "ipc_gen.h"
39 #include "saAis.h"
40 #include "saAmf.h"
42 enum req_lib_amf_types {
43 MESSAGE_REQ_AMF_COMPONENTREGISTER = 0,
44 MESSAGE_REQ_AMF_COMPONENTUNREGISTER = 1,
45 MESSAGE_REQ_AMF_PMSTART = 2,
46 MESSAGE_REQ_AMF_PMSTOP = 3,
47 MESSAGE_REQ_AMF_HEALTHCHECKSTART = 4,
48 MESSAGE_REQ_AMF_HEALTHCHECKCONFIRM = 5,
49 MESSAGE_REQ_AMF_HEALTHCHECKSTOP = 6,
50 MESSAGE_REQ_AMF_HASTATEGET = 7,
51 MESSAGE_REQ_AMF_CSIQUIESCINGCOMPLETE = 8,
52 MESSAGE_REQ_AMF_PROTECTIONGROUPTRACK = 9,
53 MESSAGE_REQ_AMF_PROTECTIONGROUPTRACKSTOP = 10,
54 MESSAGE_REQ_AMF_COMPONENTERRORREPORT = 11,
55 MESSAGE_REQ_AMF_COMPONENTERRORCLEAR = 12,
56 MESSAGE_REQ_AMF_RESPONSE = 13
59 enum res_lib_amf_types {
60 MESSAGE_RES_AMF_COMPONENTREGISTER = 0,
61 MESSAGE_RES_AMF_COMPONENTUNREGISTER = 1,
62 MESSAGE_RES_AMF_PMSTART = 2,
63 MESSAGE_RES_AMF_PMSTOP = 3,
64 MESSAGE_RES_AMF_HEALTHCHECKSTART = 4,
65 MESSAGE_RES_AMF_HEALTHCHECKCONFIRM = 5,
66 MESSAGE_RES_AMF_HEALTHCHECKSTOP = 6,
67 MESSAGE_RES_AMF_HASTATEGET = 7,
68 MESSAGE_RES_AMF_CSIQUIESCINGCOMPLETE = 8,
69 MESSAGE_RES_AMF_PROTECTIONGROUPTRACK = 9,
70 MESSAGE_RES_AMF_PROTECTIONGROUPTRACKSTOP = 10,
71 MESSAGE_RES_AMF_COMPONENTERRORREPORT = 11,
72 MESSAGE_RES_AMF_COMPONENTERRORCLEAR = 12,
73 MESSAGE_RES_AMF_RESPONSE = 13,
74 MESSAGE_RES_AMF_CSISETCALLBACK = 14,
75 MESSAGE_RES_AMF_HEALTHCHECKCALLBACK = 15,
76 MESSAGE_RES_AMF_CSIREMOVECALLBACK = 16,
77 MESSAGE_RES_AMF_COMPONENTTERMINATECALLBACK = 17,
80 struct req_lib_amf_componentregister {
81 mar_req_header_t header;
82 SaNameT compName;
83 SaNameT proxyCompName;
84 } __attribute__((packed));
86 struct res_lib_amf_componentregister {
87 mar_res_header_t header;
90 struct req_lib_amf_componentunregister {
91 mar_req_header_t header;
92 SaNameT compName;
93 SaNameT proxyCompName;
96 struct res_lib_amf_componentunregister {
97 mar_res_header_t header;
100 struct req_lib_amf_pmstart {
101 mar_req_header_t header;
102 SaNameT compName;
103 SaUint64T processId;
104 SaInt32T descendentsTreeDepth;
105 SaAmfPmErrorsT pmErrors;
106 SaAmfRecommendedRecoveryT recommendedRecovery;
109 struct res_lib_amf_pmstart {
110 mar_res_header_t header;
113 struct req_lib_amf_pmstop {
114 mar_req_header_t header;
115 SaNameT compName;
116 SaAmfPmStopQualifierT stopQualifier;
117 SaUint64T processId;
118 SaAmfPmErrorsT pmErrors;
121 struct res_lib_amf_pmstop {
122 mar_res_header_t header;
125 struct req_lib_amf_healthcheckstart {
126 mar_req_header_t header;
127 SaNameT compName;
128 SaAmfHealthcheckKeyT healthcheckKey;
129 SaAmfHealthcheckInvocationT invocationType;
130 SaAmfRecommendedRecoveryT recommendedRecovery;
133 struct res_lib_amf_healthcheckstart {
134 mar_res_header_t header;
137 struct req_lib_amf_healthcheckconfirm {
138 mar_req_header_t header;
139 SaNameT compName;
140 SaAmfHealthcheckKeyT healthcheckKey;
141 SaAisErrorT healthcheckResult;
144 struct res_lib_amf_healthcheckconfirm {
145 mar_res_header_t header;
148 struct req_lib_amf_healthcheckstop {
149 mar_req_header_t header;
150 SaNameT compName;
151 SaAmfHealthcheckKeyT healthcheckKey;
154 struct res_lib_amf_healthcheckstop {
155 mar_res_header_t header;
158 struct req_lib_amf_hastateget {
159 mar_req_header_t header;
160 SaNameT compName;
161 SaNameT csiName;
164 struct res_lib_amf_hastateget {
165 mar_res_header_t header;
166 SaAmfHAStateT haState;
169 struct req_lib_amf_csiquiescingcomplete {
170 mar_req_header_t header;
171 SaInvocationT invocation;
172 SaAisErrorT error;
175 struct res_lib_amf_csiquiescingcomplete {
176 mar_res_header_t header;
179 struct req_lib_amf_protectiongrouptrack {
180 mar_req_header_t header;
181 SaNameT csiName;
182 SaUint8T trackFlags;
183 SaAmfProtectionGroupNotificationBufferT *notificationBufferAddress;
186 struct res_lib_amf_protectiongrouptrack {
187 mar_res_header_t header;
191 struct req_lib_amf_protectiongrouptrackstop {
192 mar_req_header_t header;
193 SaNameT csiName;
196 struct res_lib_amf_protectiongrouptrackstop {
197 mar_res_header_t header;
200 struct req_lib_amf_componenterrorreport {
201 mar_req_header_t header;
202 SaNameT reportingComponent;
203 SaNameT erroneousComponent;
204 SaTimeT errorDetectionTime;
205 SaAmfRecommendedRecoveryT recommendedRecovery;
206 SaNtfIdentifierT ntfIdentifier;
209 struct res_lib_amf_componenterrorreport {
210 mar_res_header_t header;
213 struct req_lib_amf_componenterrorclear {
214 mar_req_header_t header;
215 SaNameT compName;
218 struct res_lib_amf_componenterrorclear {
219 mar_res_header_t header;
222 struct req_lib_amf_response {
223 mar_req_header_t header;
224 SaInvocationT invocation;
225 SaAisErrorT error;
228 struct res_lib_amf_response {
229 mar_res_header_t header;
231 struct res_lib_amf_healthcheckcallback {
232 mar_res_header_t header;
233 SaInvocationT invocation;
234 SaNameT compName;
235 SaAmfHealthcheckKeyT key;
238 #ifdef COMPILE_OUT
240 struct res_lib_amf_componentterminatecallback {
241 mar_res_header_t header;
242 SaInvocationT invocation;
243 SaNameT compName;
247 #endif
249 /* struct res_lib_amf_csisetcallback { */
250 /* mar_res_header_t header; */
251 /* SaInvocationT invocation; */
252 /* SaNameT compName; */
253 /* SaAmfHAStateT haState; */
254 /* SaAmfCSIDescriptorT csiDescriptor; */
255 /* }; */
257 struct res_lib_amf_csisetcallback {
258 mar_res_header_t header;
259 SaInvocationT invocation;
260 SaNameT compName;
261 SaAmfHAStateT haState;
262 SaAmfCSIFlagsT csiFlags;
263 SaNameT csiName;
264 SaAmfCSIStateDescriptorT csiStateDescriptor;
265 SaUint32T number;
266 char csi_attr_buf[1]; /* Actual length will be calculated */
269 struct res_lib_amf_csiremovecallback {
270 mar_res_header_t header;
271 SaInvocationT invocation;
272 SaNameT compName;
273 SaNameT csiName;
274 SaAmfCSIFlagsT csiFlags;
277 struct res_lib_amf_componentterminatecallback {
278 mar_res_header_t header;
279 SaInvocationT invocation;
280 SaNameT compName;
284 #ifdef COMPILE_OUT
285 struct res_lib_amf_protectiongrouptrackcallback {
286 mar_res_header_t header;
287 SaNameT csiName;
288 SaAmfProtectionGroupNotificationT *notificationBufferAddress;
289 SaUint32T numberOfItems;
290 SaUint32T numberOfMembers;
291 SaUint32T error;
292 SaAmfProtectionGroupNotificationT notificationBuffer[0];
295 typedef enum {
296 SA_AMF_COMPONENT_CAPABILITY_X_ACTIVE_AND_Y_STANDBY = 1,
297 SA_AMF_COMPONENT_CAPABILITY_X_ACTIVE_OR_Y_STANDBY = 2,
298 SA_AMF_COMPONENT_CAPABILITY_1_ACTIVE_OR_Y_STANDBY = 3,
299 SA_AMF_COMPONENT_CAPABILITY_1_ACTIVE_OR_1_STANDBY = 4,
300 SA_AMF_COMPONENT_CAPABILITY_X_ACTIVE = 5,
301 SA_AMF_COMPONENT_CAPABILITY_1_ACTIVE = 6,
302 SA_AMF_COMPONENT_CAPABILITY_NO_ACTIVE = 7
303 } SaAmfComponentCapabilityModelT;
305 #endif
307 #endif /* AIS_IPC_AMF_H_DEFINED */