Function pnet_packet::tcp::ipv6_checksum_adv
source · pub fn ipv6_checksum_adv(
packet: &TcpPacket<'_>,
extra_data: &[u8],
source: &Ipv6Addr,
destination: &Ipv6Addr
) -> u16
Expand description
Calculate the checksum for a packet built on IPv6, Advanced version which accepts an extra slice of data that will be included in the checksum as being part of the data portion of the packet.
If packet
contains an odd number of bytes the last byte will not be
counted as the first byte of a word together with the first byte of
extra_data
.