This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
mesa-platform-quic/src/quic_analysis.h

79 lines
2.9 KiB
C
Raw Normal View History

2020-05-12 12:18:02 +08:00
/*
* quic_analysis.h
*
* Created on: 2019<EFBFBD><EFBFBD>4<EFBFBD><EFBFBD>2<EFBFBD><EFBFBD>
* Author: root
*/
#ifndef SRC_QUIC_ANALYSIS_H_
#define SRC_QUIC_ANALYSIS_H_
#include <stdint.h>
#include "quic_util.h"
#define QUIC_TRUE 0x01
#define QUIC_FALSE 0x00
#define QUIC_HALF_CLOSE 0x01
#define QUIC_WHOLE_CLOSE 0x02
#define QUIC_DATA 0x03
#define QUIC_KEY 1
#define CT_GNUC_SO_EXPORT __attribute__ ((visibility("default"))) //<2F><><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD>so<73>ļ<EFBFBD>
#define CT_GNUC_SO_LOCAL __attribute__ ((visibility("hidden"))) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڱ<EFBFBD>so<73>ļ<EFBFBD><C4BC><EFBFBD>
#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
#define GQUIC_HEADER_LEN 1+8+1
#define IQUIC_HEADER_LEN 1+8+1
#define ENC_BIG_ENDIAN 0x00000000
#define ENC_LITTLE_ENDIAN 0x80000000
#define DIR_C2S 0x01
#define DIR_S2C 0x02
#define DIR_DOUBLE 0x03
struct quic_param_t
{
unsigned long long quic_interested_region_flag;
unsigned long long quic_region_cnt;
char quic_conf_filename[256];
unsigned short quic_plugid;
char quic_conf_regionname[MAX_REGION_NUM][REGION_NAME_LEN];
};
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
};
int QUIC_INIT(void);
char QUIC_ENTRY(struct streaminfo *pstream, void**pme, int thread_seq,void *a_pcaket);
void QUIC_DESTROY(void);
void QUIC_GETPLUGID(unsigned short plugid);
void QUIC_PROT_FUNSTAT(unsigned long long protflag);
long long QUIC_FLAG_CHANGE(char* flag_str);
unsigned long long quic_getRegionID(char *string, int str_len,
const char g_string[MAX_REGION_NUM][REGION_NAME_LEN]);
UINT8 quic_analyseStream(struct streaminfo *pstream, void** pme, int thread_seq,void *a_packet);
int quic_init_stream(struct streaminfo *pstream, void **pme, int thread_seq);
void quic_init_clientHello(struct quic_client_hello* stClientHello, UINT32 tag_num, int thread_seq);
void quic_init_serverHello(struct quic_server_hello* stServerHello, UINT32 tag_num, int thread_seq);
void quic_release_exts(int thread_seq, quic_tlv_t** ext_tags, UINT16 ext_tag_num);
void quic_release_clientHello(int thread_seq,struct quic_client_hello* stClientHello);
void quic_release_serverHello(int thread_seq,struct quic_server_hello* stServerHello);
void quic_release_stream(struct streaminfo *a_tcp, void** pme, int thread_seq,void *a_packet);
UINT8 quic_analyseStream(struct streaminfo *pstream, void** pme, int thread_seq,void *a_packet);
int quic_getLinkState(struct quic_stream *a_quic_stream);
UCHAR quic_doWithInsterestedRegion(struct streaminfo *pstream);
#endif /* SRC_QUIC_ANALYSIS_H_ */