corosync  2.4.6
Data Structures | Macros | Typedefs | Enumerations | Functions
totempg.h File Reference

Totem Single Ring Protocol. More...

#include <sys/types.h>
#include <netinet/in.h>
#include "totem.h"
#include <qb/qbloop.h>
Include dependency graph for totempg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  totempg_group
 

Macros

#define TOTEMPG_AGREED   0
 
#define TOTEMPG_SAFE   1
 

Typedefs

typedef void(* totem_queue_level_changed_fn) (enum totem_q_level level)
 

Enumerations

enum  totem_q_level { TOTEM_Q_LEVEL_LOW, TOTEM_Q_LEVEL_GOOD, TOTEM_Q_LEVEL_HIGH, TOTEM_Q_LEVEL_CRITICAL }
 

Functions

int totempg_initialize (qb_loop_t *poll_handle, struct totem_config *totem_config)
 Initialize the totem process groups abstraction. More...
 
void totempg_finalize (void)
 
int totempg_callback_token_create (void **handle_out, enum totem_callback_token_type type, int delete, int(*callback_fn)(enum totem_callback_token_type type, const void *), const void *data)
 
void totempg_callback_token_destroy (void *handle)
 
int totempg_groups_initialize (void **instance, void(*deliver_fn)(unsigned int nodeid, const void *msg, unsigned int msg_len, int endian_conversion_required), void(*confchg_fn)(enum totem_configuration_type configuration_type, const unsigned int *member_list, size_t member_list_entries, const unsigned int *left_list, size_t left_list_entries, const unsigned int *joined_list, size_t joined_list_entries, const struct memb_ring_id *ring_id))
 Initialize a groups instance. More...
 
int totempg_groups_finalize (void *instance)
 
int totempg_groups_join (void *instance, const struct totempg_group *groups, size_t group_cnt)
 
int totempg_groups_leave (void *instance, const struct totempg_group *groups, size_t group_cnt)
 
int totempg_groups_mcast_joined (void *instance, const struct iovec *iovec, unsigned int iov_len, int guarantee)
 
int totempg_groups_joined_reserve (void *instance, const struct iovec *iovec, unsigned int iov_len)
 
int totempg_groups_joined_release (int msg_count)
 
int totempg_groups_mcast_groups (void *instance, int guarantee, const struct totempg_group *groups, size_t groups_cnt, const struct iovec *iovec, unsigned int iov_len)
 
int totempg_groups_send_ok_groups (void *instance, const struct totempg_group *groups, size_t groups_cnt, const struct iovec *iovec, unsigned int iov_len)
 
int totempg_ifaces_get (unsigned int nodeid, struct totem_ip_address *interfaces, unsigned int interfaces_size, char ***status, unsigned int *iface_count)
 
void * totempg_get_stats (void)
 
void totempg_event_signal (enum totem_event_type type, int value)
 
const char * totempg_ifaces_print (unsigned int nodeid)
 
unsigned int totempg_my_nodeid_get (void)
 
int totempg_my_family_get (void)
 
int totempg_crypto_set (const char *cipher_type, const char *hash_type)
 
int totempg_ring_reenable (void)
 
void totempg_service_ready_register (void(*totem_service_ready)(void))
 
int totempg_member_add (const struct totem_ip_address *member, int ring_no)
 
int totempg_member_remove (const struct totem_ip_address *member, int ring_no)
 
void totempg_check_q_level (void *instance)
 
void totempg_queue_level_register_callback (totem_queue_level_changed_fn)
 
void totempg_threaded_mode_enable (void)
 
void totempg_trans_ack (void)
 

Detailed Description

Totem Single Ring Protocol.

depends on poll abstraction, POSIX, IPV4

Definition in file totempg.h.

Macro Definition Documentation

#define TOTEMPG_AGREED   0

Definition at line 60 of file totempg.h.

#define TOTEMPG_SAFE   1

Definition at line 61 of file totempg.h.

Typedef Documentation

typedef void(* totem_queue_level_changed_fn) (enum totem_q_level level)

Definition at line 182 of file totempg.h.

Enumeration Type Documentation

Enumerator
TOTEM_Q_LEVEL_LOW 
TOTEM_Q_LEVEL_GOOD 
TOTEM_Q_LEVEL_HIGH 
TOTEM_Q_LEVEL_CRITICAL 

Definition at line 173 of file totempg.h.

Function Documentation

int totempg_callback_token_create ( void **  handle_out,
enum totem_callback_token_type  type,
int  delete,
int(*)(enum totem_callback_token_type type, const void *)  callback_fn,
const void *  data 
)

Definition at line 1108 of file totempg.c.

References totemmrp_callback_token_create().

void totempg_callback_token_destroy ( void *  handle)

Definition at line 1127 of file totempg.c.

References totemmrp_callback_token_destroy().

void totempg_check_q_level ( void *  instance)

Definition at line 1303 of file totempg.c.

Referenced by corosync_recheck_the_q_level().

int totempg_crypto_set ( const char *  cipher_type,
const char *  hash_type 
)

Definition at line 1472 of file totempg.c.

References totemmrp_crypto_set().

void totempg_event_signal ( enum totem_event_type  type,
int  value 
)

Definition at line 1462 of file totempg.c.

References totemmrp_event_signal().

void totempg_finalize ( void  )

Definition at line 866 of file totempg.c.

References totemmrp_finalize().

Referenced by main().

void* totempg_get_stats ( void  )

Definition at line 1467 of file totempg.c.

int totempg_groups_finalize ( void *  instance)
int totempg_groups_initialize ( void **  instance,
void(*)(unsigned int nodeid, const void *msg, unsigned int msg_len, int endian_conversion_required)  deliver_fn,
void(*)(enum totem_configuration_type configuration_type, const unsigned int *member_list, size_t member_list_entries, const unsigned int *left_list, size_t left_list_entries, const unsigned int *joined_list, size_t joined_list_entries, const struct memb_ring_id *ring_id confchg_fn 
)
int totempg_groups_join ( void *  instance,
const struct totempg_group groups,
size_t  group_cnt 
)

Definition at line 1191 of file totempg.c.

References totempg_group_instance::groups, and totempg_group_instance::groups_cnt.

Referenced by main(), and sync_init().

int totempg_groups_joined_release ( int  msg_count)

Definition at line 1355 of file totempg.c.

Referenced by corosync_sending_allowed_release().

int totempg_groups_joined_reserve ( void *  instance,
const struct iovec *  iovec,
unsigned int  iov_len 
)
int totempg_groups_leave ( void *  instance,
const struct totempg_group groups,
size_t  group_cnt 
)

Definition at line 1223 of file totempg.c.

int totempg_groups_mcast_groups ( void *  instance,
int  guarantee,
const struct totempg_group groups,
size_t  groups_cnt,
const struct iovec *  iovec,
unsigned int  iov_len 
)

Definition at line 1369 of file totempg.c.

References totempg_group::group_len, and MAX_GROUPS_PER_MSG.

int totempg_groups_mcast_joined ( void *  instance,
const struct iovec *  iovec,
unsigned int  iov_len,
int  guarantee 
)
int totempg_groups_send_ok_groups ( void *  instance,
const struct totempg_group groups,
size_t  groups_cnt,
const struct iovec *  iovec,
unsigned int  iov_len 
)

Definition at line 1413 of file totempg.c.

References totempg_group::group_len.

int totempg_ifaces_get ( unsigned int  nodeid,
struct totem_ip_address interfaces,
unsigned int  interfaces_size,
char ***  status,
unsigned int *  iface_count 
)

Definition at line 1443 of file totempg.c.

References totemmrp_ifaces_get().

Referenced by totempg_ifaces_print().

const char* totempg_ifaces_print ( unsigned int  nodeid)

Definition at line 1493 of file totempg.c.

References INTERFACE_MAX, ONE_IFACE_LEN, totemip_print(), and totempg_ifaces_get().

int totempg_initialize ( qb_loop_t *  poll_handle,
struct totem_config totem_config 
)
int totempg_member_add ( const struct totem_ip_address member,
int  ring_no 
)

Definition at line 1541 of file totempg.c.

References totemmrp_member_add().

int totempg_member_remove ( const struct totem_ip_address member,
int  ring_no 
)

Definition at line 1548 of file totempg.c.

References totemmrp_member_remove().

int totempg_my_family_get ( void  )

Definition at line 1526 of file totempg.c.

References totemmrp_my_family_get().

unsigned int totempg_my_nodeid_get ( void  )

Definition at line 1521 of file totempg.c.

References totemmrp_my_nodeid_get().

Referenced by message_source_is_local(), and message_source_set().

void totempg_queue_level_register_callback ( totem_queue_level_changed_fn  )

Definition at line 1536 of file totempg.c.

Referenced by cs_ipcs_init().

int totempg_ring_reenable ( void  )

Definition at line 1483 of file totempg.c.

References totemmrp_ring_reenable().

void totempg_service_ready_register ( void(*)(void)  totem_service_ready)

Definition at line 1530 of file totempg.c.

References totemmrp_service_ready_register().

Referenced by main().

void totempg_threaded_mode_enable ( void  )

Definition at line 1555 of file totempg.c.

References totemmrp_threaded_mode_enable().

void totempg_trans_ack ( void  )

Definition at line 1561 of file totempg.c.

References totemmrp_trans_ack().