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  o2net_msg
 

Macros

#define O2NET_MAX_PAYLOAD_BYTES   (4096 - sizeof(struct o2net_msg))
 
#define O2NET_RECONNECT_DELAY_MS_DEFAULT   2000
 
#define O2NET_KEEPALIVE_DELAY_MS_DEFAULT   2000
 
#define O2NET_IDLE_TIMEOUT_MS_DEFAULT   30000
 

Typedefs

typedef into2net_msg_handler_func )(struct o2net_msg *msg, u32 len, void *data, void **ret_data)
 
typedef voido2net_post_msg_handler_func )(int status, void *data, void *ret_data)
 

Enumerations

enum  { O2NET_DRIVER_UNINITED, O2NET_DRIVER_READY }
 

Functions

int o2net_send_message (u32 msg_type, u32 key, void *data, u32 len, u8 target_node, int *status)
 
int o2net_send_message_vec (u32 msg_type, u32 key, struct kvec *vec, size_t veclen, u8 target_node, int *status)
 
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)
 
void o2net_unregister_handler_list (struct list_head *list)
 
void o2net_fill_node_map (unsigned long *map, unsigned bytes)
 
int o2net_register_hb_callbacks (void)
 
void o2net_unregister_hb_callbacks (void)
 
int o2net_start_listening (struct o2nm_node *node)
 
void o2net_stop_listening (struct o2nm_node *node)
 
void o2net_disconnect_node (struct o2nm_node *node)
 
int o2net_num_connected_peers (void)
 
int o2net_init (void)
 
void o2net_exit (void)
 

Macro Definition Documentation

#define O2NET_IDLE_TIMEOUT_MS_DEFAULT   30000

Definition at line 64 of file tcp.h.

#define O2NET_KEEPALIVE_DELAY_MS_DEFAULT   2000

Definition at line 63 of file tcp.h.

#define O2NET_MAX_PAYLOAD_BYTES   (4096 - sizeof(struct o2net_msg))

Definition at line 58 of file tcp.h.

#define O2NET_RECONNECT_DELAY_MS_DEFAULT   2000

Definition at line 61 of file tcp.h.

Typedef Documentation

typedef int( o2net_msg_handler_func)(struct o2net_msg *msg, u32 len, void *data, void **ret_data)

Definition at line 53 of file tcp.h.

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

Definition at line 55 of file tcp.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
O2NET_DRIVER_UNINITED 
O2NET_DRIVER_READY 

Definition at line 93 of file tcp.h.

Function Documentation

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 vec,
size_t  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.