35#ifndef COROSYNC_CPG_H_DEFINED
36#define COROSYNC_CPG_H_DEFINED
38#include <netinet/in.h>
116#define CPG_MAX_NAME_LENGTH 128
125#define CPG_MEMBERS_MAX 128
165 const struct cpg_address *member_list,
size_t member_list_entries,
166 const struct cpg_address *left_list,
size_t left_list_entries,
167 const struct cpg_address *joined_list,
size_t joined_list_entries);
175 uint32_t member_list_entries,
176 const uint32_t *member_list);
193#define CPG_MODEL_V1_DELIVER_INITIAL_TOTEM_CONF 0x01
331 const struct iovec *iovec,
332 unsigned int iov_len);
346 int *member_list_entries);
355 unsigned int *local_nodeid);
cs_dispatch_flags_t
The cs_dispatch_flags_t enum.
cs_error_t
The cs_error_t enum.
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
cs_error_t cpg_iteration_next(cpg_iteration_handle_t handle, struct cpg_iteration_description_t *description)
cpg_iteration_next
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.
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.
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.
cs_error_t cpg_leave(cpg_handle_t handle, const struct cpg_name *group)
Leave one or more groups.
cs_error_t cpg_context_get(cpg_handle_t handle, void **context)
Get contexts for a CPG handle.
cs_error_t cpg_fd_get(cpg_handle_t handle, int *fd)
Get a file descriptor on which to poll.
cs_error_t cpg_join(cpg_handle_t handle, const struct cpg_name *group)
Join one or more groups.
cs_error_t cpg_zcb_free(cpg_handle_t handle, void *buffer)
cpg_zcb_free
cs_error_t cpg_iteration_finalize(cpg_iteration_handle_t handle)
cpg_iteration_finalize
cs_error_t cpg_zcb_alloc(cpg_handle_t handle, size_t size, void **buffer)
cpg_zcb_alloc
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.
cs_error_t cpg_initialize(cpg_handle_t *handle, cpg_callbacks_t *callbacks)
Create a new cpg connection.
cs_error_t cpg_local_get(cpg_handle_t handle, unsigned int *local_nodeid)
cpg_local_get
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
cs_error_t cpg_context_set(cpg_handle_t handle, void *context)
Set contexts for a CPG handle.
cs_error_t cpg_finalize(cpg_handle_t handle)
Close the cpg handle.
cs_error_t cpg_dispatch(cpg_handle_t handle, cs_dispatch_flags_t dispatch_types)
Dispatch messages and configuration changes.
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
cpg_flow_control_state_t
The cpg_flow_control_state_t enum.
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.
#define CPG_MAX_NAME_LENGTH
cpg_guarantee_t
The cpg_guarantee_t enum.
cpg_iteration_type_t
The cpg_iteration_type_t enum.
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.
uint64_t cpg_handle_t
cpg_handle_t
uint64_t cpg_iteration_handle_t
cpg_iteration_handle_t
cpg_model_t
The cpg_model_t enum.
cpg_reason_t
The cpg_reason_t enum.
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.
@ CPG_FLOW_CONTROL_DISABLED
flow control is disabled - new messages may be sent
@ CPG_FLOW_CONTROL_ENABLED
flow control is enabled - new messages should not be sent
@ CPG_TYPE_UNORDERED
not implemented
@ CPG_TYPE_FIFO
same as agreed
@ CPG_TYPE_SAFE
not implemented
@ CPG_ITERATION_ONE_GROUP
@ CPG_ITERATION_NAME_ONLY
The cpg_callbacks_t struct.
cpg_deliver_fn_t cpg_deliver_fn
cpg_confchg_fn_t cpg_confchg_fn
The cpg_iteration_description_t struct.
The cpg_model_data_t struct.
The cpg_model_v1_data_t struct.
cpg_totem_confchg_fn_t cpg_totem_confchg_fn
cpg_confchg_fn_t cpg_confchg_fn
cpg_deliver_fn_t cpg_deliver_fn
char value[CPG_MAX_NAME_LENGTH]
struct memb_ring_id ring_id