2020-05-29 15:10:01 +08:00
|
|
|
#ifndef _QUIC_ANALYSIS_H_
|
|
|
|
|
#define _QUIC_ANALYSIS_H_
|
2020-05-12 12:18:02 +08:00
|
|
|
|
2021-11-10 11:55:22 +03:00
|
|
|
#include "quic.h"
|
2020-05-12 12:18:02 +08:00
|
|
|
|
2023-06-27 13:34:19 +08:00
|
|
|
#ifndef MIN
|
|
|
|
|
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
|
|
|
#endif
|
|
|
|
|
|
2020-06-01 17:16:23 +08:00
|
|
|
#define FALSE 0x00
|
|
|
|
|
#define TRUE 0x01
|
2020-11-04 17:12:23 +06:00
|
|
|
#define MAYBE 0x02
|
2020-06-01 17:16:23 +08:00
|
|
|
|
2021-09-18 17:15:54 +08:00
|
|
|
#define SUPPORT_QUIC_PORT_NUM 128
|
2020-06-01 17:16:23 +08:00
|
|
|
|
2020-05-12 12:18:02 +08:00
|
|
|
#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
|
|
|
|
|
|
2021-11-10 11:55:22 +03:00
|
|
|
struct quic_param
|
2020-05-12 12:18:02 +08:00
|
|
|
{
|
2024-06-07 19:03:56 +08:00
|
|
|
struct stellar *st;
|
|
|
|
|
int quic_plugid;
|
2021-09-10 13:19:28 +08:00
|
|
|
int level;
|
2021-09-18 17:15:54 +08:00
|
|
|
int quic_port_num;
|
2021-11-10 11:55:22 +03:00
|
|
|
int decrypted_switch;
|
2021-11-10 19:39:17 +03:00
|
|
|
int max_parse_pkt_num;
|
2024-06-07 19:03:56 +08:00
|
|
|
// int context_bridge_id;
|
|
|
|
|
int exdata_id;
|
|
|
|
|
int udp_topic_id; //as subscriber
|
|
|
|
|
int quic_topic_id; //as publisher
|
|
|
|
|
unsigned short quic_port_list[SUPPORT_QUIC_PORT_NUM]; //network order
|
2021-09-10 13:19:28 +08:00
|
|
|
char quic_conf_regionname[MAX_REGION_NUM][REGION_NAME_LEN];
|
|
|
|
|
char log_path[128];
|
2020-05-22 18:44:00 +08:00
|
|
|
void *logger;
|
2020-05-12 12:18:02 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif /* SRC_QUIC_ANALYSIS_H_ */
|
|
|
|
|
|