TSG-8364: 重构代码,只解QUIC链接的第一个数据包

This commit is contained in:
liuxueli
2021-11-10 11:55:22 +03:00
parent fa5af89690
commit 11c3aa538a
23 changed files with 1145 additions and 2264 deletions

53
src/quic_entry.h Normal file
View File

@@ -0,0 +1,53 @@
#ifndef _QUIC_ANALYSIS_H_
#define _QUIC_ANALYSIS_H_
#include "quic.h"
#define FALSE 0x00
#define TRUE 0x01
#define MAYBE 0x02
#define SUPPORT_QUIC_PORT_NUM 128
#define QUIC_HALF_CLOSE 0x01
#define QUIC_WHOLE_CLOSE 0x02
#define QUIC_DATA 0x03
#define QUIC_KEY 1
#define QUIC_RETURN_NORM 0x60
#define QUIC_RETURN_UNNORM 0x61
#define QUIC_RETURN_RESET_BUFFER 0x62
#define QUIC_RETURN_DROPME 0x63
#define MAX_REGION_NUM 15
#define REGION_NAME_LEN 32
struct quic_param
{
unsigned long long quic_interested_region_flag;
unsigned long long quic_region_cnt;
unsigned short quic_plugid;
int level;
int quic_port_num;
int decrypted_switch;
unsigned short quic_port_list[SUPPORT_QUIC_PORT_NUM];
char quic_conf_regionname[MAX_REGION_NUM][REGION_NAME_LEN];
char log_path[128];
void *logger;
};
enum quic_mes_type{
VER_NEGO = 0, //vertion negotiation packet
PUB_RST, //public reset packet
FRAME, //frame packet
FEC, //FEC packet
Initial, //iquic
Retey, //iquic
Handshake, //iquic
MSG_UNKNOWN = 255
};
extern struct quic_param g_quic_param;
int is_quic_port(struct streaminfo *pstream);
void quic_free_client_hello(struct quic_client_hello *client_hello, int thread_seq);
#endif /* SRC_QUIC_ANALYSIS_H_ */