This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-tfe/common/include/tfe_tcp_restore.h
luwenpeng 1fe60d2428 废除 tfe-kmod, tfe 直接与 kni 通信
* 新增 enable_kni_v3=1 配置项
	* develop_build_release 分支关闭 ASAN 检测
	* 修正根据 CMSG 恢复 TCP 链接时没有正确填写 TCP 时间戳启用选项的问题
2021-04-21 13:26:07 +08:00

47 lines
816 B
C

#ifndef _TFE_TCP_RESTORE_H
#define _TFE_TCP_RESTORE_H
#ifdef __cpluscplus
extern "C"
{
#endif
enum tcp_restore_pkt_dir
{
PKT_DIR_NOT_SET = 0x0,
PKT_DIR_C2S = 0x1,
PKT_DIR_S2C = 0x2
};
struct tcp_restore_endpoint
{
struct sockaddr_storage addr;
uint32_t seq;
uint32_t ack;
uint32_t ts_val;
uint16_t mss;
uint16_t window;
uint8_t wscale;
bool wscale_perm;
bool timestamp_perm;
bool sack_perm;
};
struct tcp_restore_info
{
enum tcp_restore_pkt_dir cur_dir;
struct tcp_restore_endpoint client;
struct tcp_restore_endpoint server;
char cmsg[2048];
unsigned int cmsg_len;
};
void tfe_tcp_restore_info_dump(const struct tcp_restore_info *info);
int tfe_tcp_restore_fd_create(const struct tcp_restore_endpoint *endpoint, const struct tcp_restore_endpoint *peer);
#ifdef __cpluscplus
}
#endif
#endif