修改文件编码

This commit is contained in:
wangmenglan
2023-04-24 10:48:40 +08:00
parent 11a46269f1
commit 8a7c196c20
18 changed files with 1588 additions and 1194 deletions

View File

@@ -7,6 +7,7 @@ extern "C"
#endif
#include <sched.h>
#include <pthread.h>
// #include "proxy.h"
#include "tfe_utils.h"
@@ -84,35 +85,31 @@ extern "C"
struct packet_info
{
int dir_is_e2i;
int is_e2i_dir;
struct addr_tuple4 tuple4;
char *addr_string;
char *header_data;
int header_len;
struct sids sids;
struct route_ctx route_ctx;
};
struct session_ctx
{
int policy_ids;
uint64_t session_id;
char *session_addr;
uint16_t user_field;
char client_mac[6];
char server_mac[6];
struct route_ctx raw_pkt_i2e_route_ctx;
struct route_ctx raw_pkt_e2i_route_ctx;
struct packet_info c2s_info;
struct packet_info s2c_info;
struct sids raw_pkt_i2e_sids;
struct sids raw_pkt_e2i_sids;
struct metadata *raw_meta_i2e;
struct metadata *raw_meta_e2i;
struct metadata *ctrl_meta;
// depending on first control packet
struct packet_info first_ctrl_pkt;
// 加锁
struct tfe_cmsg *cmsg;
struct acceptor_thread_ctx *ref_thread_ctx;
};
@@ -133,10 +130,8 @@ extern "C"
cpu_set_t coremask;
struct tap_config *config;
struct timestamp *ts;
struct packet_io *io;
struct global_metrics *metrics;
struct policy_enforcer *enforcer;
struct acceptor_thread_ctx work_threads[TFE_THREAD_MAX];
struct tfe_proxy *ref_proxy;

View File

@@ -27,6 +27,11 @@ struct ctrl_pkt_parser
uint64_t sce_policy_ids[32];
int sce_policy_id_num;
struct tfe_cmsg *cmsg;
struct sids seq_sids;
struct route_ctx seq_route_ctx;
struct sids ack_sids;
struct route_ctx ack_route_ctx;
};
const char *session_state_to_string(enum session_state state);

View File

@@ -32,6 +32,14 @@ struct global_metrics
struct throughput_metrics decrypt_rx; // 累计值
struct throughput_metrics ctrl_pkt_rx; // 累计值
struct throughput_metrics ctrl_pkt_tx; // 累计值
struct throughput_metrics tap_pkt_rx; // 累计值
struct throughput_metrics tap_pkt_tx; // 累计值
struct throughput_metrics tap_c_pkt_rx; // 累计值
struct throughput_metrics tap_c_pkt_tx; // 累计值
struct throughput_metrics tap_s_pkt_rx; // 累计值
struct throughput_metrics tap_s_pkt_tx; // 累计值
uint64_t ctrl_pkt_opening_num; // 累计值
uint64_t ctrl_pkt_active_num; // 累计值