corosync  2.4.2-dirty
Functions | Variables
totemmrp.c File Reference
#include <config.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <netdb.h>
#include <sys/un.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sched.h>
#include <time.h>
#include <sys/time.h>
#include <sys/poll.h>
#include <corosync/totem/totem.h>
#include <qb/qbloop.h>
#include "totemmrp.h"
#include "totemsrp.h"
Include dependency graph for totemmrp.c:

Go to the source code of this file.

Functions

void totemmrp_deliver_fn (unsigned int nodeid, const void *msg, unsigned int msg_len, int endian_conversion_required)
 
void totemmrp_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)
 
int totemmrp_initialize (qb_loop_t *poll_handle, struct totem_config *totem_config, totempg_stats_t *stats, 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), void(*waiting_trans_ack_cb_fn)(int waiting_trans_ack))
 Initialize the group messaging interface. More...
 
void totemmrp_finalize (void)
 
int totemmrp_mcast (struct iovec *iovec, unsigned int iov_len, int priority)
 Multicast a message. More...
 
int totemmrp_avail (void)
 Return number of available messages that can be queued. More...
 
int totemmrp_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 totemmrp_callback_token_destroy (void *handle_out)
 
void totemmrp_event_signal (enum totem_event_type type, int value)
 
int totemmrp_ifaces_get (unsigned int nodeid, struct totem_ip_address *interfaces, unsigned int interfaces_size, char ***status, unsigned int *iface_count)
 
int totemmrp_crypto_set (const char *cipher_type, const char *hash_type)
 
unsigned int totemmrp_my_nodeid_get (void)
 
int totemmrp_my_family_get (void)
 
int totemmrp_ring_reenable (void)
 
void totemmrp_service_ready_register (void(*totem_service_ready)(void))
 
int totemmrp_member_add (const struct totem_ip_address *member, int ring_no)
 
int totemmrp_member_remove (const struct totem_ip_address *member, int ring_no)
 
void totemmrp_threaded_mode_enable (void)
 
void totemmrp_trans_ack (void)
 

Variables

void * totemsrp_context
 
void(* pg_deliver_fn )(unsigned int nodeid, const void *msg, unsigned int msg_len, int endian_conversion_required)=0
 
void(* pg_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)=0
 

Function Documentation

int totemmrp_avail ( void  )

Return number of available messages that can be queued.

Definition at line 173 of file totemmrp.c.

References totemsrp_avail(), and totemsrp_context.

Referenced by totempg_initialize().

int totemmrp_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 
)
void totemmrp_callback_token_destroy ( void *  handle_out)

Definition at line 188 of file totemmrp.c.

References totemsrp_callback_token_destroy(), and totemsrp_context.

Referenced by totempg_callback_token_destroy().

void totemmrp_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 
)

Definition at line 101 of file totemmrp.c.

References pg_confchg_fn.

Referenced by totemmrp_initialize().

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

Definition at line 219 of file totemmrp.c.

References totemsrp_context, and totemsrp_crypto_set().

Referenced by totempg_crypto_set().

void totemmrp_deliver_fn ( unsigned int  nodeid,
const void *  msg,
unsigned int  msg_len,
int  endian_conversion_required 
)

Definition at line 92 of file totemmrp.c.

References pg_deliver_fn.

Referenced by totemmrp_initialize().

void totemmrp_event_signal ( enum totem_event_type  type,
int  value 
)

Definition at line 194 of file totemmrp.c.

References totemsrp_context, and totemsrp_event_signal().

Referenced by totempg_event_signal().

void totemmrp_finalize ( void  )

Definition at line 154 of file totemmrp.c.

References totemsrp_context, and totemsrp_finalize().

Referenced by totempg_finalize().

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

Definition at line 199 of file totemmrp.c.

References totemsrp_context, and totemsrp_ifaces_get().

Referenced by totempg_ifaces_get().

int totemmrp_initialize ( qb_loop_t *  poll_handle,
struct totem_config totem_config,
totempg_stats_t stats,
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,
void(*)(int waiting_trans_ack)  waiting_trans_ack_cb_fn 
)

Initialize the group messaging interface.

Definition at line 118 of file totemmrp.c.

References totempg_stats_t::mrp, pg_confchg_fn, pg_deliver_fn, totemmrp_confchg_fn(), totemmrp_deliver_fn(), totemsrp_context, and totemsrp_initialize().

Referenced by totempg_initialize().

int totemmrp_mcast ( struct iovec *  iovec,
unsigned int  iov_len,
int  priority 
)

Multicast a message.

Definition at line 162 of file totemmrp.c.

References totemsrp_context, and totemsrp_mcast().

int totemmrp_member_add ( const struct totem_ip_address member,
int  ring_no 
)

Definition at line 256 of file totemmrp.c.

References totemsrp_context, and totemsrp_member_add().

Referenced by totempg_member_add().

int totemmrp_member_remove ( const struct totem_ip_address member,
int  ring_no 
)

Definition at line 267 of file totemmrp.c.

References totemsrp_context, and totemsrp_member_remove().

Referenced by totempg_member_remove().

int totemmrp_my_family_get ( void  )

Definition at line 233 of file totemmrp.c.

References totemsrp_context, and totemsrp_my_family_get().

Referenced by totempg_my_family_get().

unsigned int totemmrp_my_nodeid_get ( void  )

Definition at line 228 of file totemmrp.c.

References totemsrp_context, and totemsrp_my_nodeid_get().

Referenced by totempg_my_nodeid_get().

int totemmrp_ring_reenable ( void  )

Definition at line 238 of file totemmrp.c.

References totemsrp_context, and totemsrp_ring_reenable().

Referenced by totempg_ring_reenable().

void totemmrp_service_ready_register ( void(*)(void)  totem_service_ready)

Definition at line 248 of file totemmrp.c.

References totemsrp_context, and totemsrp_service_ready_register().

Referenced by totempg_service_ready_register().

void totemmrp_threaded_mode_enable ( void  )

Definition at line 278 of file totemmrp.c.

References totemsrp_context, and totemsrp_threaded_mode_enable().

Referenced by totempg_threaded_mode_enable().

void totemmrp_trans_ack ( void  )

Definition at line 283 of file totemmrp.c.

References totemsrp_context, and totemsrp_trans_ack().

Referenced by totempg_trans_ack().

Variable Documentation

void(* pg_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)=0

Definition at line 85 of file totemmrp.c.

Referenced by totemmrp_confchg_fn(), and totemmrp_initialize().

void(* pg_deliver_fn)(unsigned int nodeid, const void *msg, unsigned int msg_len, int endian_conversion_required)=0

Definition at line 79 of file totemmrp.c.

Referenced by totemmrp_deliver_fn(), and totemmrp_initialize().

void* totemsrp_context