common

package
v0.0.0-...-c1fdb11 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package common provides common functions for Geneva.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateIPv4Checksum

func CalculateIPv4Checksum(bytes []byte) uint16

CalculateIPv4Checksum calculates the IPv4 checksum for the given bytes. copied from gopacket/layers/ip4.go because they didn't export one. for whatever some reason..

func UpdateIPv4Checksum

func UpdateIPv4Checksum(ip *layers.IPv4)

UpdateIPv4Checksum updates the IPv4 checksum field and the raw bytes for a gopacket IPv4 layer.

func UpdateTCPChecksum

func UpdateTCPChecksum(tcp *layers.TCP)

UpdateTCPChecksum updates the TCP checksum field and the raw bytes for a gopacket TCP layer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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