ipc_ckpt.h 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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 "../include/ipc_gen.h"
  37. #include "../include/ais_types.h"
  38. #include "../include/saCkpt.h"
  39. #include "../exec/totemsrp.h"
  40. #include "../exec/ckpt.h"
  41. enum req_lib_ckpt_checkpoint_types {
  42. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTOPEN = 0,
  43. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTOPENASYNC = 1,
  44. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTCLOSE = 2,
  45. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTUNLINK = 3,
  46. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTRETENTIONDURATIONSET = 4,
  47. MESSAGE_REQ_CKPT_ACTIVEREPLICASET = 5,
  48. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSTATUSGET = 6,
  49. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONCREATE = 7,
  50. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONDELETE = 8,
  51. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONEXPIRATIONTIMESET = 9,
  52. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONWRITE = 10,
  53. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONOVERWRITE = 11,
  54. MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONREAD = 12,
  55. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZE = 13,
  56. MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZEASYNC = 14,
  57. MESSAGE_REQ_CKPT_SECTIONITERATOR_SECTIONITERATORINITIALIZE = 15,
  58. MESSAGE_REQ_CKPT_SECTIONITERATOR_SECTIONITERATORNEXT = 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_SECTIONITERATOR_SECTIONITERATORINITIALIZE = 15,
  77. MESSAGE_RES_CKPT_SECTIONITERATOR_SECTIONITERATORNEXT = 16
  78. };
  79. struct req_exec_ckpt_checkpointclose {
  80. struct req_header header;
  81. struct message_source source;
  82. SaNameT checkpointName;
  83. };
  84. struct req_exec_ckpt_checkpointretentiondurationset {
  85. struct req_header header;
  86. struct message_source source;
  87. SaNameT checkpointName;
  88. SaTimeT retentionDuration;
  89. };
  90. struct req_exec_ckpt_checkpointretentiondurationexpire {
  91. struct req_header header;
  92. SaNameT checkpointName;
  93. };
  94. struct req_lib_ckpt_checkpointopen {
  95. struct req_header header;
  96. SaNameT checkpointName;
  97. SaCkptCheckpointCreationAttributesT checkpointCreationAttributes;
  98. int checkpointCreationAttributesSet;
  99. SaCkptCheckpointOpenFlagsT checkpointOpenFlags;
  100. };
  101. struct res_lib_ckpt_checkpointopen {
  102. struct res_header header;
  103. };
  104. struct req_exec_ckpt_checkpointopen {
  105. struct req_header header;
  106. struct message_source source;
  107. struct req_lib_ckpt_checkpointopen req_lib_ckpt_checkpointopen;
  108. SaCkptCheckpointHandleT checkpointHandle;
  109. SaInvocationT invocation;
  110. int async_call;
  111. };
  112. struct req_lib_ckpt_checkpointopenasync {
  113. struct req_header header;
  114. SaNameT checkpointName;
  115. SaCkptCheckpointCreationAttributesT checkpointCreationAttributes;
  116. int checkpointCreationAttributesSet;
  117. SaCkptCheckpointOpenFlagsT checkpointOpenFlags;
  118. SaInvocationT invocation;
  119. SaCkptCheckpointHandleT checkpointHandle;
  120. };
  121. struct res_lib_ckpt_checkpointopenasync {
  122. struct res_header header;
  123. SaCkptCheckpointHandleT checkpointHandle;
  124. SaInvocationT invocation;
  125. };
  126. struct req_lib_ckpt_checkpointclose {
  127. struct req_header header;
  128. SaNameT checkpointName;
  129. };
  130. struct res_lib_ckpt_checkpointclose {
  131. struct res_header header;
  132. };
  133. struct req_lib_ckpt_checkpointunlink {
  134. struct req_header header;
  135. SaNameT checkpointName;
  136. };
  137. struct res_lib_ckpt_checkpointunlink {
  138. struct res_header header;
  139. };
  140. struct req_exec_ckpt_checkpointunlink {
  141. struct req_header header;
  142. struct message_source source;
  143. struct req_lib_ckpt_checkpointunlink req_lib_ckpt_checkpointunlink;
  144. };
  145. struct req_lib_ckpt_checkpointretentiondurationset {
  146. struct req_header header;
  147. SaNameT checkpointName;
  148. SaTimeT retentionDuration;
  149. };
  150. struct res_lib_ckpt_checkpointretentiondurationset {
  151. struct res_header header;
  152. };
  153. struct req_lib_ckpt_activereplicaset {
  154. struct req_header header;
  155. SaNameT checkpointName;
  156. };
  157. struct res_lib_ckpt_activereplicaset {
  158. struct res_header header;
  159. };
  160. struct req_lib_ckpt_checkpointstatusget {
  161. struct req_header header;
  162. SaNameT checkpointName;
  163. };
  164. struct res_lib_ckpt_checkpointstatusget {
  165. struct res_header header;
  166. SaCkptCheckpointDescriptorT checkpointDescriptor;
  167. };
  168. struct req_lib_ckpt_sectioncreate {
  169. struct req_header header;
  170. SaNameT checkpointName;
  171. SaUint32T idLen;
  172. SaTimeT expirationTime;
  173. SaUint32T initialDataSize;
  174. };
  175. struct res_lib_ckpt_sectioncreate {
  176. struct res_header header;
  177. };
  178. struct req_exec_ckpt_sectioncreate {
  179. struct req_header header;
  180. struct message_source source;
  181. SaNameT checkpointName;
  182. struct req_lib_ckpt_sectioncreate req_lib_ckpt_sectioncreate; /* this must be last */
  183. };
  184. struct req_lib_ckpt_sectiondelete {
  185. struct req_header header;
  186. SaNameT checkpointName;
  187. SaUint32T idLen;
  188. };
  189. struct res_lib_ckpt_sectiondelete {
  190. struct res_header header;
  191. };
  192. struct req_exec_ckpt_sectiondelete {
  193. struct req_header header;
  194. struct message_source source;
  195. SaNameT checkpointName;
  196. struct req_lib_ckpt_sectiondelete req_lib_ckpt_sectiondelete; /* this must be last */
  197. };
  198. struct req_lib_ckpt_sectionexpirationtimeset {
  199. struct req_header header;
  200. SaNameT checkpointName;
  201. SaUint32T idLen;
  202. SaTimeT expirationTime;
  203. };
  204. struct res_lib_ckpt_sectionexpirationtimeset {
  205. struct res_header header;
  206. };
  207. struct req_exec_ckpt_sectionexpirationtimeset {
  208. struct req_header header;
  209. struct message_source source;
  210. SaNameT checkpointName;
  211. struct req_lib_ckpt_sectionexpirationtimeset req_lib_ckpt_sectionexpirationtimeset;
  212. };
  213. struct req_lib_ckpt_sectioniteratorinitialize {
  214. struct req_header header;
  215. SaNameT checkpointName;
  216. SaCkptSectionsChosenT sectionsChosen;
  217. SaTimeT expirationTime;
  218. };
  219. struct res_lib_ckpt_sectioniteratorinitialize {
  220. struct res_header header;
  221. };
  222. struct req_lib_ckpt_sectioniteratornext {
  223. struct req_header header;
  224. };
  225. struct res_lib_ckpt_sectioniteratornext {
  226. struct res_header header;
  227. SaCkptSectionDescriptorT sectionDescriptor;
  228. };
  229. struct req_lib_ckpt_sectionwrite {
  230. struct req_header header;
  231. SaNameT checkpointName;
  232. SaUint32T idLen;
  233. SaOffsetT dataOffset;
  234. SaOffsetT dataSize;
  235. };
  236. struct res_lib_ckpt_sectionwrite {
  237. struct res_header header;
  238. };
  239. struct req_exec_ckpt_sectionwrite {
  240. struct req_header header;
  241. struct message_source source;
  242. SaNameT checkpointName;
  243. struct req_lib_ckpt_sectionwrite req_lib_ckpt_sectionwrite;
  244. };
  245. struct req_lib_ckpt_sectionoverwrite {
  246. struct req_header header;
  247. SaNameT checkpointName;
  248. SaUint32T idLen;
  249. SaUint32T dataSize;
  250. };
  251. struct res_lib_ckpt_sectionoverwrite {
  252. struct res_header header;
  253. };
  254. struct req_exec_ckpt_sectionoverwrite {
  255. struct req_header header;
  256. struct message_source source;
  257. SaNameT checkpointName;
  258. struct req_lib_ckpt_sectionoverwrite req_lib_ckpt_sectionoverwrite;
  259. };
  260. struct req_lib_ckpt_sectionread {
  261. struct req_header header;
  262. SaNameT checkpointName;
  263. SaUint32T idLen;
  264. SaOffsetT dataOffset;
  265. SaOffsetT dataSize;
  266. };
  267. struct res_lib_ckpt_sectionread {
  268. struct res_header header;
  269. SaSizeT dataRead;
  270. };
  271. struct req_exec_ckpt_sectionread {
  272. struct req_header header;
  273. struct message_source source;
  274. SaNameT checkpointName;
  275. struct req_lib_ckpt_sectionread req_lib_ckpt_sectionread;
  276. };
  277. struct req_lib_ckpt_checkpointsynchronize {
  278. struct req_header header;
  279. };
  280. struct res_lib_ckpt_checkpointsynchronize {
  281. struct res_header header;
  282. };
  283. struct req_lib_ckpt_checkpointsynchronizeasync {
  284. struct req_header header;
  285. SaInvocationT invocation;
  286. };
  287. struct res_lib_ckpt_checkpointsynchronizeasync {
  288. struct res_header header;
  289. };
  290. struct req_exec_ckpt_synchronize_state {
  291. struct req_header header;
  292. struct memb_ring_id previous_ring_id;
  293. SaNameT checkpointName;
  294. SaCkptCheckpointCreationAttributesT checkpointCreationAttributes;
  295. SaCkptSectionDescriptorT sectionDescriptor;
  296. struct in_addr source_addr;
  297. struct ckpt_refcnt ckpt_refcount[PROCESSOR_COUNT_MAX];
  298. };
  299. struct req_exec_ckpt_synchronize_section {
  300. struct req_header header;
  301. struct memb_ring_id previous_ring_id;
  302. SaNameT checkpointName;
  303. SaCkptSectionIdT sectionId;
  304. SaUint32T dataOffSet;
  305. SaUint32T dataSize;
  306. };
  307. #endif /* IPC_CKPT_H_DEFINED */