pacemaker  2.0.5-ba59be712
Scalable High-Availability cluster resource manager
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.

Macros

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

Functions

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)
 

Variables

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

◆ cs_repeat

#define cs_repeat (   counter,
  max,
  code 
)
Value:
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)
int rc
Definition: pcmk_fence.c:35

Definition at line 39 of file cpg.c.

◆ CS_SEND_MAX

#define CS_SEND_MAX   200

Definition at line 146 of file cpg.c.

Function Documentation

◆ cluster_connect_cpg()

gboolean cluster_connect_cpg ( crm_cluster_t cluster)

Definition at line 539 of file cpg.c.

◆ cluster_disconnect_cpg()

void cluster_disconnect_cpg ( crm_cluster_t cluster)

Definition at line 51 of file cpg.c.

◆ get_local_nodeid()

uint32_t get_local_nodeid ( cpg_handle_t  handle)

Definition at line 65 of file cpg.c.

◆ pcmk_cpg_membership()

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 405 of file cpg.c.

◆ pcmk_message_common_cs()

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 252 of file cpg.c.

◆ send_cluster_message_cs()

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

Definition at line 635 of file cpg.c.

◆ send_cluster_text()

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 647 of file cpg.c.

◆ send_cpg_iov()

gboolean send_cpg_iov ( struct iovec *  iov)

Definition at line 219 of file cpg.c.

◆ text2msg_type()

enum crm_ais_msg_types text2msg_type ( const char *  text)

Definition at line 776 of file cpg.c.

Variable Documentation

◆ cs_message_queue

GListPtr cs_message_queue = NULL

Definition at line 133 of file cpg.c.

◆ cs_message_timer

int cs_message_timer = 0

Definition at line 134 of file cpg.c.

◆ pcmk_cpg_dispatch_fn

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

Definition at line 37 of file cpg.c.

◆ pcmk_cpg_handle

cpg_handle_t pcmk_cpg_handle = 0

Definition at line 34 of file cpg.c.