rename struct packet_layer to struct raw_layer

This commit is contained in:
luwenpeng
2024-06-14 10:48:11 +08:00
parent 020c8303c6
commit 1f78881cbb
20 changed files with 251 additions and 251 deletions

View File

@@ -607,7 +607,7 @@ TEST(IPV6_REASSEMBLE, NORMAL)
{
struct packet pkt;
struct packet *new_pkt;
const struct packet_layer *layer;
const struct raw_layer *layer;
struct ip_reassembly *assy;
struct ip_reassembly_options opts = {
.enable = true,
@@ -676,7 +676,7 @@ TEST(IPV6_REASSEMBLE, NORMAL)
EXPECT_TRUE(memcmp(new_pkt->data_ptr, expect, new_pkt->data_len) == 0);
// check IPv6
layer = packet_get_innermost_layer(new_pkt, LAYER_PROTO_IPV6);
layer = packet_get_innermost_raw_layer(new_pkt, LAYER_PROTO_IPV6);
EXPECT_TRUE(layer);
struct ip6_hdr *hdr = (struct ip6_hdr *)layer->hdr_ptr;
EXPECT_TRUE(ipv6_hdr_get_version(hdr) == 6);
@@ -696,7 +696,7 @@ TEST(IPV6_REASSEMBLE, NORMAL)
EXPECT_TRUE(ipv6_hdr_get_frag_ext(hdr) == NULL);
// check UDP
layer = packet_get_innermost_layer(new_pkt, LAYER_PROTO_UDP);
layer = packet_get_innermost_raw_layer(new_pkt, LAYER_PROTO_UDP);
EXPECT_TRUE(layer);
struct udphdr *udp_hdr = (struct udphdr *)layer->hdr_ptr;
EXPECT_TRUE(udp_hdr_get_src_port(udp_hdr) == 6363);
@@ -767,7 +767,7 @@ TEST(IPV6_REASSEMBLE, DUP_FIRST_FRAG)
{
struct packet pkt;
struct packet *new_pkt;
const struct packet_layer *layer;
const struct raw_layer *layer;
struct ip_reassembly *assy;
struct ip_reassembly_options opts = {
.enable = true,
@@ -847,7 +847,7 @@ TEST(IPV6_REASSEMBLE, DUP_FIRST_FRAG)
EXPECT_TRUE(memcmp(new_pkt->data_ptr, expect, new_pkt->data_len) == 0);
// check IPv6
layer = packet_get_innermost_layer(new_pkt, LAYER_PROTO_IPV6);
layer = packet_get_innermost_raw_layer(new_pkt, LAYER_PROTO_IPV6);
EXPECT_TRUE(layer);
struct ip6_hdr *hdr = (struct ip6_hdr *)layer->hdr_ptr;
EXPECT_TRUE(ipv6_hdr_get_version(hdr) == 6);
@@ -867,7 +867,7 @@ TEST(IPV6_REASSEMBLE, DUP_FIRST_FRAG)
EXPECT_TRUE(ipv6_hdr_get_frag_ext(hdr) == NULL);
// check UDP
layer = packet_get_innermost_layer(new_pkt, LAYER_PROTO_UDP);
layer = packet_get_innermost_raw_layer(new_pkt, LAYER_PROTO_UDP);
EXPECT_TRUE(layer);
struct udphdr *udp_hdr = (struct udphdr *)layer->hdr_ptr;
EXPECT_TRUE(udp_hdr_get_src_port(udp_hdr) == 6363);
@@ -887,7 +887,7 @@ TEST(IPV6_REASSEMBLE, DUP_LAST_FRAG)
{
struct packet pkt;
struct packet *new_pkt;
const struct packet_layer *layer;
const struct raw_layer *layer;
struct ip_reassembly *assy;
struct ip_reassembly_options opts = {
.enable = true,
@@ -967,7 +967,7 @@ TEST(IPV6_REASSEMBLE, DUP_LAST_FRAG)
EXPECT_TRUE(memcmp(new_pkt->data_ptr, expect, new_pkt->data_len) == 0);
// check IPv6
layer = packet_get_innermost_layer(new_pkt, LAYER_PROTO_IPV6);
layer = packet_get_innermost_raw_layer(new_pkt, LAYER_PROTO_IPV6);
EXPECT_TRUE(layer);
struct ip6_hdr *hdr = (struct ip6_hdr *)layer->hdr_ptr;
EXPECT_TRUE(ipv6_hdr_get_version(hdr) == 6);
@@ -987,7 +987,7 @@ TEST(IPV6_REASSEMBLE, DUP_LAST_FRAG)
EXPECT_TRUE(ipv6_hdr_get_frag_ext(hdr) == NULL);
// check UDP
layer = packet_get_innermost_layer(new_pkt, LAYER_PROTO_UDP);
layer = packet_get_innermost_raw_layer(new_pkt, LAYER_PROTO_UDP);
EXPECT_TRUE(layer);
struct udphdr *udp_hdr = (struct udphdr *)layer->hdr_ptr;
EXPECT_TRUE(udp_hdr_get_src_port(udp_hdr) == 6363);