libpacket::tcp

Function ipv4_checksum

Source
pub fn ipv4_checksum(
    packet: &TcpPacket<'_>,
    source: &Ipv4Addr,
    destination: &Ipv4Addr,
) -> u16
Expand description

Calculate a checksum for a packet built on IPv4.