corosync 3.1.8
|
Totem Single Ring Protocol. More...
Go to the source code of this file.
Functions | |
int | totemsrp_initialize (qb_loop_t *poll_handle, void **srp_context, struct totem_config *totem_config, totempg_stats_t *stats, void(*deliver_fn)(unsigned int nodeid, const void *msg, unsigned int msg_len, int endian_conversion_required), void(*confchg_fn)(enum totem_configuration_type configuration_type, const unsigned int *member_list, size_t member_list_entries, const unsigned int *left_list, size_t left_list_entries, const unsigned int *joined_list, size_t joined_list_entries, const struct memb_ring_id *ring_id), void(*waiting_trans_ack_cb_fn)(int waiting_trans_ack)) |
Create a protocol instance. | |
void | totemsrp_finalize (void *srp_context) |
int | totemsrp_mcast (void *srp_context, struct iovec *iovec, unsigned int iov_len, int priority) |
Multicast a message. | |
int | totemsrp_avail (void *srp_context) |
Return number of available messages that can be queued. | |
int | totemsrp_callback_token_create (void *srp_context, void **handle_out, enum totem_callback_token_type type, int delete, int(*callback_fn)(enum totem_callback_token_type type, const void *), const void *data) |
void | totemsrp_callback_token_destroy (void *srp_context, void **handle_out) |
void | totemsrp_event_signal (void *srp_context, enum totem_event_type type, int value) |
void | totemsrp_net_mtu_adjust (struct totem_config *totem_config) |
int | totemsrp_nodestatus_get (void *srp_context, unsigned int nodeid, struct totem_node_status *node_status) |
int | totemsrp_ifaces_get (void *srp_context, unsigned int nodeid, unsigned int *interface_id, struct totem_ip_address *interfaces, unsigned int interfaces_size, char ***status, unsigned int *iface_count) |
unsigned int | totemsrp_my_nodeid_get (void *srp_context) |
int | totemsrp_my_family_get (void *srp_context) |
int | totemsrp_crypto_set (void *srp_context, const char *cipher_type, const char *hash_type) |
void | totemsrp_service_ready_register (void *srp_context, void(*totem_service_ready)(void)) |
int | totemsrp_iface_set (void *srp_context, const struct totem_ip_address *interface_addr, unsigned short ip_port, unsigned int iface_no) |
int | totemsrp_member_add (void *srp_context, const struct totem_ip_address *member, int ring_no) |
int | totemsrp_member_remove (void *srp_context, const struct totem_ip_address *member, int ring_no) |
void | totemsrp_threaded_mode_enable (void *srp_context) |
void | totemsrp_trans_ack (void *srp_context) |
int | totemsrp_reconfigure (void *context, struct totem_config *totem_config) |
int | totemsrp_crypto_reconfigure_phase (void *context, struct totem_config *totem_config, cfg_message_crypto_reconfig_phase_t phase) |
void | totemsrp_stats_clear (void *srp_context, int flags) |
void | totemsrp_force_gather (void *context) |
int totemsrp_avail | ( | void * | srp_context | ) |
Return number of available messages that can be queued.
Definition at line 2569 of file totemsrp.c.
References totemsrp_instance::new_message_queue, totemsrp_instance::new_message_queue_trans, and totemsrp_instance::waiting_trans_ack.
Referenced by totempg_initialize().
int totemsrp_callback_token_create | ( | void * | srp_context, |
void ** | handle_out, | ||
enum totem_callback_token_type | type, | ||
int | delete, | ||
int(* | callback_fn )(enum totem_callback_token_type type, const void *), | ||
const void * | data ) |
Definition at line 3496 of file totemsrp.c.
References token_callback_instance::callback_fn, token_callback_instance::callback_type, token_callback_instance::data, token_callback_instance::delete, token_callback_instance::list, totemsrp_instance::token_callback_received_listhead, totemsrp_instance::token_callback_sent_listhead, TOTEM_CALLBACK_TOKEN_RECEIVED, TOTEM_CALLBACK_TOKEN_SENT, and type.
Referenced by totempg_callback_token_create(), totempg_initialize(), and totemsrp_initialize().
void totemsrp_callback_token_destroy | ( | void * | srp_context, |
void ** | handle_out ) |
Definition at line 3531 of file totemsrp.c.
References token_callback_instance::list.
Referenced by totempg_callback_token_destroy().
int totemsrp_crypto_reconfigure_phase | ( | void * | context, |
struct totem_config * | totem_config, | ||
cfg_message_crypto_reconfig_phase_t | phase ) |
Definition at line 5230 of file totemsrp.c.
References totemsrp_instance::totemnet_context, and totemnet_crypto_reconfigure_phase().
Referenced by totempg_crypto_reconfigure_phase().
|
extern |
Definition at line 1109 of file totemsrp.c.
References totemsrp_instance::totemnet_context, and totemnet_crypto_set().
Referenced by totempg_crypto_set().
void totemsrp_event_signal | ( | void * | srp_context, |
enum totem_event_type | type, | ||
int | value ) |
Definition at line 2489 of file totemsrp.c.
Referenced by totempg_event_signal().
void totemsrp_finalize | ( | void * | srp_context | ) |
Definition at line 1027 of file totemsrp.c.
References totemsrp_instance::new_message_queue, totemsrp_instance::new_message_queue_trans, totemsrp_instance::recovery_sort_queue, totemsrp_instance::regular_sort_queue, totemsrp_instance::retrans_message_queue, totemsrp_instance::totemnet_context, and totemnet_finalize().
Referenced by totempg_finalize().
void totemsrp_force_gather | ( | void * | context | ) |
Definition at line 5249 of file totemsrp.c.
Referenced by totempg_force_gather().
|
extern |
Definition at line 5086 of file totemsrp.c.
References totemsrp_instance::my_addrs, totemip_copy(), totemsrp_instance::totemnet_context, and totemnet_iface_set().
Referenced by totempg_iface_set().
|
extern |
Definition at line 1071 of file totemsrp.c.
References totem_interface::configured, INTERFACE_MAX, totem_config::interfaces, totem_interface::member_count, totem_interface::member_list, nodeid, totem_ip_address::nodeid, totemsrp_instance::totem_config, totemsrp_instance::totemnet_context, and totemnet_ifaces_get().
Referenced by totempg_ifaces_get().
int totemsrp_initialize | ( | qb_loop_t * | poll_handle, |
void ** | srp_context, | ||
struct totem_config * | totem_config, | ||
totempg_stats_t * | stats, | ||
void(* | deliver_fn )(unsigned int nodeid, const void *msg, unsigned int msg_len, int endian_conversion_required), | ||
void(* | confchg_fn )(enum totem_configuration_type configuration_type, const unsigned int *member_list, size_t member_list_entries, const unsigned int *left_list, size_t left_list_entries, const unsigned int *joined_list, size_t joined_list_entries, const struct memb_ring_id *ring_id), | ||
void(* | waiting_trans_ack_cb_fn )(int waiting_trans_ack) ) |
Create a protocol instance.
Definition at line 819 of file totemsrp.c.
References totem_interface::boundto, totem_config::consensus_timeout, totem_config::downcheck_timeout, totemsrp_stats_t::earliest_token, totem_config::fail_to_recv_const, totem_config::heartbeat_failures_allowed, totemsrp_instance::heartbeat_timeout, totem_config::interfaces, totem_config::join_timeout, totemsrp_stats_t::latest_token, totem_logging_configuration::log_level_debug, totem_logging_configuration::log_level_error, totem_logging_configuration::log_level_notice, totem_logging_configuration::log_level_security, totem_logging_configuration::log_level_trace, totem_logging_configuration::log_level_warning, log_printf, totem_logging_configuration::log_printf, totem_logging_configuration::log_subsys_id, LOGSYS_LEVEL_DEBUG, totemsrp_instance::lowest_active_if, main_deliver_fn(), main_iface_change_fn(), totem_config::max_messages, totem_config::max_network_delay, totem_interface::mcast_addr, totemsrp_instance::mcast_address, totemsrp_instance::memb_ring_id_create_or_load, totemsrp_instance::memb_ring_id_store, totem_config::merge_timeout, MESSAGE_QUEUE_MAX, totem_config::miss_count_const, totemsrp_instance::my_id, totem_config::net_mtu, totemsrp_instance::new_message_queue, totemsrp_instance::new_message_queue_trans, srp_addr::nodeid, totem_ip_address::nodeid, QUEUE_RTR_ITEMS_SIZE_MAX, totemsrp_instance::recovery_sort_queue, totemsrp_instance::regular_sort_queue, totemsrp_instance::retrans_message_queue, RETRANS_MESSAGE_QUEUE_SIZE_MAX, totem_config::send_join_timeout, totem_config::seqno_unchanged_const, totemsrp_instance::stats, totemsrp_instance::threaded_mode_enabled, totem_config::threads, totem_config::token_hold_timeout, totemsrp_instance::token_recv_event_handle, totem_config::token_retransmit_timeout, totem_config::token_retransmits_before_loss_const, totemsrp_instance::token_sent_event_handle, totem_config::token_timeout, totem_config::token_warning, TOTEM_CALLBACK_TOKEN_RECEIVED, TOTEM_CALLBACK_TOKEN_SENT, totemsrp_instance::totem_config, totem_config::totem_logging_configuration, totem_config::totem_memb_ring_id_create_or_load, totem_config::totem_memb_ring_id_store, totemip_copy(), totemsrp_instance::totemnet_context, totemnet_initialize(), totemsrp_callback_token_create(), totemsrp_instance::totemsrp_confchg_fn, totemsrp_instance::totemsrp_deliver_fn, totemsrp_instance::totemsrp_log_level_debug, totemsrp_instance::totemsrp_log_level_error, totemsrp_instance::totemsrp_log_level_notice, totemsrp_instance::totemsrp_log_level_security, totemsrp_instance::totemsrp_log_level_trace, totemsrp_instance::totemsrp_log_level_warning, totemsrp_instance::totemsrp_log_printf, totemsrp_instance::totemsrp_poll_handle, totemsrp_instance::totemsrp_subsys_id, totemsrp_instance::totemsrp_waiting_trans_ack_cb_fn, totemsrp_instance::use_heartbeat, and totem_config::window_size.
Referenced by totempg_initialize().
int totemsrp_mcast | ( | void * | srp_context, |
struct iovec * | iovec, | ||
unsigned int | iov_len, | ||
int | priority ) |
Multicast a message.
Definition at line 2498 of file totemsrp.c.
References addr, totem_message_header::encapsulated, guarantee, mcast::guarantee, mcast::header, log_printf, totem_message_header::magic, message_item::mcast, totemsrp_stats_t::mcast_tx, MESSAGE_NOT_ENCAPSULATED, MESSAGE_TYPE_MCAST, message_item::msg_len, totemsrp_instance::my_id, totemsrp_instance::new_message_queue, totemsrp_instance::new_message_queue_trans, srp_addr::nodeid, totem_message_header::nodeid, totemsrp_instance::stats, mcast::system_from, TOTEM_MH_MAGIC, TOTEM_MH_VERSION, totemsrp_instance::totemsrp_log_level_debug, totemsrp_instance::totemsrp_log_level_trace, totem_message_header::type, totem_message_header::version, and totemsrp_instance::waiting_trans_ack.
|
extern |
Definition at line 5179 of file totemsrp.c.
References totemsrp_instance::my_addrs, totemsrp_instance::totemnet_context, and totemnet_member_add().
Referenced by totempg_member_add().
|
extern |
Definition at line 5192 of file totemsrp.c.
References totemsrp_instance::totemnet_context, and totemnet_member_remove().
Referenced by totempg_member_remove().
|
extern |
Definition at line 1134 of file totemsrp.c.
References totem_interface::boundto, totem_ip_address::family, totem_config::interfaces, totemsrp_instance::lowest_active_if, and totemsrp_instance::totem_config.
Referenced by totempg_my_family_get().
|
extern |
Definition at line 1123 of file totemsrp.c.
References totemsrp_instance::my_id, and srp_addr::nodeid.
Referenced by totempg_my_nodeid_get().
|
extern |
Definition at line 5166 of file totemsrp.c.
References totem_config::net_mtu.
Referenced by totempg_initialize().
|
extern |
Definition at line 1042 of file totemsrp.c.
References totemsrp_instance::my_proc_list, totemsrp_instance::my_proc_list_entries, nodeid, srp_addr::nodeid, totem_node_status::reachable, TOTEM_NODE_STATUS_STRUCTURE_VERSION, totemsrp_instance::totemnet_context, totemnet_nodestatus_get(), and totem_node_status::version.
Referenced by totempg_nodestatus_get().
int totemsrp_reconfigure | ( | void * | context, |
struct totem_config * | totem_config ) |
Definition at line 5221 of file totemsrp.c.
References totemsrp_instance::totemnet_context, and totemnet_reconfigure().
Referenced by totempg_reconfigure().
void totemsrp_service_ready_register | ( | void * | srp_context, |
void(* | totem_service_ready )(void) ) |
Definition at line 5170 of file totemsrp.c.
References totemsrp_instance::totemsrp_service_ready_fn.
Referenced by totempg_service_ready_register().
void totemsrp_stats_clear | ( | void * | srp_context, |
int | flags ) |
Definition at line 5239 of file totemsrp.c.
References flags, totemsrp_instance::stats, totemsrp_instance::totemnet_context, totemnet_stats_clear(), and TOTEMPG_STATS_CLEAR_TRANSPORT.
Referenced by totempg_stats_clear().
void totemsrp_threaded_mode_enable | ( | void * | srp_context | ) |
Definition at line 5205 of file totemsrp.c.
References totemsrp_instance::threaded_mode_enabled.
Referenced by totempg_threaded_mode_enable().
void totemsrp_trans_ack | ( | void * | srp_context | ) |
Definition at line 5212 of file totemsrp.c.
References totemsrp_instance::totemsrp_waiting_trans_ack_cb_fn, and totemsrp_instance::waiting_trans_ack.
Referenced by totempg_trans_ack().