checksum

package
v1.66.2 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Overview

Package checksum provides functions for updating checksums in parsed packets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateDstAddr

func UpdateDstAddr(q *packet.Parsed, dst netip.Addr)

UpdateDstAddr updates the destination address in the packet buffer (e.g. during DNAT). It also updates the checksum. Currently (2022-12-10) only TCP/UDP/ICMP is supported. It panics if provided with an address in a different family to the parsed packet.

func UpdateSrcAddr

func UpdateSrcAddr(q *packet.Parsed, src netip.Addr)

UpdateSrcAddr updates the source address in the packet buffer (e.g. during SNAT). It also updates the checksum. Currently (2023-09-22) only TCP/UDP/ICMP is supported. It panics if provided with an address in a different family to the parsed packet.

Types

This section is empty.

Jump to

Keyboard shortcuts

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