conntrack

package
v0.12.8 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CiliumAvailable added in v0.4.0

func CiliumAvailable(mode string) bool

func InitNetfilterAccounting added in v0.11.0

func InitNetfilterAccounting() error

func ProtoString

func ProtoString(p uint8) string

Types

type Client

type Client interface {
	ListEntries(filter EntriesFilter) ([]*Entry, error)
	Close() error
}

func NewCiliumClient

func NewCiliumClient(log logrus.FieldLogger, clockSource ClockSource) (Client, error)

func NewNetfilterClient

func NewNetfilterClient(log logrus.FieldLogger, hostPid bool) (Client, error)

type ClockSource added in v0.7.0

type ClockSource string
const (
	ClockSourceKtime   ClockSource = "ktime"
	ClockSourceJiffies ClockSource = "jiffies"
)

type EntriesFilter

type EntriesFilter func(e *Entry) bool

func All

func All() EntriesFilter

func FilterBySrcIP added in v0.5.0

func FilterBySrcIP(ips map[netaddr.IP]struct{}) EntriesFilter

type Entry

type Entry struct {
	Src       netaddr.IPPort
	Dst       netaddr.IPPort
	TxBytes   uint64
	TxPackets uint64
	RxBytes   uint64
	RxPackets uint64
	Lifetime  time.Time
	Proto     uint8
}

Jump to

Keyboard shortcuts

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