[][src]Module pnet_packet::util

Utilities for working with packets, eg. checksumming

Traits

Octets

Convert value to byte array

Functions

checksum

Calculates a checksum. Used by ipv4 and icmp. The two bytes starting at skipword * 2 will be ignored. Supposed to be the checksum field, which is regarded as zero during calculation.

ipv4_checksum

Calculate the checksum for a packet built on IPv4. Used by udp and tcp.

ipv6_checksum

Calculate the checksum for a packet built on IPv6