Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
tcp.c File Reference
#include <linux/kernel.h>
#include <linux/jiffies.h>
#include <linux/slab.h>
#include <linux/idr.h>
#include <linux/kref.h>
#include <linux/net.h>
#include <linux/export.h>
#include <net/tcp.h>
#include <asm/uaccess.h>
#include "heartbeat.h"
#include "tcp.h"
#include "nodemanager.h"
#include "masklog.h"
#include "quorum.h"
#include "tcp_internal.h"

Go to the source code of this file.

Macros

#define MLOG_MASK_PREFIX   ML_TCP
 
#define SC_NODEF_FMT   "node %s (num %u) at %pI4:%u"
 
#define SC_NODEF_ARGS(sc)
 
#define msglog(hdr, fmt, args...)
 
#define sclog(sc, fmt, args...)
 
#define O2NET_HB_PRI   0x1
 
#define o2net_init_nst(a, b, c, d, e)
 
#define o2net_set_nst_sock_time(a)
 
#define o2net_set_nst_send_time(a)
 
#define o2net_set_nst_status_time(a)
 
#define o2net_set_nst_sock_container(a, b)
 
#define o2net_set_nst_msg_id(a, b)
 
#define o2net_set_sock_timer(a)
 
#define o2net_set_data_ready_time(a)
 
#define o2net_set_advance_start_time(a)
 
#define o2net_set_advance_stop_time(a)
 
#define o2net_set_func_start_time(a)
 
#define o2net_set_func_stop_time(a)
 
#define o2net_update_send_stats(a, b)
 
#define o2net_update_recv_stats(sc)
 

Functions

int o2net_num_connected_peers (void)
 
int o2net_register_handler (u32 msg_type, u32 key, u32 max_len, o2net_msg_handler_func *func, void *data, o2net_post_msg_handler_func *post_func, struct list_head *unreg_list)
 
 EXPORT_SYMBOL_GPL (o2net_register_handler)
 
void o2net_unregister_handler_list (struct list_head *list)
 
 EXPORT_SYMBOL_GPL (o2net_unregister_handler_list)
 
void o2net_fill_node_map (unsigned long *map, unsigned bytes)
 
 EXPORT_SYMBOL_GPL (o2net_fill_node_map)
 
int o2net_send_message_vec (u32 msg_type, u32 key, struct kvec *caller_vec, size_t caller_veclen, u8 target_node, int *status)
 
 EXPORT_SYMBOL_GPL (o2net_send_message_vec)
 
int o2net_send_message (u32 msg_type, u32 key, void *data, u32 len, u8 target_node, int *status)
 
 EXPORT_SYMBOL_GPL (o2net_send_message)
 
void o2net_disconnect_node (struct o2nm_node *node)
 
void o2net_unregister_hb_callbacks (void)
 
int o2net_register_hb_callbacks (void)
 
int o2net_start_listening (struct o2nm_node *node)
 
void o2net_stop_listening (struct o2nm_node *node)
 
int o2net_init (void)
 
void o2net_exit (void)
 

Macro Definition Documentation

#define MLOG_MASK_PREFIX   ML_TCP

Definition at line 70 of file tcp.c.

#define msglog (   hdr,
  fmt,
  args... 
)
Value:
do { \
typeof(hdr) __hdr = (hdr); \
mlog(ML_MSG, "[mag %u len %u typ %u stat %d sys_stat %d " \
"key %08x num %u] " fmt, \
be16_to_cpu(__hdr->magic), be16_to_cpu(__hdr->data_len), \
be16_to_cpu(__hdr->msg_type), be32_to_cpu(__hdr->status), \
be32_to_cpu(__hdr->sys_status), be32_to_cpu(__hdr->key), \
be32_to_cpu(__hdr->msg_num) , ##args); \
} while (0)

Definition at line 86 of file tcp.c.

#define O2NET_HB_PRI   0x1

Definition at line 125 of file tcp.c.

#define o2net_init_nst (   a,
  b,
  c,
  d,
  e 
)

Definition at line 215 of file tcp.c.

#define o2net_set_advance_start_time (   a)

Definition at line 223 of file tcp.c.

#define o2net_set_advance_stop_time (   a)

Definition at line 224 of file tcp.c.

#define o2net_set_data_ready_time (   a)

Definition at line 222 of file tcp.c.

#define o2net_set_func_start_time (   a)

Definition at line 225 of file tcp.c.

#define o2net_set_func_stop_time (   a)

Definition at line 226 of file tcp.c.

#define o2net_set_nst_msg_id (   a,
  b 
)

Definition at line 220 of file tcp.c.

#define o2net_set_nst_send_time (   a)

Definition at line 217 of file tcp.c.

#define o2net_set_nst_sock_container (   a,
  b 
)

Definition at line 219 of file tcp.c.

#define o2net_set_nst_sock_time (   a)

Definition at line 216 of file tcp.c.

#define o2net_set_nst_status_time (   a)

Definition at line 218 of file tcp.c.

#define o2net_set_sock_timer (   a)

Definition at line 221 of file tcp.c.

#define o2net_update_recv_stats (   sc)

Definition at line 261 of file tcp.c.

#define o2net_update_send_stats (   a,
  b 
)

Definition at line 259 of file tcp.c.

#define SC_NODEF_ARGS (   sc)
Value:
sc->sc_node->nd_name, sc->sc_node->nd_num, \
&sc->sc_node->nd_ipv4_address, \
ntohs(sc->sc_node->nd_ipv4_port)

Definition at line 77 of file tcp.c.

#define SC_NODEF_FMT   "node %s (num %u) at %pI4:%u"

Definition at line 76 of file tcp.c.

#define sclog (   sc,
  fmt,
  args... 
)
Value:
do { \
typeof(sc) __sc = (sc); \
mlog(ML_SOCKET, "[sc %p refs %d sock %p node %u page %p " \
"pg_off %zu] " fmt, __sc, \
atomic_read(&__sc->sc_kref.refcount), __sc->sc_sock, \
__sc->sc_node->nd_num, __sc->sc_page, __sc->sc_page_off , \
##args); \
} while (0)

Definition at line 96 of file tcp.c.

Function Documentation

EXPORT_SYMBOL_GPL ( o2net_register_handler  )
EXPORT_SYMBOL_GPL ( o2net_unregister_handler_list  )
EXPORT_SYMBOL_GPL ( o2net_fill_node_map  )
EXPORT_SYMBOL_GPL ( o2net_send_message_vec  )
EXPORT_SYMBOL_GPL ( o2net_send_message  )
void o2net_disconnect_node ( struct o2nm_node node)

Definition at line 1749 of file tcp.c.

void o2net_exit ( void  )

Definition at line 2143 of file tcp.c.

void o2net_fill_node_map ( unsigned long map,
unsigned  bytes 
)

Definition at line 1039 of file tcp.c.

int o2net_init ( void  )

Definition at line 2099 of file tcp.c.

int o2net_num_connected_peers ( void  )

Definition at line 501 of file tcp.c.

int o2net_register_handler ( u32  msg_type,
u32  key,
u32  max_len,
o2net_msg_handler_func func,
void data,
o2net_post_msg_handler_func post_func,
struct list_head unreg_list 
)

Definition at line 814 of file tcp.c.

int o2net_register_hb_callbacks ( void  )

Definition at line 1813 of file tcp.c.

int o2net_send_message ( u32  msg_type,
u32  key,
void data,
u32  len,
u8  target_node,
int status 
)

Definition at line 1177 of file tcp.c.

int o2net_send_message_vec ( u32  msg_type,
u32  key,
struct kvec caller_vec,
size_t  caller_veclen,
u8  target_node,
int status 
)

Definition at line 1057 of file tcp.c.

int o2net_start_listening ( struct o2nm_node node)

Definition at line 2037 of file tcp.c.

void o2net_stop_listening ( struct o2nm_node node)

Definition at line 2064 of file tcp.c.

void o2net_unregister_handler_list ( struct list_head list)

Definition at line 888 of file tcp.c.

void o2net_unregister_hb_callbacks ( void  )

Definition at line 1807 of file tcp.c.