api 378 daemons/controld/controld_execd_state.c lrmd_t *api = NULL; api 380 daemons/controld/controld_execd_state.c rc = lrmd__new(&api, NULL, NULL, 0); api 384 daemons/controld/controld_execd_state.c api->cmds->set_callback(api, lrm_op_callback); api 385 daemons/controld/controld_execd_state.c lrm_state->conn = api; api 578 daemons/controld/controld_execd_state.c lrmd_t *api = NULL; api 580 daemons/controld/controld_execd_state.c rc = lrmd__new(&api, lrm_state->node_name, server, port); api 587 daemons/controld/controld_execd_state.c lrm_state->conn = api; api 588 daemons/controld/controld_execd_state.c api->cmds->set_callback(api, remote_lrm_op_callback); api 589 daemons/controld/controld_execd_state.c lrmd_internal_set_proxy_callback(api, lrm_state, crmd_remote_proxy_cb); api 162 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 119 include/crm/common/ipc_attrd_internal.h int pcmk__attrd_api_query(pcmk_ipc_api_t *api, const char *node, const char *name, api 137 include/crm/common/ipc_attrd_internal.h int pcmk__attrd_api_refresh(pcmk_ipc_api_t *api, const char *node); api 160 include/crm/common/ipc_attrd_internal.h int pcmk__attrd_api_update(pcmk_ipc_api_t *api, const char *node, const char *name, api 187 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 66 include/crm/common/ipc_pacemakerd.h int pcmk_pacemakerd_api_ping(pcmk_ipc_api_t *api, const char *ipc_name); api 67 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 347 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 362 lib/common/ipc_attrd.c pcmk__attrd_api_refresh(pcmk_ipc_api_t *api, const char *node) api 378 lib/common/ipc_attrd.c if (api == NULL) { api 379 lib/common/ipc_attrd.c rc = create_api(&api); api 384 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 385 lib/common/ipc_attrd.c destroy_api(api); api 387 lib/common/ipc_attrd.c } else if (!pcmk_ipc_is_connected(api)) { api 388 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 391 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 437 lib/common/ipc_attrd.c pcmk__attrd_api_update(pcmk_ipc_api_t *api, const char *node, const char *name, api 459 lib/common/ipc_attrd.c if (api == NULL) { api 460 lib/common/ipc_attrd.c rc = create_api(&api); api 465 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 466 lib/common/ipc_attrd.c destroy_api(api); api 468 lib/common/ipc_attrd.c } else if (!pcmk_ipc_is_connected(api)) { api 469 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 472 lib/common/ipc_attrd.c rc = send_attrd_request(api, request); api 484 lib/common/ipc_attrd.c pcmk__attrd_api_update_list(pcmk_ipc_api_t *api, GList *attrs, const char *dampen, api 545 lib/common/ipc_attrd.c rc = pcmk__attrd_api_update(api, pair->node, pair->name, pair->value, api 556 lib/common/ipc_attrd.c if (api == NULL) { api 557 lib/common/ipc_attrd.c rc = create_api(&api); api 565 lib/common/ipc_attrd.c rc = connect_and_send_attrd_request(api, request); api 569 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 425 lib/common/ipc_client.c pcmk_dispatch_ipc(pcmk_ipc_api_t *api) api 427 lib/common/ipc_client.c if (api == NULL) { api 430 lib/common/ipc_client.c while (crm_ipc_ready(api->ipc) > 0) { api 431 lib/common/ipc_client.c if (crm_ipc_read(api->ipc) > 0) { api 432 lib/common/ipc_client.c dispatch_ipc_data(crm_ipc_buffer(api->ipc), api); api 439 lib/common/ipc_client.c connect_with_main_loop(pcmk_ipc_api_t *api) api 448 lib/common/ipc_client.c rc = pcmk__add_mainloop_ipc(api->ipc, G_PRIORITY_DEFAULT, api, api 449 lib/common/ipc_client.c &callbacks, &(api->mainloop_io)); api 454 lib/common/ipc_client.c pcmk_ipc_name(api, true)); api 463 lib/common/ipc_client.c connect_without_main_loop(pcmk_ipc_api_t *api) api 467 lib/common/ipc_client.c if (!crm_ipc_connect(api->ipc)) { api 469 lib/common/ipc_client.c crm_ipc_close(api->ipc); api 473 lib/common/ipc_client.c pcmk_ipc_name(api, true)); api 486 lib/common/ipc_client.c pcmk_connect_ipc(pcmk_ipc_api_t *api, enum pcmk_ipc_dispatch dispatch_type) api 490 lib/common/ipc_client.c if (api == NULL) { api 495 lib/common/ipc_client.c if (api->ipc == NULL) { api 496 lib/common/ipc_client.c api->ipc = crm_ipc_new(pcmk_ipc_name(api, false), api 497 lib/common/ipc_client.c api->ipc_size_max); api 498 lib/common/ipc_client.c if (api->ipc == NULL) { api 504 lib/common/ipc_client.c if (crm_ipc_connected(api->ipc)) { api 505 lib/common/ipc_client.c crm_trace("Already connected to %s IPC API", pcmk_ipc_name(api, true)); api 509 lib/common/ipc_client.c api->dispatch_type = dispatch_type; api 512 lib/common/ipc_client.c rc = connect_with_main_loop(api); api 517 lib/common/ipc_client.c rc = connect_without_main_loop(api); api 524 lib/common/ipc_client.c if ((api->cmds != NULL) && (api->cmds->post_connect != NULL)) { api 525 lib/common/ipc_client.c rc = api->cmds->post_connect(api); api 527 lib/common/ipc_client.c crm_ipc_close(api->ipc); api 545 lib/common/ipc_client.c pcmk_disconnect_ipc(pcmk_ipc_api_t *api) api 547 lib/common/ipc_client.c if ((api == NULL) || (api->ipc == NULL)) { api 550 lib/common/ipc_client.c switch (api->dispatch_type) { api 553 lib/common/ipc_client.c mainloop_io_t *mainloop_io = api->mainloop_io; api 556 lib/common/ipc_client.c api->mainloop_io = NULL; api 557 lib/common/ipc_client.c api->ipc = NULL; api 567 lib/common/ipc_client.c crm_ipc_t *ipc = api->ipc; api 570 lib/common/ipc_client.c api->ipc = NULL; api 573 lib/common/ipc_client.c api->free_on_disconnect = false; api 577 lib/common/ipc_client.c ipc_post_disconnect(api); api 596 lib/common/ipc_client.c pcmk_register_ipc_callback(pcmk_ipc_api_t *api, pcmk_ipc_callback_t cb, api 599 lib/common/ipc_client.c if (api == NULL) { api 602 lib/common/ipc_client.c api->cb = cb; api 603 lib/common/ipc_client.c api->user_data = user_data; api 619 lib/common/ipc_client.c pcmk__send_ipc_request(pcmk_ipc_api_t *api, xmlNode *request) api 625 lib/common/ipc_client.c if ((api == NULL) || (api->ipc == NULL) || (request == NULL)) { api 631 lib/common/ipc_client.c if ((api->dispatch_type == pcmk_ipc_dispatch_sync) api 632 lib/common/ipc_client.c && (api->cmds != NULL) api 633 lib/common/ipc_client.c && (api->cmds->reply_expected != NULL) api 634 lib/common/ipc_client.c && (api->cmds->reply_expected(api, request))) { api 639 lib/common/ipc_client.c rc = crm_ipc_send(api->ipc, request, flags, 0, &reply); api 649 lib/common/ipc_client.c bool more = call_api_dispatch(api, reply); api 654 lib/common/ipc_client.c rc = crm_ipc_read(api->ipc); api 664 lib/common/ipc_client.c rc = dispatch_ipc_data(crm_ipc_buffer(api->ipc), api); api 701 lib/common/ipc_client.c create_purge_node_request(const pcmk_ipc_api_t *api, const char *node_name, api 707 lib/common/ipc_client.c switch (api->server) { api 720 lib/common/ipc_client.c pcmk_ipc_name(api, false), client, NULL); api 747 lib/common/ipc_client.c pcmk_ipc_purge_node(pcmk_ipc_api_t *api, const char *node_name, uint32_t nodeid) api 752 lib/common/ipc_client.c if (api == NULL) { api 759 lib/common/ipc_client.c request = create_purge_node_request(api, node_name, nodeid); api 763 lib/common/ipc_client.c rc = pcmk__send_ipc_request(api, request); api 767 lib/common/ipc_client.c pcmk_ipc_name(api, true), node_name, (unsigned long) nodeid, rc); api 32 lib/common/ipc_controld.c new_data(pcmk_ipc_api_t *api) api 36 lib/common/ipc_controld.c api->api_data = calloc(1, sizeof(struct controld_api_private_s)); api 38 lib/common/ipc_controld.c if (api->api_data == NULL) { api 42 lib/common/ipc_controld.c private = api->api_data; api 68 lib/common/ipc_controld.c post_connect(pcmk_ipc_api_t *api) api 73 lib/common/ipc_controld.c struct controld_api_private_s *private = api->api_data; api 81 lib/common/ipc_controld.c rc = pcmk__send_ipc_request(api, hello); api 85 lib/common/ipc_controld.c pcmk_ipc_name(api, true), pcmk_rc_str(rc), rc); api 87 lib/common/ipc_controld.c crm_debug("Sent IPC hello to %s", pcmk_ipc_name(api, true)); api 144 lib/common/ipc_controld.c reply_expected(pcmk_ipc_api_t *api, xmlNode *request) api 161 lib/common/ipc_controld.c dispatch(pcmk_ipc_api_t *api, xmlNode *reply) api 163 lib/common/ipc_controld.c struct controld_api_private_s *private = api->api_data; api 251 lib/common/ipc_controld.c pcmk__call_ipc_callback(api, pcmk_ipc_event_reply, status, &reply_data); api 288 lib/common/ipc_controld.c create_controller_request(const pcmk_ipc_api_t *api, const char *op, api 294 lib/common/ipc_controld.c if (api == NULL) { api 297 lib/common/ipc_controld.c private = api->api_data; api 310 lib/common/ipc_controld.c send_controller_request(pcmk_ipc_api_t *api, xmlNode *request, api 318 lib/common/ipc_controld.c rc = pcmk__send_ipc_request(api, request); api 320 lib/common/ipc_controld.c struct controld_api_private_s *private = api->api_data; api 351 lib/common/ipc_controld.c pcmk_controld_api_reprobe(pcmk_ipc_api_t *api, const char *target_node, api 358 lib/common/ipc_controld.c if (api == NULL) { api 365 lib/common/ipc_controld.c pcmk_ipc_name(api, true), pcmk__s(target_node, "local node"), api 368 lib/common/ipc_controld.c request = create_controller_request(api, CRM_OP_REPROBE, router_node, api 370 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 386 lib/common/ipc_controld.c pcmk_controld_api_node_info(pcmk_ipc_api_t *api, uint32_t nodeid) api 391 lib/common/ipc_controld.c request = create_controller_request(api, CRM_OP_NODE_INFO, NULL, NULL); api 399 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 414 lib/common/ipc_controld.c pcmk_controld_api_ping(pcmk_ipc_api_t *api, const char *node_name) api 419 lib/common/ipc_controld.c request = create_controller_request(api, CRM_OP_PING, node_name, NULL); api 423 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 437 lib/common/ipc_controld.c pcmk_controld_api_list_nodes(pcmk_ipc_api_t *api) api 442 lib/common/ipc_controld.c request = create_controller_request(api, PCMK__CONTROLD_CMD_NODES, NULL, api 445 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 453 lib/common/ipc_controld.c controller_resource_op(pcmk_ipc_api_t *api, const char *op, api 463 lib/common/ipc_controld.c if (api == NULL) { api 506 lib/common/ipc_controld.c request = create_controller_request(api, op, router_node, msg_data); api 507 lib/common/ipc_controld.c rc = send_controller_request(api, request, true); api 529 lib/common/ipc_controld.c pcmk_controld_api_fail(pcmk_ipc_api_t *api, api 536 lib/common/ipc_controld.c pcmk_ipc_name(api, true), pcmk__s(rsc_id, "unknown resource"), api 540 lib/common/ipc_controld.c return controller_resource_op(api, CRM_OP_LRM_FAIL, target_node, api 562 lib/common/ipc_controld.c pcmk_controld_api_refresh(pcmk_ipc_api_t *api, const char *target_node, api 569 lib/common/ipc_controld.c pcmk_ipc_name(api, true), pcmk__s(rsc_id, "unknown resource"), api 573 lib/common/ipc_controld.c return controller_resource_op(api, CRM_OP_LRM_DELETE, target_node, api 586 lib/common/ipc_controld.c pcmk_controld_api_replies_expected(const pcmk_ipc_api_t *api) api 588 lib/common/ipc_controld.c struct controld_api_private_s *private = api->api_data; api 100 lib/common/ipc_pacemakerd.c new_data(pcmk_ipc_api_t *api) api 104 lib/common/ipc_pacemakerd.c api->api_data = calloc(1, sizeof(struct pacemakerd_api_private_s)); api 106 lib/common/ipc_pacemakerd.c if (api->api_data == NULL) { api 110 lib/common/ipc_pacemakerd.c private = api->api_data; api 129 lib/common/ipc_pacemakerd.c post_connect(pcmk_ipc_api_t *api) api 133 lib/common/ipc_pacemakerd.c if (api->api_data == NULL) { api 136 lib/common/ipc_pacemakerd.c private = api->api_data; api 143 lib/common/ipc_pacemakerd.c post_disconnect(pcmk_ipc_api_t *api) api 147 lib/common/ipc_pacemakerd.c if (api->api_data == NULL) { api 150 lib/common/ipc_pacemakerd.c private = api->api_data; api 157 lib/common/ipc_pacemakerd.c reply_expected(pcmk_ipc_api_t *api, xmlNode *request) api 170 lib/common/ipc_pacemakerd.c dispatch(pcmk_ipc_api_t *api, xmlNode *reply) api 230 lib/common/ipc_pacemakerd.c pcmk__call_ipc_callback(api, pcmk_ipc_event_reply, status, &reply_data); api 251 lib/common/ipc_pacemakerd.c do_pacemakerd_api_call(pcmk_ipc_api_t *api, const char *ipc_name, const char *task) api 257 lib/common/ipc_pacemakerd.c if (api == NULL) { api 261 lib/common/ipc_pacemakerd.c private = api->api_data; api 269 lib/common/ipc_pacemakerd.c rc = pcmk__send_ipc_request(api, cmd); api 283 lib/common/ipc_pacemakerd.c pcmk_pacemakerd_api_ping(pcmk_ipc_api_t *api, const char *ipc_name) api 285 lib/common/ipc_pacemakerd.c return do_pacemakerd_api_call(api, ipc_name, CRM_OP_PING); api 289 lib/common/ipc_pacemakerd.c pcmk_pacemakerd_api_shutdown(pcmk_ipc_api_t *api, const char *ipc_name) api 291 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 2214 lib/lrmd/lrmd_client.c lrmd__new(lrmd_t **api, const char *nodename, const char *server, int port) api 2218 lib/lrmd/lrmd_client.c if (api == NULL) { api 2221 lib/lrmd/lrmd_client.c *api = NULL; api 2225 lib/lrmd/lrmd_client.c *api = calloc(1, sizeof(lrmd_t)); api 2226 lib/lrmd/lrmd_client.c if (*api == NULL) { api 2232 lib/lrmd/lrmd_client.c lrmd_api_delete(*api); api 2233 lib/lrmd/lrmd_client.c *api = NULL; api 2236 lib/lrmd/lrmd_client.c (*api)->lrmd_private = pvt; api 2241 lib/lrmd/lrmd_client.c (*api)->cmds = calloc(1, sizeof(lrmd_api_operations_t)); api 2243 lib/lrmd/lrmd_client.c if ((pvt->remote == NULL) || ((*api)->cmds == NULL)) { api 2244 lib/lrmd/lrmd_client.c lrmd_api_delete(*api); api 2245 lib/lrmd/lrmd_client.c *api = NULL; api 2250 lib/lrmd/lrmd_client.c (*api)->cmds->connect = lrmd_api_connect; api 2251 lib/lrmd/lrmd_client.c (*api)->cmds->connect_async = lrmd_api_connect_async; api 2252 lib/lrmd/lrmd_client.c (*api)->cmds->is_connected = lrmd_api_is_connected; api 2253 lib/lrmd/lrmd_client.c (*api)->cmds->poke_connection = lrmd_api_poke_connection; api 2254 lib/lrmd/lrmd_client.c (*api)->cmds->disconnect = lrmd_api_disconnect; api 2255 lib/lrmd/lrmd_client.c (*api)->cmds->register_rsc = lrmd_api_register_rsc; api 2256 lib/lrmd/lrmd_client.c (*api)->cmds->unregister_rsc = lrmd_api_unregister_rsc; api 2257 lib/lrmd/lrmd_client.c (*api)->cmds->get_rsc_info = lrmd_api_get_rsc_info; api 2258 lib/lrmd/lrmd_client.c (*api)->cmds->get_recurring_ops = lrmd_api_get_recurring_ops; api 2259 lib/lrmd/lrmd_client.c (*api)->cmds->set_callback = lrmd_api_set_callback; api 2260 lib/lrmd/lrmd_client.c (*api)->cmds->get_metadata = lrmd_api_get_metadata; api 2261 lib/lrmd/lrmd_client.c (*api)->cmds->exec = lrmd_api_exec; api 2262 lib/lrmd/lrmd_client.c (*api)->cmds->cancel = lrmd_api_cancel; api 2263 lib/lrmd/lrmd_client.c (*api)->cmds->list_agents = lrmd_api_list_agents; api 2264 lib/lrmd/lrmd_client.c (*api)->cmds->list_ocf_providers = lrmd_api_list_ocf_providers; api 2265 lib/lrmd/lrmd_client.c (*api)->cmds->list_standards = lrmd_api_list_standards; api 2266 lib/lrmd/lrmd_client.c (*api)->cmds->exec_alert = lrmd_api_exec_alert; api 2267 lib/lrmd/lrmd_client.c (*api)->cmds->get_metadata_params = lrmd_api_get_metadata_params; api 2282 lib/lrmd/lrmd_client.c lrmd_api_delete(*api); api 2283 lib/lrmd/lrmd_client.c *api = NULL; api 2293 lib/lrmd/lrmd_client.c lrmd_api_delete(*api); api 2294 lib/lrmd/lrmd_client.c *api = NULL; api 2304 lib/lrmd/lrmd_client.c lrmd_t *api = NULL; api 2306 lib/lrmd/lrmd_client.c CRM_ASSERT(lrmd__new(&api, NULL, NULL, 0) == pcmk_rc_ok); api 2307 lib/lrmd/lrmd_client.c return api; api 2313 lib/lrmd/lrmd_client.c lrmd_t *api = NULL; api 2315 lib/lrmd/lrmd_client.c CRM_ASSERT(lrmd__new(&api, nodename, server, port) == pcmk_rc_ok); api 2316 lib/lrmd/lrmd_client.c return api; api 84 lib/pacemaker/pcmk_cluster_queries.c event_done(data_t *data, pcmk_ipc_api_t *api) api 86 lib/pacemaker/pcmk_cluster_queries.c pcmk_disconnect_ipc(api); api 254 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_api_t *api = NULL; api 256 lib/pacemaker/pcmk_cluster_queries.c rc = pcmk_new_ipc_api(&api, server); api 257 lib/pacemaker/pcmk_cluster_queries.c if (api == NULL) { api 259 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true), api 265 lib/pacemaker/pcmk_cluster_queries.c pcmk_register_ipc_callback(api, cb, data); api 268 lib/pacemaker/pcmk_cluster_queries.c rc = pcmk_connect_ipc(api, dispatch_type); api 277 lib/pacemaker/pcmk_cluster_queries.c pcmk_ipc_name(api, true), pcmk_rc_str(rc)); api 280 lib/pacemaker/pcmk_cluster_queries.c pcmk_free_ipc_api(api); api 284 lib/pacemaker/pcmk_cluster_queries.c return api; api 568 maint/gnulib/lib/parse-datetime.y %define api.pure api 264 tools/crm_resource.c controller_event_callback(pcmk_ipc_api_t *api, enum pcmk_ipc_event event_type, api 279 tools/crm_resource.c pcmk_disconnect_ipc(api); api 282 tools/crm_resource.c if ((pcmk_controld_api_replies_expected(api) == 0) api 286 tools/crm_resource.c pcmk_disconnect_ipc(api);