Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
tcp.h File Reference
#include <linux/socket.h>
#include <sys/socket.h>
#include <linux/inet.h>
#include <linux/in.h>

Go to the source code of this file.

Data Structures

struct  r2net_msg
 

Macros

#define R2NET_MAX_PAYLOAD_BYTES   (4096 - sizeof(struct r2net_msg))
 
#define R2NET_RECONNECT_DELAY_MS_DEFAULT   2000
 
#define R2NET_KEEPALIVE_DELAY_MS_DEFAULT   2000
 
#define R2NET_IDLE_TIMEOUT_MS_DEFAULT   30000
 

Typedefs

typedef intr2net_msg_handler_func )(struct r2net_msg *msg, u32 len, void *data, void **ret_data)
 
typedef voidr2net_post_msg_handler_func )(int status, void *data, void *ret_data)
 

Enumerations

enum  { R2NET_DRIVER_UNINITED, R2NET_DRIVER_READY }
 

Functions

int r2net_send_message (u32 msg_type, u32 key, void *data, u32 len, u8 target_node, int *status)
 
int r2net_send_message_vec (u32 msg_type, u32 key, struct kvec *vec, size_t veclen, u8 target_node, int *status)
 
int r2net_register_handler (u32 msg_type, u32 key, u32 max_len, r2net_msg_handler_func *func, void *data, r2net_post_msg_handler_func *post_func, struct list_head *unreg_list)
 
void r2net_unregister_handler_list (struct list_head *list)
 
void r2net_fill_node_map (unsigned long *map, unsigned bytes)
 
void r2net_force_data_magic (struct r2net_msg *, u16, u32)
 
void r2net_hb_node_up_manual (int)
 
struct r2net_noder2net_nn_from_num (u8)
 
int r2net_register_hb_callbacks (void)
 
void r2net_unregister_hb_callbacks (void)
 
int r2net_start_listening (struct r2nm_node *node)
 
void r2net_stop_listening (struct r2nm_node *node)
 
void r2net_disconnect_node (struct r2nm_node *node)
 
int r2net_num_connected_peers (void)
 
int r2net_init (void)
 
void r2net_exit (void)
 

Macro Definition Documentation

#define R2NET_IDLE_TIMEOUT_MS_DEFAULT   30000

Definition at line 63 of file tcp.h.

#define R2NET_KEEPALIVE_DELAY_MS_DEFAULT   2000

Definition at line 62 of file tcp.h.

#define R2NET_MAX_PAYLOAD_BYTES   (4096 - sizeof(struct r2net_msg))

Definition at line 57 of file tcp.h.

#define R2NET_RECONNECT_DELAY_MS_DEFAULT   2000

Definition at line 60 of file tcp.h.

Typedef Documentation

typedef int( r2net_msg_handler_func)(struct r2net_msg *msg, u32 len, void *data, void **ret_data)

Definition at line 52 of file tcp.h.

typedef void( r2net_post_msg_handler_func)(int status, void *data, void *ret_data)

Definition at line 54 of file tcp.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
R2NET_DRIVER_UNINITED 
R2NET_DRIVER_READY 

Definition at line 94 of file tcp.h.

Function Documentation

void r2net_disconnect_node ( struct r2nm_node node)

Definition at line 1851 of file tcp.c.

void r2net_exit ( void  )

Definition at line 2247 of file tcp.c.

void r2net_fill_node_map ( unsigned long map,
unsigned  bytes 
)

Definition at line 1047 of file tcp.c.

void r2net_force_data_magic ( struct r2net_msg ,
u16  ,
u32   
)

Definition at line 1259 of file tcp.c.

void r2net_hb_node_up_manual ( int  )

Definition at line 2192 of file tcp.c.

int r2net_init ( void  )

Definition at line 2205 of file tcp.c.

struct r2net_node* r2net_nn_from_num ( u8  )
read

Definition at line 287 of file tcp.c.

int r2net_num_connected_peers ( void  )

Definition at line 497 of file tcp.c.

int r2net_register_handler ( u32  msg_type,
u32  key,
u32  max_len,
r2net_msg_handler_func func,
void data,
r2net_post_msg_handler_func post_func,
struct list_head unreg_list 
)

Definition at line 816 of file tcp.c.

int r2net_register_hb_callbacks ( void  )

Definition at line 1911 of file tcp.c.

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

Definition at line 1187 of file tcp.c.

int r2net_send_message_vec ( u32  msg_type,
u32  key,
struct kvec vec,
size_t  veclen,
u8  target_node,
int status 
)

Definition at line 1065 of file tcp.c.

int r2net_start_listening ( struct r2nm_node node)

Definition at line 2135 of file tcp.c.

void r2net_stop_listening ( struct r2nm_node node)

Definition at line 2161 of file tcp.c.

void r2net_unregister_handler_list ( struct list_head list)

Definition at line 890 of file tcp.c.

void r2net_unregister_hb_callbacks ( void  )

Definition at line 1905 of file tcp.c.