2012-04-28 16:42:50 +04:00
|
|
|
#ifndef __CR_SK_INET_H__
|
|
|
|
#define __CR_SK_INET_H__
|
2012-04-28 16:47:30 +04:00
|
|
|
|
|
|
|
#define INET_ADDR_LEN 40
|
|
|
|
|
|
|
|
struct inet_sk_desc {
|
|
|
|
struct socket_desc sd;
|
|
|
|
unsigned int type;
|
|
|
|
unsigned int proto;
|
|
|
|
unsigned int src_port;
|
|
|
|
unsigned int dst_port;
|
|
|
|
unsigned int state;
|
|
|
|
unsigned int rqlen;
|
|
|
|
unsigned int wqlen;
|
|
|
|
unsigned int src_addr[4];
|
|
|
|
unsigned int dst_addr[4];
|
2012-04-28 17:46:12 +04:00
|
|
|
|
|
|
|
int rfd;
|
|
|
|
struct list_head rlist;
|
2012-04-28 16:47:30 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct inet_sk_info {
|
2012-07-13 21:05:00 +04:00
|
|
|
struct inet_sk_entry *ie;
|
2012-04-28 16:47:30 +04:00
|
|
|
struct file_desc d;
|
2012-04-28 17:46:12 +04:00
|
|
|
struct list_head rlist;
|
2012-04-28 16:47:30 +04:00
|
|
|
};
|
|
|
|
|
2012-04-28 16:42:50 +04:00
|
|
|
int inet_bind(int sk, struct inet_sk_info *);
|
|
|
|
int inet_connect(int sk, struct inet_sk_info *);
|
2012-04-28 17:15:12 +04:00
|
|
|
|
2012-04-28 17:38:46 +04:00
|
|
|
void tcp_unlock_all(void);
|
|
|
|
void tcp_locked_conn_add(struct inet_sk_info *);
|
|
|
|
void tcp_unlock_connections(void);
|
|
|
|
|
2012-04-28 17:46:12 +04:00
|
|
|
int dump_one_tcp(int sk, struct inet_sk_desc *sd);
|
|
|
|
int restore_one_tcp(int sk, struct inet_sk_info *si);
|
2012-04-28 17:15:12 +04:00
|
|
|
|
|
|
|
#define SK_EST_PARAM "tcp-established"
|
2012-04-28 17:29:14 +04:00
|
|
|
|
|
|
|
struct cr_options;
|
|
|
|
void show_tcp_stream(int fd, struct cr_options *);
|
2012-05-03 15:21:37 +04:00
|
|
|
|
|
|
|
int check_tcp_repair(void);
|
2012-04-28 16:42:50 +04:00
|
|
|
#endif
|