corosync
2.4.3
|
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>
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) |
Totem Network interface - also does encryption/decryption.
depends on poll abstraction, POSIX, IPV4
Definition in file totemrrp.h.
#define TOTEMRRP_FLUSH 1 |
Definition at line 52 of file totemrrp.h.
#define TOTEMRRP_NOFLUSH 0 |
Definition at line 51 of file totemrrp.h.
void* totemrrp_buffer_alloc | ( | void * | rrp_context | ) |
Definition at line 2179 of file totemrrp.c.
References totemrrp_instance::net_handles, and totemnet_buffer_alloc().
void totemrrp_buffer_release | ( | void * | rrp_context, |
void * | ptr | ||
) |
Definition at line 2186 of file totemrrp.c.
References totemrrp_instance::net_handles, and totemnet_buffer_release().
int totemrrp_crypto_set | ( | void * | rrp_context, |
const char * | cipher_type, | ||
const char * | hash_type | ||
) |
Definition at line 2301 of file totemrrp.c.
References totemrrp_instance::net_handles, and totemnet_crypto_set().
Referenced by totemsrp_crypto_set().
int totemrrp_finalize | ( | void * | rrp_context | ) |
Definition at line 2031 of file totemrrp.c.
References totemrrp_instance::interface_count, totemrrp_instance::net_handles, and totemnet_finalize().
int totemrrp_iface_check | ( | void * | rrp_context | ) |
Definition at line 2277 of file totemrrp.c.
References rrp_algo::iface_check, and totemrrp_instance::rrp_algo.
int totemrrp_ifaces_get | ( | void * | rrp_context, |
char *** | status, | ||
unsigned int * | iface_count | ||
) |
Definition at line 2286 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 2060 of file totemrrp.c.
int totemrrp_mcast_flush_send | ( | void * | rrp_context, |
const void * | msg, | ||
unsigned int | msg_len | ||
) |
Definition at line 2243 of file totemrrp.c.
References rrp_algo::mcast_flush_send, and totemrrp_instance::rrp_algo.
int totemrrp_mcast_noflush_send | ( | void * | rrp_context, |
const void * | msg, | ||
unsigned int | msg_len | ||
) |
Definition at line 2257 of file totemrrp.c.
References rrp_algo::mcast_noflush_send, totemrrp_instance::processor_count, and totemrrp_instance::rrp_algo.
int totemrrp_mcast_recv_empty | ( | void * | rrp_context | ) |
Definition at line 2343 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 2354 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 2367 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 2380 of file totemrrp.c.
References rrp_algo::membership_changed, and totemrrp_instance::rrp_algo.
int totemrrp_processor_count_set | ( | void * | rrp_context, |
unsigned int | processor_count | ||
) |
Definition at line 2193 of file totemrrp.c.
References totemrrp_instance::processor_count, rrp_algo::processor_count_set, and totemrrp_instance::rrp_algo.
int totemrrp_recv_flush | ( | void * | rrp_context | ) |
Definition at line 2215 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 | ||
) |
Definition at line 2320 of file totemrrp.c.
References totemrrp_instance::interface_count, rrp_algo::ring_reenable, totemrrp_instance::rrp_algo, totemrrp_instance::status, and STATUS_STR_LEN.
Referenced by totemsrp_ring_reenable().
int totemrrp_send_flush | ( | void * | rrp_context | ) |
Definition at line 2224 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 2232 of file totemrrp.c.
References totemrrp_instance::rrp_algo, and rrp_algo::token_send.
int totemrrp_token_target_set | ( | void * | rrp_context, |
struct totem_ip_address * | target, | ||
unsigned int | iface_no | ||
) |
Definition at line 2205 of file totemrrp.c.
References totemrrp_instance::rrp_algo, and rrp_algo::token_target_set.