packet_formats::testutil

Function parse_ip_packet_in_ethernet_frame

Source
pub fn parse_ip_packet_in_ethernet_frame<I: IpExt>(
    buf: &[u8],
    ethernet_length_check: EthernetFrameLengthCheck,
) -> IpParseResult<I, (&[u8], Mac, Mac, I::Addr, I::Addr, I::Proto, u8)>
Expand description

Parse an IP packet in an Ethernet frame.

parse_ip_packet_in_ethernet_frame parses an IP packet in an Ethernet frame, returning the body of the IP packet along with some important fields from both the IP and Ethernet headers.