tschecksum

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2025 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checksum

func Checksum(data []byte, initial uint16) uint16

Checksum computes an IP checksum starting with the provided initial value. The length of data should be at least 128 bytes for best performance. Smaller buffers will still compute a correct result.

func PseudoHeaderChecksum

func PseudoHeaderChecksum(protocol uint8, srcAddr, dstAddr []byte, totalLen uint16) uint16

PseudoHeaderChecksum computes an IP pseudo-header checksum. srcAddr and dstAddr must be 4 or 16 bytes in length.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL