Refactored packet API to support struct layer (using union to contain different types of encapsulation headers)

This commit is contained in:
luwenpeng
2024-06-14 19:24:27 +08:00
parent 1f78881cbb
commit de4c15f43c
47 changed files with 834 additions and 701 deletions

View File

@@ -67,6 +67,7 @@ TEST(TCP_OVERLOAD, EVICT_OLD_SESS)
// C2S SYN Packet
printf("\n=> Packet Parse: TCP C2S SYN packet\n");
memset(&pkt, 0, sizeof(pkt));
packet_parse(&pkt, (const char *)tcp_pkt1_c2s_syn, sizeof(tcp_pkt1_c2s_syn));
printf("<= Packet Parse: done\n\n");
@@ -107,6 +108,7 @@ TEST(TCP_OVERLOAD, EVICT_NEW_SESS)
// C2S SYN Packet
printf("\n=> Packet Parse: TCP C2S SYN packet\n");
memset(&pkt, 0, sizeof(pkt));
packet_parse(&pkt, (const char *)tcp_pkt1_c2s_syn, sizeof(tcp_pkt1_c2s_syn));
printf("<= Packet Parse: done\n\n");