46#define LOGSYS_UTILS_ONLY 1
54 void **transport_instance,
65 void (*iface_change_fn) (
68 unsigned int ring_no),
74 void (*target_set_completed) (
77 void *(*buffer_alloc) (void);
82 void *transport_context,
86 void *transport_context,
88 unsigned int msg_len);
91 void *transport_context,
93 unsigned int msg_len);
97 void *transport_context,
99 unsigned int msg_len);
111 const char *(*iface_print) (
void *transport_context);
114 void *transport_context,
116 unsigned int *iface_count);
119 void *transport_context,
124 void *transport_context,
128 void *transport_context,
129 const char *cipher_type,
130 const char *hash_type);
133 void *transport_context);
136 void *transport_context,
138 unsigned short ip_port,
139 unsigned int ring_no);
142 void *transport_context,
148 void *transport_context,
153 void *transport_context,
172 .
name =
"UDP/IP Multicast",
194 .crypto_reconfigure_phase = NULL
197 .name =
"UDP/IP Unicast",
219 .crypto_reconfigure_phase = NULL
256 const char *function,
265#define log_printf(level, format, args...) \
267 instance->totemnet_log_printf ( \
269 instance->totemnet_subsys_id, \
270 __FUNCTION__, __FILE__, __LINE__, \
271 (const char *)format, ##args); \
274static void totemnet_instance_initialize (
294 const char *cipher_type,
295 const char *hash_type)
301 cipher_type, hash_type);
327 unsigned int msg_len,
330 void (*iface_change_fn) (
333 unsigned int ring_no),
335 void (*mtu_changed) (
339 void (*target_set_completed) (
346 if (instance == NULL) {
353 context, deliver_fn, iface_change_fn, mtu_changed, target_set_completed);
359 *net_context = instance;
370 assert (instance != NULL);
378 assert (instance != NULL);
417 unsigned int msg_len)
429 unsigned int msg_len)
442 unsigned int msg_len)
473 unsigned short ip_port,
474 unsigned int iface_no)
500 unsigned int *iface_count)
540 unsigned int res = 0;
559 unsigned int res = 0;
577 unsigned int res = 0;
594 unsigned int res = 0;
609 unsigned int res = 0;
#define LOGSYS_LEVEL_NOTICE
struct totem_logging_configuration totem_logging_configuration
totem_transport_t transport_number
The totem_ip_address struct.
void(* log_printf)(int level, int subsys, const char *function_name, const char *file_name, int file_line, const char *format,...) __attribute__((format(printf
struct transport * transport
void(* totemnet_log_printf)(int level, int subsys, const char *function, const char *file, int line, const char *format,...) __attribute__((format(printf
void(*) in totemnet_subsys_id)
int(* finalize)(void *transport_context)
int(* mcast_noflush_send)(void *transport_context, const void *msg, unsigned int msg_len)
int(* mcast_flush_send)(void *transport_context, const void *msg, unsigned int msg_len)
void(* buffer_release)(void *ptr)
int(* token_target_set)(void *transport_context, unsigned int nodeid)
int(* member_add)(void *transport_context, const struct totem_ip_address *local, const struct totem_ip_address *member, int ring_no)
int(* reconfigure)(void *net_context, struct totem_config *totem_config)
int(* initialize)(qb_loop_t *loop_pt, void **transport_instance, struct totem_config *totem_config, totemsrp_stats_t *stats, void *context, void(*deliver_fn)(void *context, const void *msg, unsigned int msg_len, const struct sockaddr_storage *system_from), void(*iface_change_fn)(void *context, const struct totem_ip_address *iface_address, unsigned int ring_no), void(*mtu_changed)(void *context, int net_mtu), void(*target_set_completed)(void *context))
int(* send_flush)(void *transport_context)
int(* recv_mcast_empty)(void *transport_context)
int(* iface_check)(void *transport_context)
void(* stats_clear)(void *net_context)
int(* nodestatus_get)(void *transport_context, unsigned int nodeid, struct totem_node_status *node_status)
void(* net_mtu_adjust)(void *transport_context, struct totem_config *totem_config)
void *(* buffer_alloc)(void)
int(* member_set_active)(void *transport_context, const struct totem_ip_address *member, int active)
int(* processor_count_set)(void *transport_context, int processor_count)
int(* crypto_set)(void *transport_context, const char *cipher_type, const char *hash_type)
int(* member_remove)(void *transport_context, const struct totem_ip_address *member, int ring_no)
int(* iface_set)(void *transport_context, const struct totem_ip_address *local, unsigned short ip_port, unsigned int ring_no)
int(* recv_flush)(void *transport_context)
int(* crypto_reconfigure_phase)(void *net_context, struct totem_config *totem_config, cfg_message_crypto_reconfig_phase_t phase)
int(* token_send)(void *transport_context, const void *msg, unsigned int msg_len)
int(* ifaces_get)(void *transport_context, char ***status, unsigned int *iface_count)
cfg_message_crypto_reconfig_phase_t
int totemknet_mcast_flush_send(void *knet_context, const void *msg, unsigned int msg_len)
int totemknet_iface_set(void *knet_context, const struct totem_ip_address *local_addr, unsigned short ip_port, unsigned int iface_no)
int totemknet_finalize(void *knet_context)
int totemknet_recv_flush(void *knet_context)
void * totemknet_buffer_alloc(void)
int totemknet_processor_count_set(void *knet_context, int processor_count)
int totemknet_mcast_noflush_send(void *knet_context, const void *msg, unsigned int msg_len)
void totemknet_buffer_release(void *ptr)
int totemknet_ifaces_get(void *knet_context, char ***status, unsigned int *iface_count)
int totemknet_member_add(void *knet_context, const struct totem_ip_address *local, const struct totem_ip_address *member, int link_no)
int totemknet_crypto_set(void *knet_context, const char *cipher_type, const char *hash_type)
int totemknet_member_remove(void *knet_context, const struct totem_ip_address *token_target, int link_no)
int totemknet_initialize(qb_loop_t *poll_handle, void **knet_context, struct totem_config *totem_config, totemsrp_stats_t *stats, void *context, void(*deliver_fn)(void *context, const void *msg, unsigned int msg_len, const struct sockaddr_storage *system_from), void(*iface_change_fn)(void *context, const struct totem_ip_address *iface_address, unsigned int link_no), void(*mtu_changed)(void *context, int net_mtu), void(*target_set_completed)(void *context))
int totemknet_token_send(void *knet_context, const void *msg, unsigned int msg_len)
int totemknet_nodestatus_get(void *knet_context, unsigned int nodeid, struct totem_node_status *node_status)
void totemknet_stats_clear(void *knet_context)
int totemknet_send_flush(void *knet_context)
void totemknet_net_mtu_adjust(void *knet_context, struct totem_config *totem_config)
int totemknet_token_target_set(void *knet_context, unsigned int nodeid)
int totemknet_reconfigure(void *knet_context, struct totem_config *totem_config)
int totemknet_crypto_reconfigure_phase(void *knet_context, struct totem_config *totem_config, cfg_message_crypto_reconfig_phase_t phase)
int totemknet_recv_mcast_empty(void *knet_context)
int totemknet_iface_check(void *knet_context)
#define log_printf(level, format, args...)
int totemnet_iface_set(void *net_context, const struct totem_ip_address *interface_addr, unsigned short ip_port, unsigned int iface_no)
int totemnet_member_remove(void *net_context, const struct totem_ip_address *member, int ring_no)
void * totemnet_buffer_alloc(void *net_context)
int totemnet_token_send(void *net_context, const void *msg, unsigned int msg_len)
int totemnet_send_flush(void *net_context)
int totemnet_initialize(qb_loop_t *loop_pt, void **net_context, struct totem_config *totem_config, totemsrp_stats_t *stats, void *context, void(*deliver_fn)(void *context, const void *msg, unsigned int msg_len, const struct sockaddr_storage *system_from), void(*iface_change_fn)(void *context, const struct totem_ip_address *iface_address, unsigned int ring_no), void(*mtu_changed)(void *context, int net_mtu), void(*target_set_completed)(void *context))
void totemnet_buffer_release(void *net_context, void *ptr)
int totemnet_mcast_flush_send(void *net_context, const void *msg, unsigned int msg_len)
int totemnet_member_add(void *net_context, const struct totem_ip_address *local, const struct totem_ip_address *member, int ring_no)
int totemnet_finalize(void *net_context)
int totemnet_crypto_set(void *net_context, const char *cipher_type, const char *hash_type)
int totemnet_ifaces_get(void *net_context, char ***status, unsigned int *iface_count)
struct transport transport_entries[]
int totemnet_processor_count_set(void *net_context, int processor_count)
int totemnet_token_target_set(void *net_context, unsigned int nodeid)
int totemnet_recv_flush(void *net_context)
int totemnet_iface_check(void *net_context)
int totemnet_mcast_noflush_send(void *net_context, const void *msg, unsigned int msg_len)
int totemnet_recv_mcast_empty(void *net_context)
int totemnet_net_mtu_adjust(void *net_context, struct totem_config *totem_config)
int totemnet_nodestatus_get(void *net_context, unsigned int nodeid, struct totem_node_status *node_status)
void totemnet_stats_clear(void *net_context)
int totemnet_reconfigure(void *net_context, struct totem_config *totem_config)
int totemnet_member_set_active(void *net_context, const struct totem_ip_address *member, int active)
int totemnet_crypto_reconfigure_phase(void *net_context, struct totem_config *totem_config, cfg_message_crypto_reconfig_phase_t phase)
Totem Network interface - also does encryption/decryption.
struct srp_addr system_from
int totemudp_iface_set(void *net_context, const struct totem_ip_address *local_addr, unsigned short ip_port, unsigned int iface_no)
void totemudp_net_mtu_adjust(void *udp_context, struct totem_config *totem_config)
void * totemudp_buffer_alloc(void)
int totemudp_send_flush(void *udp_context)
int totemudp_iface_check(void *udp_context)
int totemudp_recv_flush(void *udp_context)
int totemudp_nodestatus_get(void *udp_context, unsigned int nodeid, struct totem_node_status *node_status)
int totemudp_token_target_set(void *udp_context, unsigned int nodeid)
int totemudp_ifaces_get(void *net_context, char ***status, unsigned int *iface_count)
int totemudp_reconfigure(void *udp_context, struct totem_config *totem_config)
int totemudp_mcast_flush_send(void *udp_context, const void *msg, unsigned int msg_len)
int totemudp_finalize(void *udp_context)
int totemudp_recv_mcast_empty(void *udp_context)
int totemudp_crypto_set(void *udp_context, const char *cipher_type, const char *hash_type)
int totemudp_processor_count_set(void *udp_context, int processor_count)
int totemudp_token_send(void *udp_context, const void *msg, unsigned int msg_len)
int totemudp_mcast_noflush_send(void *udp_context, const void *msg, unsigned int msg_len)
int totemudp_member_add(void *udp_context, const struct totem_ip_address *local, const struct totem_ip_address *member, int ring_no)
void totemudp_buffer_release(void *ptr)
int totemudp_member_remove(void *udp_context, const struct totem_ip_address *token_target, int ring_no)
int totemudp_initialize(qb_loop_t *poll_handle, void **udp_context, struct totem_config *totem_config, totemsrp_stats_t *stats, void *context, void(*deliver_fn)(void *context, const void *msg, unsigned int msg_len, const struct sockaddr_storage *system_from), void(*iface_change_fn)(void *context, const struct totem_ip_address *iface_address, unsigned int ring_no), void(*mtu_changed)(void *context, int net_mtu), void(*target_set_completed)(void *context))
Create an instance.
void totemudpu_buffer_release(void *ptr)
int totemudpu_ifaces_get(void *net_context, char ***status, unsigned int *iface_count)
int totemudpu_send_flush(void *udpu_context)
int totemudpu_token_target_set(void *udpu_context, unsigned int nodeid)
void * totemudpu_buffer_alloc(void)
int totemudpu_recv_mcast_empty(void *udpu_context)
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_iface_set(void *net_context, const struct totem_ip_address *local_addr, unsigned short ip_port, unsigned int iface_no)
int totemudpu_initialize(qb_loop_t *poll_handle, void **udpu_context, struct totem_config *totem_config, totemsrp_stats_t *stats, void *context, void(*deliver_fn)(void *context, const void *msg, unsigned int msg_len, const struct sockaddr_storage *system_from), void(*iface_change_fn)(void *context, const struct totem_ip_address *iface_address, unsigned int ring_no), void(*mtu_changed)(void *context, int net_mtu), void(*target_set_completed)(void *context))
Create an instance.
int totemudpu_crypto_set(void *udpu_context, const char *cipher_type, const char *hash_type)
int totemudpu_recv_flush(void *udpu_context)
int totemudpu_mcast_noflush_send(void *udpu_context, const void *msg, unsigned int msg_len)
int totemudpu_member_remove(void *udpu_context, const struct totem_ip_address *token_target, int ring_no)
int totemudpu_finalize(void *udpu_context)
int totemudpu_mcast_flush_send(void *udpu_context, const void *msg, unsigned int msg_len)
int totemudpu_iface_check(void *udpu_context)
int totemudpu_reconfigure(void *udpu_context, struct totem_config *totem_config)
void totemudpu_net_mtu_adjust(void *udpu_context, struct totem_config *totem_config)
int totemudpu_nodestatus_get(void *udpu_context, unsigned int nodeid, struct totem_node_status *node_status)
int totemudpu_member_add(void *udpu_context, const struct totem_ip_address *local, const struct totem_ip_address *member, int ring_no)