ipc_ckpt.h 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. /*
  2. * Copyright (c) 2002-2005 MontaVista Software, Inc.
  3. *
  4. * All rights reserved.
  5. *
  6. * Author: Steven Dake (sdake@mvista.com)
  7. *
  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:
  12. *
  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.
  21. *
  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.
  33. */
  34. #ifndef IPC_CKPT_H_DEFINED
  35. #define IPC_CKPT_H_DEFINED
  36. #include "ais_types.h"
  37. #include "saCkpt.h"
  38. #include "ipc_gen.h"
  39. enum req_lib_ckpt_checkpoint_types {
  40. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTOPEN = 0,
  41. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTOPENASYNC = 1,
  42. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTCLOSE = 2,
  43. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTUNLINK = 3,
  44. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTRETENTIONDURATIONSET = 4,
  45. MESSAGE_REQ_CKPT_ACTIVEREPLICASET = 5,
  46. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSTATUSGET = 6,
  47. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONCREATE = 7,
  48. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONDELETE = 8,
  49. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONEXPIRATIONTIMESET = 9,
  50. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONWRITE = 10,
  51. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONOVERWRITE = 11,
  52. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONREAD = 12,
  53. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZE = 13,
  54. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZEASYNC = 14,
  55. MESSAGE_REQ_CKPT_SECTIONITERATOR_SECTIONITERATORINITIALIZE = 15,
  56. MESSAGE_REQ_CKPT_SECTIONITERATOR_SECTIONITERATORNEXT = 16
  57. };
  58. enum res_lib_ckpt_checkpoint_types {
  59. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTOPEN = 0,
  60. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTOPENASYNC = 1,
  61. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTCLOSE = 2,
  62. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTUNLINK = 3,
  63. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTRETENTIONDURATIONSET = 4,
  64. MESSAGE_RES_CKPT_ACTIVEREPLICASET = 5,
  65. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTSTATUSGET = 6,
  66. MESSAGE_RES_CKPT_CHECKPOINT_SECTIONCREATE = 7,
  67. MESSAGE_RES_CKPT_CHECKPOINT_SECTIONDELETE = 8,
  68. MESSAGE_RES_CKPT_CHECKPOINT_SECTIONEXPIRATIONTIMESET = 9,
  69. MESSAGE_RES_CKPT_CHECKPOINT_SECTIONWRITE = 10,
  70. MESSAGE_RES_CKPT_CHECKPOINT_SECTIONOVERWRITE = 11,
  71. MESSAGE_RES_CKPT_CHECKPOINT_SECTIONREAD = 12,
  72. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZE = 13,
  73. MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZEASYNC = 14,
  74. MESSAGE_RES_CKPT_SECTIONITERATOR_SECTIONITERATORINITIALIZE = 15,
  75. MESSAGE_RES_CKPT_SECTIONITERATOR_SECTIONITERATORNEXT = 16
  76. };
  77. struct req_lib_ckpt_checkpointopen {
  78. struct req_header header;
  79. SaNameT checkpointName;
  80. SaCkptCheckpointCreationAttributesT checkpointCreationAttributes;
  81. int checkpointCreationAttributesSet;
  82. SaCkptCheckpointOpenFlagsT checkpointOpenFlags;
  83. };
  84. struct res_lib_ckpt_checkpointopen {
  85. struct res_header header;
  86. };
  87. struct req_lib_ckpt_checkpointopenasync {
  88. struct req_header header;
  89. SaNameT checkpointName;
  90. SaCkptCheckpointCreationAttributesT checkpointCreationAttributes;
  91. int checkpointCreationAttributesSet;
  92. SaCkptCheckpointOpenFlagsT checkpointOpenFlags;
  93. SaInvocationT invocation;
  94. SaCkptCheckpointHandleT checkpointHandle;
  95. SaAisErrorT fail_with_error;
  96. };
  97. struct res_lib_ckpt_checkpointopenasync {
  98. struct res_header header;
  99. SaCkptCheckpointHandleT checkpointHandle;
  100. SaInvocationT invocation;
  101. };
  102. struct req_lib_ckpt_checkpointclose {
  103. struct req_header header;
  104. SaNameT checkpointName;
  105. };
  106. struct res_lib_ckpt_checkpointclose {
  107. struct res_header header;
  108. };
  109. struct req_lib_ckpt_checkpointunlink {
  110. struct req_header header;
  111. SaNameT checkpointName;
  112. };
  113. struct res_lib_ckpt_checkpointunlink {
  114. struct res_header header;
  115. };
  116. struct req_lib_ckpt_checkpointretentiondurationset {
  117. struct req_header header;
  118. SaNameT checkpointName;
  119. SaTimeT retentionDuration;
  120. };
  121. struct res_lib_ckpt_checkpointretentiondurationset {
  122. struct res_header header;
  123. };
  124. struct req_lib_ckpt_activereplicaset {
  125. struct req_header header;
  126. SaNameT checkpointName;
  127. };
  128. struct res_lib_ckpt_activereplicaset {
  129. struct res_header header;
  130. };
  131. struct req_lib_ckpt_checkpointstatusget {
  132. struct req_header header;
  133. SaNameT checkpointName;
  134. };
  135. struct res_lib_ckpt_checkpointstatusget {
  136. struct res_header header;
  137. SaCkptCheckpointDescriptorT checkpointDescriptor;
  138. };
  139. struct req_lib_ckpt_sectioncreate {
  140. struct req_header header;
  141. SaNameT checkpointName;
  142. SaUint32T idLen;
  143. SaTimeT expirationTime;
  144. SaUint32T initialDataSize;
  145. };
  146. struct res_lib_ckpt_sectioncreate {
  147. struct res_header header;
  148. };
  149. struct req_lib_ckpt_sectiondelete {
  150. struct req_header header;
  151. SaNameT checkpointName;
  152. SaUint32T idLen;
  153. };
  154. struct res_lib_ckpt_sectiondelete {
  155. struct res_header header;
  156. };
  157. struct req_lib_ckpt_sectionexpirationtimeset {
  158. struct req_header header;
  159. SaNameT checkpointName;
  160. SaUint32T idLen;
  161. SaTimeT expirationTime;
  162. };
  163. struct res_lib_ckpt_sectionexpirationtimeset {
  164. struct res_header header;
  165. };
  166. struct req_lib_ckpt_sectioniteratorinitialize {
  167. struct req_header header;
  168. SaNameT checkpointName;
  169. SaCkptSectionsChosenT sectionsChosen;
  170. SaTimeT expirationTime;
  171. };
  172. struct res_lib_ckpt_sectioniteratorinitialize {
  173. struct res_header header;
  174. };
  175. struct req_lib_ckpt_sectioniteratornext {
  176. struct req_header header;
  177. };
  178. struct res_lib_ckpt_sectioniteratornext {
  179. struct res_header header;
  180. SaCkptSectionDescriptorT sectionDescriptor;
  181. };
  182. struct req_lib_ckpt_sectionwrite {
  183. struct req_header header;
  184. SaNameT checkpointName;
  185. SaUint32T idLen;
  186. SaOffsetT dataOffset;
  187. SaOffsetT dataSize;
  188. };
  189. struct res_lib_ckpt_sectionwrite {
  190. struct res_header header;
  191. };
  192. struct req_lib_ckpt_sectionoverwrite {
  193. struct req_header header;
  194. SaNameT checkpointName;
  195. SaUint32T idLen;
  196. SaUint32T dataSize;
  197. };
  198. struct res_lib_ckpt_sectionoverwrite {
  199. struct res_header header;
  200. };
  201. struct req_lib_ckpt_sectionread {
  202. struct req_header header;
  203. SaNameT checkpointName;
  204. SaUint32T idLen;
  205. SaOffsetT dataOffset;
  206. SaOffsetT dataSize;
  207. };
  208. struct res_lib_ckpt_sectionread {
  209. struct res_header header;
  210. SaSizeT dataRead;
  211. };
  212. struct req_lib_ckpt_checkpointsynchronize {
  213. struct req_header header;
  214. };
  215. struct res_lib_ckpt_checkpointsynchronize {
  216. struct res_header header;
  217. };
  218. struct req_lib_ckpt_checkpointsynchronizeasync {
  219. struct req_header header;
  220. SaInvocationT invocation;
  221. };
  222. struct res_lib_ckpt_checkpointsynchronizeasync {
  223. struct res_header header;
  224. };
  225. #endif /* IPC_CKPT_H_DEFINED */