confdb.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. /*
  2. * Copyright (c) 2008 Red Hat, Inc.
  3. *
  4. * All rights reserved.
  5. *
  6. * Author: Christine Caulfield (ccaulfie@redhat.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 CONTIBUTORS "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. #include <sys/types.h>
  35. #include <unistd.h>
  36. #include <fcntl.h>
  37. #include <stdlib.h>
  38. #include <errno.h>
  39. #include <unistd.h>
  40. #include "../include/saAis.h"
  41. #include "../include/ipc_gen.h"
  42. #include "../include/ipc_confdb.h"
  43. #include "../include/mar_gen.h"
  44. #include "../lcr/lcr_comp.h"
  45. #include "../exec/logsys.h"
  46. #include "../include/coroapi.h"
  47. LOGSYS_DECLARE_SUBSYS ("CONFDB", LOG_INFO);
  48. static struct corosync_api_v1 *api;
  49. static int confdb_exec_init_fn (
  50. struct corosync_api_v1 *corosync_api);
  51. static int confdb_lib_init_fn (void *conn);
  52. static int confdb_lib_exit_fn (void *conn);
  53. static void message_handler_req_lib_confdb_object_create (void *conn, void *message);
  54. static void message_handler_req_lib_confdb_object_destroy (void *conn, void *message);
  55. static void message_handler_req_lib_confdb_key_create (void *conn, void *message);
  56. static void message_handler_req_lib_confdb_key_get (void *conn, void *message);
  57. static void message_handler_req_lib_confdb_key_replace (void *conn, void *message);
  58. static void message_handler_req_lib_confdb_key_delete (void *conn, void *message);
  59. static void message_handler_req_lib_confdb_key_iter (void *conn, void *message);
  60. static void message_handler_req_lib_confdb_object_iter (void *conn, void *message);
  61. static void message_handler_req_lib_confdb_object_find (void *conn, void *message);
  62. static void message_handler_req_lib_confdb_object_parent_get (void *conn, void *message);
  63. static void message_handler_req_lib_confdb_write (void *conn, void *message);
  64. static void message_handler_req_lib_confdb_track_start (void *conn, void *message);
  65. static void message_handler_req_lib_confdb_track_stop (void *conn, void *message);
  66. /*
  67. * Library Handler Definition
  68. */
  69. static struct corosync_lib_handler confdb_lib_engine[] =
  70. {
  71. { /* 0 */
  72. .lib_handler_fn = message_handler_req_lib_confdb_object_create,
  73. .response_size = sizeof (mar_res_header_t),
  74. .response_id = MESSAGE_RES_CONFDB_OBJECT_CREATE,
  75. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  76. },
  77. { /* 1 */
  78. .lib_handler_fn = message_handler_req_lib_confdb_object_destroy,
  79. .response_size = sizeof (mar_res_header_t),
  80. .response_id = MESSAGE_RES_CONFDB_OBJECT_DESTROY,
  81. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  82. },
  83. { /* 2 */
  84. .lib_handler_fn = message_handler_req_lib_confdb_object_find,
  85. .response_size = sizeof (struct res_lib_confdb_object_find),
  86. .response_id = MESSAGE_RES_CONFDB_OBJECT_FIND,
  87. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  88. },
  89. { /* 3 */
  90. .lib_handler_fn = message_handler_req_lib_confdb_key_create,
  91. .response_size = sizeof (mar_res_header_t),
  92. .response_id = MESSAGE_RES_CONFDB_KEY_CREATE,
  93. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  94. },
  95. { /* 4 */
  96. .lib_handler_fn = message_handler_req_lib_confdb_key_get,
  97. .response_size = sizeof (struct res_lib_confdb_key_get),
  98. .response_id = MESSAGE_RES_CONFDB_KEY_GET,
  99. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  100. },
  101. { /* 5 */
  102. .lib_handler_fn = message_handler_req_lib_confdb_key_replace,
  103. .response_size = sizeof (mar_res_header_t),
  104. .response_id = MESSAGE_RES_CONFDB_KEY_REPLACE,
  105. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  106. },
  107. { /* 6 */
  108. .lib_handler_fn = message_handler_req_lib_confdb_key_delete,
  109. .response_size = sizeof (mar_res_header_t),
  110. .response_id = MESSAGE_RES_CONFDB_KEY_DELETE,
  111. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  112. },
  113. { /* 7 */
  114. .lib_handler_fn = message_handler_req_lib_confdb_object_iter,
  115. .response_size = sizeof (struct res_lib_confdb_object_iter),
  116. .response_id = MESSAGE_RES_CONFDB_OBJECT_ITER,
  117. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  118. },
  119. { /* 8 */
  120. .lib_handler_fn = message_handler_req_lib_confdb_object_parent_get,
  121. .response_size = sizeof (struct res_lib_confdb_object_parent_get),
  122. .response_id = MESSAGE_RES_CONFDB_OBJECT_PARENT_GET,
  123. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  124. },
  125. { /* 9 */
  126. .lib_handler_fn = message_handler_req_lib_confdb_key_iter,
  127. .response_size = sizeof (struct res_lib_confdb_key_iter),
  128. .response_id = MESSAGE_RES_CONFDB_KEY_ITER,
  129. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  130. },
  131. { /* 10 */
  132. .lib_handler_fn = message_handler_req_lib_confdb_track_start,
  133. .response_size = sizeof (mar_res_header_t),
  134. .response_id = MESSAGE_RES_CONFDB_TRACK_START,
  135. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  136. },
  137. { /* 11 */
  138. .lib_handler_fn = message_handler_req_lib_confdb_track_stop,
  139. .response_size = sizeof (mar_res_header_t),
  140. .response_id = MESSAGE_RES_CONFDB_TRACK_START,
  141. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  142. },
  143. { /* 12 */
  144. .lib_handler_fn = message_handler_req_lib_confdb_write,
  145. .response_size = sizeof (struct res_lib_confdb_write),
  146. .response_id = MESSAGE_RES_CONFDB_WRITE,
  147. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
  148. },
  149. };
  150. struct corosync_service_engine confdb_service_engine = {
  151. .name = "corosync cluster config database access v1.01",
  152. .id = CONFDB_SERVICE,
  153. .private_data_size = 0,
  154. .flow_control = COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED,
  155. .lib_init_fn = confdb_lib_init_fn,
  156. .lib_exit_fn = confdb_lib_exit_fn,
  157. .lib_engine = confdb_lib_engine,
  158. .lib_engine_count = sizeof (confdb_lib_engine) / sizeof (struct corosync_lib_handler),
  159. .exec_init_fn = confdb_exec_init_fn,
  160. };
  161. /*
  162. * Dynamic loader definition
  163. */
  164. static struct corosync_service_engine *confdb_get_service_engine_ver0 (void);
  165. static struct corosync_service_engine_iface_ver0 confdb_service_engine_iface = {
  166. .corosync_get_service_engine_ver0 = confdb_get_service_engine_ver0
  167. };
  168. static struct lcr_iface corosync_confdb_ver0[1] = {
  169. {
  170. .name = "corosync_confdb",
  171. .version = 0,
  172. .versions_replace = 0,
  173. .versions_replace_count = 0,
  174. .dependencies = 0,
  175. .dependency_count = 0,
  176. .constructor = NULL,
  177. .destructor = NULL,
  178. .interfaces = NULL
  179. }
  180. };
  181. static struct lcr_comp confdb_comp_ver0 = {
  182. .iface_count = 1,
  183. .ifaces = corosync_confdb_ver0
  184. };
  185. static struct corosync_service_engine *confdb_get_service_engine_ver0 (void)
  186. {
  187. return (&confdb_service_engine);
  188. }
  189. __attribute__ ((constructor)) static void confdb_comp_register (void) {
  190. lcr_interfaces_set (&corosync_confdb_ver0[0], &confdb_service_engine_iface);
  191. lcr_component_register (&confdb_comp_ver0);
  192. }
  193. static int confdb_exec_init_fn (
  194. struct corosync_api_v1 *corosync_api)
  195. {
  196. api = corosync_api;
  197. return 0;
  198. }
  199. static int confdb_lib_init_fn (void *conn)
  200. {
  201. log_printf(LOG_LEVEL_DEBUG, "lib_init_fn: conn=%p\n", conn);
  202. return (0);
  203. }
  204. static int confdb_lib_exit_fn (void *conn)
  205. {
  206. log_printf(LOG_LEVEL_DEBUG, "exit_fn for conn=%p\n", conn);
  207. return (0);
  208. }
  209. static void message_handler_req_lib_confdb_object_create (void *conn, void *message)
  210. {
  211. struct req_lib_confdb_object_create *req_lib_confdb_object_create = (struct req_lib_confdb_object_create *)message;
  212. struct res_lib_confdb_object_create res_lib_confdb_object_create;
  213. unsigned int object_handle;
  214. int ret = SA_AIS_OK;
  215. if (api->object_create(req_lib_confdb_object_create->parent_object_handle,
  216. &object_handle,
  217. req_lib_confdb_object_create->object_name.value,
  218. req_lib_confdb_object_create->object_name.length))
  219. ret = SA_AIS_ERR_ACCESS;
  220. res_lib_confdb_object_create.object_handle = object_handle;
  221. res_lib_confdb_object_create.header.size = sizeof(res_lib_confdb_object_create);
  222. res_lib_confdb_object_create.header.id = MESSAGE_RES_CONFDB_OBJECT_CREATE;
  223. res_lib_confdb_object_create.header.error = ret;
  224. api->ipc_conn_send_response(conn, &res_lib_confdb_object_create, sizeof(res_lib_confdb_object_create));
  225. }
  226. static void message_handler_req_lib_confdb_object_destroy (void *conn, void *message)
  227. {
  228. struct req_lib_confdb_object_destroy *req_lib_confdb_object_destroy = (struct req_lib_confdb_object_destroy *)message;
  229. mar_res_header_t res;
  230. int ret = SA_AIS_OK;
  231. if (api->object_destroy(req_lib_confdb_object_destroy->object_handle))
  232. ret = SA_AIS_ERR_ACCESS;
  233. res.size = sizeof(res);
  234. res.id = MESSAGE_RES_CONFDB_OBJECT_CREATE;
  235. res.error = ret;
  236. api->ipc_conn_send_response(conn, &res, sizeof(res));
  237. }
  238. static void message_handler_req_lib_confdb_key_create (void *conn, void *message)
  239. {
  240. struct req_lib_confdb_key_create *req_lib_confdb_key_create = (struct req_lib_confdb_key_create *)message;
  241. mar_res_header_t res;
  242. int ret = SA_AIS_OK;
  243. if (api->object_key_create(req_lib_confdb_key_create->object_handle,
  244. req_lib_confdb_key_create->key_name.value,
  245. req_lib_confdb_key_create->key_name.length,
  246. req_lib_confdb_key_create->value.value,
  247. req_lib_confdb_key_create->value.length))
  248. ret = SA_AIS_ERR_ACCESS;
  249. res.size = sizeof(res);
  250. res.id = MESSAGE_RES_CONFDB_KEY_CREATE;
  251. res.error = ret;
  252. api->ipc_conn_send_response(conn, &res, sizeof(res));
  253. }
  254. static void message_handler_req_lib_confdb_key_get (void *conn, void *message)
  255. {
  256. struct req_lib_confdb_key_get *req_lib_confdb_key_get = (struct req_lib_confdb_key_get *)message;
  257. struct res_lib_confdb_key_get res_lib_confdb_key_get;
  258. int value_len;
  259. void *value;
  260. int ret = SA_AIS_OK;
  261. if (api->object_key_get(req_lib_confdb_key_get->parent_object_handle,
  262. req_lib_confdb_key_get->key_name.value,
  263. req_lib_confdb_key_get->key_name.length,
  264. &value,
  265. &value_len))
  266. ret = SA_AIS_ERR_ACCESS;
  267. else {
  268. memcpy(res_lib_confdb_key_get.value.value, value, value_len);
  269. res_lib_confdb_key_get.value.length = value_len;
  270. }
  271. res_lib_confdb_key_get.header.size = sizeof(res_lib_confdb_key_get);
  272. res_lib_confdb_key_get.header.id = MESSAGE_RES_CONFDB_KEY_GET;
  273. res_lib_confdb_key_get.header.error = ret;
  274. api->ipc_conn_send_response(conn, &res_lib_confdb_key_get, sizeof(res_lib_confdb_key_get));
  275. }
  276. static void message_handler_req_lib_confdb_key_replace (void *conn, void *message)
  277. {
  278. struct req_lib_confdb_key_replace *req_lib_confdb_key_replace = (struct req_lib_confdb_key_replace *)message;
  279. mar_res_header_t res;
  280. int ret = SA_AIS_OK;
  281. if (api->object_key_replace(req_lib_confdb_key_replace->object_handle,
  282. req_lib_confdb_key_replace->key_name.value,
  283. req_lib_confdb_key_replace->key_name.length,
  284. req_lib_confdb_key_replace->old_value.value,
  285. req_lib_confdb_key_replace->old_value.length,
  286. req_lib_confdb_key_replace->new_value.value,
  287. req_lib_confdb_key_replace->new_value.length))
  288. ret = SA_AIS_ERR_ACCESS;
  289. res.size = sizeof(res);
  290. res.id = MESSAGE_RES_CONFDB_KEY_REPLACE;
  291. res.error = ret;
  292. api->ipc_conn_send_response(conn, &res, sizeof(res));
  293. }
  294. static void message_handler_req_lib_confdb_key_delete (void *conn, void *message)
  295. {
  296. struct req_lib_confdb_key_delete *req_lib_confdb_key_delete = (struct req_lib_confdb_key_delete *)message;
  297. mar_res_header_t res;
  298. int ret = SA_AIS_OK;
  299. if (api->object_key_delete(req_lib_confdb_key_delete->object_handle,
  300. req_lib_confdb_key_delete->key_name.value,
  301. req_lib_confdb_key_delete->key_name.length,
  302. req_lib_confdb_key_delete->value.value,
  303. req_lib_confdb_key_delete->value.length))
  304. ret = SA_AIS_ERR_ACCESS;
  305. res.size = sizeof(res);
  306. res.id = MESSAGE_RES_CONFDB_KEY_DELETE;
  307. res.error = ret;
  308. api->ipc_conn_send_response(conn, &res, sizeof(res));
  309. }
  310. static void message_handler_req_lib_confdb_object_parent_get (void *conn, void *message)
  311. {
  312. struct req_lib_confdb_object_parent_get *req_lib_confdb_object_parent_get = (struct req_lib_confdb_object_parent_get *)message;
  313. struct res_lib_confdb_object_parent_get res_lib_confdb_object_parent_get;
  314. unsigned int object_handle;
  315. int ret = SA_AIS_OK;
  316. if (api->object_parent_get(req_lib_confdb_object_parent_get->object_handle,
  317. &object_handle))
  318. ret = SA_AIS_ERR_ACCESS;
  319. res_lib_confdb_object_parent_get.parent_object_handle = object_handle;
  320. res_lib_confdb_object_parent_get.header.size = sizeof(res_lib_confdb_object_parent_get);
  321. res_lib_confdb_object_parent_get.header.id = MESSAGE_RES_CONFDB_OBJECT_CREATE;
  322. res_lib_confdb_object_parent_get.header.error = ret;
  323. api->ipc_conn_send_response(conn, &res_lib_confdb_object_parent_get, sizeof(res_lib_confdb_object_parent_get));
  324. }
  325. static void message_handler_req_lib_confdb_key_iter (void *conn, void *message)
  326. {
  327. struct req_lib_confdb_key_iter *req_lib_confdb_key_iter = (struct req_lib_confdb_key_iter *)message;
  328. struct res_lib_confdb_key_iter res_lib_confdb_key_iter;
  329. void *key_name;
  330. int key_name_len;
  331. void *value;
  332. int value_len;
  333. int ret = SA_AIS_OK;
  334. if (api->object_key_iter_from(req_lib_confdb_key_iter->parent_object_handle,
  335. req_lib_confdb_key_iter->next_entry,
  336. &key_name,
  337. &key_name_len,
  338. &value,
  339. &value_len))
  340. ret = SA_AIS_ERR_ACCESS;
  341. else {
  342. memcpy(res_lib_confdb_key_iter.key_name.value, key_name, key_name_len);
  343. memcpy(res_lib_confdb_key_iter.value.value, value, value_len);
  344. res_lib_confdb_key_iter.key_name.length = key_name_len;
  345. res_lib_confdb_key_iter.value.length = value_len;
  346. }
  347. res_lib_confdb_key_iter.header.size = sizeof(res_lib_confdb_key_iter);
  348. res_lib_confdb_key_iter.header.id = MESSAGE_RES_CONFDB_KEY_ITER;
  349. res_lib_confdb_key_iter.header.error = ret;
  350. api->ipc_conn_send_response(conn, &res_lib_confdb_key_iter, sizeof(res_lib_confdb_key_iter));
  351. }
  352. static void message_handler_req_lib_confdb_object_iter (void *conn, void *message)
  353. {
  354. struct req_lib_confdb_object_iter *req_lib_confdb_object_iter = (struct req_lib_confdb_object_iter *)message;
  355. struct res_lib_confdb_object_iter res_lib_confdb_object_iter;
  356. void *object_name;
  357. int object_name_len;
  358. int ret = SA_AIS_OK;
  359. if (api->object_iter_from(req_lib_confdb_object_iter->parent_object_handle,
  360. req_lib_confdb_object_iter->next_entry,
  361. &object_name,
  362. &object_name_len,
  363. &res_lib_confdb_object_iter.object_handle))
  364. ret = SA_AIS_ERR_ACCESS;
  365. else {
  366. res_lib_confdb_object_iter.object_name.length = object_name_len;
  367. memcpy(res_lib_confdb_object_iter.object_name.value, object_name, object_name_len);
  368. }
  369. res_lib_confdb_object_iter.header.size = sizeof(res_lib_confdb_object_iter);
  370. res_lib_confdb_object_iter.header.id = MESSAGE_RES_CONFDB_OBJECT_ITER;
  371. res_lib_confdb_object_iter.header.error = ret;
  372. api->ipc_conn_send_response(conn, &res_lib_confdb_object_iter, sizeof(res_lib_confdb_object_iter));
  373. }
  374. static void message_handler_req_lib_confdb_object_find (void *conn, void *message)
  375. {
  376. struct req_lib_confdb_object_find *req_lib_confdb_object_find = (struct req_lib_confdb_object_find *)message;
  377. struct res_lib_confdb_object_find res_lib_confdb_object_find;
  378. int ret = SA_AIS_OK;
  379. if (api->object_find_from(req_lib_confdb_object_find->parent_object_handle,
  380. req_lib_confdb_object_find->next_entry,
  381. req_lib_confdb_object_find->object_name.value,
  382. req_lib_confdb_object_find->object_name.length,
  383. &res_lib_confdb_object_find.object_handle,
  384. &res_lib_confdb_object_find.next_entry))
  385. ret = SA_AIS_ERR_ACCESS;
  386. res_lib_confdb_object_find.header.size = sizeof(res_lib_confdb_object_find);
  387. res_lib_confdb_object_find.header.id = MESSAGE_RES_CONFDB_OBJECT_FIND;
  388. res_lib_confdb_object_find.header.error = ret;
  389. api->ipc_conn_send_response(conn, &res_lib_confdb_object_find, sizeof(res_lib_confdb_object_find));
  390. }
  391. static void message_handler_req_lib_confdb_write (void *conn, void *message)
  392. {
  393. struct res_lib_confdb_write res_lib_confdb_write;
  394. int ret = SA_AIS_OK;
  395. char *error_string = NULL;
  396. if (api->object_write_config(&error_string))
  397. ret = SA_AIS_ERR_ACCESS;
  398. res_lib_confdb_write.header.size = sizeof(res_lib_confdb_write);
  399. res_lib_confdb_write.header.id = MESSAGE_RES_CONFDB_WRITE;
  400. res_lib_confdb_write.header.error = ret;
  401. if (error_string) {
  402. strcpy((char *)res_lib_confdb_write.error.value, error_string);
  403. res_lib_confdb_write.error.length = strlen(error_string) + 1;
  404. } else
  405. res_lib_confdb_write.error.length = 0;
  406. api->ipc_conn_send_response(conn, &res_lib_confdb_write, sizeof(res_lib_confdb_write));
  407. }
  408. /* TODO: when we have notification in the objdb. */
  409. static void message_handler_req_lib_confdb_track_start (void *conn, void *message)
  410. {
  411. mar_res_header_t res;
  412. res.size = sizeof(res);
  413. res.id = MESSAGE_RES_CONFDB_TRACK_START;
  414. res.error = SA_AIS_ERR_NOT_SUPPORTED;
  415. api->ipc_conn_send_response(conn, &res, sizeof(res));
  416. }
  417. static void message_handler_req_lib_confdb_track_stop (void *conn, void *message)
  418. {
  419. mar_res_header_t res;
  420. res.size = sizeof(res);
  421. res.id = MESSAGE_RES_CONFDB_TRACK_STOP;
  422. res.error = SA_AIS_ERR_NOT_SUPPORTED;
  423. api->ipc_conn_send_response(conn, &res, sizeof(res));
  424. }