diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index a0fd392..702047e 100644 --- a/src/tsg_entry.cpp +++ b/src/tsg_entry.cpp @@ -147,6 +147,41 @@ static int get_device_id(char *command, int entrance_id) return (entrance_id<<7)+(atoi(buffer)%128); } +static int print_hit_path(const struct streaminfo *a_stream, struct master_context *context) +{ + if(g_tsg_para.hit_path_switch==0) + { + return 0; + } + + char path_buff[1024*128]={0}; + int i=0, n_read=0, offset=0; + struct Maat_hit_path_t hit_path[1024]; + + n_read=Maat_get_scan_status(g_tsg_maat_feather, &(context->mid), MAAT_GET_SCAN_HIT_PATH, hit_path, sizeof(hit_path)); + for(i=0; iaction) { case TSG_ACTION_DENY: @@ -1442,6 +1478,7 @@ extern "C" int TSG_MASTER_INIT() MESA_load_profile_int_def(tsg_conffile, "SYSTEM","DEFAULT_POLICY_ID", &g_tsg_para.default_compile_id, 0); MESA_load_profile_int_def(tsg_conffile, "SYSTEM","DEFAULT_POLICY_SWITCH", &g_tsg_para.default_compile_switch, 0); + MESA_load_profile_int_def(tsg_conffile, "SYSTEM","HIT_PATH_SWITCH", &g_tsg_para.hit_path_switch, 0); MESA_load_profile_string_def(tsg_conffile, "SYSTEM", "IDENTIFY_PROTO_NAME", identify_proto_name, sizeof(identify_proto_name), "HTTP;SSL;DNS;FTP;BGP;SIP;MAIL;STREAMING_MEDIA;QUIC;SIP;"); tsg_proto_name2flag(identify_proto_name, &g_tsg_para.proto_flag); diff --git a/src/tsg_entry.h b/src/tsg_entry.h index 9835b2c..0e26bf1 100644 --- a/src/tsg_entry.h +++ b/src/tsg_entry.h @@ -141,6 +141,7 @@ typedef struct _tsg_para int hash_timeout; int hash_slot_size; int scan_time_interval; + int hit_path_switch; int default_compile_switch; int default_compile_id; int table_id[TABLE_MAX];