summaryrefslogtreecommitdiff
path: root/plugin/business/doh/src/logger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/business/doh/src/logger.cpp')
-rw-r--r--plugin/business/doh/src/logger.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/plugin/business/doh/src/logger.cpp b/plugin/business/doh/src/logger.cpp
index 12d383a..50e2648 100644
--- a/plugin/business/doh/src/logger.cpp
+++ b/plugin/business/doh/src/logger.cpp
@@ -372,9 +372,9 @@ int doh_send_log(struct doh_conf *handle, const struct tfe_http_session *http, c
doh_get_integer_by_cmsg(common_obj, cmsg, TFE_CMSG_COMMON_DIRECTION, "direction");
}
- tfe_get_library_tags(stream, common_obj, TFE_CMSG_SRC_IP_TAGS_IDS_ARR, "client_ip_tags");
- tfe_get_library_tags(stream, common_obj, TFE_CMSG_DST_IP_TAGS_IDS_ARR, "server_ip_tags");
- tfe_get_library_tags(stream, common_obj, TFE_CMSG_FQDN_TAGS_IDS_ARR, "server_fqdn_tags");
+ tfe_get_library_tags(stream, common_obj, TFE_CMSG_SRC_IP_TAGS_IDS_ARR, "source_ip_tags");
+ tfe_get_library_tags(stream, common_obj, TFE_CMSG_DST_IP_TAGS_IDS_ARR, "destination_ip_tags");
+ tfe_get_library_tags(stream, common_obj, TFE_CMSG_FQDN_TAGS_IDS_ARR, "destination_fqdn_tags");
if (http->req)
{
@@ -400,19 +400,19 @@ int doh_send_log(struct doh_conf *handle, const struct tfe_http_session *http, c
cJSON_AddNumberToObject(common_obj, "address_type", 4);
inet_ntop(AF_INET, &addr->tuple4_v4->saddr, src_ip_str, sizeof(src_ip_str));
inet_ntop(AF_INET, &addr->tuple4_v4->daddr, dst_ip_str, sizeof(dst_ip_str));
- cJSON_AddStringToObject(common_obj, "client_ip", src_ip_str);
- cJSON_AddStringToObject(common_obj, "server_ip", dst_ip_str);
- cJSON_AddNumberToObject(common_obj, "client_port", ntohs(addr->tuple4_v4->source));
- cJSON_AddNumberToObject(common_obj, "server_port", ntohs(addr->tuple4_v4->dest));
+ cJSON_AddStringToObject(common_obj, "source_ip", src_ip_str);
+ cJSON_AddStringToObject(common_obj, "destination_ip", dst_ip_str);
+ cJSON_AddNumberToObject(common_obj, "source_port", ntohs(addr->tuple4_v4->source));
+ cJSON_AddNumberToObject(common_obj, "destination_port", ntohs(addr->tuple4_v4->dest));
break;
case TFE_ADDR_STREAM_TUPLE4_V6:
cJSON_AddNumberToObject(common_obj, "address_type", 6);
inet_ntop(AF_INET6, &addr->tuple4_v6->saddr, src_ip_str, sizeof(src_ip_str));
inet_ntop(AF_INET6, &addr->tuple4_v6->daddr, dst_ip_str, sizeof(dst_ip_str));
- cJSON_AddStringToObject(common_obj, "client_ip", src_ip_str);
- cJSON_AddStringToObject(common_obj, "server_ip", dst_ip_str);
- cJSON_AddNumberToObject(common_obj, "client_port", ntohs(addr->tuple4_v6->source));
- cJSON_AddNumberToObject(common_obj, "server_port", ntohs(addr->tuple4_v6->dest));
+ cJSON_AddStringToObject(common_obj, "source_ip", src_ip_str);
+ cJSON_AddStringToObject(common_obj, "destination_ip", dst_ip_str);
+ cJSON_AddNumberToObject(common_obj, "source_port", ntohs(addr->tuple4_v6->source));
+ cJSON_AddNumberToObject(common_obj, "destination_port", ntohs(addr->tuple4_v6->dest));
break;
default:
break;