Module pnet_packet::util[][src]

Expand description

Utilities for working with packets, eg. checksumming.

Traits

Convert a value to a byte array.

Functions

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.

Calculate the checksum for a packet built on IPv4. Used by UDP and TCP.

Calculate the checksum for a packet built on IPv6.