Module pnet::util

source · []
Expand description

Miscellaneous utilities for low-level networking.

Re-exports

pub use pnet_base::core_net;

Structs

A MAC address.

Enums

Represents an error which occurred whilst parsing a MAC address.

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.