2021-12-25 08:13:50 +00:00
|
|
|
#ifndef _TTLTRACK_H
|
|
|
|
#define _TTLTRACK_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "dnsredir.h"
|
|
|
|
|
|
|
|
typedef struct tcp_conntrack_info {
|
|
|
|
uint8_t is_ipv6;
|
|
|
|
uint8_t ttl;
|
|
|
|
uint32_t srcip[4];
|
|
|
|
uint16_t srcport;
|
|
|
|
uint32_t dstip[4];
|
|
|
|
uint16_t dstport;
|
|
|
|
} tcp_conntrack_info_t;
|
|
|
|
|
2021-12-26 14:33:39 +00:00
|
|
|
int tcp_handle_incoming(uint32_t srcip[4], uint32_t dstip[4],
|
|
|
|
uint16_t srcport, uint16_t dstport,
|
|
|
|
uint8_t is_ipv6, uint8_t ttl);
|
2021-12-25 08:13:50 +00:00
|
|
|
|
2021-12-26 14:33:39 +00:00
|
|
|
int tcp_handle_outgoing(uint32_t srcip[4], uint32_t dstip[4],
|
|
|
|
uint16_t srcport, uint16_t dstport,
|
2021-12-25 08:13:50 +00:00
|
|
|
tcp_conntrack_info_t *conn_info,
|
2021-12-26 14:33:39 +00:00
|
|
|
uint8_t is_ipv6);
|
2021-12-25 08:13:50 +00:00
|
|
|
|
2021-12-28 13:37:42 +00:00
|
|
|
int tcp_get_auto_ttl(const uint8_t ttl, const uint8_t autottl1,
|
2021-12-28 23:01:51 +00:00
|
|
|
const uint8_t autottl2, const uint8_t minhops,
|
|
|
|
const uint8_t maxttl);
|
2021-12-25 08:13:50 +00:00
|
|
|
#endif
|