TSG-13837 支持decrypted traffic steering/mirroring,并重构packet_io

This commit is contained in:
luwenpeng
2023-03-14 16:10:44 +08:00
parent 29755f2162
commit 0e85d3c9c5
26 changed files with 1960 additions and 1941 deletions

View File

@@ -48,10 +48,10 @@ TEST(STREAM_TABLE, SEARCH_BY_ID)
struct session_node *node = NULL;
node = session_table_search_by_id(table, 1);
EXPECT_TRUE(node != nullptr);
EXPECT_STREQ((const char *)node->val_data, "HELLO");
EXPECT_STREQ((const char *)node->value, "HELLO");
node = session_table_search_by_id(table, 2);
EXPECT_TRUE(node != nullptr);
EXPECT_STREQ((const char *)node->val_data, "WORLD");
EXPECT_STREQ((const char *)node->value, "WORLD");
node = session_table_search_by_id(table, 3);
EXPECT_TRUE(node == nullptr);
@@ -80,10 +80,10 @@ TEST(STREAM_TABLE, SEARCH_BY_ADDR)
struct session_node *node = NULL;
node = session_table_search_by_addr(table, &addr1);
EXPECT_TRUE(node != nullptr);
EXPECT_STREQ((const char *)node->val_data, "HELLO");
EXPECT_STREQ((const char *)node->value, "HELLO");
node = session_table_search_by_addr(table, &addr2);
EXPECT_TRUE(node != nullptr);
EXPECT_STREQ((const char *)node->val_data, "WORLD");
EXPECT_STREQ((const char *)node->value, "WORLD");
node = session_table_search_by_addr(table, &addr3);
EXPECT_TRUE(node == nullptr);
@@ -115,10 +115,10 @@ TEST(STREAM_TABLE, SEARCH_BY_REVERSE_ADDR)
struct session_node *node = NULL;
node = session_table_search_by_addr(table, &addr1_reverse);
EXPECT_TRUE(node != nullptr);
EXPECT_STREQ((const char *)node->val_data, "HELLO");
EXPECT_STREQ((const char *)node->value, "HELLO");
node = session_table_search_by_addr(table, &addr2_reverse);
EXPECT_TRUE(node != nullptr);
EXPECT_STREQ((const char *)node->val_data, "WORLD");
EXPECT_STREQ((const char *)node->value, "WORLD");
// TEST Destory
session_table_destory(table);