corosync
2.3.6
|
#include <sys/types.h>
#include <sys/socket.h>
#include <qb/qbloop.h>
#include <corosync/totem/totem.h>
Go to the source code of this file.
Functions | |
int | totemudpu_initialize (qb_loop_t *poll_handle, void **udpu_context, struct totem_config *totem_config, totemsrp_stats_t *stats, int interface_no, void *context, void(*deliver_fn)(void *context, const void *msg, unsigned int msg_len), void(*iface_change_fn)(void *context, const struct totem_ip_address *iface_address), void(*target_set_completed)(void *context)) |
Create an instance. More... | |
void * | totemudpu_buffer_alloc (void) |
void | totemudpu_buffer_release (void *ptr) |
int | totemudpu_processor_count_set (void *udpu_context, int processor_count) |
int | totemudpu_token_send (void *udpu_context, const void *msg, unsigned int msg_len) |
int | totemudpu_mcast_flush_send (void *udpu_context, const void *msg, unsigned int msg_len) |
int | totemudpu_mcast_noflush_send (void *udpu_context, const void *msg, unsigned int msg_len) |
int | totemudpu_recv_flush (void *udpu_context) |
int | totemudpu_send_flush (void *udpu_context) |
int | totemudpu_iface_check (void *udpu_context) |
int | totemudpu_finalize (void *udpu_context) |
void | totemudpu_net_mtu_adjust (void *udpu_context, struct totem_config *totem_config) |
const char * | totemudpu_iface_print (void *udpu_context) |
int | totemudpu_iface_get (void *udpu_context, struct totem_ip_address *addr) |
int | totemudpu_token_target_set (void *udpu_context, const struct totem_ip_address *token_target) |
int | totemudpu_crypto_set (void *udpu_context, const char *cipher_type, const char *hash_type) |
int | totemudpu_recv_mcast_empty (void *udpu_context) |
int | totemudpu_member_add (void *udpu_context, const struct totem_ip_address *member) |
int | totemudpu_member_remove (void *udpu_context, const struct totem_ip_address *member) |
int | totemudpu_member_set_active (void *udpu_context, const struct totem_ip_address *member_ip, int active) |
void* totemudpu_buffer_alloc | ( | void | ) |
Definition at line 859 of file totemudpu.c.
References FRAME_SIZE_MAX.
void totemudpu_buffer_release | ( | void * | ptr | ) |
Definition at line 864 of file totemudpu.c.
int totemudpu_crypto_set | ( | void * | udpu_context, |
const char * | cipher_type, | ||
const char * | hash_type | ||
) |
Definition at line 250 of file totemudpu.c.
References totemudpu_member::active, crypto_encrypt_and_sign(), totemudpu_instance::crypto_inst, totemudpu_member::fd, FRAME_SIZE_MAX, totem_interface::ip_port, totemudpu_member::list, list_entry, log_printf, LOGSYS_LEVEL_CRIT, LOGSYS_PERROR, totemudpu_member::member, totemudpu_instance::member_list, totemudpu_instance::merge_detect_messages_sent_before_timeout, MSG_NOSIGNAL, list_head::next, totemudpu_instance::send_merge_detect_message, totemudpu_instance::token_socket, totemudpu_instance::totem_interface, totemip_totemip_to_sockaddr_convert(), and totemudpu_instance::totemudpu_log_level_debug.
int totemudpu_finalize | ( | void * | udpu_context | ) |
Definition at line 421 of file totemudpu.c.
References BIND_STATE_LOOPBACK, BIND_STATE_REGULAR, totem_interface::bindnet, totem_interface::boundto, totem_config::clear_node_high_bit, totemudpu_instance::context, crypto_authenticate_and_decrypt(), totemudpu_instance::crypto_inst, totem_config::downcheck_timeout, totem_ip_address::family, totemudpu_member::fd, FRAME_SIZE_MAX, totem_interface::ip_port, log_printf, LOGSYS_PERROR, MCAST_SOCKET_BUFFER_SIZE, MSG_NOSIGNAL, totemudpu_instance::my_id, totemudpu_instance::my_memb_entries, totemudpu_instance::netif_bind_state, totemudpu_instance::netif_state_report, NETIF_STATE_REPORT_DOWN, NETIF_STATE_REPORT_UP, totemudpu_instance::stats_recv, system_from, totemudpu_instance::timer_netif_check_timeout, totemudpu_instance::token_socket, totemudpu_instance::totem_config, totemudpu_instance::totem_interface, totemip_copy(), totemip_iface_check(), totemip_nosigpipe, totemip_print(), totemip_totemip_to_sockaddr_convert(), totemudpu_instance::totemudpu_deliver_fn, totemudpu_instance::totemudpu_iface_change_fn, totemudpu_instance::totemudpu_iov_recv, totemudpu_instance::totemudpu_log_level_notice, totemudpu_instance::totemudpu_log_level_security, totemudpu_instance::totemudpu_log_level_warning, totemudpu_member_list_rebind_ip(), and totemudpu_instance::totemudpu_poll_handle.
int totemudpu_iface_check | ( | void * | udpu_context | ) |
Definition at line 943 of file totemudpu.c.
int totemudpu_iface_get | ( | void * | udpu_context, |
struct totem_ip_address * | addr | ||
) |
Definition at line 972 of file totemudpu.c.
References totemudpu_instance::my_id.
const char* totemudpu_iface_print | ( | void * | udpu_context | ) |
Definition at line 963 of file totemudpu.c.
References totemudpu_instance::my_id, and totemip_print().
int totemudpu_initialize | ( | qb_loop_t * | poll_handle, |
void ** | udpu_context, | ||
struct totem_config * | totem_config, | ||
totemsrp_stats_t * | stats, | ||
int | interface_no, | ||
void * | context, | ||
void(*)(void *context, const void *msg, unsigned int msg_len) | deliver_fn, | ||
void(*)(void *context, const struct totem_ip_address *iface_address) | iface_change_fn, | ||
void(*)(void *context) | target_set_completed | ||
) |
Create an instance.
Definition at line 763 of file totemudpu.c.
References totem_interface::bindnet, totemudpu_instance::context, totem_config::crypto_cipher_type, totem_config::crypto_hash_type, crypto_init(), totemudpu_instance::crypto_inst, FRAME_SIZE_MAX, totem_config::interfaces, totemudpu_instance::iov_buffer, totem_logging_configuration::log_level_debug, totem_logging_configuration::log_level_error, totem_logging_configuration::log_level_notice, totem_logging_configuration::log_level_warning, totem_logging_configuration::log_printf, totem_logging_configuration::log_subsys_id, totem_config::node_id, totem_ip_address::nodeid, totem_config::private_key, totem_config::private_key_len, totemudpu_instance::stats, totemudpu_instance::timer_netif_check_timeout, totemudpu_instance::totem_config, totemudpu_instance::totem_interface, totem_config::totem_logging_configuration, totemip_localhost(), totemudpu_instance::totemudpu_deliver_fn, totemudpu_instance::totemudpu_iface_change_fn, totemudpu_instance::totemudpu_log_level_debug, totemudpu_instance::totemudpu_log_level_error, totemudpu_instance::totemudpu_log_level_notice, totemudpu_instance::totemudpu_log_level_security, totemudpu_instance::totemudpu_log_level_warning, totemudpu_instance::totemudpu_log_printf, totemudpu_instance::totemudpu_poll_handle, totemudpu_instance::totemudpu_subsys_id, and totemudpu_instance::totemudpu_target_set_completed.
int totemudpu_mcast_flush_send | ( | void * | udpu_context, |
const void * | msg, | ||
unsigned int | msg_len | ||
) |
Definition at line 917 of file totemudpu.c.
int totemudpu_mcast_noflush_send | ( | void * | udpu_context, |
const void * | msg, | ||
unsigned int | msg_len | ||
) |
Definition at line 930 of file totemudpu.c.
int totemudpu_member_add | ( | void * | udpu_context, |
const struct totem_ip_address * | member | ||
) |
Definition at line 1109 of file totemudpu.c.
References totemudpu_member::active, totemudpu_member::fd, totemudpu_member::list, log_printf, LOGSYS_LEVEL_NOTICE, totemudpu_member::member, totemudpu_instance::member_list, and totemip_print().
int totemudpu_member_remove | ( | void * | udpu_context, |
const struct totem_ip_address * | member | ||
) |
Definition at line 1135 of file totemudpu.c.
References totemudpu_member::fd, totemudpu_member::list, list_entry, log_printf, LOGSYS_LEVEL_DEBUG, LOGSYS_LEVEL_NOTICE, totemudpu_member::member, totemudpu_instance::member_list, list_head::next, totemip_compare(), totemip_print(), and totemudpu_instance::totemudpu_poll_handle.
int totemudpu_member_set_active | ( | void * | udpu_context, |
const struct totem_ip_address * | member_ip, | ||
int | active | ||
) |
Definition at line 1211 of file totemudpu.c.
References totemudpu_member::active, totemudpu_member::list, list_entry, log_printf, LOGSYS_LEVEL_DEBUG, totemudpu_member::member, totemudpu_instance::member_list, totemudpu_instance::merge_detect_messages_sent_before_timeout, totem_config::merge_timeout, list_head::next, totemudpu_instance::send_merge_detect_message, totemudpu_instance::timer_merge_detect_timeout, totemudpu_instance::totem_config, totemip_compare(), totemip_print(), and totemudpu_instance::totemudpu_poll_handle.
void totemudpu_net_mtu_adjust | ( | void * | udpu_context, |
struct totem_config * | totem_config | ||
) |
Definition at line 953 of file totemudpu.c.
References totem_interface::bindnet, totem_config::crypto_cipher_type, totem_config::crypto_hash_type, crypto_sec_header_size(), totem_ip_address::family, totem_config::interface_count, totem_config::interfaces, totem_config::net_mtu, and totemip_udpip_header_size().
int totemudpu_processor_count_set | ( | void * | udpu_context, |
int | processor_count | ||
) |
Definition at line 869 of file totemudpu.c.
References totem_config::downcheck_timeout, totemudpu_instance::my_memb_entries, totemudpu_instance::timer_netif_check_timeout, totemudpu_instance::totem_config, and totemudpu_instance::totemudpu_poll_handle.
int totemudpu_recv_flush | ( | void * | udpu_context | ) |
Definition at line 891 of file totemudpu.c.
int totemudpu_recv_mcast_empty | ( | void * | udpu_context | ) |
Definition at line 999 of file totemudpu.c.
References totem_ip_address::family, totemudpu_member::fd, LOGSYS_PERROR, MCAST_SOCKET_BUFFER_SIZE, totemudpu_member::member, MSG_NOSIGNAL, totemudpu_instance::my_id, system_from, totemudpu_instance::token_socket, totemip_nosigpipe, totemip_totemip_to_sockaddr_convert(), totemudpu_instance::totemudpu_iov_recv, totemudpu_instance::totemudpu_log_level_notice, and totemudpu_instance::totemudpu_log_level_warning.
int totemudpu_send_flush | ( | void * | udpu_context | ) |
Definition at line 898 of file totemudpu.c.
int totemudpu_token_send | ( | void * | udpu_context, |
const void * | msg, | ||
unsigned int | msg_len | ||
) |
Definition at line 905 of file totemudpu.c.
References totemudpu_instance::token_target.
int totemudpu_token_target_set | ( | void * | udpu_context, |
const struct totem_ip_address * | token_target | ||
) |
Definition at line 984 of file totemudpu.c.
References totemudpu_instance::context, totemudpu_instance::token_target, and totemudpu_instance::totemudpu_target_set_completed.