corosync  2.3.6
Data Structures | Macros | Functions
totemrrp.h File Reference

Totem Network interface - also does encryption/decryption. More...

#include <sys/types.h>
#include <sys/socket.h>
#include <qb/qbloop.h>
#include <corosync/totem/totem.h>
Include dependency graph for totemrrp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  srp_addr
 

Macros

#define TOTEMRRP_NOFLUSH   0
 
#define TOTEMRRP_FLUSH   1
 

Functions

int totemrrp_initialize (qb_loop_t *poll_handle, void **rrp_context, struct totem_config *totem_config, totemsrp_stats_t *stats, 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_addr, unsigned int iface_no), void(*token_seqid_get)(const void *msg, unsigned int *seqid, unsigned int *token_is), unsigned int(*msgs_missing)(void), void(*target_set_completed)(void *context))
 Create an instance. More...
 
void * totemrrp_buffer_alloc (void *rrp_context)
 
void totemrrp_buffer_release (void *rrp_context, void *ptr)
 
int totemrrp_processor_count_set (void *rrp_context, unsigned int processor_count)
 
int totemrrp_token_send (void *rrp_context, const void *msg, unsigned int msg_len)
 
int totemrrp_mcast_noflush_send (void *rrp_context, const void *msg, unsigned int msg_len)
 
int totemrrp_mcast_flush_send (void *rrp_context, const void *msg, unsigned int msg_len)
 
int totemrrp_recv_flush (void *rrp_context)
 
int totemrrp_send_flush (void *rrp_context)
 
int totemrrp_token_target_set (void *rrp_context, struct totem_ip_address *target, unsigned int iface_no)
 
int totemrrp_iface_check (void *rrp_context)
 
int totemrrp_finalize (void *rrp_context)
 
int totemrrp_ifaces_get (void *rrp_context, char ***status, unsigned int *iface_count)
 
int totemrrp_crypto_set (void *rrp_context, const char *cipher_type, const char *hash_type)
 
int totemrrp_ring_reenable (void *rrp_context, unsigned int iface_no)
 
int totemrrp_mcast_recv_empty (void *rrp_context)
 
int totemrrp_member_add (void *net_context, const struct totem_ip_address *member, int iface_no)
 
int totemrrp_member_remove (void *net_context, const struct totem_ip_address *member, int iface_no)
 
void totemrrp_membership_changed (void *rrp_context, enum totem_configuration_type configuration_type, const struct srp_addr *member_list, size_t member_list_entries, const struct srp_addr *left_list, size_t left_list_entries, const struct srp_addr *joined_list, size_t joined_list_entries, const struct memb_ring_id *ring_id)
 

Detailed Description

Totem Network interface - also does encryption/decryption.

depends on poll abstraction, POSIX, IPV4

Definition in file totemrrp.h.

Macro Definition Documentation

#define TOTEMRRP_FLUSH   1

Definition at line 52 of file totemrrp.h.

#define TOTEMRRP_NOFLUSH   0

Definition at line 51 of file totemrrp.h.

Function Documentation

void* totemrrp_buffer_alloc ( void *  rrp_context)

Definition at line 2118 of file totemrrp.c.

References totemrrp_instance::net_handles, and totemnet_buffer_alloc().

Referenced by totemsrp_ring_reenable().

void totemrrp_buffer_release ( void *  rrp_context,
void *  ptr 
)

Definition at line 2125 of file totemrrp.c.

References totemrrp_instance::net_handles, and totemnet_buffer_release().

Referenced by totemsrp_ring_reenable().

int totemrrp_crypto_set ( void *  rrp_context,
const char *  cipher_type,
const char *  hash_type 
)

Definition at line 2240 of file totemrrp.c.

References totemrrp_instance::net_handles, and totemnet_crypto_set().

Referenced by totemsrp_crypto_set().

int totemrrp_finalize ( void *  rrp_context)
int totemrrp_iface_check ( void *  rrp_context)

Definition at line 2216 of file totemrrp.c.

References rrp_algo::iface_check, and totemrrp_instance::rrp_algo.

Referenced by totemsrp_ring_reenable().

int totemrrp_ifaces_get ( void *  rrp_context,
char ***  status,
unsigned int *  iface_count 
)

Definition at line 2225 of file totemrrp.c.

References totemrrp_instance::interface_count, and totemrrp_instance::status.

Referenced by totemsrp_ifaces_get().

int totemrrp_initialize ( qb_loop_t *  poll_handle,
void **  rrp_context,
struct totem_config totem_config,
totemsrp_stats_t stats,
void *  context,
void(*)(void *context, const void *msg, unsigned int msg_len)  deliver_fn,
void(*)(void *context, const struct totem_ip_address *iface_addr, unsigned int iface_no)  iface_change_fn,
void(*)(const void *msg, unsigned int *seqid, unsigned int *token_is)  token_seqid_get,
unsigned int(*)(void)  msgs_missing,
void(*)(void *context)  target_set_completed 
)

Create an instance.

Definition at line 2003 of file totemrrp.c.

References totemrrp_instance::context, deliver_fn_context::context, totemrrp_instance::deliver_fn_context, totemrrp_stats_t::faulty, deliver_fn_context::iface_no, deliver_fn_context::instance, totem_config::interface_count, totemrrp_stats_t::interface_count, totemrrp_instance::interface_count, totem_config::interfaces, totemrrp_instance::interfaces, totem_logging_configuration::log_level_debug, totem_logging_configuration::log_level_error, totem_logging_configuration::log_level_notice, totem_logging_configuration::log_level_security, totem_logging_configuration::log_level_warning, totem_logging_configuration::log_printf, totem_logging_configuration::log_subsys_id, totemrrp_instance::net_handles, totemrrp_instance::poll_handle, totemsrp_stats_t::rrp, rrp_deliver_fn(), rrp_iface_change_fn(), totemrrp_instance::stats, totemrrp_instance::totem_config, totem_config::totem_logging_configuration, totemnet_initialize(), totemnet_net_mtu_adjust(), totemrrp_instance::totemrrp_deliver_fn, totemrrp_instance::totemrrp_iface_change_fn, totemrrp_instance::totemrrp_log_level_debug, totemrrp_instance::totemrrp_log_level_error, totemrrp_instance::totemrrp_log_level_notice, totemrrp_instance::totemrrp_log_level_security, totemrrp_instance::totemrrp_log_level_warning, totemrrp_instance::totemrrp_log_printf, totemrrp_instance::totemrrp_msgs_missing, totemrrp_instance::totemrrp_subsys_id, totemrrp_instance::totemrrp_target_set_completed, and totemrrp_instance::totemrrp_token_seqid_get.

Referenced by totemsrp_initialize().

int totemrrp_mcast_flush_send ( void *  rrp_context,
const void *  msg,
unsigned int  msg_len 
)

Definition at line 2182 of file totemrrp.c.

References rrp_algo::mcast_flush_send, and totemrrp_instance::rrp_algo.

Referenced by totemsrp_avail().

int totemrrp_mcast_noflush_send ( void *  rrp_context,
const void *  msg,
unsigned int  msg_len 
)
int totemrrp_mcast_recv_empty ( void *  rrp_context)

Definition at line 2282 of file totemrrp.c.

References rrp_algo::mcast_recv_empty, and totemrrp_instance::rrp_algo.

int totemrrp_member_add ( void *  net_context,
const struct totem_ip_address member,
int  iface_no 
)

Definition at line 2293 of file totemrrp.c.

References rrp_algo::member_add, and totemrrp_instance::rrp_algo.

Referenced by totemsrp_member_add().

int totemrrp_member_remove ( void *  net_context,
const struct totem_ip_address member,
int  iface_no 
)

Definition at line 2306 of file totemrrp.c.

References rrp_algo::member_remove, and totemrrp_instance::rrp_algo.

Referenced by totemsrp_member_remove().

void totemrrp_membership_changed ( void *  rrp_context,
enum totem_configuration_type  configuration_type,
const struct srp_addr member_list,
size_t  member_list_entries,
const struct srp_addr left_list,
size_t  left_list_entries,
const struct srp_addr joined_list,
size_t  joined_list_entries,
const struct memb_ring_id ring_id 
)

Definition at line 2319 of file totemrrp.c.

References rrp_algo::membership_changed, and totemrrp_instance::rrp_algo.

Referenced by totemsrp_ring_reenable().

int totemrrp_processor_count_set ( void *  rrp_context,
unsigned int  processor_count 
)
int totemrrp_recv_flush ( void *  rrp_context)

Definition at line 2154 of file totemrrp.c.

References rrp_algo::recv_flush, and totemrrp_instance::rrp_algo.

int totemrrp_ring_reenable ( void *  rrp_context,
unsigned int  iface_no 
)
int totemrrp_send_flush ( void *  rrp_context)

Definition at line 2163 of file totemrrp.c.

References totemrrp_instance::rrp_algo, and rrp_algo::send_flush.

int totemrrp_token_send ( void *  rrp_context,
const void *  msg,
unsigned int  msg_len 
)

Definition at line 2171 of file totemrrp.c.

References totemrrp_instance::rrp_algo, and rrp_algo::token_send.

Referenced by totemsrp_avail().

int totemrrp_token_target_set ( void *  rrp_context,
struct totem_ip_address target,
unsigned int  iface_no 
)

Definition at line 2144 of file totemrrp.c.

References totemrrp_instance::rrp_algo, and rrp_algo::token_target_set.

Referenced by totemsrp_avail().