From b696e82879bcecc4559cf9828e00232ca7cc6541 Mon Sep 17 00:00:00 2001 From: 刘学利 Date: Mon, 3 Apr 2023 08:30:49 +0000 Subject: TSG-13778 TSG master支持MAAT4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/src/gtest_sendlog.cpp | 103 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 97 insertions(+), 6 deletions(-) (limited to 'test/src/gtest_sendlog.cpp') diff --git a/test/src/gtest_sendlog.cpp b/test/src/gtest_sendlog.cpp index e87d876..2e5b3dd 100644 --- a/test/src/gtest_sendlog.cpp +++ b/test/src/gtest_sendlog.cpp @@ -2,37 +2,128 @@ #include #include +#include "tsg_rule.h" + #include "gtest_common.h" #include -int tsg_app_id2name(int app_id, char *app_name, int app_name_len, int is_joint_parent) +struct maat *g_tsg_maat_feather; + +char *tsg_device_tag_get(void) +{ + return NULL; +} + +char *tsg_data_center_get(void) +{ + return NULL; +} + +int tsg_location_type_get(void) { return 0; } -int tsg_get_location_type(void) +int tsg_session_record_switch_get(void) +{ + return 0; +} + +void *session_mac_linkinfo_get(const struct streaminfo * a_stream) +{ + return NULL; +} + +void *session_gather_app_results_get(const struct streaminfo * a_stream) +{ + return NULL; +} + +void *session_conn_sketch_notify_data_get(const struct streaminfo * a_stream) +{ + return NULL; +} + +void *session_business_data_get(const struct streaminfo * a_stream) +{ + return NULL; +} + +void *session_session_flags_get(const struct streaminfo * a_stream) +{ + return NULL; +} + +void *session_application_behavior_get(const struct streaminfo * a_stream) +{ + return NULL; +} + +void *session_mirrored_and_capture_packets_exec_result_get(const struct streaminfo * a_stream) +{ + return NULL; +} + +void *session_lua_user_defined_attribute_get(const struct streaminfo * a_stream) { - return 19; + return NULL; +} + +void *session_nat_c2s_linkinfo_get(const struct streaminfo * a_stream) +{ + return NULL; } -char *tsg_l7_protocol_id2name(unsigned int l7_protocol_id) +void *session_nat_s2c_linkinfo_get(const struct streaminfo * a_stream) { return NULL; } -char get_direction_from_tcpall(const struct streaminfo *a_stream) +int session_matched_rules_async(const struct streaminfo * a_stream, TSG_SERVICE service, void * data) { return 0; } +const struct matched_policy_rules *session_matched_rules_get(const struct streaminfo *a_stream, enum TSG_SERVICE service) +{ + return 0; +} + +void session_matched_rules_free(const struct streaminfo * a_stream, TSG_SERVICE service, void * data) +{ +} + +char srt_action_context_get_direction(const struct streaminfo * a_stream) +{ + return 0; +} + +int tsg_get_app_name_by_id(struct maat *feahter, int app_id, char * app_name, int app_name_len, int is_joint_parent) +{ + return 0; +} + +const struct session_runtime_attribute *session_runtime_attribute_get(const struct streaminfo * a_stream) +{ + return NULL; +} + +void *matched_rule_cites_security_compile(struct maat * feather, long long compile_id) +{ + return NULL; +} + +void plugin_ex_data_security_compile_free(struct maat_compile * maat_compile) +{ +} + TEST(MasterTest, SetVlan) { //int ret=set_vlan(NULL, NULL, NULL, 0, NULL, LOG_COMMON_TUNNELS_VLAN_SRC_ID); //EXPECT_EQ(1, ret); } - int main(int argc, char *argv[]) { testing::InitGoogleTest(&argc, argv); -- cgit v1.2.3