corosync  2.4.2-dirty
Data Structures | Macros | Functions
totemiba.c File Reference
#include <config.h>
#include <assert.h>
#include <pthread.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 <limits.h>
#include <string.h>
#include <rdma/rdma_cma.h>
#include <corosync/sq.h>
#include <corosync/list.h>
#include <corosync/hdb.h>
#include <corosync/swab.h>
#include <qb/qbdefs.h>
#include <qb/qbloop.h>
#include <corosync/logsys.h>
#include "totemiba.h"
Include dependency graph for totemiba.c:

Go to the source code of this file.

Data Structures

struct  totemiba_instance
 
union  u
 
struct  recv_buf
 
struct  send_buf
 

Macros

#define LOGSYS_UTILS_ONLY   1
 
#define COMPLETION_QUEUE_ENTRIES   100
 
#define TOTAL_READ_POSTS   100
 
#define MAX_MTU_SIZE   4096
 
#define MCAST_REJOIN_MSEC   100
 
#define log_printf(level, format, args...)
 

Functions

int totemiba_crypto_set (void *iba_context, const char *cipher_type, const char *hash_type)
 
int totemiba_finalize (void *iba_context)
 
int totemiba_initialize (qb_loop_t *qb_poll_handle, void **iba_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 * totemiba_buffer_alloc (void)
 
void totemiba_buffer_release (void *ptr)
 
int totemiba_processor_count_set (void *iba_context, int processor_count)
 
int totemiba_recv_flush (void *iba_context)
 
int totemiba_send_flush (void *iba_context)
 
int totemiba_token_send (void *iba_context, const void *ms, unsigned int msg_len)
 
int totemiba_mcast_flush_send (void *iba_context, const void *ms, unsigned int msg_len)
 
int totemiba_mcast_noflush_send (void *iba_context, const void *ms, unsigned int msg_len)
 
int totemiba_iface_check (void *iba_context)
 
void totemiba_net_mtu_adjust (void *iba_context, struct totem_config *totem_config)
 
const char * totemiba_iface_print (void *iba_context)
 
int totemiba_iface_get (void *iba_context, struct totem_ip_address *addr)
 
int totemiba_token_target_set (void *iba_context, const struct totem_ip_address *token_target)
 
int totemiba_recv_mcast_empty (void *iba_context)
 

Macro Definition Documentation

◆ COMPLETION_QUEUE_ENTRIES

#define COMPLETION_QUEUE_ENTRIES   100

Definition at line 80 of file totemiba.c.

◆ log_printf

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

Definition at line 224 of file totemiba.c.

◆ LOGSYS_UTILS_ONLY

#define LOGSYS_UTILS_ONLY   1

Definition at line 76 of file totemiba.c.

◆ MAX_MTU_SIZE

#define MAX_MTU_SIZE   4096

Definition at line 84 of file totemiba.c.

Referenced by totemiba_buffer_alloc().

◆ MCAST_REJOIN_MSEC

#define MCAST_REJOIN_MSEC   100

Definition at line 86 of file totemiba.c.

◆ TOTAL_READ_POSTS

#define TOTAL_READ_POSTS   100

Definition at line 82 of file totemiba.c.

Function Documentation

◆ totemiba_buffer_alloc()

void* totemiba_buffer_alloc ( void  )

Definition at line 1411 of file totemiba.c.

References MAX_MTU_SIZE.

◆ totemiba_buffer_release()

void totemiba_buffer_release ( void *  ptr)

Definition at line 1416 of file totemiba.c.

◆ totemiba_crypto_set()

int totemiba_crypto_set ( void *  iba_context,
const char *  cipher_type,
const char *  hash_type 
)

Definition at line 1323 of file totemiba.c.

◆ totemiba_finalize()

int totemiba_finalize ( void *  iba_context)

Definition at line 1336 of file totemiba.c.

◆ totemiba_iface_check()

int totemiba_iface_check ( void *  iba_context)

Definition at line 1575 of file totemiba.c.

◆ totemiba_iface_get()

int totemiba_iface_get ( void *  iba_context,
struct totem_ip_address addr 
)

Definition at line 1601 of file totemiba.c.

References totemiba_instance::my_id.

◆ totemiba_iface_print()

const char* totemiba_iface_print ( void *  iba_context)

Definition at line 1591 of file totemiba.c.

References totemiba_instance::my_id, and totemip_print().

◆ totemiba_initialize()

int totemiba_initialize ( qb_loop_t *  qb_poll_handle,
void **  iba_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 1350 of file totemiba.c.

◆ totemiba_mcast_flush_send()

int totemiba_mcast_flush_send ( void *  iba_context,
const void *  ms,
unsigned int  msg_len 
)

Definition at line 1493 of file totemiba.c.

◆ totemiba_mcast_noflush_send()

int totemiba_mcast_noflush_send ( void *  iba_context,
const void *  ms,
unsigned int  msg_len 
)

Definition at line 1534 of file totemiba.c.

◆ totemiba_net_mtu_adjust()

void totemiba_net_mtu_adjust ( void *  iba_context,
struct totem_config totem_config 
)

Definition at line 1585 of file totemiba.c.

◆ totemiba_processor_count_set()

int totemiba_processor_count_set ( void *  iba_context,
int  processor_count 
)

Definition at line 1421 of file totemiba.c.

◆ totemiba_recv_flush()

int totemiba_recv_flush ( void *  iba_context)

Definition at line 1433 of file totemiba.c.

◆ totemiba_recv_mcast_empty()

int totemiba_recv_mcast_empty ( void *  iba_context)

Definition at line 1632 of file totemiba.c.

◆ totemiba_send_flush()

int totemiba_send_flush ( void *  iba_context)

Definition at line 1443 of file totemiba.c.

◆ totemiba_token_send()

int totemiba_token_send ( void *  iba_context,
const void *  ms,
unsigned int  msg_len 
)

Definition at line 1453 of file totemiba.c.

◆ totemiba_token_target_set()

int totemiba_token_target_set ( void *  iba_context,
const struct totem_ip_address token_target 
)