2 * Copyright (c) 2002-2006 MontaVista Software, Inc.
3 * Copyright (c) 2006 Red Hat, Inc.
7 * Author: Steven Dake (sdake@mvista.com)
9 * This software licensed under BSD license, the text of which follows:
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions are met:
14 * - Redistributions of source code must retain the above copyright notice,
15 * this list of conditions and the following disclaimer.
16 * - Redistributions in binary form must reproduce the above copyright notice,
17 * this list of conditions and the following disclaimer in the documentation
18 * and/or other materials provided with the distribution.
19 * - Neither the name of the MontaVista Software, Inc. nor the names of its
20 * contributors may be used to endorse or promote products derived from this
21 * software without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
33 * THE POSSIBILITY OF SUCH DAMAGE.
35 #ifndef IPC_CKPT_H_DEFINED
36 #define IPC_CKPT_H_DEFINED
43 enum req_lib_ckpt_checkpoint_types
{
44 MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTOPEN
= 0,
45 MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTCLOSE
= 1,
46 MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTUNLINK
= 2,
47 MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTRETENTIONDURATIONSET
= 3,
48 MESSAGE_REQ_CKPT_ACTIVEREPLICASET
= 4,
49 MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSTATUSGET
= 5,
50 MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONCREATE
= 6,
51 MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONDELETE
= 7,
52 MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONEXPIRATIONTIMESET
= 8,
53 MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONWRITE
= 9,
54 MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONOVERWRITE
= 10,
55 MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONREAD
= 11,
56 MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZE
= 12,
57 MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZEASYNC
= 13,
58 MESSAGE_REQ_CKPT_SECTIONITERATIONINITIALIZE
= 14,
59 MESSAGE_REQ_CKPT_SECTIONITERATIONFINALIZE
= 15,
60 MESSAGE_REQ_CKPT_SECTIONITERATIONNEXT
= 16
63 enum res_lib_ckpt_checkpoint_types
{
64 MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTOPEN
= 0,
65 MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTOPENASYNC
= 1,
66 MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTCLOSE
= 2,
67 MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTUNLINK
= 3,
68 MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTRETENTIONDURATIONSET
= 4,
69 MESSAGE_RES_CKPT_ACTIVEREPLICASET
= 5,
70 MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTSTATUSGET
= 6,
71 MESSAGE_RES_CKPT_CHECKPOINT_SECTIONCREATE
= 7,
72 MESSAGE_RES_CKPT_CHECKPOINT_SECTIONDELETE
= 8,
73 MESSAGE_RES_CKPT_CHECKPOINT_SECTIONEXPIRATIONTIMESET
= 9,
74 MESSAGE_RES_CKPT_CHECKPOINT_SECTIONWRITE
= 10,
75 MESSAGE_RES_CKPT_CHECKPOINT_SECTIONOVERWRITE
= 11,
76 MESSAGE_RES_CKPT_CHECKPOINT_SECTIONREAD
= 12,
77 MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZE
= 13,
78 MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZEASYNC
= 14,
79 MESSAGE_RES_CKPT_SECTIONITERATIONINITIALIZE
= 15,
80 MESSAGE_RES_CKPT_SECTIONITERATIONFINALIZE
= 16,
81 MESSAGE_RES_CKPT_SECTIONITERATIONNEXT
= 17
84 struct req_lib_ckpt_checkpointopen
{
85 mar_req_header_t header
__attribute__((aligned(8)));
86 mar_name_t checkpoint_name
__attribute__((aligned(8)));
87 mar_ckpt_checkpoint_creation_attributes_t checkpoint_creation_attributes
__attribute__((aligned(8)));
88 int checkpoint_creation_attributes_set
__attribute__((aligned(8)));
89 mar_ckpt_checkpoint_open_flags_t checkpoint_open_flags
__attribute__((aligned(8)));
90 mar_ckpt_checkpoint_handle_t checkpoint_handle
__attribute__((aligned(8)));
91 SaAisErrorT fail_with_error
__attribute__((aligned(8)));
92 mar_invocation_t invocation
__attribute__((aligned(8)));
93 mar_uint32_t async_call
__attribute__((aligned(8)));
94 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
95 } __attribute__((aligned(8)));
97 struct res_lib_ckpt_checkpointopen
{
98 mar_res_header_t header
__attribute__((aligned(8)));
99 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
100 } __attribute__((aligned(8)));
102 struct res_lib_ckpt_checkpointopenasync
{
103 mar_res_header_t header
__attribute__((aligned(8)));
104 mar_ckpt_checkpoint_handle_t checkpoint_handle
__attribute__((aligned(8)));
105 mar_invocation_t invocation
__attribute__((aligned(8)));
106 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
107 } __attribute__((aligned(8)));
109 struct req_lib_ckpt_checkpointclose
{
110 mar_req_header_t header
__attribute__((aligned(8)));
111 mar_name_t checkpoint_name
__attribute__((aligned(8)));
112 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
113 } __attribute__((aligned(8)));
115 struct res_lib_ckpt_checkpointclose
{
116 mar_res_header_t header
__attribute__((aligned(8)));
117 } __attribute__((aligned(8)));
119 struct req_lib_ckpt_checkpointunlink
{
120 mar_req_header_t header
__attribute__((aligned(8)));
121 mar_name_t checkpoint_name
__attribute__((aligned(8)));
122 } __attribute__((aligned(8)));
124 struct res_lib_ckpt_checkpointunlink
{
125 mar_res_header_t header
__attribute__((aligned(8)));
126 } __attribute__((aligned(8)));
128 struct req_lib_ckpt_checkpointretentiondurationset
{
129 mar_req_header_t header
__attribute__((aligned(8)));
130 mar_name_t checkpoint_name
__attribute__((aligned(8)));
131 mar_time_t retention_duration
__attribute__((aligned(8)));
132 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
133 } __attribute__((aligned(8)));
135 struct res_lib_ckpt_checkpointretentiondurationset
{
136 mar_res_header_t header
__attribute__((aligned(8)));
137 } __attribute__((aligned(8)));
139 struct req_lib_ckpt_activereplicaset
{
140 mar_req_header_t header
__attribute__((aligned(8)));
141 mar_name_t checkpoint_name
__attribute__((aligned(8)));
142 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
143 } __attribute__((aligned(8)));
145 struct res_lib_ckpt_activereplicaset
{
146 mar_res_header_t header
__attribute__((aligned(8)));
147 } __attribute__((aligned(8)));
149 struct req_lib_ckpt_checkpointstatusget
{
150 mar_req_header_t header
__attribute__((aligned(8)));
151 mar_name_t checkpoint_name
__attribute__((aligned(8)));
152 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
153 } __attribute__((aligned(8)));
155 struct res_lib_ckpt_checkpointstatusget
{
156 mar_res_header_t header
__attribute__((aligned(8)));
157 mar_ckpt_checkpoint_descriptor_t checkpoint_descriptor
__attribute__((aligned(8)));
158 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
159 } __attribute__((aligned(8)));
161 struct req_lib_ckpt_sectioncreate
{
162 mar_req_header_t header
__attribute__((aligned(8)));
163 mar_name_t checkpoint_name
__attribute__((aligned(8)));
164 mar_uint32_t id_len
__attribute__((aligned(8)));
165 mar_time_t expiration_time
__attribute__((aligned(8)));
166 mar_uint32_t initial_data_size
__attribute__((aligned(8)));
167 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
168 } __attribute__((aligned(8)));
170 struct res_lib_ckpt_sectioncreate
{
171 mar_res_header_t header
__attribute__((aligned(8)));
172 } __attribute__((aligned(8)));
174 struct req_lib_ckpt_sectiondelete
{
175 mar_req_header_t header
__attribute__((aligned(8)));
176 mar_name_t checkpoint_name
__attribute__((aligned(8)));
177 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
178 mar_uint32_t id_len
__attribute__((aligned(8)));
179 } __attribute__((aligned(8)));
181 struct res_lib_ckpt_sectiondelete
{
182 mar_res_header_t header
__attribute__((aligned(8)));
183 } __attribute__((aligned(8)));
185 struct req_lib_ckpt_sectionexpirationtimeset
{
186 mar_req_header_t header
__attribute__((aligned(8)));
187 mar_name_t checkpoint_name
__attribute__((aligned(8)));
188 mar_uint32_t id_len
__attribute__((aligned(8)));
189 mar_time_t expiration_time
__attribute__((aligned(8)));
190 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
191 } __attribute__((aligned(8)));
193 struct res_lib_ckpt_sectionexpirationtimeset
{
194 mar_res_header_t header
__attribute__((aligned(8)));
195 } __attribute__((aligned(8)));
197 struct req_lib_ckpt_sectioniterationinitialize
{
198 mar_req_header_t header
__attribute__((aligned(8)));
199 mar_name_t checkpoint_name
__attribute__((aligned(8)));
200 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
201 mar_ckpt_sections_chosen_t sections_chosen
__attribute__((aligned(8)));
202 mar_time_t expiration_time
__attribute__((aligned(8)));
203 } __attribute__((aligned(8)));
205 struct res_lib_ckpt_sectioniterationinitialize
{
206 mar_res_header_t header
__attribute__((aligned(8)));
207 unsigned int iteration_handle
__attribute__((aligned(8)));
208 mar_size_t max_section_id_size
;
209 } __attribute__((aligned(8)));
211 struct req_lib_ckpt_sectioniterationfinalize
{
212 mar_req_header_t header
__attribute__((aligned(8)));
213 unsigned int iteration_handle
__attribute__((aligned(8)));
214 } __attribute__((aligned(8)));
216 struct res_lib_ckpt_sectioniterationfinalize
{
217 mar_res_header_t header
__attribute__((aligned(8)));
218 } __attribute__((aligned(8)));
220 struct req_lib_ckpt_sectioniterationnext
{
221 mar_req_header_t header
__attribute__((aligned(8)));
222 unsigned int iteration_handle
__attribute__((aligned(8)));
223 } __attribute__((aligned(8)));
225 struct res_lib_ckpt_sectioniterationnext
{
226 mar_res_header_t header
__attribute__((aligned(8)));
227 mar_ckpt_section_descriptor_t section_descriptor
__attribute__((aligned(8)));
228 } __attribute__((aligned(8)));
230 struct req_lib_ckpt_sectionwrite
{
231 mar_req_header_t header
__attribute__((aligned(8)));
232 mar_name_t checkpoint_name
__attribute__((aligned(8)));
233 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
234 mar_uint32_t id_len
__attribute__((aligned(8)));
235 mar_offset_t data_offset
__attribute__((aligned(8)));
236 mar_offset_t data_size
__attribute__((aligned(8)));
237 } __attribute__((aligned(8)));
239 struct res_lib_ckpt_sectionwrite
{
240 mar_res_header_t header
__attribute__((aligned(8)));
241 } __attribute__((aligned(8)));
243 struct req_lib_ckpt_sectionoverwrite
{
244 mar_req_header_t header
__attribute__((aligned(8)));
245 mar_name_t checkpoint_name
__attribute__((aligned(8)));
246 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
247 mar_uint32_t id_len
__attribute__((aligned(8)));
248 mar_uint32_t data_size
__attribute__((aligned(8)));
249 } __attribute__((aligned(8)));
251 struct res_lib_ckpt_sectionoverwrite
{
252 mar_res_header_t header
__attribute__((aligned(8)));
253 } __attribute__((aligned(8)));
255 struct req_lib_ckpt_sectionread
{
256 mar_req_header_t header
__attribute__((aligned(8)));
257 mar_name_t checkpoint_name
__attribute__((aligned(8)));
258 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
259 mar_uint32_t id_len
__attribute__((aligned(8)));
260 mar_offset_t data_offset
__attribute__((aligned(8)));
261 mar_offset_t data_size
__attribute__((aligned(8)));
262 } __attribute__((aligned(8)));
264 struct res_lib_ckpt_sectionread
{
265 mar_res_header_t header
__attribute__((aligned(8)));
266 mar_size_t data_read
__attribute__((aligned(8)));
267 } __attribute__((aligned(8)));
269 struct req_lib_ckpt_checkpointsynchronize
{
270 mar_req_header_t header
__attribute__((aligned(8)));
271 mar_name_t checkpoint_name
__attribute__((aligned(8)));
272 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
273 } __attribute__((aligned(8)));
275 struct res_lib_ckpt_checkpointsynchronize
{
276 mar_res_header_t header
__attribute__((aligned(8)));
277 } __attribute__((aligned(8)));
279 struct req_lib_ckpt_checkpointsynchronizeasync
{
280 mar_req_header_t header
__attribute__((aligned(8)));
281 mar_name_t checkpoint_name
__attribute__((aligned(8)));
282 mar_uint32_t ckpt_id
__attribute__((aligned(8)));
283 mar_invocation_t invocation
__attribute__((aligned(8)));
284 } __attribute__((aligned(8)));
286 struct res_lib_ckpt_checkpointsynchronizeasync
{
287 mar_res_header_t header
__attribute__((aligned(8)));
288 mar_invocation_t invocation
__attribute__((aligned(8)));
289 } __attribute__((aligned(8)));
291 #endif /* IPC_CKPT_H_DEFINED */