#include <crm_internal.h>
#include <arpa/inet.h>
#include <inttypes.h>
#include <netdb.h>
#include <netinet/in.h>
#include <stdbool.h>
#include <stdint.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/utsname.h>
#include <bzlib.h>
#include <corosync/corodefs.h>
#include <corosync/corotypes.h>
#include <corosync/hdb.h>
#include <corosync/cpg.h>
#include <qb/qbipc_common.h>
#include <qb/qbipcc.h>
#include <qb/qbutil.h>
#include <crm/cluster/internal.h>
#include <crm/common/ipc.h>
#include <crm/common/ipc_internal.h>
#include <crm/common/mainloop.h>
#include <crm/common/xml.h>
#include "crmcluster_private.h"
Go to the source code of this file.
|
struct pcmk__cpg_host_s | __attribute__ ((packed)) |
|
struct qb_ipc_response_header header | __attribute__ ((aligned(8))) |
|
uint32_t | pcmk__cpg_local_nodeid (cpg_handle_t handle) |
|
char * | pcmk__cpg_message_data (cpg_handle_t handle, uint32_t sender_id, uint32_t pid, void *content, const char **from) |
|
void | pcmk__cpg_confchg_cb (cpg_handle_t handle, const struct cpg_name *group_name, 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) |
|
int | pcmk_cpg_set_deliver_fn (pcmk_cluster_t *cluster, cpg_deliver_fn_t fn) |
| Set the CPG deliver callback function for a cluster object.
|
|
int | pcmk_cpg_set_confchg_fn (pcmk_cluster_t *cluster, cpg_confchg_fn_t fn) |
| Set the CPG config change callback function for a cluster object.
|
|
int | pcmk__cpg_connect (pcmk_cluster_t *cluster) |
| Connect to Corosync CPG.
|
|
void | pcmk__cpg_disconnect (pcmk_cluster_t *cluster) |
|
bool | pcmk__cpg_send_xml (const xmlNode *msg, const pcmk__node_status_t *node, enum pcmk_ipc_server dest) |
|
◆ cs_repeat
#define cs_repeat |
( |
| rc, |
|
|
| counter, |
|
|
| max, |
|
|
| code ) |
Value: do { \
rc = 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)
Definition at line 86 of file cpg.c.
◆ CS_SEND_MAX
◆ msg_data_len
#define msg_data_len |
( |
| msg | ) |
|
Value:(msg->is_compressed?msg->compressed_size:msg->size)
Definition at line 84 of file cpg.c.
◆ pcmk__cpg_host_t
Definition at line 63 of file cpg.c.
◆ pcmk__cpg_msg_t
Definition at line 80 of file cpg.c.
◆ __attribute__() [1/2]
struct qb_ipc_response_header header __attribute__::__attribute__ |
( |
(aligned(8)) | | ) |
|
◆ __attribute__() [2/2]
struct pcmk__cpg_host_s __attribute__ |
( |
(packed) | | ) |
|
◆ pcmk__cpg_confchg_cb()
void pcmk__cpg_confchg_cb |
( |
cpg_handle_t | handle, |
|
|
const struct cpg_name * | group_name, |
|
|
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 ) |
◆ pcmk__cpg_connect()
Connect to Corosync CPG.
- Parameters
-
[in,out] | cluster | Initialized cluster object to connect |
- Returns
- Standard Pacemaker return code
Definition at line 779 of file cpg.c.
◆ pcmk__cpg_disconnect()
◆ pcmk__cpg_local_nodeid()
uint32_t pcmk__cpg_local_nodeid |
( |
cpg_handle_t | handle | ) |
|
◆ pcmk__cpg_message_data()
char * pcmk__cpg_message_data |
( |
cpg_handle_t | handle, |
|
|
uint32_t | sender_id, |
|
|
uint32_t | pid, |
|
|
void * | content, |
|
|
const char ** | from ) |
◆ pcmk__cpg_send_xml()
◆ pcmk_cpg_set_confchg_fn()
int pcmk_cpg_set_confchg_fn |
( |
pcmk_cluster_t * | cluster, |
|
|
cpg_confchg_fn_t | fn ) |
Set the CPG config change callback function for a cluster object.
- Parameters
-
[in,out] | cluster | Cluster object |
[in] | fn | Configuration change callback function to set |
- Returns
- Standard Pacemaker return code
Definition at line 762 of file cpg.c.
◆ pcmk_cpg_set_deliver_fn()
int pcmk_cpg_set_deliver_fn |
( |
pcmk_cluster_t * | cluster, |
|
|
cpg_deliver_fn_t | fn ) |
Set the CPG deliver callback function for a cluster object.
- Parameters
-
[in,out] | cluster | Cluster object |
[in] | fn | Deliver callback function to set |
- Returns
- Standard Pacemaker return code
Definition at line 744 of file cpg.c.
◆ compressed_size
Definition at line 8 of file cpg.c.
◆ data
Definition at line 10 of file cpg.c.
◆ host
Definition at line 4 of file cpg.c.
◆ id
Definition at line 0 of file cpg.c.
◆ is_compressed
Definition at line 2 of file cpg.c.
◆ local
Definition at line 2 of file cpg.c.
◆ pid
Definition at line 1 of file cpg.c.
◆ sender
Definition at line 5 of file cpg.c.
◆ size
Definition at line 4 of file cpg.c.
◆ type
Definition at line 3 of file cpg.c.
◆ uname
Definition at line 5 of file cpg.c.