ipc_ckpt.h 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  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. 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. SaNameT checkpointName;
  153. };
  154. struct res_lib_ckpt_activereplicaset {
  155. struct res_header header;
  156. };
  157. struct req_lib_ckpt_checkpointstatusget {
  158. struct req_header header;
  159. SaNameT checkpointName;
  160. };
  161. struct res_lib_ckpt_checkpointstatusget {
  162. struct res_header header;
  163. SaCkptCheckpointDescriptorT checkpointDescriptor;
  164. };
  165. struct req_lib_ckpt_sectioncreate {
  166. struct req_header header;
  167. SaNameT checkpointName;
  168. SaUint32T idLen;
  169. SaTimeT expirationTime;
  170. SaUint32T initialDataSize;
  171. };
  172. struct res_lib_ckpt_sectioncreate {
  173. struct res_header header;
  174. };
  175. struct req_exec_ckpt_sectioncreate {
  176. struct req_header header;
  177. struct message_source source;
  178. SaNameT checkpointName;
  179. struct req_lib_ckpt_sectioncreate req_lib_ckpt_sectioncreate; /* this must be last */
  180. };
  181. struct req_lib_ckpt_sectiondelete {
  182. struct req_header header;
  183. SaNameT checkpointName;
  184. SaUint32T idLen;
  185. };
  186. struct res_lib_ckpt_sectiondelete {
  187. struct res_header header;
  188. };
  189. struct req_exec_ckpt_sectiondelete {
  190. struct req_header header;
  191. struct message_source source;
  192. SaNameT checkpointName;
  193. struct req_lib_ckpt_sectiondelete req_lib_ckpt_sectiondelete; /* this must be last */
  194. };
  195. struct req_lib_ckpt_sectionexpirationtimeset {
  196. struct req_header header;
  197. SaNameT checkpointName;
  198. SaUint32T idLen;
  199. SaTimeT expirationTime;
  200. };
  201. struct res_lib_ckpt_sectionexpirationtimeset {
  202. struct res_header header;
  203. };
  204. struct req_exec_ckpt_sectionexpirationtimeset {
  205. struct req_header header;
  206. struct message_source source;
  207. SaNameT checkpointName;
  208. struct req_lib_ckpt_sectionexpirationtimeset req_lib_ckpt_sectionexpirationtimeset;
  209. };
  210. struct req_lib_ckpt_sectioniteratorinitialize {
  211. struct req_header header;
  212. SaNameT checkpointName;
  213. SaCkptSectionsChosenT sectionsChosen;
  214. SaTimeT expirationTime;
  215. };
  216. struct res_lib_ckpt_sectioniteratorinitialize {
  217. struct res_header header;
  218. };
  219. struct req_lib_ckpt_sectioniteratornext {
  220. struct req_header header;
  221. };
  222. struct res_lib_ckpt_sectioniteratornext {
  223. struct res_header header;
  224. SaCkptSectionDescriptorT sectionDescriptor;
  225. };
  226. struct req_lib_ckpt_sectionwrite {
  227. struct req_header header;
  228. SaNameT checkpointName;
  229. SaUint32T idLen;
  230. SaOffsetT dataOffset;
  231. SaOffsetT dataSize;
  232. };
  233. struct res_lib_ckpt_sectionwrite {
  234. struct res_header header;
  235. };
  236. struct req_exec_ckpt_sectionwrite {
  237. struct req_header header;
  238. struct message_source source;
  239. SaNameT checkpointName;
  240. struct req_lib_ckpt_sectionwrite req_lib_ckpt_sectionwrite;
  241. };
  242. struct req_lib_ckpt_sectionoverwrite {
  243. struct req_header header;
  244. SaNameT checkpointName;
  245. SaUint32T idLen;
  246. SaUint32T dataSize;
  247. };
  248. struct res_lib_ckpt_sectionoverwrite {
  249. struct res_header header;
  250. };
  251. struct req_exec_ckpt_sectionoverwrite {
  252. struct req_header header;
  253. struct message_source source;
  254. SaNameT checkpointName;
  255. struct req_lib_ckpt_sectionoverwrite req_lib_ckpt_sectionoverwrite;
  256. };
  257. struct req_lib_ckpt_sectionread {
  258. struct req_header header;
  259. SaNameT checkpointName;
  260. SaUint32T idLen;
  261. SaOffsetT dataOffset;
  262. SaOffsetT dataSize;
  263. };
  264. struct res_lib_ckpt_sectionread {
  265. struct res_header header;
  266. SaSizeT dataRead;
  267. };
  268. struct req_exec_ckpt_sectionread {
  269. struct req_header header;
  270. struct message_source source;
  271. SaNameT checkpointName;
  272. struct req_lib_ckpt_sectionread req_lib_ckpt_sectionread;
  273. };
  274. struct req_lib_ckpt_checkpointsynchronize {
  275. struct req_header header;
  276. };
  277. struct res_lib_ckpt_checkpointsynchronize {
  278. struct res_header header;
  279. };
  280. struct req_lib_ckpt_checkpointsynchronizeasync {
  281. struct req_header header;
  282. SaInvocationT invocation;
  283. };
  284. struct res_lib_ckpt_checkpointsynchronizeasync {
  285. struct res_header header;
  286. };
  287. struct req_exec_ckpt_synchronize_state {
  288. struct req_header header;
  289. struct memb_ring_id previous_ring_id;
  290. SaNameT checkpointName;
  291. SaCkptCheckpointCreationAttributesT checkpointCreationAttributes;
  292. SaCkptSectionDescriptorT sectionDescriptor;
  293. struct in_addr source_addr;
  294. struct ckpt_refcnt ckpt_refcount[PROCESSOR_COUNT_MAX];
  295. };
  296. struct req_exec_ckpt_synchronize_section {
  297. struct req_header header;
  298. struct memb_ring_id previous_ring_id;
  299. SaNameT checkpointName;
  300. SaCkptSectionIdT sectionId;
  301. SaUint32T dataOffSet;
  302. SaUint32T dataSize;
  303. };
  304. #endif /* IPC_CKPT_H_DEFINED */