Expand description
IPv4 header checksum calculation.
Implements RFC 1071 Internet checksum algorithm used for IPv4 headers. The checksum is computed lazily - only when the packet is serialized.
Re-exports§
pub use crate::utils::finalize_checksum;pub use crate::utils::partial_checksum;
Functions§
- incremental_
update_ checksum - Incrementally update a checksum when a 16-bit field changes.
- incremental_
update_ checksum_ 32 - Incrementally update checksum when a 32-bit field changes.
- ipv4_
checksum - Compute the Internet checksum (RFC 1071) over a byte slice.
- pseudo_
header_ checksum - Compute the pseudo-header checksum for TCP/UDP.
- read_
checksum - Read checksum from buffer at the specified offset.
- transport_
checksum - Compute complete transport layer checksum (TCP or UDP).
- verify_
ipv4_ checksum - Verify that a checksum is valid.
- write_
checksum - Write checksum to buffer at the specified offset.
- zero_
checksum - Zero out checksum field in a buffer at the specified offset.