TSG-18285 TFE的Packet IO模块支持重复流量识别

This commit is contained in:
luwenpeng
2023-12-29 17:25:18 +08:00
parent 9d3dcce1ab
commit cbd98507a2
30 changed files with 4064 additions and 1572 deletions

View File

@@ -6,7 +6,7 @@ extern "C"
{
#endif
#include "tfe_addr_tuple4.h"
#include "tuple.h"
#include "tfe_packet_io_fs.h"
struct tap_ctx
@@ -36,6 +36,7 @@ struct packet_io_thread_ctx
struct tfe_proxy *ref_proxy;
struct packet_io_fs *ret_fs_state;
struct acceptor_kni_v4 *ref_acceptor_ctx;
struct expiry_dablooms_handle *dup_packet_filter;
void *logger;
int session_table_need_reset;
@@ -44,7 +45,7 @@ struct packet_io_thread_ctx
struct packet_info
{
int is_e2i_dir;
struct addr_tuple4 tuple4;
struct tuple4 tuple4;
char *header_data;
int header_len;
@@ -59,7 +60,7 @@ struct session_ctx
uint64_t session_id;
uint8_t is_passthrough;
uint8_t protocol;
char *session_addr;
char session_addr[128];
char client_mac[6];
char server_mac[6];
@@ -78,6 +79,11 @@ struct session_ctx
struct acceptor_kni_v4
{
int dup_packet_filter_enable;
int dup_packet_filter_capacity;
int dup_packet_filter_timeout;
double dup_packet_filter_error_rate;
int debug;
int firewall_sids;
int proxy_sids;
@@ -108,6 +114,9 @@ int packet_io_polling_nf_interface(struct packet_io *handle, int thread_seq, voi
void handle_decryption_packet_from_tap(const char *data, int len, void *args);
void handle_raw_packet_from_tap(const char *data, int len, void *args);
// only for test
int raw_traffic_decapsulate(struct packet *handler, const char *raw_data, int raw_len, char **header, int *header_len, int *is_ipv4);
#ifdef __cpluscplus
}
#endif