netlink

package
v0.0.0-...-dca2ff9 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: Apache-2.0, Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NtohsU16

func NtohsU16(n uint16) uint16

NtohsU16 converts an unsigned int16 from network order to host order

Types

type Conntracker

type Conntracker interface {
	GetTranslationForConn(ip util.Address, port uint16, transport process.ConnectionType) *IPTranslation
	ClearShortLived()
	GetStats() map[string]int64
	Close()
}

Conntracker is a wrapper around go-conntracker that keeps a record of all connections in user space

func NewConntracker

func NewConntracker(procRoot string, deleteBufferSize, maxStateSize int) (Conntracker, error)

NewConntracker creates a new conntracker with a short term buffer capped at the given size

func NewNoOpConntracker

func NewNoOpConntracker() Conntracker

NewNoOpConntracker creates a conntracker which always returns empty information

type IPTranslation

type IPTranslation struct {
	ReplSrcIP   util.Address
	ReplDstIP   util.Address
	ReplSrcPort uint16
	ReplDstPort uint16
}

IPTranslation can be associated with a connection to show show the connection is NAT'd

Jump to

Keyboard shortcuts

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