Skip to main content

Module checksum

Module checksum 

Source
Expand description

Checksum calculation and verification utilities.

Provides generic RFC 1071 Internet checksum implementation that can be used by all protocol layers (IP, ICMP, TCP, UDP, etc.).

Functionsยง

finalize_checksum
Finalize a partial checksum.
internet_checksum
Calculate the Internet checksum (RFC 1071).
partial_checksum
Compute partial checksum (before folding and complement).
transport_checksum
Calculate checksum with pseudo-header (for TCP/UDP).
verify_checksum
Verify a checksum is valid (should be 0 or 0xFFFF when calculated over data with checksum).