pub fn calculate_checksum(buffer: &[u8], pseudo_header: &PseudoHeader) -> u16Expand description
Calculate the checksum for a UDP/TCP packet.
ยงArguments
buffer- the UDP/TCP packet as bytes (without the IP header)pseudo_header- the pseudo header for this packet (IPv4 or IPv6)