pacemaker
1.1.18-7fdfbbe
Scalable High-Availability cluster resource manager
|
#include <crm_internal.h>
#include <sys/param.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <grp.h>
#include <errno.h>
#include <fcntl.h>
#include <bzlib.h>
#include <crm/crm.h>
#include <crm/msg_xml.h>
#include <crm/common/ipc.h>
#include <crm/common/ipcs.h>
Go to the source code of this file.
Macros | |
#define | PCMK_IPC_VERSION 1 |
#define | PCMK_IPC_DEFAULT_QUEUE_MAX 500 |
#define | MIN_MSG_SIZE 12336 /* sizeof(struct qb_ipc_connection_response) */ |
#define | MAX_MSG_SIZE 128*1024 /* 128k default */ |
Functions | |
unsigned int | crm_ipc_default_buffer_size (void) |
xmlNode * | create_request_adv (const char *task, xmlNode *msg_data, const char *host_to, const char *sys_to, const char *sys_from, const char *uuid_from, const char *origin) |
xmlNode * | create_reply_adv (xmlNode *original_request, xmlNode *xml_response_data, const char *origin) |
crm_client_t * | crm_client_get (qb_ipcs_connection_t *c) |
crm_client_t * | crm_client_get_by_id (const char *id) |
const char * | crm_client_name (crm_client_t *c) |
void | crm_client_init (void) |
void | crm_client_cleanup (void) |
void | crm_client_disconnect_all (qb_ipcs_service_t *service) |
crm_client_t * | crm_client_alloc (void *key) |
Allocate a new crm_client_t object and generate its ID. More... | |
crm_client_t * | crm_client_new (qb_ipcs_connection_t *c, uid_t uid_client, gid_t gid_client) |
void | crm_client_destroy (crm_client_t *c) |
bool | crm_set_client_queue_max (crm_client_t *client, const char *qmax) |
Raise IPC eviction threshold for a client, if allowed. More... | |
int | crm_ipcs_client_pid (qb_ipcs_connection_t *c) |
xmlNode * | crm_ipcs_recv (crm_client_t *c, void *data, size_t size, uint32_t *id, uint32_t *flags) |
ssize_t | crm_ipcs_flush_events (crm_client_t *c) |
ssize_t | crm_ipc_prepare (uint32_t request, xmlNode *message, struct iovec **result, uint32_t max_send_size) |
ssize_t | crm_ipcs_sendv (crm_client_t *c, struct iovec *iov, enum crm_ipc_flags flags) |
ssize_t | crm_ipcs_send (crm_client_t *c, uint32_t request, xmlNode *message, enum crm_ipc_flags flags) |
void | crm_ipcs_send_ack (crm_client_t *c, uint32_t request, uint32_t flags, const char *tag, const char *function, int line) |
crm_ipc_t * | crm_ipc_new (const char *name, size_t max_size) |
bool | crm_ipc_connect (crm_ipc_t *client) |
Establish an IPC connection to a Pacemaker component. More... | |
void | crm_ipc_close (crm_ipc_t *client) |
void | crm_ipc_destroy (crm_ipc_t *client) |
int | crm_ipc_get_fd (crm_ipc_t *client) |
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. More... | |
long | crm_ipc_read (crm_ipc_t *client) |
const char * | crm_ipc_buffer (crm_ipc_t *client) |
uint32_t | crm_ipc_buffer_flags (crm_ipc_t *client) |
const char * | crm_ipc_name (crm_ipc_t *client) |
int | crm_ipc_send (crm_ipc_t *client, xmlNode *message, enum crm_ipc_flags flags, int32_t ms_timeout, xmlNode **reply) |
xmlNode * | create_hello_message (const char *uuid, const char *client_name, const char *major_version, const char *minor_version) |
Variables | |
GHashTable * | client_connections = NULL |
#define MIN_MSG_SIZE 12336 /* sizeof(struct qb_ipc_connection_response) */ |
xmlNode* create_hello_message | ( | const char * | uuid, |
const char * | client_name, | ||
const char * | major_version, | ||
const char * | minor_version | ||
) |
xmlNode* create_reply_adv | ( | xmlNode * | original_request, |
xmlNode * | xml_response_data, | ||
const char * | origin | ||
) |
xmlNode* create_request_adv | ( | const char * | task, |
xmlNode * | msg_data, | ||
const char * | host_to, | ||
const char * | sys_to, | ||
const char * | sys_from, | ||
const char * | uuid_from, | ||
const char * | origin | ||
) |
crm_client_t* crm_client_alloc | ( | void * | key | ) |
void crm_client_destroy | ( | crm_client_t * | c | ) |
crm_client_t* crm_client_get | ( | qb_ipcs_connection_t * | c | ) |
crm_client_t* crm_client_get_by_id | ( | const char * | id | ) |
const char* crm_client_name | ( | crm_client_t * | c | ) |
crm_client_t* crm_client_new | ( | qb_ipcs_connection_t * | c, |
uid_t | uid_client, | ||
gid_t | gid_client | ||
) |
bool crm_ipc_connect | ( | crm_ipc_t * | client | ) |
Establish an IPC connection to a Pacemaker component.
[in] | client | Connection instance obtained from crm_ipc_new() |
int crm_ipc_ready | ( | crm_ipc_t * | client | ) |
int crm_ipc_send | ( | crm_ipc_t * | client, |
xmlNode * | message, | ||
enum crm_ipc_flags | flags, | ||
int32_t | ms_timeout, | ||
xmlNode ** | reply | ||
) |
ssize_t crm_ipcs_flush_events | ( | crm_client_t * | c | ) |
xmlNode* crm_ipcs_recv | ( | crm_client_t * | c, |
void * | data, | ||
size_t | size, | ||
uint32_t * | id, | ||
uint32_t * | flags | ||
) |
ssize_t crm_ipcs_send | ( | crm_client_t * | c, |
uint32_t | request, | ||
xmlNode * | message, | ||
enum crm_ipc_flags | flags | ||
) |
void crm_ipcs_send_ack | ( | crm_client_t * | c, |
uint32_t | request, | ||
uint32_t | flags, | ||
const char * | tag, | ||
const char * | function, | ||
int | line | ||
) |
ssize_t crm_ipcs_sendv | ( | crm_client_t * | c, |
struct iovec * | iov, | ||
enum crm_ipc_flags | flags | ||
) |
bool crm_set_client_queue_max | ( | crm_client_t * | client, |
const char * | qmax | ||
) |