ipc_ckpt.h 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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_CHECKPOINT_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_CHECKPOINT_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. SaCkptCheckpointOpenFlagsT checkpointOpenFlags;
  99. };
  100. struct res_lib_ckpt_checkpointopen {
  101. struct res_header header;
  102. };
  103. struct req_exec_ckpt_checkpointopen {
  104. struct req_header header;
  105. struct message_source source;
  106. struct req_lib_ckpt_checkpointopen req_lib_ckpt_checkpointopen;
  107. SaCkptCheckpointHandleT checkpointHandle;
  108. SaInvocationT invocation;
  109. };
  110. struct req_lib_ckpt_checkpointopenasync {
  111. struct req_header header;
  112. SaNameT checkpointName;
  113. SaCkptCheckpointCreationAttributesT checkpointCreationAttributes;
  114. SaCkptCheckpointOpenFlagsT checkpointOpenFlags;
  115. SaCkptCheckpointHandleT checkpointHandle;
  116. SaInvocationT invocation;
  117. };
  118. struct res_lib_ckpt_checkpointopenasync {
  119. struct res_header header;
  120. SaCkptCheckpointHandleT checkpointHandle;
  121. SaInvocationT invocation;
  122. };
  123. struct req_lib_ckpt_checkpointclose {
  124. struct req_header header;
  125. SaNameT checkpointName;
  126. };
  127. struct res_lib_ckpt_checkpointclose {
  128. struct res_header header;
  129. };
  130. struct req_lib_ckpt_checkpointunlink {
  131. struct req_header header;
  132. SaNameT checkpointName;
  133. };
  134. struct res_lib_ckpt_checkpointunlink {
  135. struct res_header header;
  136. };
  137. struct req_exec_ckpt_checkpointunlink {
  138. struct req_header header;
  139. struct message_source source;
  140. struct req_lib_ckpt_checkpointunlink req_lib_ckpt_checkpointunlink;
  141. };
  142. struct req_lib_ckpt_checkpointretentiondurationset {
  143. struct req_header header;
  144. SaNameT checkpointName;
  145. SaTimeT retentionDuration;
  146. };
  147. struct res_lib_ckpt_checkpointretentiondurationset {
  148. struct res_header header;
  149. };
  150. struct req_lib_ckpt_activereplicaset {
  151. struct req_header header;
  152. };
  153. struct res_lib_ckpt_activereplicaset {
  154. struct res_header header;
  155. };
  156. struct req_lib_ckpt_checkpointstatusget {
  157. struct req_header header;
  158. SaNameT checkpointName;
  159. };
  160. struct res_lib_ckpt_checkpointstatusget {
  161. struct res_header header;
  162. SaCkptCheckpointDescriptorT checkpointDescriptor;
  163. };
  164. struct req_lib_ckpt_sectioncreate {
  165. struct req_header header;
  166. SaNameT checkpointName;
  167. SaUint32T idLen;
  168. SaTimeT expirationTime;
  169. SaUint32T initialDataSize;
  170. };
  171. struct res_lib_ckpt_sectioncreate {
  172. struct res_header header;
  173. };
  174. struct req_exec_ckpt_sectioncreate {
  175. struct req_header header;
  176. struct message_source source;
  177. SaNameT checkpointName;
  178. struct req_lib_ckpt_sectioncreate req_lib_ckpt_sectioncreate; /* this must be last */
  179. };
  180. struct req_lib_ckpt_sectiondelete {
  181. struct req_header header;
  182. SaNameT checkpointName;
  183. SaUint32T idLen;
  184. };
  185. struct res_lib_ckpt_sectiondelete {
  186. struct res_header header;
  187. };
  188. struct req_exec_ckpt_sectiondelete {
  189. struct req_header header;
  190. struct message_source source;
  191. SaNameT checkpointName;
  192. struct req_lib_ckpt_sectiondelete req_lib_ckpt_sectiondelete; /* this must be last */
  193. };
  194. struct req_lib_ckpt_sectionexpirationtimeset {
  195. struct req_header header;
  196. SaNameT checkpointName;
  197. SaUint32T idLen;
  198. SaTimeT expirationTime;
  199. };
  200. struct res_lib_ckpt_sectionexpirationtimeset {
  201. struct res_header header;
  202. };
  203. struct req_exec_ckpt_sectionexpirationtimeset {
  204. struct req_header header;
  205. struct message_source source;
  206. SaNameT checkpointName;
  207. struct req_lib_ckpt_sectionexpirationtimeset req_lib_ckpt_sectionexpirationtimeset;
  208. };
  209. struct req_lib_ckpt_sectioniteratorinitialize {
  210. struct req_header header;
  211. SaNameT checkpointName;
  212. SaCkptSectionsChosenT sectionsChosen;
  213. SaTimeT expirationTime;
  214. };
  215. struct res_lib_ckpt_sectioniteratorinitialize {
  216. struct res_header header;
  217. };
  218. struct req_lib_ckpt_sectioniteratornext {
  219. struct req_header header;
  220. };
  221. struct res_lib_ckpt_sectioniteratornext {
  222. struct res_header header;
  223. SaCkptSectionDescriptorT sectionDescriptor;
  224. };
  225. struct req_lib_ckpt_sectionwrite {
  226. struct req_header header;
  227. SaNameT checkpointName;
  228. SaUint32T idLen;
  229. SaOffsetT dataOffset;
  230. SaOffsetT dataSize;
  231. };
  232. struct res_lib_ckpt_sectionwrite {
  233. struct res_header header;
  234. };
  235. struct req_exec_ckpt_sectionwrite {
  236. struct req_header header;
  237. struct message_source source;
  238. SaNameT checkpointName;
  239. struct req_lib_ckpt_sectionwrite req_lib_ckpt_sectionwrite;
  240. };
  241. struct req_lib_ckpt_sectionoverwrite {
  242. struct req_header header;
  243. SaNameT checkpointName;
  244. SaUint32T idLen;
  245. SaUint32T dataSize;
  246. };
  247. struct res_lib_ckpt_sectionoverwrite {
  248. struct res_header header;
  249. };
  250. struct req_exec_ckpt_sectionoverwrite {
  251. struct req_header header;
  252. struct message_source source;
  253. SaNameT checkpointName;
  254. struct req_lib_ckpt_sectionoverwrite req_lib_ckpt_sectionoverwrite;
  255. };
  256. struct req_lib_ckpt_sectionread {
  257. struct req_header header;
  258. SaNameT checkpointName;
  259. SaUint32T idLen;
  260. SaOffsetT dataOffset;
  261. SaOffsetT dataSize;
  262. };
  263. struct res_lib_ckpt_sectionread {
  264. struct res_header header;
  265. SaSizeT dataRead;
  266. };
  267. struct req_exec_ckpt_sectionread {
  268. struct req_header header;
  269. struct message_source source;
  270. SaNameT checkpointName;
  271. struct req_lib_ckpt_sectionread req_lib_ckpt_sectionread;
  272. };
  273. struct req_lib_ckpt_checkpointsynchronize {
  274. struct req_header header;
  275. };
  276. struct res_lib_ckpt_checkpointsynchronize {
  277. struct res_header header;
  278. };
  279. struct req_lib_ckpt_checkpointsynchronizeasync {
  280. struct req_header header;
  281. SaInvocationT invocation;
  282. };
  283. struct res_lib_ckpt_checkpointsynchronizeasync {
  284. struct res_header header;
  285. };
  286. struct req_exec_ckpt_synchronize_state {
  287. struct req_header header;
  288. struct memb_ring_id previous_ring_id;
  289. SaNameT checkpointName;
  290. SaCkptCheckpointCreationAttributesT checkpointCreationAttributes;
  291. SaCkptSectionDescriptorT sectionDescriptor;
  292. struct in_addr source_addr;
  293. struct ckpt_refcnt ckpt_refcount[PROCESSOR_COUNT_MAX];
  294. };
  295. struct req_exec_ckpt_synchronize_section {
  296. struct req_header header;
  297. struct memb_ring_id previous_ring_id;
  298. SaNameT checkpointName;
  299. SaCkptSectionIdT sectionId;
  300. SaUint32T dataOffSet;
  301. SaUint32T dataSize;
  302. };
  303. #endif /* IPC_CKPT_H_DEFINED */