#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