defaults

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: BSD-3-Clause, GPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package defaults contains default settings for the netcap core.

Index

Constants

View Source
const (
	// BufferSize is the size for memory buffering before feeding data into compressor.
	BufferSize = 64 * 1024 // Per-decoder buffer; all enabled writers allocate one.

	// PacketBuffer is the size of the channel for feeding packets into workers.
	PacketBuffer = 1000

	// SnapLen is the default length for an ethernet frame:
	// 1500 Ethernet MTU + 14 bytes Ethernet header.
	SnapLen = 1514

	// ConnFlushInterval configures how often the connections are flushed for Flow and Connection audit record generation.
	// TODO: refactor to flush periodically, instead of every n packets?
	ConnFlushInterval = 1000

	// FlowFlushInterval configures how often the connections are flushed for Flow and Connection audit record generation.
	// TODO: refactor to flush periodically, instead of every n packets?
	FlowFlushInterval = 1000

	// ConnTimeOut will be used to set age threshold if the corresponding FlushInterval > 0.
	ConnTimeOut = 24 * time.Hour

	// FlowTimeOut will be used to set age threshold if the corresponding FlushInterval > 0.
	FlowTimeOut = 24 * time.Hour

	// CompressionBlockSize is the block size used for parallel compression.
	CompressionBlockSize = 1024 * 1024 * 1 // 1 MB

	// CompressionLevel is the compression level to use by default.
	CompressionLevel = flate.BestSpeed

	// ReassemblyTimeout How long to wait for remaining open streams to close, before initiating teardown.
	ReassemblyTimeout = 1 * time.Second

	// FlushEvery TODO: refactor to flush periodically, instead of every n packets?
	// controls how often collected reassembly data is flushed to consumers.
	FlushEvery = 100

	// ClosePendingTimeout Close streams with pending bytes after.
	ClosePendingTimeout = 24 * time.Hour

	// CloseInactiveTimeout Close inactive streams after.
	CloseInactiveTimeout = 24 * time.Hour

	// AllowMissingInit TCP State Machine.
	AllowMissingInit = true

	// DefragIPv4 controls defragmentation for IPv4.
	DefragIPv4 = true

	// NoOptCheck controls TCP option checking for the reassembly state machine.
	NoOptCheck = true

	// Checksum controls whether the TCP checksum shall be validated.
	Checksum = false

	// IgnoreFSMErr controls if TCP state machine errors should be ignored.
	IgnoreFSMErr = true

	// FileStorage is the default location for storing extracted files.
	FileStorage = "files"

	// DirectoryPermission for all created folders.
	DirectoryPermission = 0o777

	// FilePermission for all created files.
	FilePermission = 0o600

	// FileExtension of uncompressed netcap files.
	FileExtension = ".ncap"

	// FileExtensionCompressed of gzipped netcap files.
	FileExtensionCompressed = ".ncap.gz"

	// ElasticLimitTotalFields is the maximum number of fields allowed per batch of audit records.
	ElasticLimitTotalFields = 1000000

	// NetcapTypePrefix holds the prefix for the protobuf types
	NetcapTypePrefix = "NC_"
)

Variables

This section is empty.

Functions

func CaptureWorkers added in v0.15.4

func CaptureWorkers() int

Types

This section is empty.

Jump to

Keyboard shortcuts

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