pacemaker  1.1.12-561c4cf
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
internal.h File Reference
#include <crm/cluster.h>
Include dependency graph for internal.h:

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_NAME   "ais-crm-ipc"
 
#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)
 
void crm_update_peer_proc (const char *source, crm_node_t *peer, uint32_t flag, const char *status)
 
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)
 
void crm_update_peer_expected (const char *source, crm_node_t *node, const char *expected)
 
void crm_update_peer_state (const char *source, crm_node_t *node, const char *state, int membership)
 
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 184 of file internal.h.

#define AIS_IPC_MESSAGE_SIZE   8192*128

Definition at line 25 of file internal.h.

#define AIS_IPC_NAME   "ais-crm-ipc"

Definition at line 24 of file internal.h.

#define CRM_MESSAGE_IPC_ACK   0

Definition at line 26 of file internal.h.

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

Definition at line 29 of file internal.h.

Typedef Documentation

typedef struct crm_ais_host_s AIS_Host

Definition at line 32 of file internal.h.

typedef struct crm_ais_msg_s AIS_Message

Definition at line 33 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 77 of file internal.h.

Enumerator
crm_quorum_cman 
crm_quorum_corosync 
crm_quorum_pacemaker 

Definition at line 415 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 
)
gboolean cluster_connect_quorum ( gboolean(*)(unsigned long long, gboolean)  dispatch,
void(*)(gpointer)  destroy 
)
crm_node_t* crm_find_peer ( unsigned int  id,
const char *  uname 
)
crm_node_t* crm_find_peer_full ( unsigned int  id,
const char *  uname,
int  flags 
)
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 
)
void crm_update_peer_expected ( const char *  source,
crm_node_t node,
const char *  expected 
)
void crm_update_peer_proc ( const char *  source,
crm_node_t peer,
uint32_t  flag,
const char *  status 
)
void crm_update_peer_state ( const char *  source,
crm_node_t node,
const char *  state,
int  membership 
)
char* get_ais_data ( const AIS_Message msg)
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  )
gboolean init_cman_connection ( gboolean(*)(unsigned long long, gboolean)  dispatch,
void(*)(gpointer)  destroy 
)
gboolean node_name_is_valid ( const char *  key,
const char *  name 
)
void set_node_uuid ( const char *  uname,
const char *  uuid 
)
enum crm_ais_msg_types text2msg_type ( const char *  text)

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.