46 #include <qb/qbloop.h>
48 #define LOGSYS_UTILS_ONLY 1
56 void **transport_instance,
65 unsigned int msg_len),
67 void (*iface_change_fn) (
71 void (*target_set_completed) (
74 void *(*buffer_alloc) (void);
79 void *transport_context,
83 void *transport_context,
85 unsigned int msg_len);
88 void *transport_context,
90 unsigned int msg_len);
94 void *transport_context,
96 unsigned int msg_len);
106 void (*
net_mtu_adjust) (
void *transport_context,
struct totem_config *totem_config);
108 const char *(*iface_print) (
void *transport_context);
111 void *transport_context,
115 void *transport_context,
119 void *transport_context,
120 const char *cipher_type,
121 const char *hash_type);
124 void *transport_context);
127 void *transport_context,
131 void *transport_context,
135 void *transport_context,
142 .
name =
"UDP/IP Multicast",
162 .name =
"UDP/IP Unicast",
186 .name =
"Infiniband/IP",
217 const char *
function,
226 #define log_printf(level, format, args...) \
228 instance->totemnet_log_printf ( \
230 instance->totemnet_subsys_id, \
231 __FUNCTION__, __FILE__, __LINE__, \
232 (const char *)format, ##args); \
235 static void totemnet_instance_initialize (
237 struct totem_config *config)
248 "Initializing transport (%s).", transport_entries[transport].name);
250 instance->
transport = &transport_entries[transport];
255 const char *cipher_type,
256 const char *hash_type)
262 cipher_type, hash_type);
281 struct totem_config *totem_config,
289 unsigned int msg_len),
291 void (*iface_change_fn) (
295 void (*target_set_completed) (
302 if (instance == NULL) {
305 totemnet_instance_initialize (instance, totem_config);
309 interface_no, context, deliver_fn, iface_change_fn, target_set_completed);
315 *net_context = instance;
326 assert (instance != NULL);
334 assert (instance != NULL);
373 unsigned int msg_len)
385 unsigned int msg_len)
398 unsigned int msg_len)
429 const char *ret_char;
475 unsigned int res = 0;
491 unsigned int res = 0;
508 unsigned int res = 0;
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)
const char *(* iface_print)(void *transport_context)
int(* finalize)(void *transport_context)
int totemnet_mcast_flush_send(void *net_context, const void *msg, unsigned int msg_len)
int(* recv_mcast_empty)(void *transport_context)
int totemiba_recv_mcast_empty(void *iba_context)
int(* token_target_set)(void *transport_context, const struct totem_ip_address *token_target)
int totemudpu_token_target_set(void *udpu_context, const struct totem_ip_address *token_target)
totem_transport_t transport_number
int totemiba_send_flush(void *iba_context)
int totemiba_token_target_set(void *iba_context, const struct totem_ip_address *token_target)
int totemnet_member_remove(void *net_context, const struct totem_ip_address *member)
void totemudp_net_mtu_adjust(void *udp_context, struct totem_config *totem_config)
void(*) in totemnet_subsys_id)
int(* member_set_active)(void *transport_context, const struct totem_ip_address *member, int active)
void * totemudp_buffer_alloc(void)
int totemudp_mcast_flush_send(void *udp_context, const void *msg, unsigned int msg_len)
int totemudp_token_target_set(void *udp_context, const struct totem_ip_address *token_target)
const char * totemnet_iface_print(void *net_context)
int totemiba_initialize(qb_loop_t *qb_poll_handle, void **iba_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.
int totemudpu_processor_count_set(void *udpu_context, int processor_count)
int(* send_flush)(void *transport_context)
int totemiba_mcast_flush_send(void *iba_context, const void *ms, unsigned int msg_len)
unsigned char addr[TOTEMIP_ADDRLEN]
void * totemiba_buffer_alloc(void)
int totemnet_member_add(void *net_context, const struct totem_ip_address *member)
void(* buffer_release)(void *ptr)
int(* iface_get)(void *transport_context, struct totem_ip_address *addr)
int totemudp_mcast_noflush_send(void *udp_context, const void *msg, unsigned int msg_len)
int totemiba_iface_check(void *iba_context)
void *(* buffer_alloc)(void)
const char * totemudpu_iface_print(void *udpu_context)
int totemudp_send_flush(void *udp_context)
Totem Network interface - also does encryption/decryption.
int totemudp_recv_flush(void *udp_context)
int totemnet_recv_flush(void *net_context)
int totemiba_crypto_set(void *iba_context, const char *cipher_type, const char *hash_type)
void(* totemnet_log_printf)(int level, int subsys, const char *function, const char *file, int line, const char *format,...) __attribute__((format(printf
int totemnet_net_mtu_adjust(void *net_context, struct totem_config *totem_config)
void totemudpu_buffer_release(void *ptr)
void * totemudpu_buffer_alloc(void)
int(* token_send)(void *transport_context, const void *msg, unsigned int msg_len)
int totemudp_token_send(void *udp_context, const void *msg, unsigned int msg_len)
int totemnet_crypto_set(void *net_context, const char *cipher_type, const char *hash_type)
int totemiba_token_send(void *iba_context, const void *ms, unsigned int msg_len)
void(* net_mtu_adjust)(void *transport_context, struct totem_config *totem_config)
int totemudpu_mcast_noflush_send(void *udpu_context, const void *msg, unsigned int msg_len)
int totemudp_initialize(qb_loop_t *poll_handle, void **udp_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.
void * totemnet_buffer_alloc(void *net_context)
int(* mcast_flush_send)(void *transport_context, const void *msg, unsigned int msg_len)
int totemnet_member_set_active(void *net_context, const struct totem_ip_address *member, int active)
int totemiba_iface_get(void *iba_context, struct totem_ip_address *addr)
int totemnet_recv_mcast_empty(void *net_context)
int totemnet_iface_get(void *net_context, struct totem_ip_address *addr)
int totemudpu_crypto_set(void *udpu_context, const char *cipher_type, const char *hash_type)
int totemnet_send_flush(void *net_context)
int(* initialize)(qb_loop_t *loop_pt, void **transport_instance, 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))
void totemiba_net_mtu_adjust(void *iba_context, struct totem_config *totem_config)
int totemnet_mcast_noflush_send(void *net_context, const void *msg, unsigned int msg_len)
int totemudpu_token_send(void *udpu_context, const void *msg, unsigned int msg_len)
int totemudp_finalize(void *udp_context)
int totemnet_finalize(void *net_context)
const char * totemudp_iface_print(void *udp_context)
void(* log_printf)(int level, int subsys, const char *function_name, const char *file_name, int file_line, const char *format,...) __attribute__((format(printf
int(* crypto_set)(void *transport_context, const char *cipher_type, const char *hash_type)
const char * totemiba_iface_print(void *iba_context)
int totemnet_token_send(void *net_context, const void *msg, unsigned int msg_len)
int totemiba_finalize(void *iba_context)
int(* member_add)(void *transport_context, const struct totem_ip_address *member)
int totemudpu_member_remove(void *udpu_context, const struct totem_ip_address *token_target)
int(* processor_count_set)(void *transport_context, int processor_count)
int totemnet_initialize(qb_loop_t *loop_pt, void **net_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.
int totemudpu_member_set_active(void *udpu_context, const struct totem_ip_address *member_ip, int active)
struct transport transport_entries[]
int totemudp_iface_get(void *udp_context, struct totem_ip_address *addr)
int totemiba_mcast_noflush_send(void *iba_context, const void *ms, unsigned int msg_len)
#define log_printf(level, format, args...)
struct totem_logging_configuration totem_logging_configuration
#define LOGSYS_LEVEL_NOTICE
int totemudpu_recv_mcast_empty(void *udpu_context)
int(* iface_check)(void *transport_context)
void totemnet_buffer_release(void *net_context, void *ptr)
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.
int totemiba_processor_count_set(void *iba_context, int processor_count)
int totemiba_recv_flush(void *iba_context)
int totemudp_recv_mcast_empty(void *udp_context)
int totemudp_iface_check(void *udp_context)
int totemnet_iface_check(void *net_context)
void totemudpu_net_mtu_adjust(void *udpu_context, struct totem_config *totem_config)
int totemudpu_mcast_flush_send(void *udpu_context, const void *msg, unsigned int msg_len)
struct transport * transport
int totemudpu_send_flush(void *udpu_context)
int(* recv_flush)(void *transport_context)
int(* mcast_noflush_send)(void *transport_context, const void *msg, unsigned int msg_len)
void totemiba_buffer_release(void *ptr)
int totemudpu_finalize(void *udpu_context)
int totemnet_token_target_set(void *net_context, const struct totem_ip_address *token_target)
int totemudpu_recv_flush(void *udpu_context)
int totemudpu_member_add(void *udpu_context, const struct totem_ip_address *member)
int(* member_remove)(void *transport_context, const struct totem_ip_address *member)
int totemudpu_iface_get(void *udpu_context, struct totem_ip_address *addr)
void totemudp_buffer_release(void *ptr)
int totemudpu_iface_check(void *udpu_context)
int totemnet_processor_count_set(void *net_context, int processor_count)