/* * Initialize the totem multiple ring protocol */ int totemmrp_initialize ( poll_handle poll_handle, struct totem_config *totem_config, void (*deliver_fn) ( unsigned int nodeid, struct iovec *iovec, int iov_len, int endian_conversion_required), void (*confchg_fn) ( enum totem_configuration_type configuration_type, unsigned int *member_list, int member_list_entries, unsigned int *left_list, int left_list_entries, unsigned int *joined_list, int joined_list_entries, struct memb_ring_id *ring_id)) { int result; pg_deliver_fn = deliver_fn; pg_confchg_fn = confchg_fn; result = totemsrp_initialize ( poll_handle, &totemsrp_handle_in, totem_config, totemmrp_deliver_fn, totemmrp_confchg_fn); return (result); }
/* * Initialize the totem multiple ring protocol */ int totemmrp_initialize ( qb_loop_t *poll_handle, 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)) { int result; pg_deliver_fn = deliver_fn; pg_confchg_fn = confchg_fn; stats->mrp = calloc (sizeof(totemmrp_stats_t), 1); result = totemsrp_initialize ( poll_handle, &totemsrp_context, totem_config, stats->mrp, totemmrp_deliver_fn, totemmrp_confchg_fn); return (result); }