api 395 daemons/controld/controld_execd_state.c lrmd_t *api = NULL; api 397 daemons/controld/controld_execd_state.c rc = lrmd__new(&api, NULL, NULL, 0); api 401 daemons/controld/controld_execd_state.c api->cmds->set_callback(api, lrm_op_callback); api 402 daemons/controld/controld_execd_state.c lrm_state->conn = api; api 601 daemons/controld/controld_execd_state.c lrmd_t *api = NULL; api 603 daemons/controld/controld_execd_state.c rc = lrmd__new(&api, lrm_state->node_name, server, port); api 610 daemons/controld/controld_execd_state.c lrm_state->conn = api; api 611 daemons/controld/controld_execd_state.c api->cmds->set_callback(api, remote_lrm_op_callback); api 612 daemons/controld/controld_execd_state.c lrmd_internal_set_proxy_callback(api, lrm_state, crmd_remote_proxy_cb); api 165 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 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 145 lib/common/crmcommon_private.h int (*new_data)(pcmk_ipc_api_t *api); api 169 lib/common/crmcommon_private.h int (*post_connect)(pcmk_ipc_api_t *api); api 180 lib/common/crmcommon_private.h bool (*reply_expected)(pcmk_ipc_api_t *api, xmlNode *request); api 191 lib/common/crmcommon_private.h bool (*dispatch)(pcmk_ipc_api_t *api, xmlNode *msg); api 199 lib/common/crmcommon_private.h void (*post_disconnect)(pcmk_ipc_api_t *api); api 225 lib/common/crmcommon_private.h int pcmk__send_ipc_request(pcmk_ipc_api_t *api, xmlNode *request); api 228 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, 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, xmlNode *request) api 179 lib/common/ipc_attrd.c rc = pcmk_connect_ipc(api, pcmk_ipc_dispatch_sync); api 182 lib/common/ipc_attrd.c rc = pcmk__send_ipc_request(api, request); api 197 lib/common/ipc_attrd.c send_attrd_request(pcmk_ipc_api_t *api, xmlNode *request) api 199 lib/common/ipc_attrd.c return pcmk__send_ipc_request(api, request); api 203 lib/common/ipc_attrd.c pcmk__attrd_api_clear_failures(pcmk_ipc_api_t *api, const char *node, api 226 lib/common/ipc_attrd.c if (api == NULL) { api 227 lib/common/ipc_attrd.c rc = create_api(&api); api 232 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 233 lib/common/ipc_attrd.c destroy_api(api); api 235 lib/common/ipc_attrd.c } else if (!pcmk_ipc_is_connected(api)) { api 236 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 239 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 260 lib/common/ipc_attrd.c pcmk__attrd_api_delete(pcmk_ipc_api_t *api, const char *node, const char *name, api 279 lib/common/ipc_attrd.c return pcmk__attrd_api_update(api, node, name, NULL, NULL, NULL, NULL, options); api 283 lib/common/ipc_attrd.c pcmk__attrd_api_purge(pcmk_ipc_api_t *api, const char *node) api 299 lib/common/ipc_attrd.c if (api == NULL) { api 300 lib/common/ipc_attrd.c rc = create_api(&api); api 305 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 306 lib/common/ipc_attrd.c destroy_api(api); api 308 lib/common/ipc_attrd.c } else if (!pcmk_ipc_is_connected(api)) { api 309 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 312 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 324 lib/common/ipc_attrd.c pcmk__attrd_api_query(pcmk_ipc_api_t *api, const char *node, const char *name, api 351 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 366 lib/common/ipc_attrd.c pcmk__attrd_api_refresh(pcmk_ipc_api_t *api, const char *node) api 382 lib/common/ipc_attrd.c if (api == NULL) { api 383 lib/common/ipc_attrd.c rc = create_api(&api); api 388 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 389 lib/common/ipc_attrd.c destroy_api(api); api 391 lib/common/ipc_attrd.c } else if (!pcmk_ipc_is_connected(api)) { api 392 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 395 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 453 lib/common/ipc_attrd.c pcmk__attrd_api_update(pcmk_ipc_api_t *api, const char *node, const char *name, api 475 lib/common/ipc_attrd.c if (api == NULL) { api 476 lib/common/ipc_attrd.c rc = create_api(&api); api 481 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 482 lib/common/ipc_attrd.c destroy_api(api); api 484 lib/common/ipc_attrd.c } else if (!pcmk_ipc_is_connected(api)) { api 485 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 488 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 500 lib/common/ipc_attrd.c pcmk__attrd_api_update_list(pcmk_ipc_api_t *api, GList *attrs, const char *dampen, api 561 lib/common/ipc_attrd.c rc = pcmk__attrd_api_update(api, pair->node, pair->name, pair->value, api 572 lib/common/ipc_attrd.c if (api == NULL) { api 573 lib/common/ipc_attrd.c rc = create_api(&api); api 581 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 585 lib/common/ipc_attrd.c destroy_api(api); api 47 lib/common/ipc_client.c pcmk_new_ipc_api(pcmk_ipc_api_t **api, enum pcmk_ipc_server server) api 49 lib/common/ipc_client.c if (api == NULL) { api 53 lib/common/ipc_client.c *api = calloc(1, sizeof(pcmk_ipc_api_t)); api 54 lib/common/ipc_client.c if (*api == NULL) { api 58 lib/common/ipc_client.c (*api)->server = server; api 59 lib/common/ipc_client.c if (pcmk_ipc_name(*api, false) == NULL) { api 60 lib/common/ipc_client.c pcmk_free_ipc_api(*api); api 61 lib/common/ipc_client.c *api = NULL; api 65 lib/common/ipc_client.c (*api)->ipc_size_max = 0; api 70 lib/common/ipc_client.c (*api)->cmds = pcmk__attrd_api_methods(); api 74 lib/common/ipc_client.c (*api)->ipc_size_max = 512 * 1024; // 512KB api 78 lib/common/ipc_client.c (*api)->cmds = pcmk__controld_api_methods(); api 88 lib/common/ipc_client.c (*api)->cmds = pcmk__pacemakerd_api_methods(); api 92 lib/common/ipc_client.c (*api)->cmds = pcmk__schedulerd_api_methods(); api 94 lib/common/ipc_client.c (*api)->ipc_size_max = 5 * 1024 * 1024; // 5MB api 97 lib/common/ipc_client.c if ((*api)->cmds == NULL) { api 98 lib/common/ipc_client.c pcmk_free_ipc_api(*api); api 99 lib/common/ipc_client.c *api = NULL; api 103 lib/common/ipc_client.c (*api)->ipc = crm_ipc_new(pcmk_ipc_name(*api, false), api 104 lib/common/ipc_client.c (*api)->ipc_size_max); api 105 lib/common/ipc_client.c if ((*api)->ipc == NULL) { api 106 lib/common/ipc_client.c pcmk_free_ipc_api(*api); api 107 lib/common/ipc_client.c *api = NULL; api 112 lib/common/ipc_client.c if ((*api)->cmds->new_data != NULL) { api 113 lib/common/ipc_client.c if ((*api)->cmds->new_data(*api) != pcmk_rc_ok) { api 114 lib/common/ipc_client.c pcmk_free_ipc_api(*api); api 115 lib/common/ipc_client.c *api = NULL; api 119 lib/common/ipc_client.c crm_trace("Created %s API IPC object", pcmk_ipc_name(*api, true)); api 124 lib/common/ipc_client.c free_daemon_specific_data(pcmk_ipc_api_t *api) api 126 lib/common/ipc_client.c if ((api != NULL) && (api->cmds != NULL)) { api 127 lib/common/ipc_client.c if ((api->cmds->free_data != NULL) && (api->api_data != NULL)) { api 128 lib/common/ipc_client.c api->cmds->free_data(api->api_data); api 129 lib/common/ipc_client.c api->api_data = NULL; api 131 lib/common/ipc_client.c free(api->cmds); api 132 lib/common/ipc_client.c api->cmds = NULL; api 146 lib/common/ipc_client.c pcmk__call_ipc_callback(pcmk_ipc_api_t *api, enum pcmk_ipc_event event_type, api 149 lib/common/ipc_client.c if ((api != NULL) && (api->cb != NULL)) { api 150 lib/common/ipc_client.c api->cb(api, event_type, status, event_data, api->user_data); api 165 lib/common/ipc_client.c pcmk_ipc_api_t *api = user_data; api 167 lib/common/ipc_client.c crm_info("Disconnected from %s IPC API", pcmk_ipc_name(api, true)); api 170 lib/common/ipc_client.c if ((api->cmds != NULL) && (api->cmds->post_disconnect != NULL)) { api 171 lib/common/ipc_client.c api->cmds->post_disconnect(api); api 175 lib/common/ipc_client.c pcmk__call_ipc_callback(api, pcmk_ipc_event_disconnect, CRM_EX_DISCONNECT, api 183 lib/common/ipc_client.c api->ipc = NULL; api 184 lib/common/ipc_client.c api->mainloop_io = NULL; api 186 lib/common/ipc_client.c if (api->free_on_disconnect) { api 190 lib/common/ipc_client.c free_daemon_specific_data(api); api 192 lib/common/ipc_client.c free(api); api 202 lib/common/ipc_client.c pcmk_free_ipc_api(pcmk_ipc_api_t *api) api 206 lib/common/ipc_client.c if (api == NULL) { api 209 lib/common/ipc_client.c crm_debug("Releasing %s IPC API", pcmk_ipc_name(api, true)); api 211 lib/common/ipc_client.c if (api->ipc != NULL) { api 212 lib/common/ipc_client.c if (api->mainloop_io != NULL) { api 222 lib/common/ipc_client.c free_on_disconnect = api->free_on_disconnect = true; api 224 lib/common/ipc_client.c pcmk_disconnect_ipc(api); // Frees api if free_on_disconnect is true api 227 lib/common/ipc_client.c free_daemon_specific_data(api); api 229 lib/common/ipc_client.c free(api); api 243 lib/common/ipc_client.c pcmk_ipc_name(const pcmk_ipc_api_t *api, bool for_log) api 245 lib/common/ipc_client.c if (api == NULL) { api 248 lib/common/ipc_client.c switch (api->server) { api 283 lib/common/ipc_client.c pcmk_ipc_is_connected(pcmk_ipc_api_t *api) api 285 lib/common/ipc_client.c return (api != NULL) && crm_ipc_connected(api->ipc); api 300 lib/common/ipc_client.c call_api_dispatch(pcmk_ipc_api_t *api, xmlNode *message) api 303 lib/common/ipc_client.c if ((api->cmds != NULL) && (api->cmds->dispatch != NULL)) { api 304 lib/common/ipc_client.c return api->cmds->dispatch(api, message); api 326 lib/common/ipc_client.c dispatch_ipc_data(const char *buffer, pcmk_ipc_api_t *api) api 333 lib/common/ipc_client.c pcmk_ipc_name(api, true)); api 340 lib/common/ipc_client.c pcmk_ipc_name(api, true)); api 344 lib/common/ipc_client.c more = call_api_dispatch(api, msg); api 369 lib/common/ipc_client.c pcmk_ipc_api_t *api = user_data; api 371 lib/common/ipc_client.c CRM_CHECK(api != NULL, return 0); api 372 lib/common/ipc_client.c dispatch_ipc_data(buffer, api); api 395 lib/common/ipc_client.c pcmk_poll_ipc(const pcmk_ipc_api_t *api, int timeout_ms) api 400 lib/common/ipc_client.c if ((api == NULL) || (api->dispatch_type != pcmk_ipc_dispatch_poll)) { api 403 lib/common/ipc_client.c pollfd.fd = crm_ipc_get_fd(api->ipc); api 428 lib/common/ipc_client.c pcmk_dispatch_ipc(pcmk_ipc_api_t *api) api 430 lib/common/ipc_client.c if (api == NULL) { api 433 lib/common/ipc_client.c while (crm_ipc_ready(api->ipc) > 0) { api 434 lib/common/ipc_client.c if (crm_ipc_read(api->ipc) > 0) { api 435 lib/common/ipc_client.c dispatch_ipc_data(crm_ipc_buffer(api->ipc), api); api 442 lib/common/ipc_client.c connect_with_main_loop(pcmk_ipc_api_t *api) api 451 lib/common/ipc_client.c rc = pcmk__add_mainloop_ipc(api->ipc, G_PRIORITY_DEFAULT, api, api 452 lib/common/ipc_client.c &callbacks, &(api->mainloop_io)); api 457 lib/common/ipc_client.c pcmk_ipc_name(api, true)); api 466 lib/common/ipc_client.c connect_without_main_loop(pcmk_ipc_api_t *api) api 470 lib/common/ipc_client.c if (!crm_ipc_connect(api->ipc)) { api 472 lib/common/ipc_client.c crm_ipc_close(api->ipc); api 476 lib/common/ipc_client.c pcmk_ipc_name(api, true)); api 489 lib/common/ipc_client.c pcmk_connect_ipc(pcmk_ipc_api_t *api, enum pcmk_ipc_dispatch dispatch_type) api 494 lib/common/ipc_client.c if (api == NULL) { api 499 lib/common/ipc_client.c if (api->ipc == NULL) { api 500 lib/common/ipc_client.c api->ipc = crm_ipc_new(pcmk_ipc_name(api, false), api 501 lib/common/ipc_client.c api->ipc_size_max); api 502 lib/common/ipc_client.c if (api->ipc == NULL) { api 508 lib/common/ipc_client.c if (crm_ipc_connected(api->ipc)) { api 509 lib/common/ipc_client.c crm_trace("Already connected to %s IPC API", pcmk_ipc_name(api, true)); api 513 lib/common/ipc_client.c api->dispatch_type = dispatch_type; api 518 lib/common/ipc_client.c rc = connect_with_main_loop(api); api 523 lib/common/ipc_client.c rc = connect_without_main_loop(api); api 536 lib/common/ipc_client.c pcmk_ipc_name(api, true)); api 544 lib/common/ipc_client.c if ((api->cmds != NULL) && (api->cmds->post_connect != NULL)) { api 545 lib/common/ipc_client.c rc = api->cmds->post_connect(api); api 547 lib/common/ipc_client.c crm_ipc_close(api->ipc); api 565 lib/common/ipc_client.c pcmk_disconnect_ipc(pcmk_ipc_api_t *api) api 567 lib/common/ipc_client.c if ((api == NULL) || (api->ipc == NULL)) { api 570 lib/common/ipc_client.c switch (api->dispatch_type) { api 573 lib/common/ipc_client.c mainloop_io_t *mainloop_io = api->mainloop_io; api 576 lib/common/ipc_client.c api->mainloop_io = NULL; api 577 lib/common/ipc_client.c api->ipc = NULL; api 587 lib/common/ipc_client.c crm_ipc_t *ipc = api->ipc; api 590 lib/common/ipc_client.c api->ipc = NULL; api 593 lib/common/ipc_client.c api->free_on_disconnect = false; api 597 lib/common/ipc_client.c ipc_post_disconnect(api); api 616 lib/common/ipc_client.c pcmk_register_ipc_callback(pcmk_ipc_api_t *api, pcmk_ipc_callback_t cb, api 619 lib/common/ipc_client.c if (api == NULL) { api 622 lib/common/ipc_client.c api->cb = cb; api 623 lib/common/ipc_client.c api->user_data = user_data; api 639 lib/common/ipc_client.c pcmk__send_ipc_request(pcmk_ipc_api_t *api, xmlNode *request) api 645 lib/common/ipc_client.c if ((api == NULL) || (api->ipc == NULL) || (request == NULL)) { api 651 lib/common/ipc_client.c if ((api->dispatch_type == pcmk_ipc_dispatch_sync) api 652 lib/common/ipc_client.c && (api->cmds != NULL) api 653 lib/common/ipc_client.c && (api->cmds->reply_expected != NULL) api 654 lib/common/ipc_client.c && (api->cmds->reply_expected(api, request))) { api 659 lib/common/ipc_client.c rc = crm_ipc_send(api->ipc, request, flags, 0, &reply); api 669 lib/common/ipc_client.c bool more = call_api_dispatch(api, reply); api 674 lib/common/ipc_client.c rc = crm_ipc_read(api->ipc); api 684 lib/common/ipc_client.c rc = dispatch_ipc_data(crm_ipc_buffer(api->ipc), api); api 721 lib/common/ipc_client.c create_purge_node_request(const pcmk_ipc_api_t *api, const char *node_name, api 727 lib/common/ipc_client.c switch (api->server) { api 740 lib/common/ipc_client.c pcmk_ipc_name(api, false), client, NULL); api 767 lib/common/ipc_client.c pcmk_ipc_purge_node(pcmk_ipc_api_t *api, const char *node_name, uint32_t nodeid) api 772 lib/common/ipc_client.c if (api == NULL) { api 779 lib/common/ipc_client.c request = create_purge_node_request(api, node_name, nodeid); api 783 lib/common/ipc_client.c rc = pcmk__send_ipc_request(api, request); api 787 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, xmlNode *request) api 195 lib/common/ipc_controld.c dispatch(pcmk_ipc_api_t *api, xmlNode *reply) api 197 lib/common/ipc_controld.c struct controld_api_private_s *private = api->api_data; api 285 lib/common/ipc_controld.c pcmk__call_ipc_callback(api, pcmk_ipc_event_reply, status, &reply_data); api 322 lib/common/ipc_controld.c create_controller_request(const pcmk_ipc_api_t *api, const char *op, api 328 lib/common/ipc_controld.c if (api == NULL) { api 331 lib/common/ipc_controld.c private = api->api_data; api 344 lib/common/ipc_controld.c send_controller_request(pcmk_ipc_api_t *api, xmlNode *request, api 352 lib/common/ipc_controld.c rc = pcmk__send_ipc_request(api, request); api 354 lib/common/ipc_controld.c struct controld_api_private_s *private = api->api_data; api 385 lib/common/ipc_controld.c pcmk_controld_api_reprobe(pcmk_ipc_api_t *api, const char *target_node, api 392 lib/common/ipc_controld.c if (api == NULL) { api 399 lib/common/ipc_controld.c pcmk_ipc_name(api, true), pcmk__s(target_node, "local node"), api 402 lib/common/ipc_controld.c request = create_controller_request(api, CRM_OP_REPROBE, router_node, api 404 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 420 lib/common/ipc_controld.c pcmk_controld_api_node_info(pcmk_ipc_api_t *api, uint32_t nodeid) api 425 lib/common/ipc_controld.c request = create_controller_request(api, CRM_OP_NODE_INFO, NULL, NULL); api 433 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 448 lib/common/ipc_controld.c pcmk_controld_api_ping(pcmk_ipc_api_t *api, const char *node_name) api 453 lib/common/ipc_controld.c request = create_controller_request(api, CRM_OP_PING, node_name, NULL); api 457 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 471 lib/common/ipc_controld.c pcmk_controld_api_list_nodes(pcmk_ipc_api_t *api) api 476 lib/common/ipc_controld.c request = create_controller_request(api, PCMK__CONTROLD_CMD_NODES, NULL, api 479 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 487 lib/common/ipc_controld.c controller_resource_op(pcmk_ipc_api_t *api, const char *op, api 497 lib/common/ipc_controld.c if (api == NULL) { api 540 lib/common/ipc_controld.c request = create_controller_request(api, op, router_node, msg_data); api 541 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 563 lib/common/ipc_controld.c pcmk_controld_api_fail(pcmk_ipc_api_t *api, api 570 lib/common/ipc_controld.c pcmk_ipc_name(api, true), pcmk__s(rsc_id, "unknown resource"), api 574 lib/common/ipc_controld.c return controller_resource_op(api, CRM_OP_LRM_FAIL, target_node, api 596 lib/common/ipc_controld.c pcmk_controld_api_refresh(pcmk_ipc_api_t *api, const char *target_node, api 603 lib/common/ipc_controld.c pcmk_ipc_name(api, true), pcmk__s(rsc_id, "unknown resource"), api 607 lib/common/ipc_controld.c return controller_resource_op(api, CRM_OP_LRM_DELETE, target_node, api 620 lib/common/ipc_controld.c pcmk_controld_api_replies_expected(const pcmk_ipc_api_t *api) api 622 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, 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, 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 2223 lib/lrmd/lrmd_client.c lrmd__new(lrmd_t **api, const char *nodename, const char *server, int port) api 2227 lib/lrmd/lrmd_client.c if (api == NULL) { api 2230 lib/lrmd/lrmd_client.c *api = NULL; api 2234 lib/lrmd/lrmd_client.c *api = calloc(1, sizeof(lrmd_t)); api 2235 lib/lrmd/lrmd_client.c if (*api == NULL) { api 2241 lib/lrmd/lrmd_client.c lrmd_api_delete(*api); api 2242 lib/lrmd/lrmd_client.c *api = NULL; api 2245 lib/lrmd/lrmd_client.c (*api)->lrmd_private = pvt; api 2250 lib/lrmd/lrmd_client.c (*api)->cmds = calloc(1, sizeof(lrmd_api_operations_t)); api 2252 lib/lrmd/lrmd_client.c if ((pvt->remote == NULL) || ((*api)->cmds == NULL)) { api 2253 lib/lrmd/lrmd_client.c lrmd_api_delete(*api); api 2254 lib/lrmd/lrmd_client.c *api = NULL; api 2259 lib/lrmd/lrmd_client.c (*api)->cmds->connect = lrmd_api_connect; api 2260 lib/lrmd/lrmd_client.c (*api)->cmds->connect_async = lrmd_api_connect_async; api 2261 lib/lrmd/lrmd_client.c (*api)->cmds->is_connected = lrmd_api_is_connected; api 2262 lib/lrmd/lrmd_client.c (*api)->cmds->poke_connection = lrmd_api_poke_connection; api 2263 lib/lrmd/lrmd_client.c (*api)->cmds->disconnect = lrmd_api_disconnect; api 2264 lib/lrmd/lrmd_client.c (*api)->cmds->register_rsc = lrmd_api_register_rsc; api 2265 lib/lrmd/lrmd_client.c (*api)->cmds->unregister_rsc = lrmd_api_unregister_rsc; api 2266 lib/lrmd/lrmd_client.c (*api)->cmds->get_rsc_info = lrmd_api_get_rsc_info; api 2267 lib/lrmd/lrmd_client.c (*api)->cmds->get_recurring_ops = lrmd_api_get_recurring_ops; api 2268 lib/lrmd/lrmd_client.c (*api)->cmds->set_callback = lrmd_api_set_callback; api 2269 lib/lrmd/lrmd_client.c (*api)->cmds->get_metadata = lrmd_api_get_metadata; api 2270 lib/lrmd/lrmd_client.c (*api)->cmds->exec = lrmd_api_exec; api 2271 lib/lrmd/lrmd_client.c (*api)->cmds->cancel = lrmd_api_cancel; api 2272 lib/lrmd/lrmd_client.c (*api)->cmds->list_agents = lrmd_api_list_agents; api 2273 lib/lrmd/lrmd_client.c (*api)->cmds->list_ocf_providers = lrmd_api_list_ocf_providers; api 2274 lib/lrmd/lrmd_client.c (*api)->cmds->list_standards = lrmd_api_list_standards; api 2275 lib/lrmd/lrmd_client.c (*api)->cmds->exec_alert = lrmd_api_exec_alert; api 2276 lib/lrmd/lrmd_client.c (*api)->cmds->get_metadata_params = lrmd_api_get_metadata_params; api 2291 lib/lrmd/lrmd_client.c lrmd_api_delete(*api); api 2292 lib/lrmd/lrmd_client.c *api = NULL; api 2302 lib/lrmd/lrmd_client.c lrmd_api_delete(*api); api 2303 lib/lrmd/lrmd_client.c *api = NULL; api 2313 lib/lrmd/lrmd_client.c lrmd_t *api = NULL; api 2315 lib/lrmd/lrmd_client.c CRM_ASSERT(lrmd__new(&api, NULL, NULL, 0) == pcmk_rc_ok); api 2316 lib/lrmd/lrmd_client.c return api; api 2322 lib/lrmd/lrmd_client.c lrmd_t *api = NULL; api 2324 lib/lrmd/lrmd_client.c CRM_ASSERT(lrmd__new(&api, nodename, server, port) == pcmk_rc_ok); api 2325 lib/lrmd/lrmd_client.c return api; api 65 lib/pacemaker/pcmk_cluster_queries.c validate_reply_event(data_t *data, const pcmk_ipc_api_t *api, api 77 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true)); api 89 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true), crm_exit_str(status)); api 110 lib/pacemaker/pcmk_cluster_queries.c validate_controld_reply(data_t *data, const pcmk_ipc_api_t *api, api 119 lib/pacemaker/pcmk_cluster_queries.c rc = validate_reply_event(data, api, event_type, status); api 151 lib/pacemaker/pcmk_cluster_queries.c validate_pcmkd_reply(data_t *data, const pcmk_ipc_api_t *api, api 158 lib/pacemaker/pcmk_cluster_queries.c int rc = validate_reply_event(data, api, event_type, status); api 351 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_api_t *api = NULL; api 353 lib/pacemaker/pcmk_cluster_queries.c rc = pcmk_new_ipc_api(&api, server); api 354 lib/pacemaker/pcmk_cluster_queries.c if (api == NULL) { api 356 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true), api 362 lib/pacemaker/pcmk_cluster_queries.c pcmk_register_ipc_callback(api, cb, data); api 365 lib/pacemaker/pcmk_cluster_queries.c rc = pcmk_connect_ipc(api, dispatch_type); api 377 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true), pcmk_rc_str(rc)); api 381 lib/pacemaker/pcmk_cluster_queries.c pcmk_free_ipc_api(api); api 385 lib/pacemaker/pcmk_cluster_queries.c return api; api 400 lib/pacemaker/pcmk_cluster_queries.c poll_until_reply(data_t *data, pcmk_ipc_api_t *api, const char *on_node) api 410 lib/pacemaker/pcmk_cluster_queries.c int rc = pcmk_poll_ipc(api, remaining_ms); api 419 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true), (on_node != NULL)? " on " : "", api 425 lib/pacemaker/pcmk_cluster_queries.c pcmk_dispatch_ipc(api); api 438 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 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);