summaryrefslogtreecommitdiff
path: root/src/tsg_rule.cpp
diff options
context:
space:
mode:
authoryangwei <[email protected]>2023-04-14 15:34:03 +0800
committeryangwei <[email protected]>2023-04-14 15:34:03 +0800
commit36d5c3061e6744bafe7d7eeecbd1f487339d8ad1 (patch)
tree2d2a064d89db895b93fb06411f34a028234fd8fc /src/tsg_rule.cpp
parentb31278b7cda764e257ea3bad58f1da5eb8f8f528 (diff)
🦄 refactor(maat scan log): 记录mid地址,用于比对多句柄多条件扫描结果
Diffstat (limited to 'src/tsg_rule.cpp')
-rw-r--r--src/tsg_rule.cpp35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp
index fc0a381..3966f53 100644
--- a/src/tsg_rule.cpp
+++ b/src/tsg_rule.cpp
@@ -2225,11 +2225,12 @@ size_t tsg_scan_integer(const struct streaminfo *a_stream, struct maat *feather,
MESA_handle_runtime_log(g_tsg_maat_rt_para.logger,
RLOG_LV_DEBUG,
"SCAN_INTEGER",
- "No hit: %lld: scan ret: %d table_name: %s addr: %s",
+ "No hit: %lld: scan ret: %d table_name: %s addr: %s, mid: %p",
s_integer,
is_hited,
g_tsg_maat_rt_para.scan_tb[idx].name,
- PRINTADDR(a_stream, g_tsg_maat_rt_para.level)
+ PRINTADDR(a_stream, g_tsg_maat_rt_para.level),
+ s_mid
);
return 0;
}
@@ -2247,11 +2248,12 @@ size_t tsg_scan_flags(const struct streaminfo *a_stream, struct maat *feather, u
MESA_handle_runtime_log(g_tsg_maat_rt_para.logger,
RLOG_LV_DEBUG,
"SCAN_FLAGS",
- "No hit: %llu scan ret: %d table_name: %s addr: %s",
+ "No hit: %llu scan ret: %d table_name: %s addr: %s, mid: %p",
flags,
is_hited,
g_tsg_maat_rt_para.scan_tb[idx].name,
- PRINTADDR(a_stream, g_tsg_maat_rt_para.level)
+ PRINTADDR(a_stream, g_tsg_maat_rt_para.level),
+ s_mid
);
return 0;
}
@@ -2269,12 +2271,13 @@ size_t tsg_scan_string(const struct streaminfo *a_stream, struct maat *feather,
MESA_handle_runtime_log(g_tsg_maat_rt_para.logger,
RLOG_LV_DEBUG,
"SCAN_STRING",
- "No hit: %s len: %lu scan ret: %d table_name: %s addr: %s",
+ "No hit: %s len: %lu scan ret: %d table_name: %s addr: %s, mid: %p",
s_data,
s_data_len,
is_hited,
g_tsg_maat_rt_para.scan_tb[idx].name,
- PRINTADDR(a_stream, g_tsg_maat_rt_para.level)
+ PRINTADDR(a_stream, g_tsg_maat_rt_para.level),
+ s_mid
);
return 0;
}
@@ -2323,10 +2326,11 @@ size_t tsg_scan_ipv4_address(const struct streaminfo *a_stream, struct maat *fea
MESA_handle_runtime_log(g_tsg_maat_rt_para.logger,
RLOG_LV_DEBUG,
"SCAN_IPV4",
- "Hit %s addr: %s return n_rules: %llu",
+ "Hit %s addr: %s return n_rules: %llu, mid: %p",
g_tsg_maat_rt_para.scan_tb[idx].name,
PRINTADDR(a_stream, g_tsg_maat_rt_para.level),
- n_matched_rules
+ n_matched_rules,
+ s_mid
);
return matche_rules_convert(feather, matched_rules, n_matched_rules, rules, n_rules);
}
@@ -2334,10 +2338,11 @@ size_t tsg_scan_ipv4_address(const struct streaminfo *a_stream, struct maat *fea
MESA_handle_runtime_log(g_tsg_maat_rt_para.logger,
RLOG_LV_DEBUG,
"SCAN_IPV4",
- "Not hit %s addr: %s Scan return: %d ",
+ "Not hit %s addr: %s Scan return: %d, mid: %p",
g_tsg_maat_rt_para.scan_tb[idx].name,
PRINTADDR(a_stream, g_tsg_maat_rt_para.level),
- is_hited
+ is_hited,
+ s_mid
);
return 0;
@@ -2372,10 +2377,11 @@ size_t tsg_scan_ipv6_address(const struct streaminfo *a_stream, struct maat *fea
MESA_handle_runtime_log(g_tsg_maat_rt_para.logger,
RLOG_LV_DEBUG,
"SCAN_IPV6",
- "Hit %s addr: %s return n_rules: %llu",
+ "Hit %s addr: %s return n_rules: %llu, mid: %p",
g_tsg_maat_rt_para.scan_tb[idx].name,
PRINTADDR(a_stream, g_tsg_maat_rt_para.level),
- n_matched_rules
+ n_matched_rules,
+ s_mid
);
return matche_rules_convert(feather, matched_rules, n_matched_rules, rules, n_rules);
}
@@ -2383,10 +2389,11 @@ size_t tsg_scan_ipv6_address(const struct streaminfo *a_stream, struct maat *fea
MESA_handle_runtime_log(g_tsg_maat_rt_para.logger,
RLOG_LV_DEBUG,
"SCAN_IPV6",
- "Not hit %s addr: %s Scan return: %d ",
+ "Not hit %s addr: %s Scan return: %d, mid: %p",
g_tsg_maat_rt_para.scan_tb[idx].name,
PRINTADDR(a_stream, g_tsg_maat_rt_para.level),
- is_hited
+ is_hited,
+ s_mid
);
return 0;