tcp

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: BSD-3-Clause, GPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StreamFactory = newStreamFactory()

StreamFactory is a structure that manages TCP stream reassembly

Functions

func CleanupReassembly

func CleanupReassembly(wait bool, assemblers []*reassembly.Assembler)

CleanupReassembly will shutdown the reassembly.

func CloseStreamReaderChannelsAndWait added in v0.7.6

func CloseStreamReaderChannelsAndWait()

CloseStreamReaderChannelsAndWait closes all TCP stream reader channels and waits for goroutines to finish. This MUST be called BEFORE closing log files to avoid write errors. CRITICAL: Each TCP connection spawns 2 goroutines (client + server) that run tcpStreamReader.Run() These goroutines must be properly shut down before log files are closed.

func GetStreamPool

func GetStreamPool() *reassembly.StreamPool

GetStreamPool returns the stream pool.

func NumSavedTCPConns

func NumSavedTCPConns() int64

NumSavedTCPConns returns the number of saved TCP connections.

func ReassemblePacket

func ReassemblePacket(packet gopacket.Packet, assembler *reassembly.Assembler)

ReassemblePacket takes care of submitting a TCP / UDP packet to the reassembly.

func ResetStreamFactory added in v0.7.5

func ResetStreamFactory()

ResetStreamFactory creates a new stream factory to clear all stream state. This should be called when resetting state between processing different files. CRITICAL: This explicitly resets the old StreamPool to release backing arrays before creating a new factory, preventing memory leaks.

func SetLogger

func SetLogger(l *zap.Logger)

SetLogger sets the logger instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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