packet_formats::testutil

Function verify_ipv4_packet

Source
pub fn verify_ipv4_packet(
    packet: &Ipv4Packet<&[u8]>,
    expected: TestPacket<Ipv4PacketMetadata>,
)
Expand description

Verify that a parsed IPv4 packet is as expected.

Ensures the parsed packet’s header fields and body are equal to those in the test packet.