corosync 3.1.7
Data Structures | Macros | Typedefs | Enumerations | Functions
cpg.h File Reference
#include <netinet/in.h>
#include <corosync/corotypes.h>
Include dependency graph for cpg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cpg_address
 The cpg_address struct. More...
 
struct  cpg_name
 The cpg_name struct. More...
 
struct  cpg_iteration_description_t
 The cpg_iteration_description_t struct. More...
 
struct  cpg_ring_id
 The cpg_ring_id struct. More...
 
struct  cpg_callbacks_t
 The cpg_callbacks_t struct. More...
 
struct  cpg_model_data_t
 The cpg_model_data_t struct. More...
 
struct  cpg_model_v1_data_t
 The cpg_model_v1_data_t struct. More...
 

Macros

#define CPG_MAX_NAME_LENGTH   128
 
#define CPG_MEMBERS_MAX   128
 
#define CPG_MODEL_V1_DELIVER_INITIAL_TOTEM_CONF   0x01
 

Typedefs

typedef uint64_t cpg_handle_t
 cpg_handle_t More...
 
typedef uint64_t cpg_iteration_handle_t
 cpg_iteration_handle_t More...
 
typedef void(* cpg_deliver_fn_t) (cpg_handle_t handle, const struct cpg_name *group_name, uint32_t nodeid, uint32_t pid, void *msg, size_t msg_len)
 The cpg_deliver_fn_t callback. More...
 
typedef void(* cpg_confchg_fn_t) (cpg_handle_t handle, const struct cpg_name *group_name, const struct cpg_address *member_list, size_t member_list_entries, const struct cpg_address *left_list, size_t left_list_entries, const struct cpg_address *joined_list, size_t joined_list_entries)
 The cpg_confchg_fn_t callback. More...
 
typedef void(* cpg_totem_confchg_fn_t) (cpg_handle_t handle, struct cpg_ring_id ring_id, uint32_t member_list_entries, const uint32_t *member_list)
 The cpg_totem_confchg_fn_t callback. More...
 

Enumerations

enum  cpg_guarantee_t { CPG_TYPE_UNORDERED , CPG_TYPE_FIFO , CPG_TYPE_AGREED , CPG_TYPE_SAFE }
 The cpg_guarantee_t enum. More...
 
enum  cpg_flow_control_state_t { CPG_FLOW_CONTROL_DISABLED , CPG_FLOW_CONTROL_ENABLED }
 The cpg_flow_control_state_t enum. More...
 
enum  cpg_reason_t {
  CPG_REASON_UNDEFINED = 0 , CPG_REASON_JOIN = 1 , CPG_REASON_LEAVE = 2 , CPG_REASON_NODEDOWN = 3 ,
  CPG_REASON_NODEUP = 4 , CPG_REASON_PROCDOWN = 5
}
 The cpg_reason_t enum. More...
 
enum  cpg_iteration_type_t { CPG_ITERATION_NAME_ONLY = 1 , CPG_ITERATION_ONE_GROUP = 2 , CPG_ITERATION_ALL = 3 }
 The cpg_iteration_type_t enum. More...
 
enum  cpg_model_t { CPG_MODEL_V1 = 1 }
 The cpg_model_t enum. More...
 

Functions

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_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_membership_get (cpg_handle_t handle, struct cpg_name *groupName, 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_enabled)
 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_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...