10 #ifndef PCMK__CRM_COMMON_IPC__H 11 #define PCMK__CRM_COMMON_IPC__H 15 #include <qb/qbipcc.h> 206 pid_t *gotpid, uid_t *gotuid, gid_t *gotgid);
enum pcmk_ipc_dispatch dispatch_type
int pcmk_connect_ipc(pcmk_ipc_api_t *api, enum pcmk_ipc_dispatch dispatch_type)
Connect to a Pacemaker daemon via IPC.
int crm_ipc_get_fd(crm_ipc_t *client)
int pcmk_new_ipc_api(pcmk_ipc_api_t **api, enum pcmk_ipc_server server)
Create a new object for using Pacemaker daemon IPC.
void pcmk_dispatch_ipc(pcmk_ipc_api_t *api)
Dispatch available messages on an IPC connection (without main loop)
int pcmk_ipc_purge_node(pcmk_ipc_api_t *api, const char *node_name, uint32_t nodeid)
Ask a Pacemaker daemon to purge a node from its peer cache.
enum crm_exit_e crm_exit_t
long crm_ipc_read(crm_ipc_t *client)
uint32_t crm_ipc_buffer_flags(crm_ipc_t *client)
const char * crm_ipc_buffer(crm_ipc_t *client)
int pcmk_poll_ipc(const pcmk_ipc_api_t *api, int timeout_ms)
Check whether an IPC connection has data available (without main loop)
Caller will poll and dispatch IPC.
pcmk_ipc_server
Available IPC interfaces.
struct crm_ipc_s crm_ipc_t
Wrappers for and extensions to libxml2.
unsigned int crm_ipc_default_buffer_size(void)
Return pacemaker's default IPC buffer size.
void crm_ipc_destroy(crm_ipc_t *client)
void pcmk_free_ipc_event(struct iovec *event)
Free an I/O vector created by pcmk__ipc_prepare_iov()
void(* pcmk_ipc_callback_t)(pcmk_ipc_api_t *api, enum pcmk_ipc_event event_type, crm_exit_t status, void *event_data, void *user_data)
Callback function type for Pacemaker daemon IPC APIs.
bool crm_ipc_connected(crm_ipc_t *client)
int crm_ipc_ready(crm_ipc_t *client)
Check whether an IPC connection is ready to be read.
pcmk_ipc_dispatch
How IPC replies should be dispatched.
Notification from daemon.
pcmk_ipc_event
Possible event types that an IPC event callback can be called for.
const char * crm_ipc_name(crm_ipc_t *client)
Attach IPC to GMainLoop for dispatch.
Termination of IPC connection.
Sending a command will wait for any reply.
void pcmk_free_ipc_api(pcmk_ipc_api_t *api)
Free the contents of an IPC API object.
crm_ipc_t * crm_ipc_new(const char *name, size_t max_size)
Create a new (legacy) object for using Pacemaker daemon IPC.
const char * pcmk_ipc_name(const pcmk_ipc_api_t *api, bool for_log)
Get the IPC name used with an IPC API connection.
Daemon's reply to client IPC request.
Result of asynchronous connection attempt.
enum pcmk_ipc_server server
void pcmk_register_ipc_callback(pcmk_ipc_api_t *api, pcmk_ipc_callback_t cb, void *user_data)
Register a callback for IPC API events.
int crm_ipc_send(crm_ipc_t *client, const xmlNode *message, enum crm_ipc_flags flags, int32_t ms_timeout, xmlNode **reply)
Send an IPC XML message.
void crm_ipc_close(crm_ipc_t *client)
void pcmk_disconnect_ipc(pcmk_ipc_api_t *api)
Disconnect an IPC API instance.
int crm_ipc_is_authentic_process(int sock, uid_t refuid, gid_t refgid, pid_t *gotpid, uid_t *gotuid, gid_t *gotgid)
Check the authenticity of the IPC socket peer process (legacy)
bool pcmk_ipc_is_connected(pcmk_ipc_api_t *api)
Check whether an IPC API connection is active.