Function pnet::packet::ipv4::checksum

source ยท
pub fn checksum(packet: &Ipv4Packet<'_>) -> u16
Expand description

Calculates a checksum of an IPv4 packet header. The checksum field of the packet is regarded as zeros during the calculation.