refactor: rename struct raw_layer to struct layer_private

This commit is contained in:
luwenpeng
2024-08-21 11:17:25 +08:00
parent ee612d73c9
commit 1aece166cd
20 changed files with 268 additions and 268 deletions

View File

@@ -607,7 +607,7 @@ TEST(IPV6_REASSEMBLE, NORMAL)
{
struct packet pkt;
struct packet *new_pkt;
const struct raw_layer *layer;
const struct layer_private *layer;
struct ip_reassembly *assy;
struct ip_reassembly_options opts = {
.enable = true,
@@ -680,7 +680,7 @@ TEST(IPV6_REASSEMBLE, NORMAL)
EXPECT_TRUE(memcmp(new_pkt->data_ptr, expect, new_pkt->data_len) == 0);
// check IPv6
layer = packet_get_innermost_raw_layer(new_pkt, LAYER_PROTO_IPV6);
layer = packet_get_innermost_layer(new_pkt, LAYER_PROTO_IPV6);
EXPECT_TRUE(layer);
struct ip6_hdr *hdr = (struct ip6_hdr *)layer->hdr_ptr;
EXPECT_TRUE(ip6_hdr_get_version(hdr) == 6);
@@ -700,7 +700,7 @@ TEST(IPV6_REASSEMBLE, NORMAL)
EXPECT_TRUE(ip6_hdr_get_frag_ext(hdr) == NULL);
// check UDP
layer = packet_get_innermost_raw_layer(new_pkt, LAYER_PROTO_UDP);
layer = packet_get_innermost_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);
@@ -773,7 +773,7 @@ TEST(IPV6_REASSEMBLE, DUP_FIRST_FRAG)
{
struct packet pkt;
struct packet *new_pkt;
const struct raw_layer *layer;
const struct layer_private *layer;
struct ip_reassembly *assy;
struct ip_reassembly_options opts = {
.enable = true,
@@ -858,7 +858,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_raw_layer(new_pkt, LAYER_PROTO_IPV6);
layer = packet_get_innermost_layer(new_pkt, LAYER_PROTO_IPV6);
EXPECT_TRUE(layer);
struct ip6_hdr *hdr = (struct ip6_hdr *)layer->hdr_ptr;
EXPECT_TRUE(ip6_hdr_get_version(hdr) == 6);
@@ -878,7 +878,7 @@ TEST(IPV6_REASSEMBLE, DUP_FIRST_FRAG)
EXPECT_TRUE(ip6_hdr_get_frag_ext(hdr) == NULL);
// check UDP
layer = packet_get_innermost_raw_layer(new_pkt, LAYER_PROTO_UDP);
layer = packet_get_innermost_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);
@@ -898,7 +898,7 @@ TEST(IPV6_REASSEMBLE, DUP_LAST_FRAG)
{
struct packet pkt;
struct packet *new_pkt;
const struct raw_layer *layer;
const struct layer_private *layer;
struct ip_reassembly *assy;
struct ip_reassembly_options opts = {
.enable = true,
@@ -983,7 +983,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_raw_layer(new_pkt, LAYER_PROTO_IPV6);
layer = packet_get_innermost_layer(new_pkt, LAYER_PROTO_IPV6);
EXPECT_TRUE(layer);
struct ip6_hdr *hdr = (struct ip6_hdr *)layer->hdr_ptr;
EXPECT_TRUE(ip6_hdr_get_version(hdr) == 6);
@@ -1003,7 +1003,7 @@ TEST(IPV6_REASSEMBLE, DUP_LAST_FRAG)
EXPECT_TRUE(ip6_hdr_get_frag_ext(hdr) == NULL);
// check UDP
layer = packet_get_innermost_raw_layer(new_pkt, LAYER_PROTO_UDP);
layer = packet_get_innermost_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);