pacemaker  1.1.18-7fdfbbe
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
internal.h File Reference
#include <crm/cluster.h>
Include dependency graph for internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  crm_ais_host_s
 
struct  crm_ais_msg_s
 
struct  crm_ais_nodeid_resp_s
 
struct  crm_ais_quorum_resp_s
 

Macros

#define AIS_IPC_MESSAGE_SIZE   (8192 * 128)
 
#define CRM_MESSAGE_IPC_ACK   0
 
#define INTERFACE_MAX   2 /* from the private coroapi.h header */
 
#define ais_data_len(msg)   (msg->is_compressed?msg->compressed_size:msg->size)
 

Typedefs

typedef struct crm_ais_host_s AIS_Host
 
typedef struct crm_ais_msg_s AIS_Message
 

Enumerations

enum  crm_proc_flag {
  crm_proc_none = 0x00000001, crm_proc_heartbeat = 0x01000000, crm_proc_plugin = 0x00000002, crm_proc_cpg = 0x04000000,
  crm_proc_lrmd = 0x00000010, crm_proc_cib = 0x00000100, crm_proc_crmd = 0x00000200, crm_proc_attrd = 0x00001000,
  crm_proc_stonithd = 0x00002000, crm_proc_stonith_ng = 0x00100000, crm_proc_pe = 0x00010000, crm_proc_te = 0x00020000,
  crm_proc_mgmtd = 0x00040000
}
 
enum  crm_quorum_source { crm_quorum_cman, crm_quorum_corosync, crm_quorum_pacemaker }
 

Functions

struct crm_ais_host_s __attribute__ ((packed))
 
cs_ipc_header_response_t header __attribute__ ((aligned(8)))
 
enum crm_ais_msg_types text2msg_type (const char *text)
 
char * get_ais_data (const AIS_Message *msg)
 
gboolean check_message_sanity (const AIS_Message *msg, const char *data)
 
int get_corosync_id (int id, const char *uuid)
 
char * get_corosync_uuid (crm_node_t *peer)
 
enum crm_quorum_source get_quorum_source (void)
 
crm_node_tcrm_update_peer (const char *source, unsigned int id, uint64_t born, uint64_t seen, int32_t votes, uint32_t children, const char *uuid, const char *uname, const char *addr, const char *state)
 
crm_node_tcrm_update_peer_proc (const char *source, crm_node_t *peer, uint32_t flag, const char *status)
 
crm_node_tcrm_update_peer_state (const char *source, crm_node_t *node, const char *state, int membership)
 Update a node's state and membership information. More...
 
void crm_update_peer_uname (crm_node_t *node, const char *uname)
 
void crm_update_peer_expected (const char *source, crm_node_t *node, const char *expected)
 
void crm_reap_unseen_nodes (uint64_t ring_id)
 
gboolean init_cman_connection (gboolean(*dispatch)(unsigned long long, gboolean), void(*destroy)(gpointer))
 
gboolean cluster_connect_quorum (gboolean(*dispatch)(unsigned long long, gboolean), void(*destroy)(gpointer))
 
void set_node_uuid (const char *uname, const char *uuid)
 
gboolean node_name_is_valid (const char *key, const char *name)
 
crm_node_tcrm_find_peer_full (unsigned int id, const char *uname, int flags)
 
crm_node_tcrm_find_peer (unsigned int id, const char *uname)
 

Variables

uint32_t id
 
uint32_t pid
 
gboolean local
 
enum crm_ais_msg_types type
 
uint32_t size
 
char uname [MAX_NAME]
 
gboolean is_compressed
 
AIS_Host host
 
AIS_Host sender
 
uint32_t compressed_size
 
char data [0]
 
uint32_t counter
 
char cname [MAX_NAME]
 
uint32_t votes
 
uint32_t expected_votes
 
uint32_t quorate
 
enum crm_proc_flag __attribute__
 

Macro Definition Documentation

#define ais_data_len (   msg)    (msg->is_compressed?msg->compressed_size:msg->size)

Definition at line 208 of file internal.h.

#define AIS_IPC_MESSAGE_SIZE   (8192 * 128)

Definition at line 24 of file internal.h.

#define CRM_MESSAGE_IPC_ACK   0

Definition at line 25 of file internal.h.

#define INTERFACE_MAX   2 /* from the private coroapi.h header */

Definition at line 28 of file internal.h.

Typedef Documentation

typedef struct crm_ais_host_s AIS_Host

Definition at line 31 of file internal.h.

typedef struct crm_ais_msg_s AIS_Message

Definition at line 32 of file internal.h.

Enumeration Type Documentation

Enumerator
crm_proc_none 
crm_proc_heartbeat 
crm_proc_plugin 
crm_proc_cpg 
crm_proc_lrmd 
crm_proc_cib 
crm_proc_crmd 
crm_proc_attrd 
crm_proc_stonithd 
crm_proc_stonith_ng 
crm_proc_pe 
crm_proc_te 
crm_proc_mgmtd 

Definition at line 76 of file internal.h.

Enumerator
crm_quorum_cman 
crm_quorum_corosync 
crm_quorum_pacemaker 

Definition at line 439 of file internal.h.

Function Documentation

struct crm_ais_host_s __attribute__ ( (packed)  )
cs_ipc_header_response_t header __attribute__::__attribute__ ( (aligned(8))  )
gboolean check_message_sanity ( const AIS_Message msg,
const char *  data 
)

Definition at line 1356 of file plugin.c.

gboolean cluster_connect_quorum ( gboolean(*)(unsigned long long, gboolean)  dispatch,
void(*)(gpointer)  destroy 
)

Definition at line 249 of file corosync.c.

crm_node_t* crm_find_peer ( unsigned int  id,
const char *  uname 
)

Definition at line 540 of file membership.c.

crm_node_t* crm_find_peer_full ( unsigned int  id,
const char *  uname,
int  flags 
)

Definition at line 502 of file membership.c.

void crm_reap_unseen_nodes ( uint64_t  ring_id)

Definition at line 1089 of file membership.c.

crm_node_t* crm_update_peer ( const char *  source,
unsigned int  id,
uint64_t  born,
uint64_t  seen,
int32_t  votes,
uint32_t  children,
const char *  uuid,
const char *  uname,
const char *  addr,
const char *  state 
)

Definition at line 755 of file membership.c.

void crm_update_peer_expected ( const char *  source,
crm_node_t node,
const char *  expected 
)

Definition at line 965 of file membership.c.

crm_node_t* crm_update_peer_proc ( const char *  source,
crm_node_t peer,
uint32_t  flag,
const char *  status 
)

Definition at line 891 of file membership.c.

crm_node_t* crm_update_peer_state ( const char *  source,
crm_node_t node,
const char *  state,
int  membership 
)

Update a node's state and membership information.

Parameters
[in]sourceCaller's function name (for log messages)
[in]nodeNode object to update
[in]stateNode's new state
[in]membershipNode's new membership ID
Returns
NULL if any node was reaped, value of node otherwise
Note
If this function returns NULL, the supplied node object was likely freed and should not be used again. This function should not be called within a cache iteration if reaping is possible, otherwise reaping could invalidate the iterator.

Definition at line 1077 of file membership.c.

void crm_update_peer_uname ( crm_node_t node,
const char *  uname 
)

Definition at line 838 of file membership.c.

char* get_ais_data ( const AIS_Message msg)

Definition at line 454 of file utils.c.

int get_corosync_id ( int  id,
const char *  uuid 
)

Definition at line 96 of file cluster.c.

char* get_corosync_uuid ( crm_node_t peer)

Definition at line 106 of file cluster.c.

enum crm_quorum_source get_quorum_source ( void  )
gboolean init_cman_connection ( gboolean(*)(unsigned long long, gboolean)  dispatch,
void(*)(gpointer)  destroy 
)

Definition at line 435 of file legacy.c.

gboolean node_name_is_valid ( const char *  key,
const char *  name 
)

Definition at line 651 of file cluster.c.

void set_node_uuid ( const char *  uname,
const char *  uuid 
)
enum crm_ais_msg_types text2msg_type ( const char *  text)

Definition at line 652 of file cpg.c.

Variable Documentation

cs_ipc_header_response_t header __attribute__
char cname[MAX_NAME]

Definition at line 52 of file internal.h.

uint32_t compressed_size

Definition at line 56 of file internal.h.

uint32_t counter

Definition at line 50 of file internal.h.

char data[0]

Definition at line 58 of file internal.h.

uint32_t expected_votes

Definition at line 51 of file internal.h.

AIS_Host host

Definition at line 52 of file internal.h.

uint64_t id

Definition at line 48 of file internal.h.

gboolean is_compressed

Definition at line 50 of file internal.h.

gboolean local

Definition at line 50 of file internal.h.

uint32_t pid

Definition at line 49 of file internal.h.

uint32_t quorate

Definition at line 52 of file internal.h.

AIS_Host sender

Definition at line 53 of file internal.h.

uint32_t size

Definition at line 52 of file internal.h.

enum crm_ais_msg_types type

Definition at line 51 of file internal.h.

char uname

Definition at line 53 of file internal.h.

uint32_t votes

Definition at line 50 of file internal.h.