10 Commits

13 changed files with 175 additions and 92 deletions

View File

@@ -126,6 +126,7 @@ release_build_debug_for_centos7:
BUILD_TYPE: Debug BUILD_TYPE: Debug
PACKAGE: 1 PACKAGE: 1
UPLOAD_RPM: 1 UPLOAD_RPM: 1
ASAN_OPTION: ADDRESS
PULP3_REPO_NAME: protocol-stable-x86_64.el7 PULP3_REPO_NAME: protocol-stable-x86_64.el7
PULP3_DIST_NAME: protocol-stable-x86_64.el7 PULP3_DIST_NAME: protocol-stable-x86_64.el7
extends: .build_by_travis_for_centos7 extends: .build_by_travis_for_centos7
@@ -217,6 +218,7 @@ release_build_debug_for_centos8:
BUILD_TYPE: Debug BUILD_TYPE: Debug
PACKAGE: 1 PACKAGE: 1
UPLOAD_RPM: 1 UPLOAD_RPM: 1
ASAN_OPTION: ADDRESS
PULP3_REPO_NAME: protocol-stable-x86_64.el8 PULP3_REPO_NAME: protocol-stable-x86_64.el8
PULP3_DIST_NAME: protocol-stable-x86_64.el8 PULP3_DIST_NAME: protocol-stable-x86_64.el8
extends: .build_by_travis_for_centos8 extends: .build_by_travis_for_centos8

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8) cmake_minimum_required (VERSION 2.8...3.10)
set(lib_name quic) set(lib_name quic)

View File

@@ -67,9 +67,3 @@ if [ -n "${UPLOAD_RPM}" ]; then
python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm
fi fi
if [ -n "${UPLOAD_SYMBOL_FILES}" ]; then
rpm -i $SYMBOL_TARGET*debuginfo*.rpm
_symbol_file=`find /usr/lib/debug/ -name "$SYMBOL_TARGET*.so*.debug"`
cp $_symbol_file ${_symbol_file}info.${CI_COMMIT_SHORT_SHA}
sentry-cli upload-dif -t elf ${_symbol_file}info.${CI_COMMIT_SHORT_SHA}
fi

View File

@@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
work_path=$1 work_path=$1
branch=`git status | grep branch | awk '{print $NF}'` branch=`git status | grep 'On branch' | awk '{print $NF}'`
git log --branches=$branch --no-merges --date=local --show-signature --pretty="* %ad %an %ae %nhash: %H%ncommit:%n%B" | awk -F"-" '{print "- "$0}' | sed 's/- \*/\*/g' | sed 's/- $//g' | sed 's/-/ -/g' | sed 's/[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}//g' > $work_path/changelog.txt git log --branches=$branch --no-merges --date=local --show-signature --pretty="* %ad %an %ae %nhash: %H%ncommit:%n%B" | awk -F"-" '{print "- "$0}' | sed 's/- \*/\*/g' | sed 's/- $//g' | sed 's/-/ -/g' | sed 's/[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}//g' > $work_path/changelog.txt

View File

@@ -0,0 +1,70 @@
//https://jira.geedge.net/browse/OMPUB-527
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
static int msb2_varint_decode(const unsigned char *buf, long *out)
{
unsigned long val = buf[0] & 0x3f;
unsigned int nfollow = 1<<(buf[0]>>6);
switch (nfollow-1)
{
case 7: val = (val << 8) | buf[nfollow - 7]; /*fail through*/
case 6: val = (val << 8) | buf[nfollow - 6]; /*fail through*/
case 5: val = (val << 8) | buf[nfollow - 5]; /*fail through*/
case 4: val = (val << 8) | buf[nfollow - 4]; /*fail through*/
case 3: val = (val << 8) | buf[nfollow - 3]; /*fail through*/
case 2: val = (val << 8) | buf[nfollow - 2]; /*fail through*/
case 1: val = (val << 8) | buf[nfollow-1];
case 0: break;
}
*out=val;
return nfollow;
}
int parse_quic_transport_parameter(const char *quic_para, int quic_para_len, int thread_seq)
{
int one_para_length=0;
int para_offset=0;
long one_para_type=0;
while(quic_para_len > para_offset)
{
para_offset+=msb2_varint_decode((const unsigned char *)(quic_para+para_offset), &one_para_type);
switch(one_para_type)
{
//case EXT_QUIC_PARAM_USER_AGENT: // 2021-10-20 deprecated
case 0x3129:
one_para_length=quic_para[para_offset++]; // length=1
if(one_para_length+para_offset>quic_para_len)
{
return 0;
}
//para_offset+=copy_extension_tag(quic_para+para_offset, one_para_length, &client_hello->user_agent, thread_seq);
return 1;
default:
one_para_length=(int)(quic_para[para_offset++]); // length=1
if(one_para_length<0 || one_para_length>quic_para_len)
{
break;
}
para_offset+=one_para_length;
break;
}
}
return 0;
}
int main(int argc, char *argv[])
{
char buff1[106]={0x80, 0x0, 0x47, 0x52, 0x4, 0x0, 0x0, 0x0, 0x1, 0x20, 0x4, 0x80, 0x1, 0x0, 0x0, 0xf, 0x0, 0x4, 0x4, 0x80, 0xf0, 0x0, 0x0, 0x8, 0x2, 0x40, 0x64, 0x7, 0x4, 0x80, 0x60, 0x0, 0x0, 0x9, 0x2, 0x40, 0x67, 0x6, 0x4, 0x80, 0x60, 0x0, 0x0, 0x80, 0xff, 0x73, 0xdb, 0xc, 0x0, 0x0, 0x0, 0x1, 0x3a, 0x6a, 0x9b, 0xaa, 0x4f, 0x2f, 0xbd, 0xc, 0xd5, 0xe2, 0xae, 0x32, 0x45, 0x6, 0x2e, 0xf, 0xc5, 0x82, 0x94, 0x3d, 0x5d, 0xb2, 0x69, 0x2c, 0x25, 0xbd, 0xd5, 0x85, 0x99, 0x72, 0xeb, 0x3, 0x2, 0x45, 0xc0, 0x1, 0x4, 0x80, 0x0, 0x75, 0x30, 0x71, 0x28, 0x4, 0x52, 0x56, 0x43, 0x4d, 0x5, 0x4, 0x80, 0x60, 0x0, 0x0};
char buff2[99]={0x71, 0x27, 0x4, 0x80, 0x2, 0xa5, 0xb2, 0xe4, 0xcf, 0x74, 0x5b, 0xf5, 0x6, 0x41, 0x20, 0x0, 0x8, 0x2, 0x40, 0x64, 0x4, 0x4, 0x80, 0xd4, 0x9f, 0xb7, 0x6f, 0xdf, 0xed, 0x48, 0x94, 0x18, 0xd7, 0x53, 0xf7, 0x92, 0x6, 0x94, 0xa0, 0x0, 0x0, 0x1, 0x4, 0x80, 0x0, 0x75, 0x30, 0xf, 0x0, 0x80, 0xff, 0x73, 0xdb, 0xc, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x8a, 0x7a, 0x8a, 0x3a, 0x9, 0x2, 0x40, 0x67, 0x3, 0x2, 0x45, 0xc0, 0x5, 0x4, 0x80, 0x60, 0x0, 0x0, 0x71, 0x28, 0x4, 0x52, 0x56, 0x43, 0x4d, 0x20, 0x4, 0x80, 0x1, 0x0, 0x0, 0x7, 0x4, 0x80, 0x60, 0x0, 0x0};
parse_quic_transport_parameter(buff1, 106, 0);
parse_quic_transport_parameter(buff2, 99, 0);
return 0;
}

View File

@@ -49,7 +49,7 @@ struct quic_info
//buff_len minimun 32bytes //buff_len minimun 32bytes
int quic_version_int2string(unsigned int version, char *buff, int buff_len); int quic_version_int2string(unsigned int version, char *buff, int buff_len);
//ret: 0: not quic, >0: quic version //ret: NULL: not quic, quic_info: quic version
unsigned int quic_protocol_identify(struct streaminfo *a_stream, void *a_packet, char *out_sni, int *out_sni_len, char *out_ua, int *out_ua_len); struct quic_info *quic_protocol_identify(const struct streaminfo *a_stream);
#endif /* SRC__QUIC_H__ */ #endif /* SRC__QUIC_H__ */

View File

@@ -44,7 +44,7 @@ extern "C"
#endif #endif
#define QUIC_MAX_UDP_PAYLOAD_SIZE 65527 #define QUIC_MAX_UDP_PAYLOAD_SIZE 1460
#define quic_string(str) \ #define quic_string(str) \
{ \ { \

View File

@@ -6,9 +6,11 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <MESA/stream_inc/stream_base.h>
#include <MESA/MESA_handle_logger.h> #include <MESA/stream.h>
#include <MESA/MESA_prof_load.h> #include <MESA/MESA_prof_load.h>
#include <MESA/MESA_handle_logger.h>
#include "quic.h" #include "quic.h"
#include "quic_entry.h" #include "quic_entry.h"
#include "quic_process.h" #include "quic_process.h"
@@ -141,47 +143,48 @@ void quic_free_client_hello(struct quic_client_hello *client_hello, int thread_s
return ; return ;
} }
void quic_free_context(void** pme, int thread_seq) void quic_free_context(const struct streaminfo *a_stream, int bridge_id, void *data)
{ {
if(NULL==*pme) if(NULL!=data)
{ {
return ; struct quic_context *context = (struct quic_context *)data;
quic_free_client_hello(context->quic_info.client_hello, a_stream->threadnum);
dictator_free(a_stream->threadnum, data);
} }
struct quic_context *context = (struct quic_context *)*pme;
quic_free_client_hello(context->quic_info.client_hello, thread_seq);
dictator_free(thread_seq, *pme);
*pme=NULL;
return;
} }
extern "C" unsigned char QUIC_ENTRY(struct streaminfo *pstream, void**pme, int thread_seq, void *a_packet) extern "C" unsigned char QUIC_ENTRY(const struct streaminfo *pstream, void**pme, int thread_seq, const void *a_packet)
{ {
unsigned char state=0;
struct quic_context *context=(struct quic_context *)*pme;
if((g_quic_param.quic_interested_region_flag<QUIC_KEY) || (!is_quic_port(pstream))) if((g_quic_param.quic_interested_region_flag<QUIC_KEY) || (!is_quic_port(pstream)))
{ {
return APP_STATE_DROPME; return APP_STATE_DROPME;
} }
if(*pme==NULL) if(pstream->opstate==OP_STATE_PENDING)
{ {
quic_init_context(pme, thread_seq); *pme=stream_bridge_async_data_get(pstream, g_quic_param.context_bridge_id);
context=(struct quic_context *)*pme; if(*pme==NULL)
{
*pme=dictator_malloc(thread_seq, sizeof(struct quic_context));
memset(*pme, 0, sizeof(struct quic_context));
}
} }
unsigned char state=0;
struct quic_context *context=(struct quic_context *)*pme;
state=quic_analyze_entry(pstream, context, thread_seq, a_packet); state=quic_analyze_entry(pstream, context, thread_seq, a_packet);
if(pstream->opstate==OP_STATE_CLOSE)
{
state=quic_call_business_plug(pstream, context, NULL, 0, QUIC_INTEREST_KEY_MASK, a_packet);
}
if(state&APP_STATE_DROPME || state&APP_STATE_DROPPKT || pstream->opstate==OP_STATE_CLOSE) if(state&APP_STATE_DROPME || pstream->opstate==OP_STATE_CLOSE)
{ {
quic_free_context(pme, thread_seq); if(context->link_state==1)
{
quic_call_business_plug(pstream, context, NULL, 0, QUIC_INTEREST_KEY_MASK, a_packet);
}
quic_free_context(pstream, g_quic_param.context_bridge_id, *pme);
stream_bridge_async_data_put(pstream, g_quic_param.context_bridge_id, NULL);
*pme=NULL; *pme=NULL;
return state; return state;
} }
@@ -233,7 +236,7 @@ extern "C" int QUIC_INIT(void)
return -1; return -1;
} }
strncpy(g_quic_param.quic_conf_regionname[region_id], region_name, strlen(region_name)); memcpy(g_quic_param.quic_conf_regionname[region_id], region_name, MIN(sizeof(g_quic_param.quic_conf_regionname[region_id])-1, strlen(region_name)));
g_quic_param.quic_region_cnt++; g_quic_param.quic_region_cnt++;
memset(region_name, 0, sizeof(region_name)); memset(region_name, 0, sizeof(region_name));
} }
@@ -246,6 +249,9 @@ extern "C" int QUIC_INIT(void)
return -1; return -1;
} }
g_quic_param.context_bridge_id=stream_bridge_build("QUIC_CONTEXT", "w");
stream_bridge_register_data_free_cb(g_quic_param.context_bridge_id, quic_free_context);
return 0; return 0;
} }
@@ -319,6 +325,8 @@ extern "C" long long QUIC_FLAG_CHANGE(char* flag_str)
extern "C" void QUIC_DESTROY(void) extern "C" void QUIC_DESTROY(void)
{ {
MESA_destroy_runtime_log_handle(g_quic_param.logger);
g_quic_param.logger = NULL;
return ; return ;
} }

View File

@@ -3,6 +3,10 @@
#include "quic.h" #include "quic.h"
#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
#define FALSE 0x00 #define FALSE 0x00
#define TRUE 0x01 #define TRUE 0x01
#define MAYBE 0x02 #define MAYBE 0x02
@@ -29,6 +33,7 @@ struct quic_param
int quic_port_num; int quic_port_num;
int decrypted_switch; int decrypted_switch;
int max_parse_pkt_num; int max_parse_pkt_num;
int context_bridge_id;
unsigned short quic_port_list[SUPPORT_QUIC_PORT_NUM]; unsigned short quic_port_list[SUPPORT_QUIC_PORT_NUM];
char quic_conf_regionname[MAX_REGION_NUM][REGION_NAME_LEN]; char quic_conf_regionname[MAX_REGION_NUM][REGION_NAME_LEN];
char log_path[128]; char log_path[128];
@@ -47,8 +52,7 @@ enum quic_mes_type{
}; };
extern struct quic_param g_quic_param; extern struct quic_param g_quic_param;
int is_quic_port(struct streaminfo *pstream); int is_quic_port(const struct streaminfo *pstream);
void quic_free_client_hello(struct quic_client_hello *client_hello, int thread_seq);
#endif /* SRC_QUIC_ANALYSIS_H_ */ #endif /* SRC_QUIC_ANALYSIS_H_ */

View File

@@ -31,10 +31,6 @@ enum PARSE_RESULT
#define PRINTADDR(a, b) ((b)<RLOG_LV_FATAL ? printaddr(&(a->addr), a->threadnum) : "") #define PRINTADDR(a, b) ((b)<RLOG_LV_FATAL ? printaddr(&(a->addr), a->threadnum) : "")
#endif #endif
#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
struct quic_client_hello_msg_hdr struct quic_client_hello_msg_hdr
{ {
uint8_t handshake_type; uint8_t handshake_type;
@@ -57,7 +53,7 @@ int check_port(unsigned short port)
return 0; return 0;
} }
int is_quic_port(struct streaminfo *pstream) int is_quic_port(const struct streaminfo *pstream)
{ {
unsigned short source=0, dest=0; unsigned short source=0, dest=0;
@@ -152,7 +148,7 @@ int quic_call_business_state(struct quic_context *context)
return state; return state;
} }
unsigned char quic_call_business_plug(struct streaminfo *pstream, struct quic_context *context, void *buff, int buff_len, enum quic_interested_region region_mask, void *a_packet) unsigned char quic_call_business_plug(const struct streaminfo *pstream, struct quic_context *context, void *buff, int buff_len, enum quic_interested_region region_mask, const void *a_packet)
{ {
char state=PROT_STATE_GIVEME; char state=PROT_STATE_GIVEME;
char app_state=APP_STATE_GIVEME; char app_state=APP_STATE_GIVEME;
@@ -176,7 +172,7 @@ unsigned char quic_call_business_plug(struct streaminfo *pstream, struct quic_co
session_info.buf=buff; session_info.buf=buff;
session_info.buflen=buff_len; session_info.buflen=buff_len;
} }
state=PROT_PROCESS(&session_info, &(context->business_pme), pstream->threadnum, pstream, a_packet); state=PROT_PROCESS(&session_info, &(context->business_pme), pstream->threadnum, (struct streaminfo *)pstream, a_packet);
if(state&PROT_STATE_DROPPKT) if(state&PROT_STATE_DROPPKT)
{ {
@@ -376,7 +372,11 @@ int parse_quic_transport_parameter(struct quic_client_hello *client_hello, const
para_offset+=copy_extension_tag(quic_para+para_offset, one_para_length, &client_hello->user_agent, thread_seq); para_offset+=copy_extension_tag(quic_para+para_offset, one_para_length, &client_hello->user_agent, thread_seq);
return 1; return 1;
default: default:
one_para_length=quic_para[para_offset++]; // length=1 one_para_length=(int)(quic_para[para_offset++]); // length=1
if(one_para_length<0 || one_para_length>quic_para_len)
{
break;
}
para_offset+=one_para_length; para_offset+=one_para_length;
break; break;
} }
@@ -737,6 +737,11 @@ enum QUIC_VERSION is_quic_protocol(const char *payload, int payload_len, int *pa
enum QUIC_VERSION quic_version=QUIC_VERSION_UNKNOWN; enum QUIC_VERSION quic_version=QUIC_VERSION_UNKNOWN;
unsigned char frame_type=(unsigned char)(payload[0]); unsigned char frame_type=(unsigned char)(payload[0]);
if(payload_len<=4)
{
return QUIC_VERSION_UNKNOWN;
}
if(frame_type&QUIC_LONG_HEADER_MASK) if(frame_type&QUIC_LONG_HEADER_MASK)
{ {
quic_version=identify_quic_version(payload, payload_len, payload_offset); quic_version=identify_quic_version(payload, payload_len, payload_offset);
@@ -773,7 +778,11 @@ unsigned char parse_quic_all_version(struct quic_info *quic_info, const char *pa
if(quic_version>=GQUIC_VERSION_Q001 && quic_version<=GQUIC_VERSION_Q048) if(quic_version>=GQUIC_VERSION_Q001 && quic_version<=GQUIC_VERSION_Q048)
{ {
return parse_quic_uncryption_payload(quic_info, payload+payload_offset, payload_len-payload_offset, thread_seq); if(payload_len > payload_offset)
{
return parse_quic_uncryption_payload(quic_info, payload+payload_offset, payload_len-payload_offset, thread_seq);
}
return PARSE_RESULT_VERSION;
} }
else if(((quic_version>=MVFST_VERSION_00 && quic_version<=MVFST_VERSION_0F) || else if(((quic_version>=MVFST_VERSION_00 && quic_version<=MVFST_VERSION_0F) ||
(quic_version>=GQUIC_VERSION_Q049 && quic_version<=GQUIC_VERSION_Q059) || (quic_version>=GQUIC_VERSION_Q049 && quic_version<=GQUIC_VERSION_Q059) ||
@@ -808,12 +817,12 @@ unsigned char parse_quic_all_version(struct quic_info *quic_info, const char *pa
} }
unsigned char quic_analyze_entry(struct streaminfo *pstream, struct quic_context* context, int thread_seq, void* a_packet) unsigned char quic_analyze_entry(const struct streaminfo *pstream, struct quic_context* context, int thread_seq, const void* a_packet)
{ {
unsigned char parse_result=PARSE_RESULT_UNKNOWN; unsigned char parse_result=PARSE_RESULT_UNKNOWN;
char state=APP_STATE_GIVEME; char state=APP_STATE_GIVEME;
if(pstream==NULL || pstream->pudpdetail==NULL) if(pstream==NULL || pstream->pudpdetail==NULL || context==NULL)
{ {
return APP_STATE_DROPME; return APP_STATE_DROPME;
} }
@@ -822,7 +831,7 @@ unsigned char quic_analyze_entry(struct streaminfo *pstream, struct quic_context
switch(context->pre_parse_state) switch(context->pre_parse_state)
{ {
case PARSE_RESULT_CLIENT_HELLO: case PARSE_RESULT_CLIENT_HELLO:
parse_result=PARSE_RESULT_PAYLOAD; parse_result=PARSE_RESULT_PAYLOAD;
break; break;
case PARSE_RESULT_VERSION: case PARSE_RESULT_VERSION:
@@ -835,6 +844,20 @@ unsigned char quic_analyze_entry(struct streaminfo *pstream, struct quic_context
case PARSE_RESULT_PAYLOAD: case PARSE_RESULT_PAYLOAD:
case PARSE_RESULT_UNKNOWN: case PARSE_RESULT_UNKNOWN:
default: default:
if(context->parse_first_pkt==1)
{
context->parse_first_pkt=0;
if(context->quic_info.client_hello==NULL)
{
parse_result=PARSE_RESULT_VERSION;
}
else
{
parse_result=PARSE_RESULT_CLIENT_HELLO;
}
break;
}
if((context->parse_pkt_cnt++)>=g_quic_param.max_parse_pkt_num) if((context->parse_pkt_cnt++)>=g_quic_param.max_parse_pkt_num)
{ {
parse_result=PARSE_RESULT_PAYLOAD; parse_result=PARSE_RESULT_PAYLOAD;
@@ -865,49 +888,30 @@ unsigned char quic_analyze_entry(struct streaminfo *pstream, struct quic_context
return state; return state;
} }
static int copy_client_hello_extension(char *src, char *dest, int d_len) struct quic_info *quic_protocol_identify(const struct streaminfo *a_stream)
{ {
if(src==NULL || dest==NULL || d_len<=0)
{
return 0;
}
int len=MIN((int)strlen(src), d_len-1);
memcpy(dest, src, len);
dest[len]='\0';
return len;
}
unsigned int quic_protocol_identify(struct streaminfo *a_stream, void *a_packet, char *out_sni, int *out_sni_len, char *out_ua, int *out_ua_len)
{
unsigned char parse_result=APP_STATE_GIVEME;
struct quic_info quic_info={0, NULL};
unsigned int quic_version=QUIC_VERSION_UNKNOWN;
if(!is_quic_port(a_stream) || a_stream==NULL || a_stream->pudpdetail==NULL) if(!is_quic_port(a_stream) || a_stream==NULL || a_stream->pudpdetail==NULL)
{ {
return quic_version; return NULL;
} }
parse_result=parse_quic_all_version(&quic_info, (const char *)a_stream->pudpdetail->pdata, a_stream->pudpdetail->datalen, a_stream->threadnum); struct quic_info tmp_quic_info={0, NULL};
unsigned char parse_result=APP_STATE_GIVEME;
parse_result=parse_quic_all_version(&tmp_quic_info, (const char *)a_stream->pudpdetail->pdata, a_stream->pudpdetail->datalen, a_stream->threadnum);
if(parse_result!=PARSE_RESULT_UNKNOWN) if(parse_result!=PARSE_RESULT_UNKNOWN)
{ {
if(quic_info.client_hello!=NULL) struct quic_context *context=(struct quic_context *)dictator_malloc(a_stream->threadnum, sizeof(struct quic_context));
{ memset(context, 0, sizeof(struct quic_context));
*out_sni_len=copy_client_hello_extension(quic_info.client_hello->sni, out_sni, *out_sni_len); context->quic_info=tmp_quic_info;
*out_ua_len=copy_client_hello_extension(quic_info.client_hello->user_agent, out_ua, *out_ua_len); context->parse_first_pkt=1;
quic_free_client_hello(quic_info.client_hello, a_stream->threadnum); context->pre_parse_state=PARSE_RESULT_UNKNOWN;
}
else stream_bridge_async_data_put(a_stream, g_quic_param.context_bridge_id, (void *)context);
{
*out_sni_len=0; return &(context->quic_info);
*out_ua_len=0;
}
quic_version=quic_info.quic_version;
} }
return quic_version; return NULL;
} }

View File

@@ -284,13 +284,14 @@ struct quic_context
unsigned char link_state; unsigned char link_state;
unsigned char parse_pkt_cnt; unsigned char parse_pkt_cnt;
unsigned char pre_parse_state; unsigned char pre_parse_state;
unsigned char padding[5]; unsigned char parse_first_pkt;
unsigned char padding[4];
void *business_pme; void *business_pme;
struct quic_info quic_info; struct quic_info quic_info;
}; };
unsigned char quic_analyze_entry(struct streaminfo *pstream, struct quic_context* context, int thread_seq, void* a_packet); unsigned char quic_analyze_entry(const struct streaminfo *pstream, struct quic_context* context, int thread_seq, const void* a_packet);
unsigned char quic_call_business_plug(struct streaminfo *pstream, struct quic_context *context, void *buff, int buff_len, enum quic_interested_region region_mask, void *a_packet); unsigned char quic_call_business_plug(const struct streaminfo *pstream, struct quic_context *context, void *buff, int buff_len, enum quic_interested_region region_mask, const void *a_packet);
#endif #endif

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8) cmake_minimum_required (VERSION 2.8...3.10)
set(lib_name quic) set(lib_name quic)
project(${lib_name}_test) project(${lib_name}_test)

Binary file not shown.