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

@@ -68,6 +68,7 @@ TEST(UDP_OVERLOAD, EVICT_OLD_SESS)
// C2S REQ Packet
printf("\n=> Packet Parse: UDP C2S REQ packet\n");
memset(&pkt, 0, sizeof(pkt));
packet_parse(&pkt, (const char *)udp_pkt1_dns_req, sizeof(udp_pkt1_dns_req));
printf("<= Packet Parse: done\n\n");
@@ -156,6 +157,7 @@ TEST(UDP_OVERLOAD, EVICT_NEW_SESS)
// C2S REQ Packet
printf("\n=> Packet Parse: UDP C2S REQ packet\n");
memset(&pkt, 0, sizeof(pkt));
packet_parse(&pkt, (const char *)udp_pkt1_dns_req, sizeof(udp_pkt1_dns_req));
printf("<= Packet Parse: done\n\n");