pacemaker  1.1.18-7fdfbbe
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 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 (int 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

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

Definition at line 46 of file cpg.c.

#define CS_SEND_MAX   200

Definition at line 128 of file cpg.c.

Function Documentation

gboolean cluster_connect_cpg ( crm_cluster_t cluster)

Definition at line 436 of file cpg.c.

void cluster_disconnect_cpg ( crm_cluster_t cluster)

Definition at line 58 of file cpg.c.

uint32_t get_local_nodeid ( cpg_handle_t  handle)

Definition at line 72 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 363 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 233 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 509 of file cpg.c.

gboolean send_cluster_text ( int  class,
const char *  data,
gboolean  local,
crm_node_t node,
enum crm_ais_msg_types  dest 
)

Definition at line 521 of file cpg.c.

gboolean send_cpg_iov ( struct iovec *  iov)

Definition at line 201 of file cpg.c.

enum crm_ais_msg_types text2msg_type ( const char *  text)

Definition at line 652 of file cpg.c.

Variable Documentation

GListPtr cs_message_queue = NULL

Definition at line 115 of file cpg.c.

int cs_message_timer = 0

Definition at line 116 of file cpg.c.

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

Definition at line 44 of file cpg.c.

cpg_handle_t pcmk_cpg_handle = 0

Definition at line 41 of file cpg.c.