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);
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,
137 .
name =
"UDP/IP Multicast",
157 .name =
"UDP/IP Unicast",
180 .name =
"Infiniband/IP",
211 const char *
function,
220 #define log_printf(level, format, args...) \
222 instance->totemnet_log_printf ( \
224 instance->totemnet_subsys_id, \
225 __FUNCTION__, __FILE__, __LINE__, \
226 (const char *)format, ##args); \
229 static void totemnet_instance_initialize (
242 "Initializing transport (%s).", transport_entries[transport].
name);
244 instance->
transport = &transport_entries[transport];
249 const char *cipher_type,
250 const char *hash_type)
256 cipher_type, hash_type);
283 unsigned int msg_len),
285 void (*iface_change_fn) (
289 void (*target_set_completed) (
296 if (instance == NULL) {
299 totemnet_instance_initialize (instance, totem_config);
303 interface_no, context, deliver_fn, iface_change_fn, target_set_completed);
309 *net_context = instance;
320 assert (instance != NULL);
328 assert (instance != NULL);
367 unsigned int msg_len)
379 unsigned int msg_len)
392 unsigned int msg_len)
423 const char *ret_char;
469 unsigned int res = 0;
485 unsigned int res = 0;
void *(* buffer_alloc)(void)
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(* recv_mcast_empty)(void *transport_context)
int totemnet_mcast_flush_send(void *net_context, const void *msg, unsigned int msg_len)
void(* net_mtu_adjust)(void *transport_context, struct totem_config *totem_config)
void(*) in totemnet_subsys_id)
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)
int(* finalize)(void *transport_context)
totem_transport_t transport_number
int totemiba_send_flush(void *iba_context)
int(* crypto_set)(void *transport_context, const char *cipher_type, const char *hash_type)
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)
const char *(* iface_print)(void *transport_context)
void * totemudp_buffer_alloc(void)
int totemudp_mcast_flush_send(void *udp_context, const void *msg, unsigned int msg_len)
int(* member_remove)(void *transport_context, const struct totem_ip_address *member)
int(* mcast_flush_send)(void *transport_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 totemiba_mcast_flush_send(void *iba_context, const void *ms, unsigned int msg_len)
unsigned char addr[TOTEMIP_ADDRLEN]
void * totemiba_buffer_alloc(void)
void(* buffer_release)(void *ptr)
int totemnet_member_add(void *net_context, const struct totem_ip_address *member)
int(* iface_check)(void *transport_context)
int(* processor_count_set)(void *transport_context, int processor_count)
int totemudp_mcast_noflush_send(void *udp_context, const void *msg, unsigned int msg_len)
int totemiba_iface_check(void *iba_context)
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)
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 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)
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(* 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(* totemnet_log_printf)(int level, int subsys, const char *function, const char *file, int line, const char *format,...) __attribute__((format(printf
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)
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 totemnet_send_flush(void *net_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)
int(* member_add)(void *transport_context, const struct totem_ip_address *member)
const char * totemiba_iface_print(void *iba_context)
int totemnet_token_send(void *net_context, const void *msg, unsigned int msg_len)
int(* iface_get)(void *transport_context, struct totem_ip_address *addr)
int totemiba_finalize(void *iba_context)
int(* token_send)(void *transport_context, const void *msg, unsigned int msg_len)
int totemudpu_member_remove(void *udpu_context, const struct totem_ip_address *token_target)
int(* mcast_noflush_send)(void *transport_context, const void *msg, unsigned int msg_len)
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.
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(* send_flush)(void *transport_context)
int totemudpu_recv_mcast_empty(void *udpu_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)
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 totemudpu_iface_get(void *udpu_context, struct totem_ip_address *addr)
int(* recv_flush)(void *transport_context)
void totemudp_buffer_release(void *ptr)
int totemudpu_iface_check(void *udpu_context)
int totemnet_processor_count_set(void *net_context, int processor_count)