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

Macros

#define pcmk__set_peer_flags(peer, flags_to_set)
 
#define pcmk__clear_peer_flags(peer, flags_to_clear)
 
#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_cpg = 0x04000000, crm_proc_execd = 0x00000010, crm_proc_based = 0x00000100,
  crm_proc_controld = 0x00000200, crm_proc_attrd = 0x00001000, crm_proc_schedulerd = 0x00010000, crm_proc_fenced = 0x00100000
}
 

Functions

struct crm_ais_host_s __attribute__ ((packed))
 
cs_ipc_header_response_t header __attribute__ ((aligned(8)))
 
gboolean check_message_sanity (const AIS_Message *msg, const char *data)
 
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, uint64_t 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 cluster_connect_quorum (gboolean(*dispatch)(unsigned long long, gboolean), void(*destroy)(gpointer))
 
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)
 
void crm_peer_caches_refresh (xmlNode *cib)
 
crm_node_tcrm_find_known_peer_full (unsigned int id, const char *uname, int flags)
 

Variables

typedef __attribute__
 
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]
 

Macro Definition Documentation

◆ ais_data_len

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

Definition at line 152 of file internal.h.

◆ pcmk__clear_peer_flags

#define pcmk__clear_peer_flags (   peer,
  flags_to_clear 
)
Value:
do { \
(peer)->flags = pcmk__clear_flags_as(__func__, __LINE__, \
"Peer", (peer)->uname, \
(peer)->flags, (flags_to_clear), \
#flags_to_clear); \
} while (0)
#define LOG_TRACE
Definition: logging.h:36
uint64_t flags
Definition: remote.c:149

Definition at line 22 of file internal.h.

◆ pcmk__set_peer_flags

#define pcmk__set_peer_flags (   peer,
  flags_to_set 
)
Value:
do { \
(peer)->flags = pcmk__set_flags_as(__func__, __LINE__, LOG_TRACE, \
"Peer", (peer)->uname, \
(peer)->flags, (flags_to_set), \
#flags_to_set); \
} while (0)
#define LOG_TRACE
Definition: logging.h:36
uint64_t flags
Definition: remote.c:149

Definition at line 15 of file internal.h.

Typedef Documentation

◆ AIS_Host

typedef struct crm_ais_host_s AIS_Host

Definition at line 30 of file internal.h.

◆ AIS_Message

typedef struct crm_ais_msg_s AIS_Message

Definition at line 31 of file internal.h.

Enumeration Type Documentation

◆ crm_proc_flag

Enumerator
crm_proc_none 
crm_proc_cpg 
crm_proc_execd 
crm_proc_based 
crm_proc_controld 
crm_proc_attrd 
crm_proc_schedulerd 
crm_proc_fenced 

Definition at line 71 of file internal.h.

Function Documentation

◆ __attribute__() [1/2]

struct crm_ais_host_s __attribute__ ( (packed)  )

◆ __attribute__() [2/2]

cs_ipc_header_response_t header __attribute__::__attribute__ ( (aligned(8))  )

◆ check_message_sanity()

gboolean check_message_sanity ( const AIS_Message msg,
const char *  data 
)

Definition at line 421 of file corosync.c.

◆ cluster_connect_quorum()

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

Definition at line 272 of file corosync.c.

◆ crm_find_known_peer_full()

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

Definition at line 1170 of file membership.c.

◆ crm_find_peer()

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

Definition at line 522 of file membership.c.

◆ crm_find_peer_full()

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

Definition at line 484 of file membership.c.

◆ crm_peer_caches_refresh()

void crm_peer_caches_refresh ( xmlNode *  cib)

Definition at line 1163 of file membership.c.

◆ crm_reap_unseen_nodes()

void crm_reap_unseen_nodes ( uint64_t  ring_id)

Definition at line 990 of file membership.c.

◆ crm_update_peer_expected()

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

Definition at line 864 of file membership.c.

◆ crm_update_peer_proc()

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

Definition at line 786 of file membership.c.

◆ crm_update_peer_state()

crm_node_t* crm_update_peer_state ( const char *  source,
crm_node_t node,
const char *  state,
uint64_t  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 978 of file membership.c.

◆ crm_update_peer_uname()

void crm_update_peer_uname ( crm_node_t node,
const char *  uname 
)

Definition at line 733 of file membership.c.

◆ node_name_is_valid()

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

Definition at line 336 of file cluster.c.

Variable Documentation

◆ __attribute__

◆ compressed_size

uint32_t compressed_size

Definition at line 88 of file internal.h.

◆ data

char data[0]

Definition at line 90 of file internal.h.

◆ host

AIS_Host host

Definition at line 84 of file internal.h.

◆ id

uint32_t id

Definition at line 80 of file internal.h.

◆ is_compressed

gboolean is_compressed

Definition at line 82 of file internal.h.

◆ local

gboolean local

Definition at line 82 of file internal.h.

◆ pid

uint32_t pid

Definition at line 81 of file internal.h.

◆ sender

AIS_Host sender

Definition at line 85 of file internal.h.

◆ size

uint32_t size

Definition at line 84 of file internal.h.

◆ type

enum crm_ais_msg_types type

Definition at line 83 of file internal.h.

◆ uname

char uname[MAX_NAME]

Definition at line 85 of file internal.h.