pacemaker  2.0.2-debe490
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
cpg.c File Reference
#include <crm_internal.h>
#include <bzlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <crm/common/ipc.h>
#include <crm/cluster/internal.h>
#include <crm/common/mainloop.h>
#include <sys/utsname.h>
#include <qb/qbipcc.h>
#include <qb/qbutil.h>
#include <corosync/corodefs.h>
#include <corosync/corotypes.h>
#include <corosync/hdb.h>
#include <corosync/cpg.h>
#include <crm/msg_xml.h>
#include <crm/common/ipc_internal.h>
Include dependency graph for cpg.c:

Go to the source code of this file.


#define cs_repeat(counter, max, code)
#define CS_SEND_MAX   200


void cluster_disconnect_cpg (crm_cluster_t *cluster)
uint32_t get_local_nodeid (cpg_handle_t handle)
gboolean send_cpg_iov (struct iovec *iov)
char * pcmk_message_common_cs (cpg_handle_t handle, uint32_t nodeid, uint32_t pid, void *content, uint32_t *kind, const char **from)
void pcmk_cpg_membership (cpg_handle_t handle, const struct cpg_name *groupName, const struct cpg_address *member_list, size_t member_list_entries, const struct cpg_address *left_list, size_t left_list_entries, const struct cpg_address *joined_list, size_t joined_list_entries)
gboolean cluster_connect_cpg (crm_cluster_t *cluster)
gboolean send_cluster_message_cs (xmlNode *msg, gboolean local, crm_node_t *node, enum crm_ais_msg_types dest)
gboolean send_cluster_text (enum crm_ais_msg_class msg_class, const char *data, gboolean local, crm_node_t *node, enum crm_ais_msg_types dest)
enum crm_ais_msg_types text2msg_type (const char *text)


cpg_handle_t pcmk_cpg_handle = 0
gboolean(* pcmk_cpg_dispatch_fn )(int kind, const char *from, const char *data) = NULL
GListPtr cs_message_queue = NULL
int cs_message_timer = 0

Macro Definition Documentation

#define cs_repeat (   counter,
do { \
code; \
if(rc == CS_ERR_TRY_AGAIN || rc == CS_ERR_QUEUE_FULL) { \
counter++; \
crm_debug("Retrying operation after %ds", counter); \
sleep(counter); \
} else { \
break; \
} \
} while(counter < max)
#define crm_debug(fmt, args...)
Definition: logging.h:245

Definition at line 39 of file cpg.c.

#define CS_SEND_MAX   200

Definition at line 146 of file cpg.c.

Function Documentation

gboolean cluster_connect_cpg ( crm_cluster_t cluster)

Definition at line 537 of file cpg.c.

void cluster_disconnect_cpg ( crm_cluster_t cluster)

Definition at line 51 of file cpg.c.

uint32_t get_local_nodeid ( cpg_handle_t  handle)

Definition at line 65 of file cpg.c.

void pcmk_cpg_membership ( cpg_handle_t  handle,
const struct cpg_name *  groupName,
const struct cpg_address *  member_list,
size_t  member_list_entries,
const struct cpg_address *  left_list,
size_t  left_list_entries,
const struct cpg_address *  joined_list,
size_t  joined_list_entries 

Definition at line 404 of file cpg.c.

char* pcmk_message_common_cs ( cpg_handle_t  handle,
uint32_t  nodeid,
uint32_t  pid,
void *  content,
uint32_t *  kind,
const char **  from 

Definition at line 251 of file cpg.c.

gboolean send_cluster_message_cs ( xmlNode *  msg,
gboolean  local,
crm_node_t node,
enum crm_ais_msg_types  dest 

Definition at line 633 of file cpg.c.

gboolean send_cluster_text ( enum crm_ais_msg_class  msg_class,
const char *  data,
gboolean  local,
crm_node_t node,
enum crm_ais_msg_types  dest 

Definition at line 645 of file cpg.c.

gboolean send_cpg_iov ( struct iovec *  iov)

Definition at line 219 of file cpg.c.

enum crm_ais_msg_types text2msg_type ( const char *  text)

Definition at line 771 of file cpg.c.

Variable Documentation

GListPtr cs_message_queue = NULL

Definition at line 133 of file cpg.c.

int cs_message_timer = 0

Definition at line 134 of file cpg.c.

gboolean(* pcmk_cpg_dispatch_fn)(int kind, const char *from, const char *data) = NULL

Definition at line 37 of file cpg.c.

cpg_handle_t pcmk_cpg_handle = 0

Definition at line 34 of file cpg.c.