corosync  2.3.6
Data Structures | Macros | Enumerations | Functions | Variables
totemsrp.c File Reference
#include <config.h>
#include <assert.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <netdb.h>
#include <sys/un.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sched.h>
#include <time.h>
#include <sys/time.h>
#include <sys/poll.h>
#include <sys/uio.h>
#include <limits.h>
#include <qb/qbdefs.h>
#include <qb/qbutil.h>
#include <qb/qbloop.h>
#include <corosync/swab.h>
#include <corosync/sq.h>
#include <corosync/list.h>
#include <corosync/logsys.h>
#include "totemsrp.h"
#include "totemrrp.h"
#include "totemnet.h"
#include "cs_queue.h"
Include dependency graph for totemsrp.c:

Go to the source code of this file.

Data Structures

struct  consensus_list_item
 
struct  token_callback_instance
 
struct  totemsrp_socket
 
struct  message_header
 
struct  mcast
 
struct  rtr_item
 
struct  orf_token
 
struct  memb_join
 
struct  memb_merge_detect
 
struct  token_hold_cancel
 
struct  memb_commit_token_memb_entry
 
struct  memb_commit_token
 
struct  message_item
 
struct  sort_queue_item
 
struct  totemsrp_instance
 
struct  message_handlers
 

Macros

#define LOGSYS_UTILS_ONLY   1
 
#define LOCALHOST_IP   inet_addr("127.0.0.1")
 
#define QUEUE_RTR_ITEMS_SIZE_MAX   16384 /* allow 16384 retransmit items */
 
#define RETRANS_MESSAGE_QUEUE_SIZE_MAX   16384 /* allow 500 messages to be queued */
 
#define RECEIVED_MESSAGE_QUEUE_SIZE_MAX   500 /* allow 500 messages to be queued */
 
#define MAXIOVS   5
 
#define RETRANSMIT_ENTRIES_MAX   30
 
#define TOKEN_SIZE_MAX   64000 /* bytes */
 
#define LEAVE_DUMMY_NODEID   0
 
#define SEQNO_START_MSG   0x0
 
#define SEQNO_START_TOKEN   0x0
 
#define ENDIAN_LOCAL   0xff22
 
#define log_printf(level, format, args...)
 
#define LOGSYS_PERROR(err_num, level, fmt, args...)
 

Enumerations

enum  message_type {
  MESSAGE_TYPE_ORF_TOKEN = 0, MESSAGE_TYPE_MCAST = 1, MESSAGE_TYPE_MEMB_MERGE_DETECT = 2, MESSAGE_TYPE_MEMB_JOIN = 3,
  MESSAGE_TYPE_MEMB_COMMIT_TOKEN = 4, MESSAGE_TYPE_TOKEN_HOLD_CANCEL = 5
}
 
enum  encapsulation_type { MESSAGE_ENCAPSULATED = 1, MESSAGE_NOT_ENCAPSULATED = 2 }
 
enum  memb_state { MEMB_STATE_OPERATIONAL = 1, MEMB_STATE_GATHER = 2, MEMB_STATE_COMMIT = 3, MEMB_STATE_RECOVERY = 4 }
 
enum  gather_state_from {
  TOTEMSRP_GSFROM_CONSENSUS_TIMEOUT = 0, TOTEMSRP_GSFROM_GATHER_MISSING1 = 1, TOTEMSRP_GSFROM_THE_TOKEN_WAS_LOST_IN_THE_OPERATIONAL_STATE = 2, TOTEMSRP_GSFROM_THE_CONSENSUS_TIMEOUT_EXPIRED = 3,
  TOTEMSRP_GSFROM_THE_TOKEN_WAS_LOST_IN_THE_COMMIT_STATE = 4, TOTEMSRP_GSFROM_THE_TOKEN_WAS_LOST_IN_THE_RECOVERY_STATE = 5, TOTEMSRP_GSFROM_FAILED_TO_RECEIVE = 6, TOTEMSRP_GSFROM_FOREIGN_MESSAGE_IN_OPERATIONAL_STATE = 7,
  TOTEMSRP_GSFROM_FOREIGN_MESSAGE_IN_GATHER_STATE = 8, TOTEMSRP_GSFROM_MERGE_DURING_OPERATIONAL_STATE = 9, TOTEMSRP_GSFROM_MERGE_DURING_GATHER_STATE = 10, TOTEMSRP_GSFROM_MERGE_DURING_JOIN = 11,
  TOTEMSRP_GSFROM_JOIN_DURING_OPERATIONAL_STATE = 12, TOTEMSRP_GSFROM_JOIN_DURING_COMMIT_STATE = 13, TOTEMSRP_GSFROM_JOIN_DURING_RECOVERY = 14, TOTEMSRP_GSFROM_INTERFACE_CHANGE = 15,
  TOTEMSRP_GSFROM_MAX = TOTEMSRP_GSFROM_INTERFACE_CHANGE
}
 

Functions

struct message_header __attribute__ ((packed))
 
void main_deliver_fn (void *context, const void *msg, unsigned int msg_len)
 
void main_iface_change_fn (void *context, const struct totem_ip_address *iface_address, unsigned int iface_no)
 
int totemsrp_initialize (qb_loop_t *poll_handle, void **srp_context, struct totem_config *totem_config, totemmrp_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. More...
 
void totemsrp_finalize (void *srp_context)
 
int totemsrp_ifaces_get (void *srp_context, unsigned int nodeid, struct totem_ip_address *interfaces, unsigned int interfaces_size, char ***status, unsigned int *iface_count)
 
int totemsrp_crypto_set (void *srp_context, const char *cipher_type, const char *hash_type)
 
unsigned int totemsrp_my_nodeid_get (void *srp_context)
 
int totemsrp_my_family_get (void *srp_context)
 
int totemsrp_ring_reenable (void *srp_context)
 
void totemsrp_event_signal (void *srp_context, enum totem_event_type type, int value)
 
int totemsrp_mcast (void *srp_context, struct iovec *iovec, unsigned int iov_len, int guarantee)
 Multicast a message. More...
 
int totemsrp_avail (void *srp_context)
 Return number of available messages that can be queued. More...
 
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_net_mtu_adjust (struct totem_config *totem_config)
 
void totemsrp_service_ready_register (void *context, void(*totem_service_ready)(void))
 
int totemsrp_member_add (void *context, const struct totem_ip_address *member, int ring_no)
 
int totemsrp_member_remove (void *context, const struct totem_ip_address *member, int ring_no)
 
void totemsrp_threaded_mode_enable (void *context)
 
void totemsrp_trans_ack (void *context)
 

Variables

char type
 
char encapsulated
 
unsigned short endian_detector
 
unsigned int nodeid
 
struct message_header header
 
struct srp_addr system_from
 
unsigned int seq
 
int this_seqno
 
struct memb_ring_id ring_id
 
unsigned int node_id
 
int guarantee
 
unsigned int token_seq
 
unsigned int aru
 
unsigned int aru_addr
 
unsigned int backlog
 
unsigned int fcc
 
int retrans_flg
 
int rtr_list_entries
 
struct rtr_item rtr_list [0]
 
unsigned int proc_list_entries
 
unsigned int failed_list_entries
 
unsigned long long ring_seq
 
unsigned char end_of_memb_join [0]
 
unsigned int high_delivered
 
unsigned int received_flg
 
int memb_index
 
int addr_entries
 
unsigned char end_of_commit_token [0]
 
struct message_item __attribute__
 
const char * gather_state_from_desc []
 
struct message_handlers totemsrp_message_handlers
 
unsigned long long int tv_old
 

Macro Definition Documentation

#define ENDIAN_LOCAL   0xff22
#define LEAVE_DUMMY_NODEID   0

Definition at line 102 of file totemsrp.c.

Referenced by totemsrp_avail(), and totemsrp_ring_reenable().

#define LOCALHOST_IP   inet_addr("127.0.0.1")

Definition at line 95 of file totemsrp.c.

#define log_printf (   level,
  format,
  args... 
)
Value:
do { \
instance->totemsrp_log_printf ( \
level, instance->totemsrp_subsys_id, \
__FUNCTION__, __FILE__, __LINE__, \
format, ##args); \
} while (0);

Definition at line 691 of file totemsrp.c.

Referenced by main_deliver_fn(), main_iface_change_fn(), totemsrp_avail(), totemsrp_initialize(), totemsrp_mcast(), and totemsrp_ring_reenable().

#define LOGSYS_PERROR (   err_num,
  level,
  fmt,
  args... 
)
Value:
do { \
char _error_str[LOGSYS_MAX_PERROR_MSG_LEN]; \
const char *_error_ptr = qb_strerror_r(err_num, _error_str, sizeof(_error_str)); \
instance->totemsrp_log_printf ( \
level, instance->totemsrp_subsys_id, \
__FUNCTION__, __FILE__, __LINE__, \
fmt ": %s (%d)\n", ##args, _error_ptr, err_num); \
} while(0)
#define LOGSYS_MAX_PERROR_MSG_LEN
Definition: logsys.h:85

Definition at line 698 of file totemsrp.c.

#define LOGSYS_UTILS_ONLY   1

Definition at line 86 of file totemsrp.c.

#define MAXIOVS   5

Definition at line 99 of file totemsrp.c.

#define QUEUE_RTR_ITEMS_SIZE_MAX   16384 /* allow 16384 retransmit items */
#define RECEIVED_MESSAGE_QUEUE_SIZE_MAX   500 /* allow 500 messages to be queued */

Definition at line 98 of file totemsrp.c.

#define RETRANS_MESSAGE_QUEUE_SIZE_MAX   16384 /* allow 500 messages to be queued */

Definition at line 97 of file totemsrp.c.

Referenced by totemsrp_initialize().

#define RETRANSMIT_ENTRIES_MAX   30

Definition at line 100 of file totemsrp.c.

Referenced by totemsrp_avail().

#define SEQNO_START_MSG   0x0

Definition at line 114 of file totemsrp.c.

Referenced by totemsrp_avail(), and totemsrp_ring_reenable().

#define SEQNO_START_TOKEN   0x0

Definition at line 115 of file totemsrp.c.

Referenced by totemsrp_avail(), and totemsrp_ring_reenable().

#define TOKEN_SIZE_MAX   64000 /* bytes */

Definition at line 101 of file totemsrp.c.

Enumeration Type Documentation

Enumerator
MESSAGE_ENCAPSULATED 
MESSAGE_NOT_ENCAPSULATED 

Definition at line 148 of file totemsrp.c.

Enumerator
TOTEMSRP_GSFROM_CONSENSUS_TIMEOUT 
TOTEMSRP_GSFROM_GATHER_MISSING1 
TOTEMSRP_GSFROM_THE_TOKEN_WAS_LOST_IN_THE_OPERATIONAL_STATE 
TOTEMSRP_GSFROM_THE_CONSENSUS_TIMEOUT_EXPIRED 
TOTEMSRP_GSFROM_THE_TOKEN_WAS_LOST_IN_THE_COMMIT_STATE 
TOTEMSRP_GSFROM_THE_TOKEN_WAS_LOST_IN_THE_RECOVERY_STATE 
TOTEMSRP_GSFROM_FAILED_TO_RECEIVE 
TOTEMSRP_GSFROM_FOREIGN_MESSAGE_IN_OPERATIONAL_STATE 
TOTEMSRP_GSFROM_FOREIGN_MESSAGE_IN_GATHER_STATE 
TOTEMSRP_GSFROM_MERGE_DURING_OPERATIONAL_STATE 
TOTEMSRP_GSFROM_MERGE_DURING_GATHER_STATE 
TOTEMSRP_GSFROM_MERGE_DURING_JOIN 
TOTEMSRP_GSFROM_JOIN_DURING_OPERATIONAL_STATE 
TOTEMSRP_GSFROM_JOIN_DURING_COMMIT_STATE 
TOTEMSRP_GSFROM_JOIN_DURING_RECOVERY 
TOTEMSRP_GSFROM_INTERFACE_CHANGE 
TOTEMSRP_GSFROM_MAX 

Definition at line 537 of file totemsrp.c.

enum memb_state
Enumerator
MEMB_STATE_OPERATIONAL 
MEMB_STATE_GATHER 
MEMB_STATE_COMMIT 
MEMB_STATE_RECOVERY 

Definition at line 278 of file totemsrp.c.

Enumerator
MESSAGE_TYPE_ORF_TOKEN 
MESSAGE_TYPE_MCAST 
MESSAGE_TYPE_MEMB_MERGE_DETECT 
MESSAGE_TYPE_MEMB_JOIN 
MESSAGE_TYPE_MEMB_COMMIT_TOKEN 
MESSAGE_TYPE_TOKEN_HOLD_CANCEL 

Definition at line 139 of file totemsrp.c.

Function Documentation

struct message_header __attribute__ ( (packed)  )
void main_deliver_fn ( void *  context,
const void *  msg,
unsigned int  msg_len 
)
void main_iface_change_fn ( void *  context,
const struct totem_ip_address iface_address,
unsigned int  iface_no 
)
int totemsrp_avail ( void *  srp_context)

Return number of available messages that can be queued.

Definition at line 2513 of file totemsrp.c.

References srp_addr::addr, consensus_list_item::addr, memb_commit_token::addr_entries, aru, orf_token::aru, memb_commit_token_memb_entry::aru, orf_token::aru_addr, orf_token::backlog, totemsrp_instance::commit_token, message_header::encapsulated, memb_commit_token::end_of_commit_token, message_header::endian_detector, ENDIAN_LOCAL, memb_join::failed_list_entries, orf_token::fcc, totemsrp_instance::fcc_remcast_current, totemsrp_instance::global_seqno, orf_token::header, memb_commit_token::header, memb_merge_detect::header, token_hold_cancel::header, memb_join::header, memb_commit_token_memb_entry::high_delivered, totem_config::interface_count, totemsrp_instance::last_released, LEAVE_DUMMY_NODEID, log_printf, message_item::mcast, sort_queue_item::mcast, totemsrp_stats_t::mcast_retx, totemsrp_stats_t::memb_commit_token_tx, memb_commit_token::memb_index, totemsrp_stats_t::memb_join_tx, totemsrp_stats_t::memb_merge_detect_tx, totemsrp_instance::memb_state, MEMB_STATE_COMMIT, MEMB_STATE_GATHER, MEMB_STATE_OPERATIONAL, MEMB_STATE_RECOVERY, MESSAGE_TYPE_MEMB_COMMIT_TOKEN, MESSAGE_TYPE_MEMB_JOIN, MESSAGE_TYPE_MEMB_MERGE_DETECT, MESSAGE_TYPE_ORF_TOKEN, MESSAGE_TYPE_TOKEN_HOLD_CANCEL, totem_config::miss_count_const, message_item::msg_len, sort_queue_item::msg_len, totemsrp_instance::my_aru, totemsrp_instance::my_failed_list, totemsrp_instance::my_failed_list_entries, totemsrp_instance::my_high_delivered, totemsrp_instance::my_high_seq_received, totemsrp_instance::my_id, totemsrp_instance::my_last_aru, totemsrp_instance::my_merge_detect_timeout_outstanding, totemsrp_instance::my_new_memb_entries, totemsrp_instance::my_new_memb_list, totemsrp_instance::my_old_ring_id, totemsrp_instance::my_proc_list, totemsrp_instance::my_proc_list_entries, totemsrp_instance::my_received_flg, totemsrp_instance::my_ring_id, totemsrp_instance::my_set_retrans_flg, totemsrp_instance::my_token_held, totemsrp_instance::new_message_queue, totemsrp_instance::new_message_queue_trans, totem_ip_address::nodeid, message_header::nodeid, totemsrp_instance::old_ring_state_aru, totemsrp_instance::orf_token_retransmit, totemsrp_instance::orf_token_retransmit_size, totemsrp_stats_t::orf_token_tx, memb_join::proc_list_entries, QUEUE_RTR_ITEMS_SIZE_MAX, memb_commit_token_memb_entry::received_flg, totemsrp_instance::recovery_sort_queue, totemsrp_instance::regular_sort_queue, memb_ring_id::rep, orf_token::retrans_flg, totemsrp_instance::retrans_message_queue, RETRANSMIT_ENTRIES_MAX, token_hold_cancel::ring_id, memb_commit_token_memb_entry::ring_id, memb_merge_detect::ring_id, rtr_item::ring_id, mcast::ring_id, orf_token::ring_id, memb_commit_token::ring_id, memb_join::ring_seq, rtr_list, orf_token::rtr_list, rtr_list_entries, orf_token::rtr_list_entries, totem_config::send_join_timeout, seq, memb_ring_id::seq, mcast::seq, rtr_item::seq, orf_token::seq, SEQNO_START_MSG, SEQNO_START_TOKEN, totemsrp_instance::stats, memb_merge_detect::system_from, memb_join::system_from, mcast::this_seqno, totemsrp_stats_t::token_hold_cancel_tx, totemsrp_instance::token_ring_id_seq, orf_token::token_seq, memb_commit_token::token_seq, totemsrp_instance::totem_config, totemip_compare(), totemip_copy(), totemip_equal(), totemsrp_instance::totemrrp_context, totemrrp_mcast_flush_send(), totemrrp_mcast_noflush_send(), totemrrp_token_send(), totemrrp_token_target_set(), totemsrp_instance::totemsrp_log_level_debug, totemsrp_instance::totemsrp_log_level_notice, totemsrp_instance::totemsrp_log_level_trace, message_header::type, value, and totemsrp_instance::waiting_trans_ack.

Referenced by totemmrp_avail().

int totemsrp_callback_token_create ( void *  srp_context,
void **  handle_out,
enum totem_callback_token_type  type,
int  delete,
int(*)(enum totem_callback_token_type type, const void *)  callback_fn,
const void *  data 
)
void totemsrp_callback_token_destroy ( void *  srp_context,
void **  handle_out 
)
int totemsrp_crypto_set ( void *  srp_context,
const char *  cipher_type,
const char *  hash_type 
)

Definition at line 1120 of file totemsrp.c.

References totemsrp_instance::totemrrp_context, and totemrrp_crypto_set().

Referenced by totemmrp_crypto_set().

void totemsrp_event_signal ( void *  srp_context,
enum totem_event_type  type,
int  value 
)

Definition at line 2435 of file totemsrp.c.

Referenced by totemmrp_event_signal().

void totemsrp_finalize ( void *  srp_context)
int totemsrp_ifaces_get ( void *  srp_context,
unsigned int  nodeid,
struct totem_ip_address interfaces,
unsigned int  interfaces_size,
char ***  status,
unsigned int *  iface_count 
)
int totemsrp_initialize ( qb_loop_t *  poll_handle,
void **  srp_context,
struct totem_config totem_config,
totemmrp_stats_t stats,
void(*)(unsigned int nodeid, const void *msg, unsigned int msg_len, int endian_conversion_required)  deliver_fn,
void(*)(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 confchg_fn,
void(*)(int waiting_trans_ack)  waiting_trans_ack_cb_fn 
)

Create a protocol instance.

Definition at line 832 of file totemsrp.c.

References 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, totem_logging_configuration::log_printf, log_printf, totem_logging_configuration::log_subsys_id, 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, totem_config::net_mtu, totemsrp_instance::new_message_queue, totemsrp_instance::new_message_queue_trans, 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::rrp_autorecovery_check_timeout, totem_config::rrp_mode, totem_config::rrp_problem_count_mcast_threshold, totem_config::rrp_problem_count_threshold, totem_config::rrp_problem_count_timeout, totem_config::rrp_token_expired_timeout, totem_config::send_join_timeout, totem_config::seqno_unchanged_const, totemmrp_stats_t::srp, 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_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::totemrrp_context, totemrrp_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 totemmrp_initialize().

int totemsrp_mcast ( void *  srp_context,
struct iovec *  iovec,
unsigned int  iov_len,
int  guarantee 
)
int totemsrp_member_add ( void *  context,
const struct totem_ip_address member,
int  ring_no 
)
int totemsrp_member_remove ( void *  context,
const struct totem_ip_address member,
int  ring_no 
)

Definition at line 4780 of file totemsrp.c.

References totemsrp_instance::totemrrp_context, and totemrrp_member_remove().

Referenced by totemmrp_member_remove().

int totemsrp_my_family_get ( void *  srp_context)
unsigned int totemsrp_my_nodeid_get ( void *  srp_context)
void totemsrp_net_mtu_adjust ( struct totem_config totem_config)

Definition at line 4754 of file totemsrp.c.

References totem_config::net_mtu.

Referenced by totempg_initialize().

int totemsrp_ring_reenable ( void *  srp_context)

Definition at line 1157 of file totemsrp.c.

References srp_addr::addr, consensus_list_item::addr, memb_commit_token::addr_entries, aru, memb_commit_token_memb_entry::aru, totemsrp_stats_t::commit_entered, totemsrp_instance::commit_token, totemsrp_stats_t::commit_token_lost, totemsrp_instance::consensus_list, totemsrp_instance::consensus_list_entries, totem_config::consensus_timeout, totemsrp_stats_t::consensus_timeouts, totemsrp_stats_t::continuous_gather, message_header::encapsulated, memb_commit_token::end_of_commit_token, message_header::endian_detector, ENDIAN_LOCAL, totemsrp_instance::failed_to_recv, family, totemsrp_stats_t::gather_entered, totemsrp_stats_t::gather_token_lost, mcast::header, totemsrp_instance::heartbeat_timeout, memb_commit_token_memb_entry::high_delivered, totem_config::interface_count, INTERFACE_MAX, totem_config::join_timeout, totemsrp_instance::last_released, LEAVE_DUMMY_NODEID, log_printf, message_item::mcast, sort_queue_item::mcast, totemsrp_instance::memb_ring_id_store, totemsrp_instance::memb_state, MEMB_STATE_COMMIT, MEMB_STATE_GATHER, MEMB_STATE_OPERATIONAL, MEMB_STATE_RECOVERY, totemsrp_instance::memb_timer_state_gather_consensus_timeout, totemsrp_instance::memb_timer_state_gather_join_timeout, totem_config::merge_timeout, MESSAGE_ENCAPSULATED, MESSAGE_TYPE_MCAST, message_item::msg_len, sort_queue_item::msg_len, totemsrp_instance::my_aru, totemsrp_instance::my_aru_count, totemsrp_instance::my_cbl, totemsrp_instance::my_deliver_memb_entries, totemsrp_instance::my_deliver_memb_list, totemsrp_instance::my_failed_list, totemsrp_instance::my_failed_list_entries, totemsrp_instance::my_high_delivered, totemsrp_instance::my_high_ring_delivered, totemsrp_instance::my_high_seq_received, totemsrp_instance::my_id, totemsrp_instance::my_install_seq, totemsrp_instance::my_last_aru, totemsrp_instance::my_leave_memb_entries, totemsrp_instance::my_leave_memb_list, totemsrp_instance::my_left_memb_entries, totemsrp_instance::my_left_memb_list, totemsrp_instance::my_memb_entries, totemsrp_instance::my_memb_list, totemsrp_instance::my_merge_detect_timeout_outstanding, totemsrp_instance::my_new_memb_entries, totemsrp_instance::my_new_memb_list, totemsrp_instance::my_old_ring_id, totemsrp_instance::my_pbl, totemsrp_instance::my_proc_list, totemsrp_instance::my_proc_list_entries, totemsrp_instance::my_received_flg, totemsrp_instance::my_ring_id, totemsrp_instance::my_seq_unchanged, totemsrp_instance::my_set_retrans_flg, totemsrp_instance::my_token_seq, totemsrp_instance::my_trans_memb_entries, totemsrp_instance::my_trans_memb_list, totemsrp_instance::my_trc, srp_addr::no_addrs, nodeid, totem_ip_address::nodeid, message_header::nodeid, totemsrp_instance::old_ring_state_aru, totemsrp_instance::old_ring_state_high_seq_received, totemsrp_instance::old_ring_state_saved, totemsrp_stats_t::operational_entered, totemsrp_stats_t::operational_token_lost, totemsrp_instance::orf_token_discard, totemsrp_instance::originated_orf_token, totemsrp_instance::pause_timestamp, PROCESSOR_COUNT_MAX, QUEUE_RTR_ITEMS_SIZE_MAX, memb_commit_token_memb_entry::received_flg, totemsrp_stats_t::recovery_entered, totemsrp_instance::recovery_sort_queue, totemsrp_stats_t::recovery_token_lost, totemsrp_instance::regular_sort_queue, memb_ring_id::rep, totemsrp_instance::retrans_message_queue, memb_commit_token_memb_entry::ring_id, mcast::ring_id, memb_commit_token::ring_id, memb_ring_id::seq, mcast::seq, SEQNO_START_MSG, SEQNO_START_TOKEN, consensus_list_item::set, totemsrp_instance::stats, mcast::system_from, totemsrp_instance::timer_heartbeat_timeout, totemsrp_instance::timer_merge_detect_timeout, totemsrp_instance::timer_orf_token_hold_retransmit_timeout, totemsrp_instance::timer_orf_token_retransmit_timeout, totemsrp_instance::timer_orf_token_timeout, totemsrp_instance::timer_pause_timeout, totem_config::token_hold_timeout, totem_config::token_retransmit_timeout, totemsrp_instance::token_ring_id_seq, totem_config::token_timeout, totemsrp_instance::totem_config, TOTEM_CONFIGURATION_REGULAR, TOTEM_CONFIGURATION_TRANSITIONAL, totemip_copy(), totemip_copy_endian_convert(), totemip_equal(), totemip_print(), totemrrp_buffer_alloc(), totemrrp_buffer_release(), totemsrp_instance::totemrrp_context, totemrrp_iface_check(), totemrrp_membership_changed(), totemrrp_processor_count_set(), totemrrp_ring_reenable(), totemsrp_instance::totemsrp_confchg_fn, TOTEMSRP_GSFROM_CONSENSUS_TIMEOUT, TOTEMSRP_GSFROM_THE_CONSENSUS_TIMEOUT_EXPIRED, TOTEMSRP_GSFROM_THE_TOKEN_WAS_LOST_IN_THE_COMMIT_STATE, TOTEMSRP_GSFROM_THE_TOKEN_WAS_LOST_IN_THE_OPERATIONAL_STATE, TOTEMSRP_GSFROM_THE_TOKEN_WAS_LOST_IN_THE_RECOVERY_STATE, totemsrp_instance::totemsrp_log_level_debug, totemsrp_instance::totemsrp_log_level_notice, totemsrp_instance::totemsrp_log_level_trace, totemsrp_instance::totemsrp_log_level_warning, totemsrp_instance::totemsrp_poll_handle, totemsrp_instance::totemsrp_waiting_trans_ack_cb_fn, message_header::type, and totemsrp_instance::waiting_trans_ack.

Referenced by totemmrp_ring_reenable().

void totemsrp_service_ready_register ( void *  context,
void(*)(void)  totem_service_ready 
)
void totemsrp_threaded_mode_enable ( void *  context)

Definition at line 4793 of file totemsrp.c.

References totemsrp_instance::threaded_mode_enabled.

Referenced by totemmrp_threaded_mode_enable().

void totemsrp_trans_ack ( void *  context)

Variable Documentation

struct message_item __attribute__
int addr_entries

Definition at line 65 of file totemsrp.c.

unsigned int aru

Definition at line 63 of file totemsrp.c.

Referenced by totemsrp_avail(), and totemsrp_ring_reenable().

unsigned int aru_addr

Definition at line 64 of file totemsrp.c.

unsigned int backlog

Definition at line 66 of file totemsrp.c.

Referenced by totemsrp_callback_token_destroy().

char encapsulated

Definition at line 61 of file totemsrp.c.

unsigned char end_of_commit_token[0]

Definition at line 66 of file totemsrp.c.

unsigned char end_of_memb_join[0]

Definition at line 65 of file totemsrp.c.

unsigned short endian_detector

Definition at line 62 of file totemsrp.c.

unsigned int failed_list_entries

Definition at line 63 of file totemsrp.c.

unsigned int fcc

Definition at line 67 of file totemsrp.c.

const char* gather_state_from_desc[]
Initial value:
= {
[TOTEMSRP_GSFROM_CONSENSUS_TIMEOUT] = "consensus timeout",
[TOTEMSRP_GSFROM_THE_TOKEN_WAS_LOST_IN_THE_OPERATIONAL_STATE] = "The token was lost in the OPERATIONAL state.",
[TOTEMSRP_GSFROM_THE_CONSENSUS_TIMEOUT_EXPIRED] = "The consensus timeout expired.",
[TOTEMSRP_GSFROM_THE_TOKEN_WAS_LOST_IN_THE_COMMIT_STATE] = "The token was lost in the COMMIT state.",
[TOTEMSRP_GSFROM_THE_TOKEN_WAS_LOST_IN_THE_RECOVERY_STATE] = "The token was lost in the RECOVERY state.",
[TOTEMSRP_GSFROM_FAILED_TO_RECEIVE] = "failed to receive",
[TOTEMSRP_GSFROM_FOREIGN_MESSAGE_IN_OPERATIONAL_STATE] = "foreign message in operational state",
[TOTEMSRP_GSFROM_FOREIGN_MESSAGE_IN_GATHER_STATE] = "foreign message in gather state",
[TOTEMSRP_GSFROM_MERGE_DURING_OPERATIONAL_STATE] = "merge during operational state",
[TOTEMSRP_GSFROM_MERGE_DURING_GATHER_STATE] = "merge during gather state",
[TOTEMSRP_GSFROM_MERGE_DURING_JOIN] = "merge during join",
[TOTEMSRP_GSFROM_JOIN_DURING_OPERATIONAL_STATE] = "join during operational state",
[TOTEMSRP_GSFROM_JOIN_DURING_COMMIT_STATE] = "join during commit state",
[TOTEMSRP_GSFROM_JOIN_DURING_RECOVERY] = "join during recovery",
[TOTEMSRP_GSFROM_INTERFACE_CHANGE] = "interface change",
}

Definition at line 557 of file totemsrp.c.

int guarantee
struct message_header header

Definition at line 60 of file totemsrp.c.

Referenced by corosync_sending_allowed(), cpg_zcb_free(), and sync_init().

unsigned int high_delivered

Definition at line 62 of file totemsrp.c.

int memb_index

Definition at line 64 of file totemsrp.c.

unsigned int node_id

Definition at line 65 of file totemsrp.c.

unsigned int nodeid

Definition at line 63 of file totemsrp.c.

Referenced by totemsrp_ring_reenable().

unsigned int proc_list_entries

Definition at line 62 of file totemsrp.c.

unsigned int received_flg

Definition at line 63 of file totemsrp.c.

unsigned int retrans_flg

Definition at line 68 of file totemsrp.c.

struct memb_ring_id ring_id

Definition at line 64 of file totemsrp.c.

Referenced by sync_init(), and votequorum_dispatch().

unsigned long long ring_seq

Definition at line 64 of file totemsrp.c.

struct rtr_item rtr_list[0]

Definition at line 70 of file totemsrp.c.

Referenced by totemsrp_avail().

int rtr_list_entries

Definition at line 69 of file totemsrp.c.

Referenced by totemsrp_avail().

unsigned int seq

Definition at line 62 of file totemsrp.c.

Referenced by totemsrp_avail().

struct srp_addr system_from
int this_seqno

Definition at line 63 of file totemsrp.c.

unsigned int token_seq

Definition at line 62 of file totemsrp.c.

struct message_handlers totemsrp_message_handlers
Initial value:
= {
6,
{
message_handler_orf_token,
message_handler_mcast,
message_handler_memb_merge_detect,
message_handler_memb_join,
message_handler_memb_commit_token,
message_handler_token_hold_cancel
}
}

Definition at line 679 of file totemsrp.c.

unsigned long long int tv_old

Definition at line 3600 of file totemsrp.c.

char type

Definition at line 60 of file totemsrp.c.

Referenced by totemsrp_callback_token_create().