flowhash

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(ipPacket []byte) uint16

FlowHash computes a symmetric flow hash for the given Ethernet type and data. It returns a 32-bit hash value based on the source and destination IP addresses, source and destination ports (for TCP/UDP), and the protocol number for other protocols. If the data is invalid or the Ethernet type is unsupported, it returns 0.

func MapToEphemeralPort added in v0.17.0

func MapToEphemeralPort(hash uint16) uint16

MapToEphemeralPort maps a given hash value to the ephemeral port range (49152-65535).

Types

This section is empty.

Jump to

Keyboard shortcuts

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