Function parse_echo_reply

Source
pub fn parse_echo_reply(
    icmp_reply_body: &[u8],
) -> Option<(EchoId, EchoSeq, &[u8])>
Expand description

Parse the body of an echo reply message into (ident, seq, data).

Since ICMPv4 and ICMPv6 share the same Echo Reply format, this works for either.

This should only be used on ICMP message bodies of the appropriate type (IcmpV4MsgType::EchoReply or IcmpV6MsgType::EchoReply, as appropiriate) and code (0) as per the relevant RFCs.