corosync  2.4.4
Data Structures | Macros | Functions | Variables
totemnet.c File Reference
#include <config.h>
#include <assert.h>
#include <totemudp.h>
#include <totemudpu.h>
#include <totemnet.h>
#include <qb/qbloop.h>
#include <corosync/logsys.h>
Include dependency graph for totemnet.c:

Go to the source code of this file.

Data Structures

struct  transport
 
struct  totemnet_instance
 

Macros

#define LOGSYS_UTILS_ONLY   1
 
#define log_printf(level, format, args...)
 

Functions

int totemnet_crypto_set (void *net_context, const char *cipher_type, const char *hash_type)
 
int totemnet_finalize (void *net_context)
 
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. More...
 
void * totemnet_buffer_alloc (void *net_context)
 
void totemnet_buffer_release (void *net_context, void *ptr)
 
int totemnet_processor_count_set (void *net_context, int processor_count)
 
int totemnet_recv_flush (void *net_context)
 
int totemnet_send_flush (void *net_context)
 
int totemnet_token_send (void *net_context, const void *msg, unsigned int msg_len)
 
int totemnet_mcast_flush_send (void *net_context, const void *msg, unsigned int msg_len)
 
int totemnet_mcast_noflush_send (void *net_context, const void *msg, unsigned int msg_len)
 
int totemnet_iface_check (void *net_context)
 
int totemnet_net_mtu_adjust (void *net_context, struct totem_config *totem_config)
 
const char * totemnet_iface_print (void *net_context)
 
int totemnet_iface_get (void *net_context, struct totem_ip_address *addr)
 
int totemnet_token_target_set (void *net_context, const struct totem_ip_address *token_target)
 
int totemnet_recv_mcast_empty (void *net_context)
 
int totemnet_member_add (void *net_context, const struct totem_ip_address *member)
 
int totemnet_member_remove (void *net_context, const struct totem_ip_address *member)
 
int totemnet_member_set_active (void *net_context, const struct totem_ip_address *member, int active)
 

Variables

struct transport transport_entries []
 

Macro Definition Documentation

#define log_printf (   level,
  format,
  args... 
)
Value:
do { \
instance->totemnet_log_printf ( \
level, \
instance->totemnet_subsys_id, \
__FUNCTION__, __FILE__, __LINE__, \
(const char *)format, ##args); \
} while (0);

Definition at line 226 of file totemnet.c.

#define LOGSYS_UTILS_ONLY   1

Definition at line 48 of file totemnet.c.

Function Documentation

void* totemnet_buffer_alloc ( void *  net_context)

Definition at line 323 of file totemnet.c.

References transport::buffer_alloc, and totemnet_instance::transport.

Referenced by totemrrp_buffer_alloc().

void totemnet_buffer_release ( void *  net_context,
void *  ptr 
)

Definition at line 331 of file totemnet.c.

References transport::buffer_release, and totemnet_instance::transport.

Referenced by totemrrp_buffer_release().

int totemnet_crypto_set ( void *  net_context,
const char *  cipher_type,
const char *  hash_type 
)
int totemnet_finalize ( void *  net_context)
int totemnet_iface_check ( void *  net_context)
int totemnet_iface_get ( void *  net_context,
struct totem_ip_address addr 
)
const char* totemnet_iface_print ( void *  net_context)
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(*)(void *context, const void *msg, unsigned int msg_len)  deliver_fn,
void(*)(void *context, const struct totem_ip_address *iface_address)  iface_change_fn,
void(*)(void *context)  target_set_completed 
)

Create an instance.

Definition at line 278 of file totemnet.c.

References transport::initialize, totemnet_instance::transport, and totemnet_instance::transport_context.

Referenced by totemrrp_initialize().

int totemnet_mcast_flush_send ( void *  net_context,
const void *  msg,
unsigned int  msg_len 
)
int totemnet_mcast_noflush_send ( void *  net_context,
const void *  msg,
unsigned int  msg_len 
)
int totemnet_member_add ( void *  net_context,
const struct totem_ip_address member 
)
int totemnet_member_remove ( void *  net_context,
const struct totem_ip_address member 
)
int totemnet_member_set_active ( void *  net_context,
const struct totem_ip_address member,
int  active 
)
int totemnet_net_mtu_adjust ( void *  net_context,
struct totem_config totem_config 
)
int totemnet_processor_count_set ( void *  net_context,
int  processor_count 
)
int totemnet_recv_flush ( void *  net_context)
int totemnet_recv_mcast_empty ( void *  net_context)
int totemnet_send_flush ( void *  net_context)
int totemnet_token_send ( void *  net_context,
const void *  msg,
unsigned int  msg_len 
)
int totemnet_token_target_set ( void *  net_context,
const struct totem_ip_address token_target 
)

Variable Documentation

struct transport transport_entries[]

Definition at line 140 of file totemnet.c.