35 #ifndef COROSYNC_CPG_H_DEFINED
36 #define COROSYNC_CPG_H_DEFINED
38 #include <netinet/in.h>
91 #define CPG_MAX_NAME_LENGTH 128
97 #define CPG_MEMBERS_MAX 128
125 const struct cpg_address *member_list,
size_t member_list_entries,
126 const struct cpg_address *left_list,
size_t left_list_entries,
127 const struct cpg_address *joined_list,
size_t joined_list_entries);
132 uint32_t member_list_entries,
133 const uint32_t *member_list);
144 #define CPG_MODEL_V1_DELIVER_INITIAL_TOTEM_CONF 0x01
161 cpg_handle_t *handle,
168 cpg_handle_t *handle,
177 cpg_handle_t handle);
240 const struct iovec *iovec,
241 unsigned int iov_len);
250 int *member_list_entries);
254 unsigned int *local_nodeid);
282 cpg_iteration_handle_t *cpg_iteration_handle);
285 cpg_iteration_handle_t handle,
289 cpg_iteration_handle_t handle);
cs_error_t cpg_iteration_next(cpg_iteration_handle_t handle, struct cpg_iteration_description_t *description)
cs_error_t cpg_flow_control_state_get(cpg_handle_t handle, cpg_flow_control_state_t *flow_control_enabled)
#define CPG_MAX_NAME_LENGTH
cpg_deliver_fn_t cpg_deliver_fn
cs_error_t cpg_context_set(cpg_handle_t handle, void *context)
Set contexts for a CPG handle.
cpg_confchg_fn_t cpg_confchg_fn
cs_error_t cpg_local_get(cpg_handle_t handle, unsigned int *local_nodeid)
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_iteration_finalize(cpg_iteration_handle_t handle)
cpg_confchg_fn_t cpg_confchg_fn
cs_error_t cpg_fd_get(cpg_handle_t handle, int *fd)
Get a file descriptor on which to poll.
cs_error_t cpg_zcb_alloc(cpg_handle_t handle, size_t size, void **buffer)
cpg_totem_confchg_fn_t cpg_totem_confchg_fn
cs_error_t cpg_zcb_mcast_joined(cpg_handle_t handle, cpg_guarantee_t guarantee, void *msg, size_t msg_len)
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)
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)
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.
char value[CPG_MAX_NAME_LENGTH]
cs_error_t cpg_dispatch(cpg_handle_t handle, cs_dispatch_flags_t dispatch_types)
Dispatch messages and configuration changes.
cs_error_t cpg_join(cpg_handle_t handle, const struct cpg_name *group)
Join one or more groups.
flow control is enabled - new messages should not be sent
flow control is disabled - new messages may be sent
cs_error_t cpg_finalize(cpg_handle_t handle)
Close the cpg handle.
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)
cs_error_t cpg_leave(cpg_handle_t handle, const struct cpg_name *group)
Leave one or more groups.
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_context_get(cpg_handle_t handle, void **context)
Get contexts for a CPG handle.
uint64_t cpg_iteration_handle_t
cs_error_t cpg_initialize(cpg_handle_t *handle, cpg_callbacks_t *callbacks)
Create a new cpg connection.
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)
Iteration.
struct memb_ring_id ring_id
cpg_deliver_fn_t cpg_deliver_fn
cs_error_t cpg_zcb_free(cpg_handle_t handle, void *buffer)