conntrack

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

package conntrack implements a conntrack plugin for Retina.

package conntrack provides the bpf code implementation for conntrack on Linux and the userspace garbage collector program for the conntrack map.

Index

Constants

View Source
const (
	TCP_FIN = 0x01 // nolint:revive // Acceptable as flag
	TCP_SYN = 0x02 // nolint:revive // Acceptable as flag
	TCP_RST = 0x04 // nolint:revive // Acceptable as flag
	TCP_PSH = 0x08 // nolint:revive // Acceptable as flag
	TCP_ACK = 0x10 // nolint:revive // Acceptable as flag
	TCP_URG = 0x20 // nolint:revive // Acceptable as flag
	TCP_ECE = 0x40 // nolint:revive // Acceptable as flag
	TCP_CWR = 0x80 // nolint:revive // Acceptable as flag
)

Define TCP flag constants

Variables

This section is empty.

Functions

func BuildDynamicHeaderPath added in v0.0.21

func BuildDynamicHeaderPath() string

Build dynamic header path

func GenerateDynamic added in v0.0.21

func GenerateDynamic(ctx context.Context, dynamicHeaderPath string, conntrackMetrics int) error

Generate dynamic header file for conntrack eBPF program.

func Init

func Init() error

Init initializes the conntrack eBPF map in the kernel for the first time. This function should be called in the init container since it requires securityContext.privileged to be true.

Types

type Conntrack

type Conntrack struct {
	// contains filtered or unexported fields
}

func New

func New() (*Conntrack, error)

New returns a new Conntrack instance.

func (*Conntrack) Run

func (ct *Conntrack) Run(ctx context.Context) error

Run starts the Conntrack garbage collection loop.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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