TSG-8364: 支持配置文件配置最多解析N数据包

This commit is contained in:
liuxueli
2021-11-10 19:39:17 +03:00
parent 11c3aa538a
commit 895e4c08bb
13 changed files with 96 additions and 33 deletions

View File

@@ -172,22 +172,11 @@ extern "C" unsigned char QUIC_ENTRY(struct streaminfo *pstream, void**pme, int t
quic_init_context(pme, thread_seq);
context=(struct quic_context *)*pme;
}
switch(pstream->opstate)
{
case OP_STATE_PENDING:
state=quic_analyze_entry(pstream, context, thread_seq, a_packet);
break;
case OP_STATE_DATA:
state=quic_call_business_plug(pstream, context, (char *)pstream->pudpdetail->pdata, pstream->pudpdetail->datalen, QUIC_APPLICATION_DATA_MASK, a_packet);
break;
case OP_STATE_CLOSE:
if(pstream->pudpdetail->pdata!=NULL && pstream->pudpdetail->datalen>0)
{
state=quic_call_business_plug(pstream, context, (char *)pstream->pudpdetail->pdata, pstream->pudpdetail->datalen, QUIC_APPLICATION_DATA_MASK, a_packet);
}
state=quic_call_business_plug(pstream, context, NULL, 0, QUIC_INTEREST_KEY_MASK, a_packet);
break;
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)
@@ -214,6 +203,7 @@ extern "C" int QUIC_INIT(void)
MESA_load_profile_string_def(g_quic_proto_conffile, "QUIC", "LOG_PATH", g_quic_param.log_path, sizeof(g_quic_param.log_path), "./log/quic/quic");
MESA_load_profile_int_def(g_quic_proto_conffile, "QUIC", "DECRYPTED_SWITCH", &g_quic_param.decrypted_switch, 2);
MESA_load_profile_int_def(g_quic_proto_conffile, "QUIC", "MAX_PARSE_PKT_NUM", &g_quic_param.max_parse_pkt_num, 3);
MESA_load_profile_string_def(g_quic_proto_conffile, "QUIC", "QUIC_PORT_LIST", buff, sizeof(buff), "443;8443;");
g_quic_param.quic_port_num=parse_quic_port(buff, g_quic_param.quic_port_list, SUPPORT_QUIC_PORT_NUM);