corosync 3.1.7
Data Structures | Macros | Functions
lib/cpg.c File Reference
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/mman.h>
#include <sys/uio.h>
#include <sys/stat.h>
#include <errno.h>
#include <limits.h>
#include <qb/qblist.h>
#include <qb/qbdefs.h>
#include <qb/qbipcc.h>
#include <qb/qblog.h>
#include <corosync/hdb.h>
#include <corosync/corotypes.h>
#include <corosync/corodefs.h>
#include <corosync/cpg.h>
#include <corosync/ipc_cpg.h>
#include "util.h"
Include dependency graph for lib/cpg.c:

Go to the source code of this file.

Data Structures

struct  cpg_assembly_data
 
struct  cpg_inst
 
struct  cpg_iteration_instance_t
 

Macros

#define MAP_ANONYMOUS   MAP_ANON
 
#define MAX_RETRIES   100
 
#define CPG_MEMORY_MAP_UMASK   077
 

Functions

 DECLARE_HDB_DATABASE (cpg_handle_t_db, cpg_inst_free)
 
 DECLARE_HDB_DATABASE (cpg_iteration_handle_t_db, NULL)
 
cs_error_t cpg_initialize (cpg_handle_t *handle, cpg_callbacks_t *callbacks)
 Create a new cpg connection. More...
 
cs_error_t cpg_model_initialize (cpg_handle_t *handle, cpg_model_t model, cpg_model_data_t *model_data, void *context)
 Create a new cpg connection, initialize with model. More...
 
cs_error_t cpg_finalize (cpg_handle_t handle)
 Close the cpg handle. More...
 
cs_error_t cpg_fd_get (cpg_handle_t handle, int *fd)
 Get a file descriptor on which to poll. More...
 
cs_error_t cpg_max_atomic_msgsize_get (cpg_handle_t handle, uint32_t *size)
 Get maximum size of a message that will not be fragmented. More...
 
cs_error_t cpg_context_get (cpg_handle_t handle, void **context)
 Get contexts for a CPG handle. More...
 
cs_error_t cpg_context_set (cpg_handle_t handle, void *context)
 Set contexts for a CPG handle. More...
 
cs_error_t cpg_dispatch (cpg_handle_t handle, cs_dispatch_flags_t dispatch_types)
 Dispatch messages and configuration changes. More...
 
cs_error_t cpg_join (cpg_handle_t handle, const struct cpg_name *group)
 Join one or more groups. More...
 
cs_error_t cpg_leave (cpg_handle_t handle, const struct cpg_name *group)
 Leave one or more groups. More...
 
cs_error_t cpg_membership_get (cpg_handle_t handle, struct cpg_name *group_name, struct cpg_address *member_list, int *member_list_entries)
 Get membership information from cpg. More...
 
cs_error_t cpg_local_get (cpg_handle_t handle, unsigned int *local_nodeid)
 cpg_local_get More...
 
cs_error_t cpg_flow_control_state_get (cpg_handle_t handle, cpg_flow_control_state_t *flow_control_state)
 cpg_flow_control_state_get More...
 
cs_error_t cpg_zcb_alloc (cpg_handle_t handle, size_t size, void **buffer)
 cpg_zcb_alloc More...
 
cs_error_t cpg_zcb_free (cpg_handle_t handle, void *buffer)
 cpg_zcb_free More...
 
cs_error_t cpg_zcb_mcast_joined (cpg_handle_t handle, cpg_guarantee_t guarantee, void *msg, size_t msg_len)
 cpg_zcb_mcast_joined More...
 
cs_error_t cpg_mcast_joined (cpg_handle_t handle, cpg_guarantee_t guarantee, const struct iovec *iovec, unsigned int iov_len)
 Multicast to groups joined with cpg_join. More...
 
cs_error_t cpg_iteration_initialize (cpg_handle_t handle, cpg_iteration_type_t iteration_type, const struct cpg_name *group, cpg_iteration_handle_t *cpg_iteration_handle)
 cpg_iteration_initialize More...
 
cs_error_t cpg_iteration_next (cpg_iteration_handle_t handle, struct cpg_iteration_description_t *description)
 cpg_iteration_next More...
 
cs_error_t cpg_iteration_finalize (cpg_iteration_handle_t handle)
 cpg_iteration_finalize More...
 

Macro Definition Documentation

◆ CPG_MEMORY_MAP_UMASK

#define CPG_MEMORY_MAP_UMASK   077

Definition at line 81 of file lib/cpg.c.

◆ MAP_ANONYMOUS

#define MAP_ANONYMOUS   MAP_ANON

Definition at line 69 of file lib/cpg.c.

◆ MAX_RETRIES

#define MAX_RETRIES   100

Definition at line 76 of file lib/cpg.c.

Function Documentation

◆ DECLARE_HDB_DATABASE() [1/2]

DECLARE_HDB_DATABASE ( cpg_handle_t_db  ,
cpg_inst_free   
)

◆ DECLARE_HDB_DATABASE() [2/2]

DECLARE_HDB_DATABASE ( cpg_iteration_handle_t_db  ,
NULL   
)