ipc_ckpt.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. /*
  2. * Copyright (c) 2002-2006 MontaVista Software, Inc.
  3. * Copyright (c) 2006 Red Hat, Inc.
  4. *
  5. * All rights reserved.
  6. *
  7. * Author: Steven Dake (sdake@redhat.com)
  8. *
  9. * This software licensed under BSD license, the text of which follows:
  10. *
  11. * Redistribution and use in source and binary forms, with or without
  12. * modification, are permitted provided that the following conditions are met:
  13. *
  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.
  22. *
  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.
  34. */
  35. #ifndef IPC_CKPT_H_DEFINED
  36. #define IPC_CKPT_H_DEFINED
  37. #include "saAis.h"
  38. #include "saCkpt.h"
  39. #include "ipc_gen.h"
  40. #include "mar_ckpt.h"
  41. enum req_lib_ckpt_checkpoint_types {
  42. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTOPEN = 0,
  43. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTCLOSE = 1,
  44. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTUNLINK = 2,
  45. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTRETENTIONDURATIONSET = 3,
  46. MESSAGE_REQ_CKPT_ACTIVEREPLICASET = 4,
  47. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSTATUSGET = 5,
  48. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONCREATE = 6,
  49. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONDELETE = 7,
  50. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONEXPIRATIONTIMESET = 8,
  51. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONWRITE = 9,
  52. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONOVERWRITE = 10,
  53. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONREAD = 11,
  54. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZE = 12,
  55. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZEASYNC = 13,
  56. MESSAGE_REQ_CKPT_SECTIONITERATIONINITIALIZE = 14,
  57. MESSAGE_REQ_CKPT_SECTIONITERATIONFINALIZE = 15,
  58. MESSAGE_REQ_CKPT_SECTIONITERATIONNEXT = 16
  59. };
  60. enum res_lib_ckpt_checkpoint_types {
  61. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTOPEN = 0,
  62. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTOPENASYNC = 1,
  63. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTCLOSE = 2,
  64. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTUNLINK = 3,
  65. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTRETENTIONDURATIONSET = 4,
  66. MESSAGE_RES_CKPT_ACTIVEREPLICASET = 5,
  67. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTSTATUSGET = 6,
  68. MESSAGE_RES_CKPT_CHECKPOINT_SECTIONCREATE = 7,
  69. MESSAGE_RES_CKPT_CHECKPOINT_SECTIONDELETE = 8,
  70. MESSAGE_RES_CKPT_CHECKPOINT_SECTIONEXPIRATIONTIMESET = 9,
  71. MESSAGE_RES_CKPT_CHECKPOINT_SECTIONWRITE = 10,
  72. MESSAGE_RES_CKPT_CHECKPOINT_SECTIONOVERWRITE = 11,
  73. MESSAGE_RES_CKPT_CHECKPOINT_SECTIONREAD = 12,
  74. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZE = 13,
  75. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZEASYNC = 14,
  76. MESSAGE_RES_CKPT_SECTIONITERATIONINITIALIZE = 15,
  77. MESSAGE_RES_CKPT_SECTIONITERATIONFINALIZE = 16,
  78. MESSAGE_RES_CKPT_SECTIONITERATIONNEXT = 17
  79. };
  80. struct req_lib_ckpt_checkpointopen {
  81. mar_req_header_t header __attribute__((aligned(8)));
  82. mar_name_t checkpoint_name __attribute__((aligned(8)));
  83. mar_ckpt_checkpoint_creation_attributes_t checkpoint_creation_attributes __attribute__((aligned(8)));
  84. int checkpoint_creation_attributes_set __attribute__((aligned(8)));
  85. mar_ckpt_checkpoint_open_flags_t checkpoint_open_flags __attribute__((aligned(8)));
  86. mar_ckpt_checkpoint_handle_t checkpoint_handle __attribute__((aligned(8)));
  87. SaAisErrorT fail_with_error __attribute__((aligned(8)));
  88. mar_invocation_t invocation __attribute__((aligned(8)));
  89. mar_uint32_t async_call __attribute__((aligned(8)));
  90. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  91. } __attribute__((aligned(8)));
  92. struct res_lib_ckpt_checkpointopen {
  93. mar_res_header_t header __attribute__((aligned(8)));
  94. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  95. } __attribute__((aligned(8)));
  96. struct res_lib_ckpt_checkpointopenasync {
  97. mar_res_header_t header __attribute__((aligned(8)));
  98. mar_ckpt_checkpoint_handle_t checkpoint_handle __attribute__((aligned(8)));
  99. mar_invocation_t invocation __attribute__((aligned(8)));
  100. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  101. } __attribute__((aligned(8)));
  102. struct req_lib_ckpt_checkpointclose {
  103. mar_req_header_t header __attribute__((aligned(8)));
  104. mar_name_t checkpoint_name __attribute__((aligned(8)));
  105. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  106. } __attribute__((aligned(8)));
  107. struct res_lib_ckpt_checkpointclose {
  108. mar_res_header_t header __attribute__((aligned(8)));
  109. } __attribute__((aligned(8)));
  110. struct req_lib_ckpt_checkpointunlink {
  111. mar_req_header_t header __attribute__((aligned(8)));
  112. mar_name_t checkpoint_name __attribute__((aligned(8)));
  113. } __attribute__((aligned(8)));
  114. struct res_lib_ckpt_checkpointunlink {
  115. mar_res_header_t header __attribute__((aligned(8)));
  116. } __attribute__((aligned(8)));
  117. struct req_lib_ckpt_checkpointretentiondurationset {
  118. mar_req_header_t header __attribute__((aligned(8)));
  119. mar_name_t checkpoint_name __attribute__((aligned(8)));
  120. mar_time_t retention_duration __attribute__((aligned(8)));
  121. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  122. } __attribute__((aligned(8)));
  123. struct res_lib_ckpt_checkpointretentiondurationset {
  124. mar_res_header_t header __attribute__((aligned(8)));
  125. } __attribute__((aligned(8)));
  126. struct req_lib_ckpt_activereplicaset {
  127. mar_req_header_t header __attribute__((aligned(8)));
  128. mar_name_t checkpoint_name __attribute__((aligned(8)));
  129. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  130. } __attribute__((aligned(8)));
  131. struct res_lib_ckpt_activereplicaset {
  132. mar_res_header_t header __attribute__((aligned(8)));
  133. } __attribute__((aligned(8)));
  134. struct req_lib_ckpt_checkpointstatusget {
  135. mar_req_header_t header __attribute__((aligned(8)));
  136. mar_name_t checkpoint_name __attribute__((aligned(8)));
  137. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  138. } __attribute__((aligned(8)));
  139. struct res_lib_ckpt_checkpointstatusget {
  140. mar_res_header_t header __attribute__((aligned(8)));
  141. mar_ckpt_checkpoint_descriptor_t checkpoint_descriptor __attribute__((aligned(8)));
  142. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  143. } __attribute__((aligned(8)));
  144. struct req_lib_ckpt_sectioncreate {
  145. mar_req_header_t header __attribute__((aligned(8)));
  146. mar_name_t checkpoint_name __attribute__((aligned(8)));
  147. mar_uint32_t id_len __attribute__((aligned(8)));
  148. mar_time_t expiration_time __attribute__((aligned(8)));
  149. mar_uint32_t initial_data_size __attribute__((aligned(8)));
  150. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  151. } __attribute__((aligned(8)));
  152. struct res_lib_ckpt_sectioncreate {
  153. mar_res_header_t header __attribute__((aligned(8)));
  154. } __attribute__((aligned(8)));
  155. struct req_lib_ckpt_sectiondelete {
  156. mar_req_header_t header __attribute__((aligned(8)));
  157. mar_name_t checkpoint_name __attribute__((aligned(8)));
  158. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  159. mar_uint32_t id_len __attribute__((aligned(8)));
  160. } __attribute__((aligned(8)));
  161. struct res_lib_ckpt_sectiondelete {
  162. mar_res_header_t header __attribute__((aligned(8)));
  163. } __attribute__((aligned(8)));
  164. struct req_lib_ckpt_sectionexpirationtimeset {
  165. mar_req_header_t header __attribute__((aligned(8)));
  166. mar_name_t checkpoint_name __attribute__((aligned(8)));
  167. mar_uint32_t id_len __attribute__((aligned(8)));
  168. mar_time_t expiration_time __attribute__((aligned(8)));
  169. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  170. } __attribute__((aligned(8)));
  171. struct res_lib_ckpt_sectionexpirationtimeset {
  172. mar_res_header_t header __attribute__((aligned(8)));
  173. } __attribute__((aligned(8)));
  174. struct req_lib_ckpt_sectioniterationinitialize {
  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_ckpt_sections_chosen_t sections_chosen __attribute__((aligned(8)));
  179. mar_time_t expiration_time __attribute__((aligned(8)));
  180. } __attribute__((aligned(8)));
  181. struct res_lib_ckpt_sectioniterationinitialize {
  182. mar_res_header_t header __attribute__((aligned(8)));
  183. unsigned int iteration_handle __attribute__((aligned(8)));
  184. mar_size_t max_section_id_size;
  185. } __attribute__((aligned(8)));
  186. struct req_lib_ckpt_sectioniterationfinalize {
  187. mar_req_header_t header __attribute__((aligned(8)));
  188. unsigned int iteration_handle __attribute__((aligned(8)));
  189. } __attribute__((aligned(8)));
  190. struct res_lib_ckpt_sectioniterationfinalize {
  191. mar_res_header_t header __attribute__((aligned(8)));
  192. } __attribute__((aligned(8)));
  193. struct req_lib_ckpt_sectioniterationnext {
  194. mar_req_header_t header __attribute__((aligned(8)));
  195. unsigned int iteration_handle __attribute__((aligned(8)));
  196. } __attribute__((aligned(8)));
  197. struct res_lib_ckpt_sectioniterationnext {
  198. mar_res_header_t header __attribute__((aligned(8)));
  199. mar_ckpt_section_descriptor_t section_descriptor __attribute__((aligned(8)));
  200. } __attribute__((aligned(8)));
  201. struct req_lib_ckpt_sectionwrite {
  202. mar_req_header_t header __attribute__((aligned(8)));
  203. mar_name_t checkpoint_name __attribute__((aligned(8)));
  204. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  205. mar_uint32_t id_len __attribute__((aligned(8)));
  206. mar_offset_t data_offset __attribute__((aligned(8)));
  207. mar_offset_t data_size __attribute__((aligned(8)));
  208. } __attribute__((aligned(8)));
  209. struct res_lib_ckpt_sectionwrite {
  210. mar_res_header_t header __attribute__((aligned(8)));
  211. } __attribute__((aligned(8)));
  212. struct req_lib_ckpt_sectionoverwrite {
  213. mar_req_header_t header __attribute__((aligned(8)));
  214. mar_name_t checkpoint_name __attribute__((aligned(8)));
  215. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  216. mar_uint32_t id_len __attribute__((aligned(8)));
  217. mar_uint32_t data_size __attribute__((aligned(8)));
  218. } __attribute__((aligned(8)));
  219. struct res_lib_ckpt_sectionoverwrite {
  220. mar_res_header_t header __attribute__((aligned(8)));
  221. } __attribute__((aligned(8)));
  222. struct req_lib_ckpt_sectionread {
  223. mar_req_header_t header __attribute__((aligned(8)));
  224. mar_name_t checkpoint_name __attribute__((aligned(8)));
  225. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  226. mar_uint32_t id_len __attribute__((aligned(8)));
  227. mar_offset_t data_offset __attribute__((aligned(8)));
  228. mar_offset_t data_size __attribute__((aligned(8)));
  229. } __attribute__((aligned(8)));
  230. struct res_lib_ckpt_sectionread {
  231. mar_res_header_t header __attribute__((aligned(8)));
  232. mar_size_t data_read __attribute__((aligned(8)));
  233. } __attribute__((aligned(8)));
  234. struct req_lib_ckpt_checkpointsynchronize {
  235. mar_req_header_t header __attribute__((aligned(8)));
  236. mar_name_t checkpoint_name __attribute__((aligned(8)));
  237. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  238. } __attribute__((aligned(8)));
  239. struct res_lib_ckpt_checkpointsynchronize {
  240. mar_res_header_t header __attribute__((aligned(8)));
  241. } __attribute__((aligned(8)));
  242. struct req_lib_ckpt_checkpointsynchronizeasync {
  243. mar_req_header_t header __attribute__((aligned(8)));
  244. mar_name_t checkpoint_name __attribute__((aligned(8)));
  245. mar_uint32_t ckpt_id __attribute__((aligned(8)));
  246. mar_invocation_t invocation __attribute__((aligned(8)));
  247. } __attribute__((aligned(8)));
  248. struct res_lib_ckpt_checkpointsynchronizeasync {
  249. mar_res_header_t header __attribute__((aligned(8)));
  250. mar_invocation_t invocation __attribute__((aligned(8)));
  251. } __attribute__((aligned(8)));
  252. #endif /* IPC_CKPT_H_DEFINED */