TSG-12299: 增加Traffic vsys id字段(common_t_vsys_id)

This commit is contained in:
liuxueli
2022-10-24 14:48:16 +08:00
parent a8a54f4f6f
commit d00e851cf8
3 changed files with 12 additions and 5 deletions

View File

@@ -115,7 +115,8 @@ STRING app_extra_info 102
STRING http_request_body 103 STRING http_request_body 103
STRING http_response_body 104 STRING http_response_body 104
STRING mail_eml_file 105 STRING mail_eml_file 105
STRING common_vsys_id 106 LONG common_vsys_id 106
STRING dtls_sni 107 STRING dtls_sni 107
STRING common_tunnel_endpoint_a_desc 108 STRING common_tunnel_endpoint_a_desc 108
STRING common_tunnel_endpoint_b_desc 109 STRING common_tunnel_endpoint_b_desc 109
LONG common_t_vsys_id 110

View File

@@ -1471,6 +1471,10 @@ static int set_xxxx_from_user_region(struct TLD_handle_t *_handle, struct tsg_lo
cJSON *object=NULL; cJSON *object=NULL;
char *user_region=NULL; char *user_region=NULL;
TLD_delete(_handle, _instance->id2field[LOG_COMMON_USER_REGION].name);
TLD_delete(_handle, _instance->id2field[LOG_COMMON_VSYSTEM_ID].name);
TLD_delete(_handle, _instance->id2field[LOG_COMMON_SUB_ACTION].name);
if(p_result->action!=TSG_ACTION_NONE && p_result->serv_def_len>0) if(p_result->action!=TSG_ACTION_NONE && p_result->serv_def_len>0)
{ {
user_region=(char *)dictator_malloc(thread_seq, p_result->serv_def_len+1); user_region=(char *)dictator_malloc(thread_seq, p_result->serv_def_len+1);
@@ -2091,6 +2095,8 @@ int tsg_send_log(struct tsg_log_instance_t *instance, struct TLD_handle_t *handl
TLD_append(_handle, _instance->id2field[LOG_COMMON_DEVICE_TAG].name, (void *)(g_tsg_para.device_tag), TLD_TYPE_STRING); TLD_append(_handle, _instance->id2field[LOG_COMMON_DEVICE_TAG].name, (void *)(g_tsg_para.device_tag), TLD_TYPE_STRING);
} }
TLD_append(_handle, _instance->id2field[LOG_COMMON_TRAFFIC_VSYSTEM_ID].name, (void *)(long)_instance->vsystem_id, TLD_TYPE_LONG);
set_application_behavior(_instance, _handle, log_msg->a_stream); set_application_behavior(_instance, _handle, log_msg->a_stream);
for(i=0;i<log_msg->result_num; i++) for(i=0;i<log_msg->result_num; i++)
@@ -2179,7 +2185,6 @@ int tsg_send_log(struct tsg_log_instance_t *instance, struct TLD_handle_t *handl
TLD_delete(_handle, _instance->id2field[LOG_COMMON_SERVICE].name); TLD_delete(_handle, _instance->id2field[LOG_COMMON_SERVICE].name);
TLD_delete(_handle, _instance->id2field[LOG_COMMON_ACTION].name); TLD_delete(_handle, _instance->id2field[LOG_COMMON_ACTION].name);
TLD_delete(_handle, _instance->id2field[LOG_COMMON_USER_REGION].name); TLD_delete(_handle, _instance->id2field[LOG_COMMON_USER_REGION].name);
TLD_delete(_handle, _instance->id2field[LOG_COMMON_SUB_ACTION].name);
} }
TLD_cancel(handle); TLD_cancel(handle);

View File

@@ -129,6 +129,7 @@ typedef enum _tsg_log_field_id
LOG_DTLS_SNI, LOG_DTLS_SNI,
LOG_COMMON_TUNNELS_ENDPOINT_A_DESC, LOG_COMMON_TUNNELS_ENDPOINT_A_DESC,
LOG_COMMON_TUNNELS_ENDPOINT_B_DESC, LOG_COMMON_TUNNELS_ENDPOINT_B_DESC,
LOG_COMMON_TRAFFIC_VSYSTEM_ID,
LOG_COMMON_MAX LOG_COMMON_MAX
}tsg_log_field_id_t; }tsg_log_field_id_t;