ipc_ckpt.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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@mvista.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. } __attribute__((aligned(8)));
  91. struct res_lib_ckpt_checkpointopen {
  92. mar_res_header_t header __attribute__((aligned(8)));
  93. } __attribute__((aligned(8)));
  94. struct res_lib_ckpt_checkpointopenasync {
  95. mar_res_header_t header __attribute__((aligned(8)));
  96. mar_ckpt_checkpoint_handle_t checkpoint_handle __attribute__((aligned(8)));
  97. mar_invocation_t invocation __attribute__((aligned(8)));
  98. } __attribute__((aligned(8)));
  99. struct req_lib_ckpt_checkpointclose {
  100. mar_req_header_t header __attribute__((aligned(8)));
  101. mar_name_t checkpoint_name __attribute__((aligned(8)));
  102. } __attribute__((aligned(8)));
  103. struct res_lib_ckpt_checkpointclose {
  104. mar_res_header_t header __attribute__((aligned(8)));
  105. } __attribute__((aligned(8)));
  106. struct req_lib_ckpt_checkpointunlink {
  107. mar_req_header_t header __attribute__((aligned(8)));
  108. mar_name_t checkpoint_name __attribute__((aligned(8)));
  109. } __attribute__((aligned(8)));
  110. struct res_lib_ckpt_checkpointunlink {
  111. mar_res_header_t header __attribute__((aligned(8)));
  112. } __attribute__((aligned(8)));
  113. struct req_lib_ckpt_checkpointretentiondurationset {
  114. mar_req_header_t header __attribute__((aligned(8)));
  115. mar_name_t checkpoint_name __attribute__((aligned(8)));
  116. mar_time_t retention_duration __attribute__((aligned(8)));
  117. } __attribute__((aligned(8)));
  118. struct res_lib_ckpt_checkpointretentiondurationset {
  119. mar_res_header_t header __attribute__((aligned(8)));
  120. } __attribute__((aligned(8)));
  121. struct req_lib_ckpt_activereplicaset {
  122. mar_req_header_t header __attribute__((aligned(8)));
  123. mar_name_t checkpoint_name __attribute__((aligned(8)));
  124. } __attribute__((aligned(8)));
  125. struct res_lib_ckpt_activereplicaset {
  126. mar_res_header_t header __attribute__((aligned(8)));
  127. } __attribute__((aligned(8)));
  128. struct req_lib_ckpt_checkpointstatusget {
  129. mar_req_header_t header __attribute__((aligned(8)));
  130. mar_name_t checkpoint_name __attribute__((aligned(8)));
  131. } __attribute__((aligned(8)));
  132. struct res_lib_ckpt_checkpointstatusget {
  133. mar_res_header_t header __attribute__((aligned(8)));
  134. mar_ckpt_checkpoint_descriptor_t checkpoint_descriptor __attribute__((aligned(8)));
  135. } __attribute__((aligned(8)));
  136. struct req_lib_ckpt_sectioncreate {
  137. mar_req_header_t header __attribute__((aligned(8)));
  138. mar_name_t checkpoint_name __attribute__((aligned(8)));
  139. mar_uint32_t id_len __attribute__((aligned(8)));
  140. mar_time_t expiration_time __attribute__((aligned(8)));
  141. mar_uint32_t initial_data_size __attribute__((aligned(8)));
  142. } __attribute__((aligned(8)));
  143. struct res_lib_ckpt_sectioncreate {
  144. mar_res_header_t header __attribute__((aligned(8)));
  145. } __attribute__((aligned(8)));
  146. struct req_lib_ckpt_sectiondelete {
  147. mar_req_header_t header __attribute__((aligned(8)));
  148. mar_name_t checkpoint_name __attribute__((aligned(8)));
  149. mar_uint32_t id_len __attribute__((aligned(8)));
  150. } __attribute__((aligned(8)));
  151. struct res_lib_ckpt_sectiondelete {
  152. mar_res_header_t header __attribute__((aligned(8)));
  153. } __attribute__((aligned(8)));
  154. struct req_lib_ckpt_sectionexpirationtimeset {
  155. mar_req_header_t header __attribute__((aligned(8)));
  156. mar_name_t checkpoint_name __attribute__((aligned(8)));
  157. mar_uint32_t id_len __attribute__((aligned(8)));
  158. mar_time_t expiration_time __attribute__((aligned(8)));
  159. } __attribute__((aligned(8)));
  160. struct res_lib_ckpt_sectionexpirationtimeset {
  161. mar_res_header_t header __attribute__((aligned(8)));
  162. } __attribute__((aligned(8)));
  163. struct req_lib_ckpt_sectioniterationinitialize {
  164. mar_req_header_t header __attribute__((aligned(8)));
  165. mar_name_t checkpoint_name __attribute__((aligned(8)));
  166. mar_ckpt_sections_chosen_t sections_chosen __attribute__((aligned(8)));
  167. mar_time_t expiration_time __attribute__((aligned(8)));
  168. } __attribute__((aligned(8)));
  169. struct res_lib_ckpt_sectioniterationinitialize {
  170. mar_res_header_t header __attribute__((aligned(8)));
  171. unsigned int iteration_handle __attribute__((aligned(8)));
  172. } __attribute__((aligned(8)));
  173. struct req_lib_ckpt_sectioniterationfinalize {
  174. mar_req_header_t header __attribute__((aligned(8)));
  175. unsigned int iteration_handle __attribute__((aligned(8)));
  176. } __attribute__((aligned(8)));
  177. struct res_lib_ckpt_sectioniterationfinalize {
  178. mar_res_header_t header __attribute__((aligned(8)));
  179. } __attribute__((aligned(8)));
  180. struct req_lib_ckpt_sectioniterationnext {
  181. mar_req_header_t header __attribute__((aligned(8)));
  182. unsigned int iteration_handle __attribute__((aligned(8)));
  183. } __attribute__((aligned(8)));
  184. struct res_lib_ckpt_sectioniterationnext {
  185. mar_res_header_t header __attribute__((aligned(8)));
  186. mar_ckpt_section_descriptor_t section_descriptor __attribute__((aligned(8)));
  187. } __attribute__((aligned(8)));
  188. struct req_lib_ckpt_sectionwrite {
  189. mar_req_header_t header __attribute__((aligned(8)));
  190. mar_name_t checkpoint_name __attribute__((aligned(8)));
  191. mar_uint32_t id_len __attribute__((aligned(8)));
  192. mar_offset_t data_offset __attribute__((aligned(8)));
  193. mar_offset_t data_size __attribute__((aligned(8)));
  194. } __attribute__((aligned(8)));
  195. struct res_lib_ckpt_sectionwrite {
  196. mar_res_header_t header __attribute__((aligned(8)));
  197. } __attribute__((aligned(8)));
  198. struct req_lib_ckpt_sectionoverwrite {
  199. mar_req_header_t header __attribute__((aligned(8)));
  200. mar_name_t checkpoint_name __attribute__((aligned(8)));
  201. mar_uint32_t id_len __attribute__((aligned(8)));
  202. mar_uint32_t data_size __attribute__((aligned(8)));
  203. } __attribute__((aligned(8)));
  204. struct res_lib_ckpt_sectionoverwrite {
  205. mar_res_header_t header __attribute__((aligned(8)));
  206. } __attribute__((aligned(8)));
  207. struct req_lib_ckpt_sectionread {
  208. mar_req_header_t header __attribute__((aligned(8)));
  209. mar_name_t checkpoint_name __attribute__((aligned(8)));
  210. mar_uint32_t id_len __attribute__((aligned(8)));
  211. mar_offset_t data_offset __attribute__((aligned(8)));
  212. mar_offset_t data_size __attribute__((aligned(8)));
  213. } __attribute__((aligned(8)));
  214. struct res_lib_ckpt_sectionread {
  215. mar_res_header_t header __attribute__((aligned(8)));
  216. mar_size_t data_read __attribute__((aligned(8)));
  217. } __attribute__((aligned(8)));
  218. struct req_lib_ckpt_checkpointsynchronize {
  219. mar_req_header_t header __attribute__((aligned(8)));
  220. mar_name_t checkpoint_name __attribute__((aligned(8)));
  221. } __attribute__((aligned(8)));
  222. struct res_lib_ckpt_checkpointsynchronize {
  223. mar_res_header_t header __attribute__((aligned(8)));
  224. } __attribute__((aligned(8)));
  225. struct req_lib_ckpt_checkpointsynchronizeasync {
  226. mar_req_header_t header __attribute__((aligned(8)));
  227. mar_name_t checkpoint_name __attribute__((aligned(8)));
  228. mar_invocation_t invocation __attribute__((aligned(8)));
  229. } __attribute__((aligned(8)));
  230. struct res_lib_ckpt_checkpointsynchronizeasync {
  231. mar_res_header_t header __attribute__((aligned(8)));
  232. mar_invocation_t invocation __attribute__((aligned(8)));
  233. } __attribute__((aligned(8)));
  234. #endif /* IPC_CKPT_H_DEFINED */