Skip to main content

parse_icmp_inner

Function parse_icmp_inner 

Source
fn parse_icmp_inner(
    icmp_packet: &ICMPPacket,
    m_id: u32,
    is_traceroute: bool,
    meta: ReplyMeta,
) -> Option<Reply>
Expand description

Parse ICMP ping packets into a Reply result (excluding the IP header).

§Arguments

  • icmp_packet - Unparsed ICMP packet
  • m_id - the ID of the current measurement
  • is_traceroute - whether this is a traceroute target ping reply
  • meta - received packet metadata (source address, TTL, kernel receive time)

§Returns

  • Option<Reply> - the received ping reply, None if invalid