packet_formats::testutil

Function overwrite_icmpv6_checksum

Source
pub fn overwrite_icmpv6_checksum(
    buf: &mut [u8],
    checksum: [u8; 2],
) -> ParseResult<[u8; 2]>
Expand description

Overwrite the checksum in an ICMPv6 message, returning the original value.

On Err, the provided buf is unmodified.