corosync 3.1.9
|
cs_error_t cpg_context_get | ( | cpg_handle_t | handle, |
void ** | context | ||
) |
Get contexts for a CPG handle.
handle | |
context |
Definition at line 332 of file lib/cpg.c.
References cpg_inst::context, CS_OK, hdb_error_to_cs(), and nodeid.
cs_error_t cpg_context_set | ( | cpg_handle_t | handle, |
void * | context | ||
) |
Set contexts for a CPG handle.
handle | |
context |
Definition at line 351 of file lib/cpg.c.
References cpg_inst::context, CS_OK, hdb_error_to_cs(), and nodeid.
cs_error_t cpg_dispatch | ( | cpg_handle_t | handle, |
cs_dispatch_flags_t | dispatch_types | ||
) |
Dispatch messages and configuration changes.
handle | |
dispatch_types |
Definition at line 370 of file lib/cpg.c.
References cpg_inst::assembly_list_head, cpg_inst::c, CPG_MEMBERS_MAX, CPG_MODEL_V1, CS_DISPATCH_ALL, CS_DISPATCH_ONE, CS_DISPATCH_ONE_NONBLOCKING, CS_ERR_BAD_HANDLE, CS_ERR_LIBRARY, CS_ERR_NO_MEMORY, CS_ERR_TRY_AGAIN, CS_OK, cpg_inst::finalize, hdb_error_to_cs(), IPC_DISPATCH_SIZE, LIBCPG_PARTIAL_FIRST, LIBCPG_PARTIAL_LAST, cpg_assembly_data::list, res_lib_cpg_confchg_callback::member_list, MESSAGE_RES_CPG_CONFCHG_CALLBACK, MESSAGE_RES_CPG_DELIVER_CALLBACK, MESSAGE_RES_CPG_PARTIAL_DELIVER_CALLBACK, MESSAGE_RES_CPG_TOTEM_CONFCHG_CALLBACK, nodeid, qb_to_cs_error(), and ring_id.
cs_error_t cpg_fd_get | ( | cpg_handle_t | handle, |
int * | fd | ||
) |
Get a file descriptor on which to poll.
cpg_handle_t is NOT a file descriptor and may not be used directly.
handle | |
fd |
Definition at line 294 of file lib/cpg.c.
References cpg_inst::c, CS_OK, hdb_error_to_cs(), nodeid, and qb_to_cs_error().
cs_error_t cpg_finalize | ( | cpg_handle_t | handle | ) |
Close the cpg handle.
handle |
Definition at line 249 of file lib/cpg.c.
References cpg_inst::c, CS_ERR_BAD_HANDLE, CS_OK, cpg_inst::finalize, hdb_error_to_cs(), MESSAGE_REQ_CPG_FINALIZE, and nodeid.
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
handle | |
flow_control_enabled |
Definition at line 844 of file lib/cpg.c.
References CPG_FLOW_CONTROL_DISABLED, CS_OK, hdb_error_to_cs(), and nodeid.
cs_error_t cpg_initialize | ( | cpg_handle_t * | handle, |
cpg_callbacks_t * | callbacks | ||
) |
Create a new cpg connection.
handle | |
callbacks |
Definition at line 169 of file lib/cpg.c.
References cpg_callbacks_t::cpg_confchg_fn, cpg_model_v1_data_t::cpg_confchg_fn, cpg_callbacks_t::cpg_deliver_fn, cpg_model_v1_data_t::cpg_deliver_fn, cpg_model_initialize(), CPG_MODEL_V1, and nodeid.
cs_error_t cpg_iteration_finalize | ( | cpg_iteration_handle_t | handle | ) |
cpg_iteration_finalize
handle |
Definition at line 1383 of file lib/cpg.c.
References CS_OK, hdb_error_to_cs(), MESSAGE_REQ_CPG_ITERATIONFINALIZE, and nodeid.
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
handle | |
iteration_type | |
group | |
cpg_iteration_handle |
Definition at line 1240 of file lib/cpg.c.
References cpg_inst::c, CPG_ITERATION_ALL, CPG_ITERATION_NAME_ONLY, CPG_ITERATION_ONE_GROUP, CPG_MAX_NAME_LENGTH, CS_ERR_INVALID_PARAM, CS_ERR_NAME_TOO_LONG, CS_OK, hdb_error_to_cs(), cpg_inst::iteration_list_head, cpg_name::length, cpg_iteration_instance::list, MESSAGE_REQ_CPG_ITERATIONINITIALIZE, and nodeid.
cs_error_t cpg_iteration_next | ( | cpg_iteration_handle_t | handle, |
struct cpg_iteration_description_t * | description | ||
) |
cpg_iteration_next
handle | |
description |
Definition at line 1333 of file lib/cpg.c.
References CS_ERR_INVALID_PARAM, CS_OK, hdb_error_to_cs(), MESSAGE_REQ_CPG_ITERATIONNEXT, nodeid, and qb_to_cs_error().
cs_error_t cpg_join | ( | cpg_handle_t | handle, |
const struct cpg_name * | group | ||
) |
Join one or more groups.
messages multicasted with cpg_mcast_joined will be sent to every group that has been joined on handle handle. Any message multicasted to a group that has been previously joined will be delivered in cpg_dispatch
handle | |
group |
Definition at line 644 of file lib/cpg.c.
References cpg_inst::c, CPG_MAX_NAME_LENGTH, CPG_MODEL_V1, CS_ERR_BUSY, CS_ERR_NAME_TOO_LONG, CS_OK, cpg_model_v1_data_t::flags, hdb_error_to_cs(), cpg_name::length, MESSAGE_REQ_CPG_JOIN, cpg_model_data_t::model, cpg_inst::model_data, cpg_inst::model_v1_data, and nodeid.
cs_error_t cpg_leave | ( | cpg_handle_t | handle, |
const struct cpg_name * | group | ||
) |
Leave one or more groups.
handle | |
group |
Definition at line 698 of file lib/cpg.c.
References cpg_inst::c, CPG_MAX_NAME_LENGTH, CS_ERR_BUSY, CS_ERR_NAME_TOO_LONG, CS_OK, hdb_error_to_cs(), cpg_name::length, MESSAGE_REQ_CPG_LEAVE, and nodeid.
cs_error_t cpg_local_get | ( | cpg_handle_t | handle, |
unsigned int * | local_nodeid | ||
) |
cpg_local_get
handle | |
local_nodeid |
Definition at line 806 of file lib/cpg.c.
References cpg_inst::c, CS_OK, hdb_error_to_cs(), MESSAGE_REQ_CPG_LOCAL_GET, and nodeid.
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.
handle | |
size |
Definition at line 313 of file lib/cpg.c.
References CS_OK, hdb_error_to_cs(), cpg_inst::max_msg_size, and nodeid.
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.
handle | |
guarantee | |
iovec | This iovec will be multicasted to all groups joined with the cpg_join interface for handle. |
iov_len |
Definition at line 1192 of file lib/cpg.c.
References cpg_inst::c, CS_OK, guarantee, hdb_error_to_cs(), cpg_inst::max_msg_size, MESSAGE_REQ_CPG_MCAST, nodeid, and qb_to_cs_error().
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.
handle | |
groupName | |
member_list | |
member_list_entries |
Definition at line 743 of file lib/cpg.c.
References cpg_inst::c, CPG_MAX_NAME_LENGTH, CS_ERR_INVALID_PARAM, CS_ERR_NAME_TOO_LONG, CS_OK, hdb_error_to_cs(), cpg_name::length, res_lib_cpg_membership_get::member_list, MESSAGE_REQ_CPG_MEMBERSHIP, and nodeid.
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.
handle | |
model | |
model_data | |
context |
Definition at line 185 of file lib/cpg.c.
References cpg_inst::assembly_list_head, cpg_inst::c, cpg_inst::context, CPG_MODEL_V1, CPG_MODEL_V1_DELIVER_INITIAL_TOTEM_CONF, CS_ERR_INVALID_PARAM, CS_OK, cpg_model_v1_data_t::flags, hdb_error_to_cs(), IPC_REQUEST_SIZE, cpg_inst::iteration_list_head, cpg_inst::max_msg_size, cpg_model_data_t::model, cpg_inst::model_data, cpg_inst::model_v1_data, nodeid, and qb_to_cs_error().
Referenced by cpg_initialize().
cs_error_t cpg_zcb_alloc | ( | cpg_handle_t | handle, |
size_t | size, | ||
void ** | buffer | ||
) |
cpg_zcb_alloc
handle | |
size | |
buffer |
Definition at line 944 of file lib/cpg.c.
References cpg_inst::c, CPG_ZC_PATH_LEN, CS_ERR_NAME_TOO_LONG, CS_OK, hdb_error_to_cs(), coroipcs_zc_header::map_size, MESSAGE_REQ_CPG_ZC_ALLOC, and nodeid.
cs_error_t cpg_zcb_free | ( | cpg_handle_t | handle, |
void * | buffer | ||
) |
cpg_zcb_free
handle | |
buffer |
Definition at line 1001 of file lib/cpg.c.
References cpg_inst::c, CS_OK, hdb_error_to_cs(), header, MESSAGE_REQ_CPG_ZC_FREE, nodeid, and qb_to_cs_error().
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
handle | |
guarantee | |
msg | |
msg_len |
Definition at line 1050 of file lib/cpg.c.
References cpg_inst::c, CS_ERR_TOO_BIG, CS_OK, guarantee, hdb_error_to_cs(), IPC_REQUEST_SIZE, MESSAGE_REQ_CPG_MCAST, MESSAGE_REQ_CPG_ZC_EXECUTE, nodeid, and coroipcs_zc_header::server_address.