rename layer_type to layer_proto

This commit is contained in:
luwenpeng
2024-06-12 18:21:45 +08:00
parent 10528bcfd3
commit 01958b56c5
20 changed files with 437 additions and 1049 deletions

View File

@@ -302,7 +302,7 @@ static inline void ip_frag_hdr_init(struct ip_frag_hdr *hdr, const struct packet
{
struct packet_layer *layer = pkt->frag_layer;
if (layer->type == LAYER_TYPE_IPV6)
if (layer->type == LAYER_PROTO_IPV6)
{
struct ip6_frag *frag_ext = ipv6_hdr_get_frag_ext((const struct ip6_hdr *)layer->hdr_ptr);
hdr->next_proto = frag_ext->ip6f_nxt;
@@ -865,7 +865,7 @@ struct packet *ip_reassembly_packet(struct ip_reassembly *assy, const struct pac
return NULL;
}
if (layer->type == LAYER_TYPE_IPV4)
if (layer->type == LAYER_PROTO_IPV4)
{
pkt1 = ipv4_reassembly_packet(assy, pkt, now);
if (pkt1 && pkt1->frag_layer)
@@ -877,7 +877,7 @@ struct packet *ip_reassembly_packet(struct ip_reassembly *assy, const struct pac
return pkt1;
}
else if (layer->type == LAYER_TYPE_IPV6)
else if (layer->type == LAYER_PROTO_IPV6)
{
pkt1 = ipv6_reassembly_packet(assy, pkt, now);
if (pkt1 && pkt1->frag_layer)