corosync 3.1.7
Data Structures | Macros | Enumerations | Functions | Variables
exec/cpg.c File Reference
#include <config.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <sys/uio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <time.h>
#include <assert.h>
#include <arpa/inet.h>
#include <sys/mman.h>
#include <qb/qblist.h>
#include <qb/qbmap.h>
#include <corosync/corotypes.h>
#include <qb/qbipc_common.h>
#include <corosync/corodefs.h>
#include <corosync/logsys.h>
#include <corosync/coroapi.h>
#include <corosync/cpg.h>
#include <corosync/ipc_cpg.h>
#include "service.h"
Include dependency graph for exec/cpg.c:

Go to the source code of this file.

Data Structures

struct  zcb_mapped
 
struct  cpg_pd
 
struct  cpg_iteration_instance
 
struct  process_info
 
struct  join_list_entry
 
struct  join_list_confchg_data
 
struct  req_exec_cpg_procjoin
 
struct  req_exec_cpg_mcast
 
struct  req_exec_cpg_partial_mcast
 
struct  req_exec_cpg_downlist_old
 
struct  req_exec_cpg_downlist
 
struct  joinlist_msg
 
union  u
 

Macros

#define MAP_ANONYMOUS   MAP_ANON
 
#define GROUP_HASH_SIZE   32
 

Enumerations

enum  cpg_message_req_types {
  MESSAGE_REQ_EXEC_CPG_PROCJOIN = 0 , MESSAGE_REQ_EXEC_CPG_PROCLEAVE = 1 , MESSAGE_REQ_EXEC_CPG_JOINLIST = 2 , MESSAGE_REQ_EXEC_CPG_MCAST = 3 ,
  MESSAGE_REQ_EXEC_CPG_DOWNLIST_OLD = 4 , MESSAGE_REQ_EXEC_CPG_DOWNLIST = 5 , MESSAGE_REQ_EXEC_CPG_PARTIAL_MCAST = 6
}
 
enum  cpd_state { CPD_STATE_UNJOINED , CPD_STATE_LEAVE_STARTED , CPD_STATE_JOIN_STARTED , CPD_STATE_JOIN_COMPLETED }
 
enum  cpg_sync_state { CPGSYNC_DOWNLIST , CPGSYNC_JOINLIST }
 

Functions

 LOGSYS_DECLARE_SUBSYS ("CPG")
 
 DECLARE_HDB_DATABASE (cpg_iteration_handle_t_db, NULL)
 
 QB_LIST_DECLARE (cpg_pd_list_head)
 
 QB_LIST_DECLARE (process_info_list_head)
 
struct corosync_service_enginecpg_get_service_engine_ver0 (void)
 

Variables

struct corosync_service_engine cpg_service_engine
 

Macro Definition Documentation

◆ GROUP_HASH_SIZE

#define GROUP_HASH_SIZE   32

Definition at line 77 of file exec/cpg.c.

◆ MAP_ANONYMOUS

#define MAP_ANONYMOUS   MAP_ANON

Definition at line 70 of file exec/cpg.c.

Enumeration Type Documentation

◆ cpd_state

enum cpd_state
Enumerator
CPD_STATE_UNJOINED 
CPD_STATE_LEAVE_STARTED 
CPD_STATE_JOIN_STARTED 
CPD_STATE_JOIN_COMPLETED 

Definition at line 131 of file exec/cpg.c.

◆ cpg_message_req_types

Enumerator
MESSAGE_REQ_EXEC_CPG_PROCJOIN 
MESSAGE_REQ_EXEC_CPG_PROCLEAVE 
MESSAGE_REQ_EXEC_CPG_JOINLIST 
MESSAGE_REQ_EXEC_CPG_MCAST 
MESSAGE_REQ_EXEC_CPG_DOWNLIST_OLD 
MESSAGE_REQ_EXEC_CPG_DOWNLIST 
MESSAGE_REQ_EXEC_CPG_PARTIAL_MCAST 

Definition at line 79 of file exec/cpg.c.

◆ cpg_sync_state

Enumerator
CPGSYNC_DOWNLIST 
CPGSYNC_JOINLIST 

Definition at line 138 of file exec/cpg.c.

Function Documentation

◆ cpg_get_service_engine_ver0()

struct corosync_service_engine * cpg_get_service_engine_ver0 ( void  )

Definition at line 454 of file exec/cpg.c.

References cpg_service_engine.

◆ DECLARE_HDB_DATABASE()

DECLARE_HDB_DATABASE ( cpg_iteration_handle_t_db  ,
NULL   
)

◆ LOGSYS_DECLARE_SUBSYS()

LOGSYS_DECLARE_SUBSYS ( "CPG"  )

◆ QB_LIST_DECLARE() [1/2]

QB_LIST_DECLARE ( cpg_pd_list_head  )

◆ QB_LIST_DECLARE() [2/2]

QB_LIST_DECLARE ( process_info_list_head  )

Variable Documentation

◆ cpg_service_engine

struct corosync_service_engine cpg_service_engine
Initial value:
= {
.name = "corosync cluster closed process group service v1.01",
.id = CPG_SERVICE,
.priority = 1,
.private_data_size = sizeof (struct cpg_pd),
.allow_inquorate = CS_LIB_ALLOW_INQUORATE,
.lib_init_fn = cpg_lib_init_fn,
.lib_exit_fn = cpg_lib_exit_fn,
.lib_engine = cpg_lib_engine,
.lib_engine_count = sizeof (cpg_lib_engine) / sizeof (struct corosync_lib_handler),
.exec_init_fn = cpg_exec_init_fn,
.exec_dump_fn = NULL,
.exec_engine = cpg_exec_engine,
.exec_engine_count = sizeof (cpg_exec_engine) / sizeof (struct corosync_exec_handler),
.sync_init = cpg_sync_init,
.sync_process = cpg_sync_process,
.sync_activate = cpg_sync_activate,
.sync_abort = cpg_sync_abort
}
@ CS_LIB_ALLOW_INQUORATE
Definition: coroapi.h:164
@ CS_LIB_FLOW_CONTROL_REQUIRED
Definition: coroapi.h:152
@ CPG_SERVICE
Definition: corodefs.h:46
The corosync_exec_handler struct.
Definition: coroapi.h:475
The corosync_lib_handler struct.
Definition: coroapi.h:467

Definition at line 433 of file exec/cpg.c.

Referenced by cpg_get_service_engine_ver0().