api 394 daemons/controld/controld_execd_state.c lrmd_t *api = NULL; api 396 daemons/controld/controld_execd_state.c rc = lrmd__new(&api, NULL, NULL, 0); api 400 daemons/controld/controld_execd_state.c api->cmds->set_callback(api, lrm_op_callback); api 401 daemons/controld/controld_execd_state.c lrm_state->conn = api; api 600 daemons/controld/controld_execd_state.c lrmd_t *api = NULL; api 602 daemons/controld/controld_execd_state.c rc = lrmd__new(&api, lrm_state->node_name, server, port); api 609 daemons/controld/controld_execd_state.c lrm_state->conn = api; api 610 daemons/controld/controld_execd_state.c api->cmds->set_callback(api, remote_lrm_op_callback); api 611 daemons/controld/controld_execd_state.c lrmd_internal_set_proxy_callback(api, lrm_state, crmd_remote_proxy_cb); api 163 daemons/controld/controld_schedulerd.c scheduler_event_callback(pcmk_ipc_api_t *api, enum pcmk_ipc_event event_type, api 111 include/crm/common/ipc.h typedef void (*pcmk_ipc_callback_t)(pcmk_ipc_api_t *api, api 116 include/crm/common/ipc.h int pcmk_new_ipc_api(pcmk_ipc_api_t **api, enum pcmk_ipc_server server); api 118 include/crm/common/ipc.h void pcmk_free_ipc_api(pcmk_ipc_api_t *api); api 120 include/crm/common/ipc.h int pcmk_connect_ipc(pcmk_ipc_api_t *api, enum pcmk_ipc_dispatch dispatch_type); api 122 include/crm/common/ipc.h void pcmk_disconnect_ipc(pcmk_ipc_api_t *api); api 124 include/crm/common/ipc.h int pcmk_poll_ipc(const pcmk_ipc_api_t *api, int timeout_ms); api 126 include/crm/common/ipc.h void pcmk_dispatch_ipc(pcmk_ipc_api_t *api); api 128 include/crm/common/ipc.h void pcmk_register_ipc_callback(pcmk_ipc_api_t *api, pcmk_ipc_callback_t cb, api 131 include/crm/common/ipc.h const char *pcmk_ipc_name(const pcmk_ipc_api_t *api, bool for_log); api 133 include/crm/common/ipc.h bool pcmk_ipc_is_connected(pcmk_ipc_api_t *api); api 135 include/crm/common/ipc.h int pcmk_ipc_purge_node(pcmk_ipc_api_t *api, const char *node_name, api 69 include/crm/common/ipc_attrd_internal.h int pcmk__attrd_api_clear_failures(pcmk_ipc_api_t *api, const char *node, api 87 include/crm/common/ipc_attrd_internal.h int pcmk__attrd_api_delete(pcmk_ipc_api_t *api, const char *node, const char *name, api 105 include/crm/common/ipc_attrd_internal.h int pcmk__attrd_api_purge(pcmk_ipc_api_t *api, const char *node); api 122 include/crm/common/ipc_attrd_internal.h int pcmk__attrd_api_query(pcmk_ipc_api_t *api, const char *node, const char *name, api 140 include/crm/common/ipc_attrd_internal.h int pcmk__attrd_api_refresh(pcmk_ipc_api_t *api, const char *node); api 163 include/crm/common/ipc_attrd_internal.h int pcmk__attrd_api_update(pcmk_ipc_api_t *api, const char *node, const char *name, api 190 include/crm/common/ipc_attrd_internal.h int pcmk__attrd_api_update_list(pcmk_ipc_api_t *api, GList *attrs, api 91 include/crm/common/ipc_controld.h int pcmk_controld_api_reprobe(pcmk_ipc_api_t *api, const char *target_node, api 93 include/crm/common/ipc_controld.h int pcmk_controld_api_node_info(pcmk_ipc_api_t *api, uint32_t nodeid); api 94 include/crm/common/ipc_controld.h int pcmk_controld_api_fail(pcmk_ipc_api_t *api, const char *target_node, api 98 include/crm/common/ipc_controld.h int pcmk_controld_api_refresh(pcmk_ipc_api_t *api, const char *target_node, api 103 include/crm/common/ipc_controld.h int pcmk_controld_api_ping(pcmk_ipc_api_t *api, const char *node_name); api 104 include/crm/common/ipc_controld.h int pcmk_controld_api_list_nodes(pcmk_ipc_api_t *api); api 105 include/crm/common/ipc_controld.h unsigned int pcmk_controld_api_replies_expected(const pcmk_ipc_api_t *api); api 101 include/crm/common/ipc_internal.h int pcmk__connect_ipc(pcmk_ipc_api_t *api, enum pcmk_ipc_dispatch dispatch_type, api 67 include/crm/common/ipc_pacemakerd.h int pcmk_pacemakerd_api_ping(pcmk_ipc_api_t *api, const char *ipc_name); api 68 include/crm/common/ipc_pacemakerd.h int pcmk_pacemakerd_api_shutdown(pcmk_ipc_api_t *api, const char *ipc_name); api 58 include/crm/common/ipc_schedulerd.h int pcmk_schedulerd_api_graph(pcmk_ipc_api_t *api, xmlNode *cib, char **ref); api 22 include/crm/lrmd_internal.h int lrmd__new(lrmd_t **api, const char *nodename, const char *server, int port); api 147 lib/common/crmcommon_private.h int (*new_data)(pcmk_ipc_api_t *api); api 171 lib/common/crmcommon_private.h int (*post_connect)(pcmk_ipc_api_t *api); api 182 lib/common/crmcommon_private.h bool (*reply_expected)(pcmk_ipc_api_t *api, const xmlNode *request); api 193 lib/common/crmcommon_private.h bool (*dispatch)(pcmk_ipc_api_t *api, xmlNode *msg); api 201 lib/common/crmcommon_private.h void (*post_disconnect)(pcmk_ipc_api_t *api); api 227 lib/common/crmcommon_private.h int pcmk__send_ipc_request(pcmk_ipc_api_t *api, const xmlNode *request); api 230 lib/common/crmcommon_private.h void pcmk__call_ipc_callback(pcmk_ipc_api_t *api, api 47 lib/common/ipc_attrd.c reply_expected(pcmk_ipc_api_t *api, const xmlNode *request) api 62 lib/common/ipc_attrd.c dispatch(pcmk_ipc_api_t *api, xmlNode *reply) api 106 lib/common/ipc_attrd.c pcmk__call_ipc_callback(api, pcmk_ipc_event_reply, status, &reply_data); api 152 lib/common/ipc_attrd.c create_api(pcmk_ipc_api_t **api) api 154 lib/common/ipc_attrd.c int rc = pcmk_new_ipc_api(api, pcmk_ipc_attrd); api 164 lib/common/ipc_attrd.c destroy_api(pcmk_ipc_api_t *api) api 166 lib/common/ipc_attrd.c pcmk_disconnect_ipc(api); api 167 lib/common/ipc_attrd.c pcmk_free_ipc_api(api); api 168 lib/common/ipc_attrd.c api = NULL; api 172 lib/common/ipc_attrd.c connect_and_send_attrd_request(pcmk_ipc_api_t *api, const xmlNode *request) api 176 lib/common/ipc_attrd.c rc = pcmk__connect_ipc(api, pcmk_ipc_dispatch_sync, 5); api 179 lib/common/ipc_attrd.c pcmk_ipc_name(api, true), pcmk_rc_str(rc)); api 183 lib/common/ipc_attrd.c rc = pcmk__send_ipc_request(api, request); api 186 lib/common/ipc_attrd.c pcmk_ipc_name(api, true), pcmk_rc_str(rc)); api 194 lib/common/ipc_attrd.c send_attrd_request(pcmk_ipc_api_t *api, const xmlNode *request) api 196 lib/common/ipc_attrd.c return pcmk__send_ipc_request(api, request); api 200 lib/common/ipc_attrd.c pcmk__attrd_api_clear_failures(pcmk_ipc_api_t *api, const char *node, api 223 lib/common/ipc_attrd.c if (api == NULL) { api 224 lib/common/ipc_attrd.c rc = create_api(&api); api 229 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 230 lib/common/ipc_attrd.c destroy_api(api); api 232 lib/common/ipc_attrd.c } else if (!pcmk_ipc_is_connected(api)) { api 233 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 236 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 257 lib/common/ipc_attrd.c pcmk__attrd_api_delete(pcmk_ipc_api_t *api, const char *node, const char *name, api 276 lib/common/ipc_attrd.c return pcmk__attrd_api_update(api, node, name, NULL, NULL, NULL, NULL, options); api 280 lib/common/ipc_attrd.c pcmk__attrd_api_purge(pcmk_ipc_api_t *api, const char *node) api 296 lib/common/ipc_attrd.c if (api == NULL) { api 297 lib/common/ipc_attrd.c rc = create_api(&api); api 302 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 303 lib/common/ipc_attrd.c destroy_api(api); api 305 lib/common/ipc_attrd.c } else if (!pcmk_ipc_is_connected(api)) { api 306 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 309 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 321 lib/common/ipc_attrd.c pcmk__attrd_api_query(pcmk_ipc_api_t *api, const char *node, const char *name, api 348 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 363 lib/common/ipc_attrd.c pcmk__attrd_api_refresh(pcmk_ipc_api_t *api, const char *node) api 379 lib/common/ipc_attrd.c if (api == NULL) { api 380 lib/common/ipc_attrd.c rc = create_api(&api); api 385 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 386 lib/common/ipc_attrd.c destroy_api(api); api 388 lib/common/ipc_attrd.c } else if (!pcmk_ipc_is_connected(api)) { api 389 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 392 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 450 lib/common/ipc_attrd.c pcmk__attrd_api_update(pcmk_ipc_api_t *api, const char *node, const char *name, api 472 lib/common/ipc_attrd.c if (api == NULL) { api 473 lib/common/ipc_attrd.c rc = create_api(&api); api 478 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 479 lib/common/ipc_attrd.c destroy_api(api); api 481 lib/common/ipc_attrd.c } else if (!pcmk_ipc_is_connected(api)) { api 482 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 485 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 497 lib/common/ipc_attrd.c pcmk__attrd_api_update_list(pcmk_ipc_api_t *api, GList *attrs, const char *dampen, api 558 lib/common/ipc_attrd.c rc = pcmk__attrd_api_update(api, pair->node, pair->name, pair->value, api 569 lib/common/ipc_attrd.c if (api == NULL) { api 570 lib/common/ipc_attrd.c rc = create_api(&api); api 578 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 582 lib/common/ipc_attrd.c destroy_api(api); api 51 lib/common/ipc_client.c pcmk_new_ipc_api(pcmk_ipc_api_t **api, enum pcmk_ipc_server server) api 53 lib/common/ipc_client.c if (api == NULL) { api 57 lib/common/ipc_client.c *api = calloc(1, sizeof(pcmk_ipc_api_t)); api 58 lib/common/ipc_client.c if (*api == NULL) { api 62 lib/common/ipc_client.c (*api)->server = server; api 63 lib/common/ipc_client.c if (pcmk_ipc_name(*api, false) == NULL) { api 64 lib/common/ipc_client.c pcmk_free_ipc_api(*api); api 65 lib/common/ipc_client.c *api = NULL; api 69 lib/common/ipc_client.c (*api)->ipc_size_max = 0; api 74 lib/common/ipc_client.c (*api)->cmds = pcmk__attrd_api_methods(); api 78 lib/common/ipc_client.c (*api)->ipc_size_max = 512 * 1024; // 512KB api 82 lib/common/ipc_client.c (*api)->cmds = pcmk__controld_api_methods(); api 92 lib/common/ipc_client.c (*api)->cmds = pcmk__pacemakerd_api_methods(); api 96 lib/common/ipc_client.c (*api)->cmds = pcmk__schedulerd_api_methods(); api 98 lib/common/ipc_client.c (*api)->ipc_size_max = 5 * 1024 * 1024; // 5MB api 101 lib/common/ipc_client.c if ((*api)->cmds == NULL) { api 102 lib/common/ipc_client.c pcmk_free_ipc_api(*api); api 103 lib/common/ipc_client.c *api = NULL; api 107 lib/common/ipc_client.c (*api)->ipc = crm_ipc_new(pcmk_ipc_name(*api, false), api 108 lib/common/ipc_client.c (*api)->ipc_size_max); api 109 lib/common/ipc_client.c if ((*api)->ipc == NULL) { api 110 lib/common/ipc_client.c pcmk_free_ipc_api(*api); api 111 lib/common/ipc_client.c *api = NULL; api 116 lib/common/ipc_client.c if ((*api)->cmds->new_data != NULL) { api 117 lib/common/ipc_client.c if ((*api)->cmds->new_data(*api) != pcmk_rc_ok) { api 118 lib/common/ipc_client.c pcmk_free_ipc_api(*api); api 119 lib/common/ipc_client.c *api = NULL; api 123 lib/common/ipc_client.c crm_trace("Created %s API IPC object", pcmk_ipc_name(*api, true)); api 128 lib/common/ipc_client.c free_daemon_specific_data(pcmk_ipc_api_t *api) api 130 lib/common/ipc_client.c if ((api != NULL) && (api->cmds != NULL)) { api 131 lib/common/ipc_client.c if ((api->cmds->free_data != NULL) && (api->api_data != NULL)) { api 132 lib/common/ipc_client.c api->cmds->free_data(api->api_data); api 133 lib/common/ipc_client.c api->api_data = NULL; api 135 lib/common/ipc_client.c free(api->cmds); api 136 lib/common/ipc_client.c api->cmds = NULL; api 150 lib/common/ipc_client.c pcmk__call_ipc_callback(pcmk_ipc_api_t *api, enum pcmk_ipc_event event_type, api 153 lib/common/ipc_client.c if ((api != NULL) && (api->cb != NULL)) { api 154 lib/common/ipc_client.c api->cb(api, event_type, status, event_data, api->user_data); api 169 lib/common/ipc_client.c pcmk_ipc_api_t *api = user_data; api 171 lib/common/ipc_client.c crm_info("Disconnected from %s", pcmk_ipc_name(api, true)); api 174 lib/common/ipc_client.c if ((api->cmds != NULL) && (api->cmds->post_disconnect != NULL)) { api 175 lib/common/ipc_client.c api->cmds->post_disconnect(api); api 179 lib/common/ipc_client.c pcmk__call_ipc_callback(api, pcmk_ipc_event_disconnect, CRM_EX_DISCONNECT, api 187 lib/common/ipc_client.c api->ipc = NULL; api 188 lib/common/ipc_client.c api->mainloop_io = NULL; api 190 lib/common/ipc_client.c if (api->free_on_disconnect) { api 194 lib/common/ipc_client.c free_daemon_specific_data(api); api 196 lib/common/ipc_client.c free(api); api 206 lib/common/ipc_client.c pcmk_free_ipc_api(pcmk_ipc_api_t *api) api 210 lib/common/ipc_client.c if (api == NULL) { api 213 lib/common/ipc_client.c crm_debug("Releasing %s IPC API", pcmk_ipc_name(api, true)); api 215 lib/common/ipc_client.c if (api->ipc != NULL) { api 216 lib/common/ipc_client.c if (api->mainloop_io != NULL) { api 226 lib/common/ipc_client.c free_on_disconnect = api->free_on_disconnect = true; api 228 lib/common/ipc_client.c pcmk_disconnect_ipc(api); // Frees api if free_on_disconnect is true api 231 lib/common/ipc_client.c free_daemon_specific_data(api); api 233 lib/common/ipc_client.c free(api); api 247 lib/common/ipc_client.c pcmk_ipc_name(const pcmk_ipc_api_t *api, bool for_log) api 249 lib/common/ipc_client.c if (api == NULL) { api 252 lib/common/ipc_client.c switch (api->server) { api 287 lib/common/ipc_client.c pcmk_ipc_is_connected(pcmk_ipc_api_t *api) api 289 lib/common/ipc_client.c return (api != NULL) && crm_ipc_connected(api->ipc); api 304 lib/common/ipc_client.c call_api_dispatch(pcmk_ipc_api_t *api, xmlNode *message) api 307 lib/common/ipc_client.c if ((api->cmds != NULL) && (api->cmds->dispatch != NULL)) { api 308 lib/common/ipc_client.c return api->cmds->dispatch(api, message); api 330 lib/common/ipc_client.c dispatch_ipc_data(const char *buffer, pcmk_ipc_api_t *api) api 337 lib/common/ipc_client.c pcmk_ipc_name(api, true)); api 344 lib/common/ipc_client.c pcmk_ipc_name(api, true)); api 348 lib/common/ipc_client.c more = call_api_dispatch(api, msg); api 373 lib/common/ipc_client.c pcmk_ipc_api_t *api = user_data; api 375 lib/common/ipc_client.c CRM_CHECK(api != NULL, return 0); api 376 lib/common/ipc_client.c dispatch_ipc_data(buffer, api); api 399 lib/common/ipc_client.c pcmk_poll_ipc(const pcmk_ipc_api_t *api, int timeout_ms) api 404 lib/common/ipc_client.c if ((api == NULL) || (api->dispatch_type != pcmk_ipc_dispatch_poll)) { api 408 lib/common/ipc_client.c rc = pcmk__ipc_fd(api->ipc, &(pollfd.fd)); api 411 lib/common/ipc_client.c pcmk_ipc_name(api, true), pcmk_rc_str(rc)); api 439 lib/common/ipc_client.c pcmk_dispatch_ipc(pcmk_ipc_api_t *api) api 441 lib/common/ipc_client.c if (api == NULL) { api 444 lib/common/ipc_client.c while (crm_ipc_ready(api->ipc) > 0) { api 445 lib/common/ipc_client.c if (crm_ipc_read(api->ipc) > 0) { api 446 lib/common/ipc_client.c dispatch_ipc_data(crm_ipc_buffer(api->ipc), api); api 453 lib/common/ipc_client.c connect_with_main_loop(pcmk_ipc_api_t *api) api 462 lib/common/ipc_client.c rc = pcmk__add_mainloop_ipc(api->ipc, G_PRIORITY_DEFAULT, api, api 463 lib/common/ipc_client.c &callbacks, &(api->mainloop_io)); api 468 lib/common/ipc_client.c pcmk_ipc_name(api, true)); api 477 lib/common/ipc_client.c connect_without_main_loop(pcmk_ipc_api_t *api) api 479 lib/common/ipc_client.c int rc = pcmk__connect_generic_ipc(api->ipc); api 482 lib/common/ipc_client.c crm_ipc_close(api->ipc); api 485 lib/common/ipc_client.c pcmk_ipc_name(api, true)); api 501 lib/common/ipc_client.c pcmk__connect_ipc(pcmk_ipc_api_t *api, enum pcmk_ipc_dispatch dispatch_type, api 506 lib/common/ipc_client.c if ((api == NULL) || (attempts < 1)) { api 510 lib/common/ipc_client.c if (api->ipc == NULL) { api 511 lib/common/ipc_client.c api->ipc = crm_ipc_new(pcmk_ipc_name(api, false), api->ipc_size_max); api 512 lib/common/ipc_client.c if (api->ipc == NULL) { api 517 lib/common/ipc_client.c if (crm_ipc_connected(api->ipc)) { api 518 lib/common/ipc_client.c crm_trace("Already connected to %s", pcmk_ipc_name(api, true)); api 522 lib/common/ipc_client.c api->dispatch_type = dispatch_type; api 525 lib/common/ipc_client.c pcmk_ipc_name(api, true), attempts, pcmk__plural_s(attempts)); api 529 lib/common/ipc_client.c rc = connect_with_main_loop(api); api 534 lib/common/ipc_client.c rc = connect_without_main_loop(api); api 545 lib/common/ipc_client.c pcmk_ipc_name(api, true), remaining, api 553 lib/common/ipc_client.c if ((api->cmds != NULL) && (api->cmds->post_connect != NULL)) { api 554 lib/common/ipc_client.c rc = api->cmds->post_connect(api); api 556 lib/common/ipc_client.c crm_ipc_close(api->ipc); api 571 lib/common/ipc_client.c pcmk_connect_ipc(pcmk_ipc_api_t *api, enum pcmk_ipc_dispatch dispatch_type) api 573 lib/common/ipc_client.c int rc = pcmk__connect_ipc(api, dispatch_type, 2); api 577 lib/common/ipc_client.c pcmk_ipc_name(api, true), pcmk_rc_str(rc)); api 594 lib/common/ipc_client.c pcmk_disconnect_ipc(pcmk_ipc_api_t *api) api 596 lib/common/ipc_client.c if ((api == NULL) || (api->ipc == NULL)) { api 599 lib/common/ipc_client.c switch (api->dispatch_type) { api 602 lib/common/ipc_client.c mainloop_io_t *mainloop_io = api->mainloop_io; api 605 lib/common/ipc_client.c api->mainloop_io = NULL; api 606 lib/common/ipc_client.c api->ipc = NULL; api 616 lib/common/ipc_client.c crm_ipc_t *ipc = api->ipc; api 619 lib/common/ipc_client.c api->ipc = NULL; api 622 lib/common/ipc_client.c api->free_on_disconnect = false; api 626 lib/common/ipc_client.c ipc_post_disconnect(api); api 645 lib/common/ipc_client.c pcmk_register_ipc_callback(pcmk_ipc_api_t *api, pcmk_ipc_callback_t cb, api 648 lib/common/ipc_client.c if (api == NULL) { api 651 lib/common/ipc_client.c api->cb = cb; api 652 lib/common/ipc_client.c api->user_data = user_data; api 668 lib/common/ipc_client.c pcmk__send_ipc_request(pcmk_ipc_api_t *api, const xmlNode *request) api 674 lib/common/ipc_client.c if ((api == NULL) || (api->ipc == NULL) || (request == NULL)) { api 680 lib/common/ipc_client.c if ((api->dispatch_type == pcmk_ipc_dispatch_sync) api 681 lib/common/ipc_client.c && (api->cmds != NULL) api 682 lib/common/ipc_client.c && (api->cmds->reply_expected != NULL) api 683 lib/common/ipc_client.c && (api->cmds->reply_expected(api, request))) { api 688 lib/common/ipc_client.c rc = crm_ipc_send(api->ipc, request, flags, 0, &reply); api 698 lib/common/ipc_client.c bool more = call_api_dispatch(api, reply); api 703 lib/common/ipc_client.c rc = crm_ipc_read(api->ipc); api 713 lib/common/ipc_client.c rc = dispatch_ipc_data(crm_ipc_buffer(api->ipc), api); api 750 lib/common/ipc_client.c create_purge_node_request(const pcmk_ipc_api_t *api, const char *node_name, api 756 lib/common/ipc_client.c switch (api->server) { api 769 lib/common/ipc_client.c pcmk_ipc_name(api, false), client, NULL); api 796 lib/common/ipc_client.c pcmk_ipc_purge_node(pcmk_ipc_api_t *api, const char *node_name, uint32_t nodeid) api 801 lib/common/ipc_client.c if (api == NULL) { api 808 lib/common/ipc_client.c request = create_purge_node_request(api, node_name, nodeid); api 812 lib/common/ipc_client.c rc = pcmk__send_ipc_request(api, request); api 816 lib/common/ipc_client.c pcmk_ipc_name(api, true), node_name, (unsigned long) nodeid, rc); api 59 lib/common/ipc_controld.c new_data(pcmk_ipc_api_t *api) api 63 lib/common/ipc_controld.c api->api_data = calloc(1, sizeof(struct controld_api_private_s)); api 65 lib/common/ipc_controld.c if (api->api_data == NULL) { api 69 lib/common/ipc_controld.c private = api->api_data; api 95 lib/common/ipc_controld.c post_connect(pcmk_ipc_api_t *api) api 100 lib/common/ipc_controld.c struct controld_api_private_s *private = api->api_data; api 108 lib/common/ipc_controld.c rc = pcmk__send_ipc_request(api, hello); api 112 lib/common/ipc_controld.c pcmk_ipc_name(api, true), pcmk_rc_str(rc), rc); api 114 lib/common/ipc_controld.c crm_debug("Sent IPC hello to %s", pcmk_ipc_name(api, true)); api 178 lib/common/ipc_controld.c reply_expected(pcmk_ipc_api_t *api, const xmlNode *request) api 193 lib/common/ipc_controld.c dispatch(pcmk_ipc_api_t *api, xmlNode *reply) api 195 lib/common/ipc_controld.c struct controld_api_private_s *private = api->api_data; api 273 lib/common/ipc_controld.c pcmk__call_ipc_callback(api, pcmk_ipc_event_reply, status, &reply_data); api 310 lib/common/ipc_controld.c create_controller_request(const pcmk_ipc_api_t *api, const char *op, api 316 lib/common/ipc_controld.c if (api == NULL) { api 319 lib/common/ipc_controld.c private = api->api_data; api 332 lib/common/ipc_controld.c send_controller_request(pcmk_ipc_api_t *api, const xmlNode *request, api 339 lib/common/ipc_controld.c struct controld_api_private_s *private = api->api_data; api 343 lib/common/ipc_controld.c return pcmk__send_ipc_request(api, request); api 370 lib/common/ipc_controld.c pcmk_controld_api_reprobe(pcmk_ipc_api_t *api, const char *target_node, api 377 lib/common/ipc_controld.c if (api == NULL) { api 384 lib/common/ipc_controld.c pcmk_ipc_name(api, true), pcmk__s(target_node, "local node"), api 387 lib/common/ipc_controld.c request = create_controller_request(api, CRM_OP_REPROBE, router_node, api 389 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 405 lib/common/ipc_controld.c pcmk_controld_api_node_info(pcmk_ipc_api_t *api, uint32_t nodeid) api 410 lib/common/ipc_controld.c request = create_controller_request(api, CRM_OP_NODE_INFO, NULL, NULL); api 418 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 433 lib/common/ipc_controld.c pcmk_controld_api_ping(pcmk_ipc_api_t *api, const char *node_name) api 438 lib/common/ipc_controld.c request = create_controller_request(api, CRM_OP_PING, node_name, NULL); api 442 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 456 lib/common/ipc_controld.c pcmk_controld_api_list_nodes(pcmk_ipc_api_t *api) api 461 lib/common/ipc_controld.c request = create_controller_request(api, PCMK__CONTROLD_CMD_NODES, NULL, api 464 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 472 lib/common/ipc_controld.c controller_resource_op(pcmk_ipc_api_t *api, const char *op, api 482 lib/common/ipc_controld.c if (api == NULL) { api 525 lib/common/ipc_controld.c request = create_controller_request(api, op, router_node, msg_data); api 526 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 548 lib/common/ipc_controld.c pcmk_controld_api_fail(pcmk_ipc_api_t *api, api 555 lib/common/ipc_controld.c pcmk_ipc_name(api, true), pcmk__s(rsc_id, "unknown resource"), api 559 lib/common/ipc_controld.c return controller_resource_op(api, CRM_OP_LRM_FAIL, target_node, api 581 lib/common/ipc_controld.c pcmk_controld_api_refresh(pcmk_ipc_api_t *api, const char *target_node, api 588 lib/common/ipc_controld.c pcmk_ipc_name(api, true), pcmk__s(rsc_id, "unknown resource"), api 592 lib/common/ipc_controld.c return controller_resource_op(api, CRM_OP_LRM_DELETE, target_node, api 605 lib/common/ipc_controld.c pcmk_controld_api_replies_expected(const pcmk_ipc_api_t *api) api 607 lib/common/ipc_controld.c struct controld_api_private_s *private = api->api_data; api 124 lib/common/ipc_pacemakerd.c new_data(pcmk_ipc_api_t *api) api 128 lib/common/ipc_pacemakerd.c api->api_data = calloc(1, sizeof(struct pacemakerd_api_private_s)); api 130 lib/common/ipc_pacemakerd.c if (api->api_data == NULL) { api 134 lib/common/ipc_pacemakerd.c private = api->api_data; api 153 lib/common/ipc_pacemakerd.c post_connect(pcmk_ipc_api_t *api) api 157 lib/common/ipc_pacemakerd.c if (api->api_data == NULL) { api 160 lib/common/ipc_pacemakerd.c private = api->api_data; api 167 lib/common/ipc_pacemakerd.c post_disconnect(pcmk_ipc_api_t *api) api 171 lib/common/ipc_pacemakerd.c if (api->api_data == NULL) { api 174 lib/common/ipc_pacemakerd.c private = api->api_data; api 181 lib/common/ipc_pacemakerd.c reply_expected(pcmk_ipc_api_t *api, const xmlNode *request) api 194 lib/common/ipc_pacemakerd.c dispatch(pcmk_ipc_api_t *api, xmlNode *reply) api 254 lib/common/ipc_pacemakerd.c pcmk__call_ipc_callback(api, pcmk_ipc_event_reply, status, &reply_data); api 275 lib/common/ipc_pacemakerd.c do_pacemakerd_api_call(pcmk_ipc_api_t *api, const char *ipc_name, const char *task) api 281 lib/common/ipc_pacemakerd.c if (api == NULL) { api 285 lib/common/ipc_pacemakerd.c private = api->api_data; api 293 lib/common/ipc_pacemakerd.c rc = pcmk__send_ipc_request(api, cmd); api 307 lib/common/ipc_pacemakerd.c pcmk_pacemakerd_api_ping(pcmk_ipc_api_t *api, const char *ipc_name) api 309 lib/common/ipc_pacemakerd.c return do_pacemakerd_api_call(api, ipc_name, CRM_OP_PING); api 313 lib/common/ipc_pacemakerd.c pcmk_pacemakerd_api_shutdown(pcmk_ipc_api_t *api, const char *ipc_name) api 315 lib/common/ipc_pacemakerd.c return do_pacemakerd_api_call(api, ipc_name, CRM_OP_QUIT); api 29 lib/common/ipc_schedulerd.c new_data(pcmk_ipc_api_t *api) api 33 lib/common/ipc_schedulerd.c api->api_data = calloc(1, sizeof(struct schedulerd_api_private_s)); api 35 lib/common/ipc_schedulerd.c if (api->api_data == NULL) { api 39 lib/common/ipc_schedulerd.c private = api->api_data; api 55 lib/common/ipc_schedulerd.c post_connect(pcmk_ipc_api_t *api) api 57 lib/common/ipc_schedulerd.c if (api->api_data == NULL) { api 65 lib/common/ipc_schedulerd.c reply_expected(pcmk_ipc_api_t *api, const xmlNode *request) api 78 lib/common/ipc_schedulerd.c dispatch(pcmk_ipc_api_t *api, xmlNode *reply) api 123 lib/common/ipc_schedulerd.c pcmk__call_ipc_callback(api, pcmk_ipc_event_reply, status, &reply_data); api 143 lib/common/ipc_schedulerd.c do_schedulerd_api_call(pcmk_ipc_api_t *api, const char *task, xmlNode *cib, char **ref) api 149 lib/common/ipc_schedulerd.c if (!pcmk_ipc_is_connected(api)) { api 153 lib/common/ipc_schedulerd.c private = api->api_data; api 161 lib/common/ipc_schedulerd.c rc = pcmk__send_ipc_request(api, cmd); api 177 lib/common/ipc_schedulerd.c pcmk_schedulerd_api_graph(pcmk_ipc_api_t *api, xmlNode *cib, char **ref) api 179 lib/common/ipc_schedulerd.c return do_schedulerd_api_call(api, CRM_OP_PECALC, cib, ref); api 2247 lib/lrmd/lrmd_client.c lrmd__new(lrmd_t **api, const char *nodename, const char *server, int port) api 2251 lib/lrmd/lrmd_client.c if (api == NULL) { api 2254 lib/lrmd/lrmd_client.c *api = NULL; api 2258 lib/lrmd/lrmd_client.c *api = calloc(1, sizeof(lrmd_t)); api 2259 lib/lrmd/lrmd_client.c if (*api == NULL) { api 2265 lib/lrmd/lrmd_client.c lrmd_api_delete(*api); api 2266 lib/lrmd/lrmd_client.c *api = NULL; api 2269 lib/lrmd/lrmd_client.c (*api)->lrmd_private = pvt; api 2274 lib/lrmd/lrmd_client.c (*api)->cmds = calloc(1, sizeof(lrmd_api_operations_t)); api 2276 lib/lrmd/lrmd_client.c if ((pvt->remote == NULL) || ((*api)->cmds == NULL)) { api 2277 lib/lrmd/lrmd_client.c lrmd_api_delete(*api); api 2278 lib/lrmd/lrmd_client.c *api = NULL; api 2283 lib/lrmd/lrmd_client.c (*api)->cmds->connect = lrmd_api_connect; api 2284 lib/lrmd/lrmd_client.c (*api)->cmds->connect_async = lrmd_api_connect_async; api 2285 lib/lrmd/lrmd_client.c (*api)->cmds->is_connected = lrmd_api_is_connected; api 2286 lib/lrmd/lrmd_client.c (*api)->cmds->poke_connection = lrmd_api_poke_connection; api 2287 lib/lrmd/lrmd_client.c (*api)->cmds->disconnect = lrmd_api_disconnect; api 2288 lib/lrmd/lrmd_client.c (*api)->cmds->register_rsc = lrmd_api_register_rsc; api 2289 lib/lrmd/lrmd_client.c (*api)->cmds->unregister_rsc = lrmd_api_unregister_rsc; api 2290 lib/lrmd/lrmd_client.c (*api)->cmds->get_rsc_info = lrmd_api_get_rsc_info; api 2291 lib/lrmd/lrmd_client.c (*api)->cmds->get_recurring_ops = lrmd_api_get_recurring_ops; api 2292 lib/lrmd/lrmd_client.c (*api)->cmds->set_callback = lrmd_api_set_callback; api 2293 lib/lrmd/lrmd_client.c (*api)->cmds->get_metadata = lrmd_api_get_metadata; api 2294 lib/lrmd/lrmd_client.c (*api)->cmds->exec = lrmd_api_exec; api 2295 lib/lrmd/lrmd_client.c (*api)->cmds->cancel = lrmd_api_cancel; api 2296 lib/lrmd/lrmd_client.c (*api)->cmds->list_agents = lrmd_api_list_agents; api 2297 lib/lrmd/lrmd_client.c (*api)->cmds->list_ocf_providers = lrmd_api_list_ocf_providers; api 2298 lib/lrmd/lrmd_client.c (*api)->cmds->list_standards = lrmd_api_list_standards; api 2299 lib/lrmd/lrmd_client.c (*api)->cmds->exec_alert = lrmd_api_exec_alert; api 2300 lib/lrmd/lrmd_client.c (*api)->cmds->get_metadata_params = lrmd_api_get_metadata_params; api 2315 lib/lrmd/lrmd_client.c lrmd_api_delete(*api); api 2316 lib/lrmd/lrmd_client.c *api = NULL; api 2326 lib/lrmd/lrmd_client.c lrmd_api_delete(*api); api 2327 lib/lrmd/lrmd_client.c *api = NULL; api 2337 lib/lrmd/lrmd_client.c lrmd_t *api = NULL; api 2339 lib/lrmd/lrmd_client.c CRM_ASSERT(lrmd__new(&api, NULL, NULL, 0) == pcmk_rc_ok); api 2340 lib/lrmd/lrmd_client.c return api; api 2346 lib/lrmd/lrmd_client.c lrmd_t *api = NULL; api 2348 lib/lrmd/lrmd_client.c CRM_ASSERT(lrmd__new(&api, nodename, server, port) == pcmk_rc_ok); api 2349 lib/lrmd/lrmd_client.c return api; api 64 lib/pacemaker/pcmk_cluster_queries.c validate_reply_event(data_t *data, const pcmk_ipc_api_t *api, api 76 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true)); api 88 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true), crm_exit_str(status)); api 109 lib/pacemaker/pcmk_cluster_queries.c validate_controld_reply(data_t *data, const pcmk_ipc_api_t *api, api 118 lib/pacemaker/pcmk_cluster_queries.c rc = validate_reply_event(data, api, event_type, status); api 150 lib/pacemaker/pcmk_cluster_queries.c validate_pcmkd_reply(data_t *data, const pcmk_ipc_api_t *api, api 157 lib/pacemaker/pcmk_cluster_queries.c int rc = validate_reply_event(data, api, event_type, status); api 350 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_api_t *api = NULL; api 352 lib/pacemaker/pcmk_cluster_queries.c rc = pcmk_new_ipc_api(&api, server); api 353 lib/pacemaker/pcmk_cluster_queries.c if (api == NULL) { api 355 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true), api 361 lib/pacemaker/pcmk_cluster_queries.c pcmk_register_ipc_callback(api, cb, data); api 364 lib/pacemaker/pcmk_cluster_queries.c rc = pcmk__connect_ipc(api, dispatch_type, 5); api 374 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true)); api 378 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true), pcmk_rc_str(rc)); api 382 lib/pacemaker/pcmk_cluster_queries.c pcmk_free_ipc_api(api); api 386 lib/pacemaker/pcmk_cluster_queries.c return api; api 401 lib/pacemaker/pcmk_cluster_queries.c poll_until_reply(data_t *data, pcmk_ipc_api_t *api, const char *on_node) api 411 lib/pacemaker/pcmk_cluster_queries.c int rc = pcmk_poll_ipc(api, remaining_ms); api 420 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true), (on_node != NULL)? " on " : "", api 426 lib/pacemaker/pcmk_cluster_queries.c pcmk_dispatch_ipc(api); api 439 lib/pacemaker/pcmk_cluster_queries.c data->message_timeout_ms, pcmk_ipc_name(api, true), api 568 maint/gnulib/lib/parse-datetime.y %define api.pure api 629 tools/crm_node.c pcmk_ipc_api_t *api = NULL; api 632 tools/crm_node.c rc = pcmk_new_ipc_api(&api, server); api 637 tools/crm_node.c rc = pcmk__connect_ipc(api, pcmk_ipc_dispatch_sync, 5); api 642 tools/crm_node.c rc = pcmk_ipc_purge_node(api, node_name, node_id); api 647 tools/crm_node.c pcmk__s(node_name, "by ID"), pcmk_ipc_name(api, true), api 650 tools/crm_node.c pcmk_free_ipc_api(api); api 265 tools/crm_resource.c controller_event_callback(pcmk_ipc_api_t *api, enum pcmk_ipc_event event_type, api 280 tools/crm_resource.c pcmk_disconnect_ipc(api); api 283 tools/crm_resource.c if ((pcmk_controld_api_replies_expected(api) == 0) api 287 tools/crm_resource.c pcmk_disconnect_ipc(api);